mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-20 19:44:23 +00:00
xlat_tables_v2: fix assembler warning of PLAT_RO_XLAT_TABLES
If PLAT_RO_XLAT_TABLES is defined, the base xlat table goes to the .rodata section instead of .bss section. This causes a warning like: /tmp/ccswitLr.s: Assembler messages: /tmp/ccswitLr.s:297: Warning: setting incorrect section attributes for .rodata It is practically no problem, but I want to keep the build log clean. Put the base table into the "base_xlat_table" section to suppress the assembler warnings. The linker script determines its final destination; rodata section if PLAT_RO_XLAT_TABLES=1, or bss section otherwise. So, the result is the same. Change-Id: Ic85d1d2dddd9b5339289fc2378cbcb21dd7db02e Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
a7739bc7b1
commit
268131c24f
3 changed files with 24 additions and 16 deletions
|
@ -58,13 +58,32 @@
|
||||||
*(.got) \
|
*(.got) \
|
||||||
__GOT_END__ = .;
|
__GOT_END__ = .;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The base xlat table
|
||||||
|
*
|
||||||
|
* It is put into the rodata section if PLAT_RO_XLAT_TABLES=1,
|
||||||
|
* or into the bss section otherwise.
|
||||||
|
*/
|
||||||
|
#define BASE_XLAT_TABLE \
|
||||||
|
. = ALIGN(16); \
|
||||||
|
*(base_xlat_table)
|
||||||
|
|
||||||
|
#if PLAT_RO_XLAT_TABLES
|
||||||
|
#define BASE_XLAT_TABLE_RO BASE_XLAT_TABLE
|
||||||
|
#define BASE_XLAT_TABLE_BSS
|
||||||
|
#else
|
||||||
|
#define BASE_XLAT_TABLE_RO
|
||||||
|
#define BASE_XLAT_TABLE_BSS BASE_XLAT_TABLE
|
||||||
|
#endif
|
||||||
|
|
||||||
#define RODATA_COMMON \
|
#define RODATA_COMMON \
|
||||||
RT_SVC_DESCS \
|
RT_SVC_DESCS \
|
||||||
FCONF_POPULATOR \
|
FCONF_POPULATOR \
|
||||||
PMF_SVC_DESCS \
|
PMF_SVC_DESCS \
|
||||||
PARSER_LIB_DESCS \
|
PARSER_LIB_DESCS \
|
||||||
CPU_OPS \
|
CPU_OPS \
|
||||||
GOT
|
GOT \
|
||||||
|
BASE_XLAT_TABLE_RO
|
||||||
|
|
||||||
#define STACK_SECTION \
|
#define STACK_SECTION \
|
||||||
stacks (NOLOAD) : { \
|
stacks (NOLOAD) : { \
|
||||||
|
@ -142,6 +161,7 @@
|
||||||
*(COMMON) \
|
*(COMMON) \
|
||||||
BAKERY_LOCK_NORMAL \
|
BAKERY_LOCK_NORMAL \
|
||||||
PMF_TIMESTAMP \
|
PMF_TIMESTAMP \
|
||||||
|
BASE_XLAT_TABLE_BSS \
|
||||||
__BSS_END__ = .; \
|
__BSS_END__ = .; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -164,20 +164,15 @@ typedef struct xlat_ctx xlat_ctx_t;
|
||||||
* Would typically be PLAT_VIRT_ADDR_SPACE_SIZE
|
* Would typically be PLAT_VIRT_ADDR_SPACE_SIZE
|
||||||
* (resp. PLAT_PHY_ADDR_SPACE_SIZE) for the translation context describing the
|
* (resp. PLAT_PHY_ADDR_SPACE_SIZE) for the translation context describing the
|
||||||
* BL image currently executing.
|
* BL image currently executing.
|
||||||
|
|
||||||
* _base_table_section:
|
|
||||||
* Specify the name of the section where the base translation tables have to
|
|
||||||
* be placed by the linker.
|
|
||||||
*/
|
*/
|
||||||
#define REGISTER_XLAT_CONTEXT(_ctx_name, _mmap_count, _xlat_tables_count, \
|
#define REGISTER_XLAT_CONTEXT(_ctx_name, _mmap_count, _xlat_tables_count, \
|
||||||
_virt_addr_space_size, _phy_addr_space_size, \
|
_virt_addr_space_size, _phy_addr_space_size) \
|
||||||
_base_table_section) \
|
|
||||||
REGISTER_XLAT_CONTEXT_FULL_SPEC(_ctx_name, (_mmap_count), \
|
REGISTER_XLAT_CONTEXT_FULL_SPEC(_ctx_name, (_mmap_count), \
|
||||||
(_xlat_tables_count), \
|
(_xlat_tables_count), \
|
||||||
(_virt_addr_space_size), \
|
(_virt_addr_space_size), \
|
||||||
(_phy_addr_space_size), \
|
(_phy_addr_space_size), \
|
||||||
EL_REGIME_INVALID, \
|
EL_REGIME_INVALID, \
|
||||||
"xlat_table", (_base_table_section))
|
"xlat_table", "base_xlat_table")
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Same as REGISTER_XLAT_CONTEXT plus the additional parameters:
|
* Same as REGISTER_XLAT_CONTEXT plus the additional parameters:
|
||||||
|
|
|
@ -25,15 +25,8 @@ uint64_t mmu_cfg_params[MMU_CFG_PARAM_MAX];
|
||||||
* Allocate and initialise the default translation context for the BL image
|
* Allocate and initialise the default translation context for the BL image
|
||||||
* currently executing.
|
* currently executing.
|
||||||
*/
|
*/
|
||||||
#if PLAT_RO_XLAT_TABLES
|
|
||||||
#define BASE_XLAT_TABLE_SECTION ".rodata"
|
|
||||||
#else
|
|
||||||
#define BASE_XLAT_TABLE_SECTION ".bss"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
REGISTER_XLAT_CONTEXT(tf, MAX_MMAP_REGIONS, MAX_XLAT_TABLES,
|
REGISTER_XLAT_CONTEXT(tf, MAX_MMAP_REGIONS, MAX_XLAT_TABLES,
|
||||||
PLAT_VIRT_ADDR_SPACE_SIZE, PLAT_PHY_ADDR_SPACE_SIZE,
|
PLAT_VIRT_ADDR_SPACE_SIZE, PLAT_PHY_ADDR_SPACE_SIZE);
|
||||||
BASE_XLAT_TABLE_SECTION);
|
|
||||||
|
|
||||||
void mmap_add_region(unsigned long long base_pa, uintptr_t base_va, size_t size,
|
void mmap_add_region(unsigned long long base_pa, uintptr_t base_va, size_t size,
|
||||||
unsigned int attr)
|
unsigned int attr)
|
||||||
|
|
Loading…
Add table
Reference in a new issue