Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
f68bc8a1
Unverified
Commit
f68bc8a1
authored
Aug 03, 2018
by
Dimitris Papastamos
Committed by
GitHub
Aug 03, 2018
Browse files
Merge pull request #1506 from danielboulby-arm/db/SeparateCodeAndROData
Fix build for SEPARATE_CODE_AND_RODATA=0
parents
f943ce74
2ecaafd2
Changes
8
Hide whitespace changes
Inline
Side-by-side
include/plat/arm/common/arm_def.h
View file @
f68bc8a1
...
@@ -241,16 +241,25 @@
...
@@ -241,16 +241,25 @@
ARM_EL3_TZC_DRAM1_SIZE, \
ARM_EL3_TZC_DRAM1_SIZE, \
MT_MEMORY | MT_RW | MT_SECURE)
MT_MEMORY | MT_RW | MT_SECURE)
/*
* If SEPARATE_CODE_AND_RODATA=1 we define a region for each section
* otherwise one region is defined containing both.
*/
#if SEPARATE_CODE_AND_RODATA
#if SEPARATE_CODE_AND_RODATA
#define ARM_MAP_BL_
CODE
MAP_REGION_FLAT( \
#define ARM_MAP_BL_
RO
MAP_REGION_FLAT( \
BL_CODE_BASE, \
BL_CODE_BASE, \
BL_CODE_END - BL_CODE_BASE, \
BL_CODE_END - BL_CODE_BASE, \
MT_CODE | MT_SECURE)
MT_CODE | MT_SECURE)
, \
#define ARM_MAP_BL_RO_DATA
MAP_REGION_FLAT( \
MAP_REGION_FLAT( \
BL_RO_DATA_BASE, \
BL_RO_DATA_BASE, \
BL_RO_DATA_END \
BL_RO_DATA_END \
- BL_RO_DATA_BASE, \
- BL_RO_DATA_BASE, \
MT_RO_DATA | MT_SECURE)
MT_RO_DATA | MT_SECURE)
#else
#define ARM_MAP_BL_RO MAP_REGION_FLAT( \
BL_CODE_BASE, \
BL_CODE_END - BL_CODE_BASE, \
MT_CODE | MT_SECURE)
#endif
#endif
#if USE_COHERENT_MEM
#if USE_COHERENT_MEM
#define ARM_MAP_BL_COHERENT_RAM MAP_REGION_FLAT( \
#define ARM_MAP_BL_COHERENT_RAM MAP_REGION_FLAT( \
...
@@ -261,14 +270,10 @@
...
@@ -261,14 +270,10 @@
#endif
#endif
/*
/*
* The number of regions like RO(code), coherent and data required by
* The
max
number of regions like RO(code), coherent and data required by
* different BL stages which need to be mapped in the MMU.
* different BL stages which need to be mapped in the MMU.
*/
*/
#if USE_COHERENT_MEM
# define ARM_BL_REGIONS 4
# define ARM_BL_REGIONS 4
#else
# define ARM_BL_REGIONS 3
#endif
#define MAX_MMAP_REGIONS (PLAT_ARM_MMAP_ENTRIES + \
#define MAX_MMAP_REGIONS (PLAT_ARM_MMAP_ENTRIES + \
ARM_BL_REGIONS)
ARM_BL_REGIONS)
...
...
plat/arm/common/arm_bl1_setup.c
View file @
f68bc8a1
...
@@ -28,15 +28,26 @@
...
@@ -28,15 +28,26 @@
bl1_tzram_layout.total_base, \
bl1_tzram_layout.total_base, \
bl1_tzram_layout.total_size, \
bl1_tzram_layout.total_size, \
MT_MEMORY | MT_RW | MT_SECURE)
MT_MEMORY | MT_RW | MT_SECURE)
#define MAP_BL1_CODE MAP_REGION_FLAT( \
/*
* If SEPARATE_CODE_AND_RODATA=1 we define a region for each section
* otherwise one region is defined containing both
*/
#if SEPARATE_CODE_AND_RODATA
#define MAP_BL1_RO MAP_REGION_FLAT( \
BL_CODE_BASE, \
BL_CODE_BASE, \
BL1_CODE_END - BL_CODE_BASE, \
BL1_CODE_END - BL_CODE_BASE, \
MT_CODE | MT_SECURE)
MT_CODE | MT_SECURE)
, \
#define MAP_BL1_RO_DATA
MAP_REGION_FLAT( \
MAP_REGION_FLAT( \
BL1_RO_DATA_BASE, \
BL1_RO_DATA_BASE, \
BL1_RO_DATA_END \
BL1_RO_DATA_END \
- BL_RO_DATA_BASE, \
- BL_RO_DATA_BASE, \
MT_RO_DATA | MT_SECURE)
MT_RO_DATA | MT_SECURE)
#else
#define MAP_BL1_RO MAP_REGION_FLAT( \
BL_CODE_BASE, \
BL1_CODE_END - BL_CODE_BASE, \
MT_CODE | MT_SECURE)
#endif
/* Data structure which holds the extents of the trusted SRAM for BL1*/
/* Data structure which holds the extents of the trusted SRAM for BL1*/
static
meminfo_t
bl1_tzram_layout
;
static
meminfo_t
bl1_tzram_layout
;
...
@@ -105,8 +116,7 @@ void arm_bl1_plat_arch_setup(void)
...
@@ -105,8 +116,7 @@ void arm_bl1_plat_arch_setup(void)
const
mmap_region_t
bl_regions
[]
=
{
const
mmap_region_t
bl_regions
[]
=
{
MAP_BL1_TOTAL
,
MAP_BL1_TOTAL
,
MAP_BL1_CODE
,
MAP_BL1_RO
,
MAP_BL1_RO_DATA
,
{
0
}
{
0
}
};
};
...
...
plat/arm/common/arm_bl2_el3_setup.c
View file @
f68bc8a1
...
@@ -75,8 +75,7 @@ void arm_bl2_el3_plat_arch_setup(void)
...
@@ -75,8 +75,7 @@ void arm_bl2_el3_plat_arch_setup(void)
const
mmap_region_t
bl_regions
[]
=
{
const
mmap_region_t
bl_regions
[]
=
{
MAP_BL2_EL3_TOTAL
,
MAP_BL2_EL3_TOTAL
,
ARM_MAP_BL_CODE
,
ARM_MAP_BL_RO
,
ARM_MAP_BL_RO_DATA
,
{
0
}
{
0
}
};
};
...
...
plat/arm/common/arm_bl2_setup.c
View file @
f68bc8a1
...
@@ -245,8 +245,7 @@ void arm_bl2_plat_arch_setup(void)
...
@@ -245,8 +245,7 @@ void arm_bl2_plat_arch_setup(void)
const
mmap_region_t
bl_regions
[]
=
{
const
mmap_region_t
bl_regions
[]
=
{
MAP_BL2_TOTAL
,
MAP_BL2_TOTAL
,
ARM_MAP_BL_CODE
,
ARM_MAP_BL_RO
,
ARM_MAP_BL_RO_DATA
,
{
0
}
{
0
}
};
};
...
...
plat/arm/common/arm_bl2u_setup.c
View file @
f68bc8a1
...
@@ -72,8 +72,7 @@ void arm_bl2u_plat_arch_setup(void)
...
@@ -72,8 +72,7 @@ void arm_bl2u_plat_arch_setup(void)
const
mmap_region_t
bl_regions
[]
=
{
const
mmap_region_t
bl_regions
[]
=
{
MAP_BL2U_TOTAL
,
MAP_BL2U_TOTAL
,
ARM_MAP_BL_CODE
,
ARM_MAP_BL_RO
,
ARM_MAP_BL_RO_DATA
,
{
0
}
{
0
}
};
};
...
...
plat/arm/common/arm_bl31_setup.c
View file @
f68bc8a1
...
@@ -287,8 +287,7 @@ void arm_bl31_plat_arch_setup(void)
...
@@ -287,8 +287,7 @@ void arm_bl31_plat_arch_setup(void)
const
mmap_region_t
bl_regions
[]
=
{
const
mmap_region_t
bl_regions
[]
=
{
MAP_BL31_TOTAL
,
MAP_BL31_TOTAL
,
ARM_MAP_BL_CODE
,
ARM_MAP_BL_RO
,
ARM_MAP_BL_RO_DATA
,
#if USE_COHERENT_MEM
#if USE_COHERENT_MEM
ARM_MAP_BL_COHERENT_RAM
,
ARM_MAP_BL_COHERENT_RAM
,
#endif
#endif
...
...
plat/arm/common/sp_min/arm_sp_min_setup.c
View file @
f68bc8a1
...
@@ -203,8 +203,7 @@ void sp_min_plat_arch_setup(void)
...
@@ -203,8 +203,7 @@ void sp_min_plat_arch_setup(void)
{
{
const
mmap_region_t
bl_regions
[]
=
{
const
mmap_region_t
bl_regions
[]
=
{
MAP_BL_SP_MIN_TOTAL
,
MAP_BL_SP_MIN_TOTAL
,
ARM_MAP_BL_CODE
,
ARM_MAP_BL_RO
,
ARM_MAP_BL_RO_DATA
,
#if USE_COHERENT_MEM
#if USE_COHERENT_MEM
ARM_MAP_BL_COHERENT_RAM
,
ARM_MAP_BL_COHERENT_RAM
,
#endif
#endif
...
...
plat/arm/common/tsp/arm_tsp_setup.c
View file @
f68bc8a1
...
@@ -81,8 +81,7 @@ void tsp_plat_arch_setup(void)
...
@@ -81,8 +81,7 @@ void tsp_plat_arch_setup(void)
const
mmap_region_t
bl_regions
[]
=
{
const
mmap_region_t
bl_regions
[]
=
{
MAP_BL_TSP_TOTAL
,
MAP_BL_TSP_TOTAL
,
ARM_MAP_BL_CODE
,
ARM_MAP_BL_RO
,
ARM_MAP_BL_RO_DATA
,
{
0
}
{
0
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment