Skip to content

Commit e64cce9

Browse files
abonislawskikartben
authored andcommitted
soc: intel_adsp: ace30: set MMU permissions for rom_ext sections
This patch will set MMU permissions for rom_ext sections It is possible to call the rom_ext code located in IMR Signed-off-by: Adrian Bonislawski <[email protected]>
1 parent 368f6cf commit e64cce9

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

soc/intel/intel_adsp/ace/include/adsp_memory.h

+7
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@
6868
#define IMR_BOOT_LDR_STACK_BASE (IMR_BOOT_LDR_BSS_BASE + IMR_BOOT_LDR_BSS_SIZE)
6969
#define IMR_BOOT_LDR_STACK_SIZE 0x1000
7070

71+
/* ROM_EXT sections, used only for MMU mapping */
72+
#define IMR_ROM_EXT_OFFSET 0xB000
73+
#define IMR_ROM_EXT_CODE_BASE (L3_MEM_BASE_ADDR + IMR_ROM_EXT_OFFSET)
74+
#define IMR_ROM_EXT_CODE_SIZE 0xD000
75+
#define IMR_ROM_EXT_DATABSS_BASE (IMR_ROM_EXT_CODE_BASE + IMR_ROM_EXT_CODE_SIZE)
76+
#define IMR_ROM_EXT_DATABSS_SIZE 0x18000
77+
7178
/* position of L3 heap, size of L3 heap - till end of the L3 memory */
7279
/* !!! FIXME: L3 heap base MUST be automatically calculated. !!! */
7380
#define IMR_L3_HEAP_BASE (IMR_BOOT_LDR_STACK_BASE + IMR_BOOT_LDR_STACK_SIZE)

soc/intel/intel_adsp/ace/mmu_ace30.c

+12
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ const struct xtensa_mmu_range xtensa_soc_mmu_ranges[] = {
7575
.name = "win3",
7676
},
7777
/* Map IMR */
78+
{
79+
.start = (uint32_t)IMR_ROM_EXT_CODE_BASE,
80+
.end = (uint32_t)(IMR_ROM_EXT_CODE_BASE + IMR_ROM_EXT_CODE_SIZE),
81+
.attrs = XTENSA_MMU_PERM_X,
82+
.name = "IMR_rom_ext_code",
83+
},
84+
{
85+
.start = (uint32_t)IMR_ROM_EXT_DATABSS_BASE,
86+
.end = (uint32_t)(IMR_ROM_EXT_DATABSS_BASE + IMR_ROM_EXT_DATABSS_SIZE),
87+
.attrs = XTENSA_MMU_PERM_W,
88+
.name = "IMR_rom_ext_data_bss",
89+
},
7890
{
7991
.start = (uint32_t)(IMR_BOOT_LDR_MANIFEST_BASE - IMR_BOOT_LDR_MANIFEST_SIZE),
8092
.end = (uint32_t)IMR_BOOT_LDR_MANIFEST_BASE,

0 commit comments

Comments
 (0)