soc/mediatek/mt8196: Reserve 70 MB memory for OP-TEE
Reserve 70MB memory space for running the OP-TEE image. BUG=b:317009620 TEST=build pass Change-Id: I6f75870bdd76e89866508d351b04a0921f30fe4d Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/85249 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
605c76bd9c
commit
758174c61b
3 changed files with 13 additions and 0 deletions
|
|
@ -6,5 +6,6 @@
|
|||
#include <symbols.h>
|
||||
|
||||
DECLARE_REGION(dram_dma)
|
||||
DECLARE_REGION(resv_mem_optee)
|
||||
|
||||
#endif /* _SOC_MEDIATEK_COMMON_SYMBOLS_H_ */
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
#include <soc/memlayout.h>
|
||||
|
||||
#define OPTEE_BUF(addr, size) \
|
||||
REGION(resv_mem_optee, addr, size, 4K)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/* MT8196 has 256KB SRAM. */
|
||||
|
|
@ -54,6 +57,7 @@ SECTIONS
|
|||
DRAM_DMA(0x80000000, 1M)
|
||||
POSTRAM_CBFS_CACHE(0x80100000, 2M)
|
||||
RAMSTAGE(0x80300000, 2M)
|
||||
OPTEE_BUF(0x80500000, 70M)
|
||||
|
||||
BL31(0x94600000, 0x200000)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,16 @@
|
|||
#include <soc/emi.h>
|
||||
#include <soc/mmu_operations.h>
|
||||
#include <soc/pcie.h>
|
||||
#include <soc/symbols.h>
|
||||
#include <symbols.h>
|
||||
|
||||
void bootmem_platform_add_ranges(void)
|
||||
{
|
||||
if (CONFIG(ARM64_BL31_OPTEE_WITH_SMC))
|
||||
bootmem_add_range((uint64_t)_resv_mem_optee,
|
||||
REGION_SIZE(resv_mem_optee), BM_MEM_RESERVED);
|
||||
}
|
||||
|
||||
static void soc_read_resources(struct device *dev)
|
||||
{
|
||||
ram_range(dev, 0, (uintptr_t)_dram, sdram_size());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue