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
bc469a84
Commit
bc469a84
authored
Jul 18, 2016
by
danh-arm
Committed by
GitHub
Jul 18, 2016
Browse files
Merge pull request #666 from Xilinx/zynqmp/rodata-xn
zynqmp: Map read-only data as execute-never
parents
84ded36c
47395a23
Changes
4
Show whitespace changes
Inline
Side-by-side
plat/xilinx/zynqmp/bl31_zynqmp_setup.c
View file @
bc469a84
...
@@ -38,24 +38,7 @@
...
@@ -38,24 +38,7 @@
#include <platform.h>
#include <platform.h>
#include "zynqmp_private.h"
#include "zynqmp_private.h"
/*
#define BL31_END (unsigned long)(&__BL31_END__)
* Declarations of linker defined symbols which will help us find the layout
* of trusted SRAM
*/
extern
unsigned
long
__RO_START__
;
extern
unsigned
long
__RO_END__
;
extern
unsigned
long
__COHERENT_RAM_START__
;
extern
unsigned
long
__COHERENT_RAM_END__
;
/*
* The next 2 constants identify the extents of the code & RO data region.
* These addresses are used by the MMU setup code and therefore they must be
* page-aligned. It is the responsibility of the linker script to ensure that
* __RO_START__ and __RO_END__ linker symbols refer to page-aligned addresses.
*/
#define BL31_RO_BASE (unsigned long)(&__RO_START__)
#define BL31_RO_LIMIT (unsigned long)(&__RO_END__)
/*
/*
* The next 2 constants identify the extents of the coherent memory region.
* The next 2 constants identify the extents of the coherent memory region.
...
@@ -154,12 +137,12 @@ void bl31_plat_arch_setup(void)
...
@@ -154,12 +137,12 @@ void bl31_plat_arch_setup(void)
plat_arm_interconnect_init
();
plat_arm_interconnect_init
();
plat_arm_interconnect_enter_coherency
();
plat_arm_interconnect_enter_coherency
();
arm_setup_page_tables
(
BL31_
RO_
BASE
,
arm_setup_page_tables
(
BL31_BASE
,
BL31_
COHERENT_RAM_LIMIT
-
BL31_
RO_
BASE
,
BL31_
END
-
BL31_BASE
,
BL
31_RO
_BASE
,
BL
_CODE
_BASE
,
BL
31_RO
_LIMIT
,
BL
_CODE
_LIMIT
,
0
,
BL_RO_DATA_BASE
,
0
,
BL_RO_DATA_LIMIT
,
BL31_COHERENT_RAM_BASE
,
BL31_COHERENT_RAM_BASE
,
BL31_COHERENT_RAM_LIMIT
);
BL31_COHERENT_RAM_LIMIT
);
enable_mmu_el3
(
0
);
enable_mmu_el3
(
0
);
...
...
plat/xilinx/zynqmp/include/platform_def.h
View file @
bc469a84
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
* Platform specific page table and MMU setup constants
* Platform specific page table and MMU setup constants
******************************************************************************/
******************************************************************************/
#define ADDR_SPACE_SIZE (1ull << 32)
#define ADDR_SPACE_SIZE (1ull << 32)
#define MAX_MMAP_REGIONS
6
#define MAX_MMAP_REGIONS
7
#if IMAGE_BL32
#if IMAGE_BL32
# define MAX_XLAT_TABLES 5
# define MAX_XLAT_TABLES 5
#else
#else
...
...
plat/xilinx/zynqmp/platform.mk
View file @
bc469a84
...
@@ -30,6 +30,7 @@ ENABLE_PLAT_COMPAT := 0
...
@@ -30,6 +30,7 @@ ENABLE_PLAT_COMPAT := 0
PROGRAMMABLE_RESET_ADDRESS
:=
1
PROGRAMMABLE_RESET_ADDRESS
:=
1
PSCI_EXTENDED_STATE_ID
:=
1
PSCI_EXTENDED_STATE_ID
:=
1
A53_DISABLE_NON_TEMPORAL_HINT
:=
0
A53_DISABLE_NON_TEMPORAL_HINT
:=
0
SEPARATE_CODE_AND_RODATA
:=
1
ifdef
ZYNQMP_ATF_MEM_BASE
ifdef
ZYNQMP_ATF_MEM_BASE
$(eval
$(call
add_define,ZYNQMP_ATF_MEM_BASE))
$(eval
$(call
add_define,ZYNQMP_ATF_MEM_BASE))
...
...
plat/xilinx/zynqmp/tsp/tsp_plat_setup.c
View file @
bc469a84
...
@@ -35,19 +35,8 @@
...
@@ -35,19 +35,8 @@
#include <plat_arm.h>
#include <plat_arm.h>
#include "../zynqmp_private.h"
#include "../zynqmp_private.h"
/*
* The next 3 constants identify the extents of the code & RO data region and
* the limit of the BL32 image. These addresses are used by the MMU setup code
* and therefore they must be page-aligned. It is the responsibility of the
* linker script to ensure that __RO_START__, __RO_END__ & & __BL32_END__
* linker symbols refer to page-aligned addresses.
*/
#define BL32_RO_BASE (unsigned long)(&__RO_START__)
#define BL32_RO_LIMIT (unsigned long)(&__RO_END__)
#define BL32_END (unsigned long)(&__BL32_END__)
#define BL32_END (unsigned long)(&__BL32_END__)
#if USE_COHERENT_MEM
/*
/*
* The next 2 constants identify the extents of the coherent memory region.
* The next 2 constants identify the extents of the coherent memory region.
* These addresses are used by the MMU setup code and therefore they must be
* These addresses are used by the MMU setup code and therefore they must be
...
@@ -57,7 +46,6 @@
...
@@ -57,7 +46,6 @@
*/
*/
#define BL32_COHERENT_RAM_BASE (unsigned long)(&__COHERENT_RAM_START__)
#define BL32_COHERENT_RAM_BASE (unsigned long)(&__COHERENT_RAM_START__)
#define BL32_COHERENT_RAM_LIMIT (unsigned long)(&__COHERENT_RAM_END__)
#define BL32_COHERENT_RAM_LIMIT (unsigned long)(&__COHERENT_RAM_END__)
#endif
/*******************************************************************************
/*******************************************************************************
* Initialize the UART
* Initialize the UART
...
@@ -90,16 +78,14 @@ void tsp_platform_setup(void)
...
@@ -90,16 +78,14 @@ void tsp_platform_setup(void)
******************************************************************************/
******************************************************************************/
void
tsp_plat_arch_setup
(
void
)
void
tsp_plat_arch_setup
(
void
)
{
{
arm_setup_page_tables
(
BL32_RO_BASE
,
arm_setup_page_tables
(
BL32_BASE
,
(
BL32_END
-
BL32_RO_BASE
),
BL32_END
-
BL32_BASE
,
BL32_RO_BASE
,
BL_CODE_BASE
,
BL32_RO_LIMIT
,
BL_CODE_LIMIT
,
0
,
BL_RO_DATA_BASE
,
0
BL_RO_DATA_LIMIT
,
#if USE_COHERENT_MEM
BL32_COHERENT_RAM_BASE
,
,
BL32_COHERENT_RAM_BASE
,
BL32_COHERENT_RAM_LIMIT
BL32_COHERENT_RAM_LIMIT
#endif
);
);
enable_mmu_el1
(
0
);
enable_mmu_el1
(
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