From f426fc0519103defb3dcf4a9d86d985d48204424 Mon Sep 17 00:00:00 2001 From: Soby Mathew Date: Tue, 13 Sep 2016 14:19:08 +0100 Subject: PSCI: Introduce PSCI Library argument structure This patch introduces a `psci_lib_args_t` structure which must be passed into `psci_setup()` which is then used to initialize the PSCI library. The `psci_lib_args_t` is a versioned structure so as to enable compatibility checks during library initialization. Both BL31 and SP_MIN are modified to use the new structure. SP_MIN is also modified to add version string and build message as part of its cold boot log just like the other BLs in Trusted Firmware. NOTE: Please be aware that this patch modifies the prototype of `psci_setup()`, which breaks compatibility with EL3 Runtime Firmware (excluding BL31 and SP_MIN) integrated with the PSCI Library. Change-Id: Ic3761db0b790760a7ad664d8a437c72ea5edbcd6 --- lib/psci/psci_setup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/psci/psci_setup.c') diff --git a/lib/psci/psci_setup.c b/lib/psci/psci_setup.c index 263ab68f9..cb8b77dbd 100644 --- a/lib/psci/psci_setup.c +++ b/lib/psci/psci_setup.c @@ -206,10 +206,12 @@ static void populate_power_domain_tree(const unsigned char *topology) * | CPU 0 | CPU 1 | CPU 2 | CPU 3 | * ------------------------------------------------ ******************************************************************************/ -int psci_setup(uintptr_t mailbox_ep) +int psci_setup(const psci_lib_args_t *lib_args) { const unsigned char *topology_tree; + assert(VERIFY_PSCI_LIB_ARGS_V1(lib_args)); + /* Do the Architectural initialization */ psci_arch_setup(); @@ -234,8 +236,7 @@ int psci_setup(uintptr_t mailbox_ep) */ psci_set_pwr_domains_to_run(PLAT_MAX_PWR_LVL); - assert(mailbox_ep); - plat_setup_psci_ops(mailbox_ep, &psci_plat_pm_ops); + plat_setup_psci_ops((uintptr_t)lib_args->mailbox_ep, &psci_plat_pm_ops); assert(psci_plat_pm_ops); /* -- cgit v1.2.3