arch: arm: core: aarch32: support for On-Chip Memory (OCM) areas in aarch32
Introduce support for On-Chip Memory (OCM) areas in aarch32 Cortex-A SoCs. This memory area is suitable for, amongst other things, un- cached device DMA. The OCM memory can reside either at address zero or at a high memory address, with configuration of the memory's lo- cation similar to the configuration of the location of the exception vectors. In both cases, it must be assured that the low/high OCM area declaration doesn't overlap with the exception vectors memory page at either the low/high address. Therefore, all possible OCM location options shall be described in the SoC's device tree, the current location shall be indicated via a "chosen" entry in the target board's device tree. This commit contains the necessary changes to the linker-related files as well as the static region declaration for the MMU in- itialization in the Zynq-7000 SoC-specific init code. Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com>
This commit is contained in:
parent
266875ead0
commit
01882b8624
4 changed files with 41 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
|||
#include <linker/sections.h>
|
||||
#include <devicetree.h>
|
||||
|
||||
#include <linker/devicetree_regions.h>
|
||||
#include <linker/linker-defs.h>
|
||||
#include <linker/linker-tool.h>
|
||||
|
||||
|
@ -80,6 +81,7 @@ MEMORY
|
|||
{
|
||||
FLASH (rx) : ORIGIN = ROM_ADDR, LENGTH = ROM_SIZE
|
||||
SRAM (wx) : ORIGIN = RAM_ADDR, LENGTH = RAM_SIZE
|
||||
LINKER_DT_REGION_FROM_NODE(OCM, rw, DT_CHOSEN(zephyr_ocm))
|
||||
/* Used by and documented in include/linker/intlist.ld */
|
||||
IDT_LIST (wx) : ORIGIN = 0xFFFFF7FF, LENGTH = 2K
|
||||
}
|
||||
|
@ -340,6 +342,32 @@ SECTIONS
|
|||
|
||||
GROUP_END(RAMABLE_REGION)
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ocm), okay)
|
||||
GROUP_START(OCM)
|
||||
|
||||
SECTION_PROLOGUE(_OCM_BSS_SECTION_NAME, (NOLOAD),SUBALIGN(4))
|
||||
{
|
||||
__ocm_start = .;
|
||||
__ocm_bss_start = .;
|
||||
*(.ocm_bss)
|
||||
*(".ocm_bss.*")
|
||||
__ocm_bss_end = .;
|
||||
} GROUP_LINK_IN(OCM)
|
||||
|
||||
SECTION_PROLOGUE(_OCM_DATA_SECTION_NAME,,SUBALIGN(4))
|
||||
{
|
||||
__ocm_data_start = .;
|
||||
*(.ocm_data)
|
||||
*(".ocm_data.*")
|
||||
__ocm_data_end = .;
|
||||
} GROUP_LINK_IN(OCM)
|
||||
|
||||
__ocm_end = .;
|
||||
__ocm_size = __ocm_end - __ocm_start;
|
||||
|
||||
GROUP_END(OCM)
|
||||
#endif
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue