From fa07bdb681f944a7382aa6ae26a28ce4980d9db0 Mon Sep 17 00:00:00 2001 From: pca006132 Date: Fri, 7 Aug 2020 15:10:38 +0800 Subject: [PATCH] libcortex_a9/mmu: share ocm3. This fixes issue #54. --- experiments/link.x | 8 ++++---- libcortex_a9/src/mmu.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/experiments/link.x b/experiments/link.x index 85d9784..0de13ff 100644 --- a/experiments/link.x +++ b/experiments/link.x @@ -32,23 +32,23 @@ SECTIONS *(.bss .bss.*); . = ALIGN(4); __bss_end = .; - } > OCM + } > OCM3 .stack1 (NOLOAD) : ALIGN(8) { __stack1_end = .; . += 0x200; __stack1_start = .; - } > OCM + } > OCM3 .stack0 (NOLOAD) : ALIGN(8) { __stack0_end = .; - . = ORIGIN(OCM) + LENGTH(OCM) - 8; + . = ORIGIN(OCM3) + LENGTH(OCM3) - 8; __stack0_start = .; /* unused heap0 to prevent the linker from complaining*/ __heap0_start = .; __heap0_end = .; - } > OCM + } > OCM3 /DISCARD/ : { diff --git a/libcortex_a9/src/mmu.rs b/libcortex_a9/src/mmu.rs index 151386b..9be0e4e 100644 --- a/libcortex_a9/src/mmu.rs +++ b/libcortex_a9/src/mmu.rs @@ -338,7 +338,7 @@ impl L1Table { /* 0xfff00000 - 0xffffffff (256K OCM when mapped to high address space) */ self.direct_mapped_section(0xfff, L1Section { global: true, - shareable: false, + shareable: true, access: AccessPermissions::FullAccess, tex: 0b100, domain: 0,