Skip to content

Commit

Permalink
[feat] Update DCCM size from 128 KB to 256 KB (#1838)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhatrevi authored Dec 9, 2024
1 parent 94875e3 commit 716d695
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions drivers/src/memory_layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub const ROM_RELAXATION_PADDING: u32 = 4 * 1024;
pub const ROM_SIZE: u32 = 96 * 1024;
pub const MBOX_SIZE: u32 = 128 * 1024;
pub const ICCM_SIZE: u32 = 128 * 1024;
pub const DCCM_SIZE: u32 = 128 * 1024;
pub const DCCM_SIZE: u32 = 256 * 1024;
pub const ROM_DATA_SIZE: u32 = 996;
pub const MAN1_SIZE: u32 = 8 * 1024;
pub const MAN2_SIZE: u32 = 8 * 1024;
Expand All @@ -79,7 +79,7 @@ pub const DPE_SIZE: u32 = 5 * 1024;
pub const PCR_RESET_COUNTER_SIZE: u32 = 1024;
pub const AUTH_MAN_IMAGE_METADATA_MAX_SIZE: u32 = 7 * 1024;
pub const IDEVID_CSR_SIZE: u32 = 1024;
pub const DATA_SIZE: u32 = 20 * 1024;
pub const DATA_SIZE: u32 = 148 * 1024;
pub const STACK_SIZE: u32 = 64 * 1024;
pub const ROM_STACK_SIZE: u32 = 14 * 1024;
pub const ESTACK_SIZE: u32 = 1024;
Expand Down
2 changes: 1 addition & 1 deletion hw-model/tests/model_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ fn test_uninitialized_dccm_read() {
);

const DCCM_ADDR: u32 = 0x5000_0000;
const DCCM_SIZE: u32 = 128 * 1024;
const DCCM_SIZE: u32 = 256 * 1024;

model.soc_ifc().cptra_rsvd_reg().at(0).write(|_| DCCM_ADDR);
model.soc_ifc().cptra_rsvd_reg().at(1).write(|_| DCCM_SIZE);
Expand Down
8 changes: 4 additions & 4 deletions rom/dev/src/rom.ld
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ ROM_ORG = 0x00000000;
ICCM_ORG = 0x40000000;
DCCM_ORG = 0x50000000;
DATA_ORG = 0x50000000;
STACK_ORG = 0x5001C000;
ESTACK_ORG = 0x5001F800;
NSTACK_ORG = 0x5001FC00;
STACK_ORG = 0x5003C000;
ESTACK_ORG = 0x5003F800;
NSTACK_ORG = 0x5003FC00;

CFI_STATE_ORG = 0x500003E4;

Expand All @@ -34,7 +34,7 @@ CFI_STATE_ORG = 0x500003E4;
ROM_RELAXATION_PADDING = 8k;
ROM_SIZE = 96K;
ICCM_SIZE = 128K;
DCCM_SIZE = 128K;
DCCM_SIZE = 256K;
DATA_SIZE = 996;
STACK_SIZE = 14K;
ESTACK_SIZE = 1K;
Expand Down
8 changes: 4 additions & 4 deletions rom/dev/tools/test-fmc/src/fmc.ld
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ ENTRY(_start)
ICCM_ORG = 0x40000000;
DCCM_ORG = 0x50000000;
DATA_ORG = 0x50004C00;
STACK_ORG = 0x5001C000;
ESTACK_ORG = 0x5001F800;
NSTACK_ORG = 0x5001FC00;
STACK_ORG = 0x5003C000;
ESTACK_ORG = 0x5003F800;
NSTACK_ORG = 0x5003FC00;

ICCM_SIZE = 16K;
DCCM_SIZE = 128K;
DCCM_SIZE = 256K;
DATA_SIZE = 93K;
STACK_SIZE = 14K;
ESTACK_SIZE = 1K;
Expand Down
8 changes: 4 additions & 4 deletions rom/dev/tools/test-rt/src/rt.ld
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ ENTRY(_start)
ICCM_ORG = 0x40004000; /* Range [0x40000000 - 0x40003FFF] is reserved for FMC */
DCCM_ORG = 0x50000000;
DATA_ORG = 0x50004C00;
STACK_ORG = 0x5001C000;
ESTACK_ORG = 0x5001F800;
NSTACK_ORG = 0x5001FC00;
STACK_ORG = 0x5003C000;
ESTACK_ORG = 0x5003F800;
NSTACK_ORG = 0x5003FC00;

ICCM_SIZE = 112K;
DCCM_SIZE = 128K;
DCCM_SIZE = 256K;
DATA_SIZE = 93K;
STACK_SIZE = 14K;
ESTACK_SIZE = 1K;
Expand Down
2 changes: 1 addition & 1 deletion sw-emulator/lib/cpu/src/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ impl<TBus: Bus> Cpu<TBus> {
const REDIRECT_ENTRY_SIZE: u32 = 4;
const MAX_IRQ: u32 = 32;
const DCCM_ORG: u32 = 0x5000_0000;
const DCCM_SIZE: u32 = 128 * 1024;
const DCCM_SIZE: u32 = 256 * 1024;

let vec_table = self.ext_int_vec;
if vec_table < DCCM_ORG || vec_table + MAX_IRQ * REDIRECT_ENTRY_SIZE > DCCM_ORG + DCCM_SIZE
Expand Down
2 changes: 1 addition & 1 deletion sw-emulator/lib/periph/src/root_bus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ pub struct CaliptraRootBus {
impl CaliptraRootBus {
pub const ROM_SIZE: usize = 96 * 1024;
pub const ICCM_SIZE: usize = 128 * 1024;
pub const DCCM_SIZE: usize = 128 * 1024;
pub const DCCM_SIZE: usize = 256 * 1024;

pub fn new(clock: &Clock, mut args: CaliptraRootBusArgs) -> Self {
let mut key_vault = KeyVault::new();
Expand Down

0 comments on commit 716d695

Please sign in to comment.