feat(rmm): get DRAM information from Boot Manifest platform data
This patch adds support for getting configuration of DRAM banks
for FVP model in RMM-EL3 Boot Manifest structure.
Structure 'rmm_manifest' is extended with 'plat_dram' structure
which contains information about platform's DRAM layout:
- number of DRAM banks;
- pointer to 'dram_bank[]' array;
- checksum: two's complement 64-bit value of the sum of
data in 'plat_dram' and 'dram_bank[] array.
Each 'dram_bank' structure holds information about DRAM
bank base address and its size. This values must be aligned
to 4KB page size.
The patch increases Boot Manifest minor version to 2 and
fixes names of SMC_RMM_BOOT_COMPLETE return codes
in lib\rmm_el3_ifc\include\rmm_el3_ifc.h to match
4.20.2.3. Boot error handling and return values
in "RMM-EL3 Communication interface" document.
This patch also implements minor syntax and MISRA-C
compliant changes.
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: Ibc0aad81c099676152ec177eb45ca8c1e4d7e822
diff --git a/plat/common/src/plat_common_init.c b/plat/common/src/plat_common_init.c
index d9c7ff8..19444cc 100644
--- a/plat/common/src/plat_common_init.c
+++ b/plat/common/src/plat_common_init.c
@@ -85,7 +85,7 @@
ret = rmm_el3_ifc_init(x0, x1, x2, x3, RMM_SHARED_BUFFER_START);
if (ret != 0) {
ERROR("%s (%u): Failed to initialized RMM EL3 Interface\n",
- __func__, __LINE__);
+ __func__, __LINE__);
return ret;
}
@@ -117,13 +117,14 @@
ret = xlat_mmap_add_ctx(&runtime_xlat_ctx, runtime_regions, true);
if (ret != 0) {
ERROR("%s (%u): Failed to add RMM common regions to xlat mapping\n",
- __func__, __LINE__);
+ __func__, __LINE__);
return ret;
}
ret = xlat_init_tables_ctx(&runtime_xlat_ctx);
if (ret != 0) {
- ERROR("%s (%u): xlat initialization failed\n", __func__, __LINE__);
+ ERROR("%s (%u): xlat initialization failed\n",
+ __func__, __LINE__);
return ret;
}
@@ -144,11 +145,11 @@
{
int ret;
- /* Setup the MMU cfg for the low region (runtime context). */
+ /* Setup the MMU cfg for the low region (runtime context) */
ret = xlat_arch_setup_mmu_cfg(&runtime_xlat_ctx);
if (ret != 0) {
ERROR("%s (%u): Failed to setup xlat tables for CPU[%u]\n",
- __func__, __LINE__, my_cpuid());
+ __func__, __LINE__, my_cpuid());
return ret;
}