Hi,
Did you attempt increasing the maximum allowed translation tables for IMX platform?
Such as https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/plat/imx/im...
With dynamic mapping, it can happen the number of xlat tables works for the boot time, but runs out if you attempt to map regions dynamically.
Regards, Olivier.
________________________________________ From: Jun Nie jun.nie@linaro.org Sent: 27 April 2021 10:40 To: Manish Pandey2 Cc: Gyorgy Szing; Achin Gupta; tf-a@lists.trustedfirmware.org; nd; Olivier Deprez; Lanfang Zhang Subject: Re: To what address BL2 load SPM manifest in FIP image
Hi,
Anyone who is familiar with ATF memory map has idea on this? I see permission error in below line when plat_spm_core_manifest_load() calls mmap_add_dynamic_region(). While fvp does not has such issue.
https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/lib/xlat_ta...
I am wandering why fvp manifest mapping check does not fall into the error. Because static memory map on FVP include ARM_SHARED_RAM_BASE 0x04000000 size: 0x00001000. While below manifest start address and size PAGE_SIZE should fall into fully_overlapped_va check and fail.
bl32_image_ep_info.args.arg0 = ARM_TRUSTED_SRAM_BASE + PLAT_ARM_TRUSTED_SRAM_SIZE - PAGE_SIZE;
Regards, Jun
Jun Nie jun.nie@linaro.org 于2021年4月23日周五 下午5:35写道:
Hi,
How fvp board handle the manifest memory map? Carve the memory out and use a dedicated memory map? I cannot find the code. But I fail in this line when I try to map and load manifest. I have to shrink DRAM size so that manifest memory is dynamically mapped.
https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/lib/xlat_ta...
Regards, Jun
Olivier Deprez Olivier.Deprez@arm.com 于2021年4月22日周四 下午11:10写道:
Hi,
the TOS fw config address comes from the firmware configuration framework: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/plat/arm/bo...
The fvp_fw_config dtb itself must be loaded to get this information. So if not using fconf on IMX you may have to hardcode the tos fw config blob address in some way in the platform port.
Regards, Olivier.
From: Jun Nie jun.nie@linaro.org Sent: 22 April 2021 16:56 To: Olivier Deprez Cc: Gyorgy Szing; Achin Gupta; tf-a@lists.trustedfirmware.org; Manish Pandey2; nd Subject: To what address BL2 load SPM manifest in FIP image
Hi,
I see below code for manifest address calculation in arm platform. But it is ARM platform specific. I am not sure how the manifest load address is decided when BL2 loads it. There is no image address in this code. https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/plat/arm/co.... Below calculation is wrong on iMX platform and cause below error.
bl32_image_ep_info.args.arg0 = BL32_BASE + BL32_SIZE - PAGE_SIZE;
125 /* SPM (hafnium in secure world) expects SPM Core manifest base address 126 * in x0, which in !RESET_TO_BL31 case loaded after base of non shared 127 * SRAM(after 4KB offset of SRAM). But in RESET_TO_BL31 case all non 128 * shared SRAM is allocated to BL31, so to avoid overwriting of manifest 129 * keep it in the last page. 130 */ 131 bl32_image_ep_info.args.arg0 = ARM_TRUSTED_SRAM_BASE + 132 PLAT_ARM_TRUSTED_SRAM_SIZE - PAGE_SIZE;
ERROR: Error while mapping SPM Core manifest (-1). WARNING: No or invalid SPM Core manifest image provided by BL2 WARNING: Booting device without SPM initialization. ERROR: Error initializing runtime service std_svc INFO: BL31: Preparing for EL3 exit to normal world
Regards, Jun