Searched hist:db2e28d5b60b8422452d0154bbf744379d4a0796 (Results 1 – 2 of 2) sorted by relevance
| /optee_os/core/arch/arm/plat-hikey/ |
| H A D | main.c | db2e28d5b60b8422452d0154bbf744379d4a0796 Thu Jun 13 11:18:17 UTC 2019 Jerome Forissier <jerome.forissier@linaro.org> hikey960: fix memory mapping for 4G boards (CFG_DRAM_SIZE_GB=4)
HiKey960 boards equipped with 4G of RAM may use physical addresses in the range 8G~8.5G [1]. This range is currently not declared in OP-TEE, so if Linux happens to be using it for shared memory, it will cause problems. This can happen when: 1. Dynamic shared memory is enabled in OP-TEE (CFG_CORE_DYN_SHM=y) and used by the kernel driver ("optee: dynamic shared memory is enabled" in the boot log), and 2. The UEFI firmware is recent enough to report the whole physical address range to the kernel (introduced in edk2's OpenPlatformPkg commit 50c813d0b9b3 ("Platforms/HiKey960: Support 4G or more memory space for RAM") [2].
The typical error is (the address could be any value >4G):
E/TC:6 0 tee_entry_std:551 Bad arg address 0x217e9a000
This commit fixes the issue by adding the missing memory range. Obviously, dealing with PAs greater than 4G requires a 64-bit TEE core or CFG_CORE_LARGE_PHYSICAL_ADDR=y, so a compile-time check is added.
Link: [1] https://github.com/96boards-hikey/OpenPlatformPkg/blob/50c813d0b9b3/Platforms/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Mem.c#L34-L38 Link: [2] https://github.com/96boards-hikey/OpenPlatformPkg/commit/50c813d0b9b3 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Sungjin Park <sungjinp@gmail.com>
|
| H A D | platform_config.h | db2e28d5b60b8422452d0154bbf744379d4a0796 Thu Jun 13 11:18:17 UTC 2019 Jerome Forissier <jerome.forissier@linaro.org> hikey960: fix memory mapping for 4G boards (CFG_DRAM_SIZE_GB=4)
HiKey960 boards equipped with 4G of RAM may use physical addresses in the range 8G~8.5G [1]. This range is currently not declared in OP-TEE, so if Linux happens to be using it for shared memory, it will cause problems. This can happen when: 1. Dynamic shared memory is enabled in OP-TEE (CFG_CORE_DYN_SHM=y) and used by the kernel driver ("optee: dynamic shared memory is enabled" in the boot log), and 2. The UEFI firmware is recent enough to report the whole physical address range to the kernel (introduced in edk2's OpenPlatformPkg commit 50c813d0b9b3 ("Platforms/HiKey960: Support 4G or more memory space for RAM") [2].
The typical error is (the address could be any value >4G):
E/TC:6 0 tee_entry_std:551 Bad arg address 0x217e9a000
This commit fixes the issue by adding the missing memory range. Obviously, dealing with PAs greater than 4G requires a 64-bit TEE core or CFG_CORE_LARGE_PHYSICAL_ADDR=y, so a compile-time check is added.
Link: [1] https://github.com/96boards-hikey/OpenPlatformPkg/blob/50c813d0b9b3/Platforms/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Mem.c#L34-L38 Link: [2] https://github.com/96boards-hikey/OpenPlatformPkg/commit/50c813d0b9b3 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Sungjin Park <sungjinp@gmail.com>
|