diff --git a/plat/intel/soc/common/include/platform_def.h b/plat/intel/soc/common/include/platform_def.h index 12dd49911197e6c9cf5d220cc3e8659c1d9c7ac2..e91995f9add5ff15390af55e069ad76bdc884e3c 100644 --- a/plat/intel/soc/common/include/platform_def.h +++ b/plat/intel/soc/common/include/platform_def.h @@ -16,9 +16,6 @@ #define PLAT_SOCFPGA_STRATIX10 1 #define PLAT_SOCFPGA_AGILEX 2 -#define PLAT_CPUID_RELEASE 0xffe1b000 -#define PLAT_SEC_ENTRY 0xffe1b008 - /* sysmgr.boot_scratch_cold4 & 5 used for CPU release address for SPL */ #define PLAT_CPU_RELEASE_ADDR 0xffd12210 @@ -109,19 +106,24 @@ */ -#define FIRMWARE_WELCOME_STR "Booting Trusted Firmware\n" +#define FIRMWARE_WELCOME_STR "Booting Trusted Firmware\n" + +#define BL1_RO_BASE (0xffe00000) +#define BL1_RO_LIMIT (0xffe0f000) +#define BL1_RW_BASE (0xffe10000) +#define BL1_RW_LIMIT (0xffe1ffff) +#define BL1_RW_SIZE (0x14000) + +#define BL2_BASE (0xffe00000) +#define BL2_LIMIT (0xffe1b000) -#define BL1_RO_BASE (0xffe00000) -#define BL1_RO_LIMIT (0xffe0f000) -#define BL1_RW_BASE (0xffe10000) -#define BL1_RW_LIMIT (0xffe1ffff) -#define BL1_RW_SIZE (0x14000) +#define BL31_BASE (0x1000) +#define BL31_LIMIT (0x81000) -#define BL2_BASE (0xffe00000) -#define BL2_LIMIT (0xffe1b000) +#define BL_DATA_LIMIT PLAT_HANDOFF_OFFSET -#define BL31_BASE (0xffe1c000) -#define BL31_LIMIT (0xffe3bfff) +#define PLAT_CPUID_RELEASE (BL_DATA_LIMIT - 16) +#define PLAT_SEC_ENTRY (BL_DATA_LIMIT - 8) /******************************************************************************* * Platform specific page table and MMU setup constants diff --git a/plat/intel/soc/common/socfpga_psci.c b/plat/intel/soc/common/socfpga_psci.c index e29836173cc8a3386b91ed6dcaecbe1a3704ba8a..65a4b0929b1bd815f2367edd2989fc4b112a6911 100644 --- a/plat/intel/soc/common/socfpga_psci.c +++ b/plat/intel/soc/common/socfpga_psci.c @@ -15,8 +15,6 @@ #include "socfpga_plat_def.h" -uintptr_t *socfpga_sec_entry = (uintptr_t *) PLAT_SEC_ENTRY; -uintptr_t *cpuid_release = (uintptr_t *) PLAT_CPUID_RELEASE; /******************************************************************************* * plat handler called when a CPU is about to enter standby. @@ -45,7 +43,7 @@ int socfpga_pwr_domain_on(u_register_t mpidr) if (cpu_id == -1) return PSCI_E_INTERN_FAIL; - *cpuid_release = cpu_id; + mmio_write_64(PLAT_CPUID_RELEASE, cpu_id); /* release core reset */ mmio_setbits_32(SOCFPGA_RSTMGR_MPUMODRST_OFST, 1 << cpu_id); @@ -183,8 +181,8 @@ int plat_setup_psci_ops(uintptr_t sec_entrypoint, const struct plat_psci_ops **psci_ops) { /* Save warm boot entrypoint.*/ - *socfpga_sec_entry = sec_entrypoint; - + mmio_write_64(PLAT_SEC_ENTRY, sec_entrypoint); *psci_ops = &socfpga_psci_pm_ops; + return 0; }