diff options
author | Grzegorz Jaszczyk <jaz@semihalf.com> | 2021-04-30 15:29:48 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2021-05-16 06:48:45 +0200 |
commit | a2122d8bab8d41736d12e353cf00a75ae639873f (patch) | |
tree | d0bdf8e887199020aa4f914ae3549f204af3b5c2 /arch/arm | |
parent | 762f9fba0f748c1f7fd3e0ed52c2baebfa6d1bff (diff) | |
download | u-boot-a2122d8bab8d41736d12e353cf00a75ae639873f.tar.gz |
arm64: mvebu: do not map firmware RT service region
There is region left by ATF, which needs to remain in memory to provide RT
services. To prevent overwriting it by u-boot, do not provide any mapping
for this memory region, so any attempt to access it will trigger
synchronous exception.
Update sr 2021-04-12:
Don't update armada3700/cpu.c mmu table, as this has specific changes
included in mainline.
Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-mvebu/armada8k/cpu.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-mvebu/include/mach/fw_info.h | 13 |
2 files changed, 24 insertions, 1 deletions
diff --git a/arch/arm/mach-mvebu/armada8k/cpu.c b/arch/arm/mach-mvebu/armada8k/cpu.c index 99531711ee..d76e176325 100644 --- a/arch/arm/mach-mvebu/armada8k/cpu.c +++ b/arch/arm/mach-mvebu/armada8k/cpu.c @@ -14,6 +14,7 @@ #include <asm/arch/cpu.h> #include <asm/arch/soc.h> #include <asm/armv8/mmu.h> +#include <mach/fw_info.h> /* Armada 7k/8k */ #define MVEBU_RFU_BASE (MVEBU_REGISTER(0x6f0000)) @@ -27,9 +28,18 @@ static struct mm_region mvebu_mem_map[] = { /* Armada 80x0 memory regions include the CP1 (slave) units */ { - /* RAM */ + /* RAM 0-64MB */ .phys = 0x0UL, .virt = 0x0UL, + .size = ATF_REGION_START, + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | + PTE_BLOCK_INNER_SHARE + }, + /* ATF and TEE region 0x4000000-0x5400000 not mapped */ + { + /* RAM 66MB-2GB */ + .phys = ATF_REGION_END, + .virt = ATF_REGION_END, .size = SZ_2G, .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_INNER_SHARE diff --git a/arch/arm/mach-mvebu/include/mach/fw_info.h b/arch/arm/mach-mvebu/include/mach/fw_info.h new file mode 100644 index 0000000000..ab2bb91bd5 --- /dev/null +++ b/arch/arm/mach-mvebu/include/mach/fw_info.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2018 Marvell International Ltd. + */ + +#ifndef _FW_INFO_H_ +#define _FW_INFO_H_ + +/* Protected ATF and TEE region */ +#define ATF_REGION_START 0x4000000 +#define ATF_REGION_END 0x5400000 + +#endif /* _FW_INFO_H_ */ |