From dff29e0c65462258776b8fb821516faad3ec1394 Mon Sep 17 00:00:00 2001 From: Ting Shen Date: Mon, 28 Jan 2019 18:15:00 +0800 Subject: bootmem: add new memory type for BL31 After CL:31122, we can finally define a memory type specific for BL31, to make sure BL31 is not loaded on other reserved area. Change-Id: Idbd9a7fe4b12af23de1519892936d8d88a000e2c Signed-off-by: Ting Shen Reviewed-on: https://review.coreboot.org/c/31123 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/soc/nvidia/tegra210/soc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/soc/nvidia/tegra210') diff --git a/src/soc/nvidia/tegra210/soc.c b/src/soc/nvidia/tegra210/soc.c index 71532be989..619d27fb11 100644 --- a/src/soc/nvidia/tegra210/soc.c +++ b/src/soc/nvidia/tegra210/soc.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -33,13 +34,23 @@ #include "chip.h" +void bootmem_platform_add_ranges(void) +{ + uintptr_t begin; + size_t size; + carveout_range(CARVEOUT_TZ, &begin, &size); + if (size == 0) + return; + bootmem_add_range(begin * MiB, size * MiB, BM_MEM_BL31); +} + static void soc_read_resources(struct device *dev) { unsigned long index = 0; int i; uintptr_t begin, end; size_t size; - for (i = 0; i < CARVEOUT_NUM; i++) { + for (i = CARVEOUT_TZ + 1; i < CARVEOUT_NUM; i++) { carveout_range(i, &begin, &size); if (size == 0) continue; -- cgit v1.2.3