Commit 74cbb839 authored by Jeenu Viswambharan's avatar Jeenu Viswambharan Committed by Dan Handley
Browse files

Move translation tables into separate section

This patch moves the translation tables into their own section. This
saves space that would otherwise have been lost in padding due to page
table alignment constraints. The BL31 and BL32 bases have been
consequently adjusted.

Change-Id: Ibd65ae8a5ce4c4ea9a71a794c95bbff40dc63e65
parent d265bd7c
...@@ -76,6 +76,15 @@ SECTIONS ...@@ -76,6 +76,15 @@ SECTIONS
__BSS_END__ = .; __BSS_END__ = .;
} >RAM } >RAM
/*
* The .xlat_table section is for full, aligned page tables (4K).
* Removing them from .bss avoids forcing 4K alignment on
* the .bss section and eliminates the unecessary zero init
*/
xlat_table (NOLOAD) : {
*(xlat_table)
} >RAM
/* /*
* The base address of the coherent memory section must be page-aligned (4K) * The base address of the coherent memory section must be page-aligned (4K)
* to guarantee that the coherent data are stored on their own pages and * to guarantee that the coherent data are stored on their own pages and
......
...@@ -59,6 +59,15 @@ SECTIONS ...@@ -59,6 +59,15 @@ SECTIONS
__RO_END__ = .; __RO_END__ = .;
} >RAM } >RAM
/*
* The .xlat_table section is for full, aligned page tables (4K).
* Removing them from .bss avoids forcing 4K alignment on
* the .bss section and eliminates the unecessary zero init
*/
xlat_table (NOLOAD) : {
*(xlat_table)
} >RAM
.data . : { .data . : {
__DATA_START__ = .; __DATA_START__ = .;
*(.data) *(.data)
......
...@@ -60,6 +60,15 @@ SECTIONS ...@@ -60,6 +60,15 @@ SECTIONS
__RO_END__ = .; __RO_END__ = .;
} >RAM } >RAM
/*
* The .xlat_table section is for full, aligned page tables (4K).
* Removing them from .bss avoids forcing 4K alignment on
* the .bss section and eliminates the unecessary zero init
*/
xlat_table (NOLOAD) : {
*(xlat_table)
} >RAM
.data . : { .data . : {
__DATA_START__ = .; __DATA_START__ = .;
*(.data) *(.data)
......
...@@ -67,14 +67,14 @@ __attribute__ ((aligned((ADDR_SPACE_SIZE >> 30) << 3))); ...@@ -67,14 +67,14 @@ __attribute__ ((aligned((ADDR_SPACE_SIZE >> 30) << 3)));
* space needed to address secure peripherals e.g. trusted ROM and RAM. * space needed to address secure peripherals e.g. trusted ROM and RAM.
******************************************************************************/ ******************************************************************************/
static unsigned long l2_xlation_table[NUM_L2_PAGETABLES][NUM_2MB_IN_GB] static unsigned long l2_xlation_table[NUM_L2_PAGETABLES][NUM_2MB_IN_GB]
__attribute__ ((aligned(NUM_2MB_IN_GB << 3))); __attribute__ ((aligned(NUM_2MB_IN_GB << 3), section("xlat_table")));
/******************************************************************************* /*******************************************************************************
* Level 3 translation tables (2 sets) describe the trusted & non-trusted RAM * Level 3 translation tables (2 sets) describe the trusted & non-trusted RAM
* regions at a granularity of 4K. * regions at a granularity of 4K.
******************************************************************************/ ******************************************************************************/
static unsigned long l3_xlation_table[NUM_L3_PAGETABLES][NUM_4K_IN_2MB] static unsigned long l3_xlation_table[NUM_L3_PAGETABLES][NUM_4K_IN_2MB]
__attribute__ ((aligned(NUM_4K_IN_2MB << 3))); __attribute__ ((aligned(NUM_4K_IN_2MB << 3), section("xlat_table")));
/******************************************************************************* /*******************************************************************************
* Helper to create a level 1/2 table descriptor which points to a level 2/3 * Helper to create a level 1/2 table descriptor which points to a level 2/3
......
...@@ -225,12 +225,12 @@ ...@@ -225,12 +225,12 @@
/******************************************************************************* /*******************************************************************************
* BL2 specific defines. * BL2 specific defines.
******************************************************************************/ ******************************************************************************/
#define BL2_BASE 0x0402B000 #define BL2_BASE 0x0402D000
/******************************************************************************* /*******************************************************************************
* BL31 specific defines. * BL31 specific defines.
******************************************************************************/ ******************************************************************************/
#define BL31_BASE 0x0400E000 #define BL31_BASE 0x0400C000
/******************************************************************************* /*******************************************************************************
* Platform specific page table and MMU setup constants * Platform specific page table and MMU setup constants
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment