Allow platform specific service handling on PSCI
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 2 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 2 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [PATCH v1 0/2] Allow platform specific service handling on PSCI
Quoted 55 lines · Tom Rini
Quoted 52 lines · chee.hong.ang at intel.com
From: "Ang, Chee Hong" <[email protected]>
Currently u-boot only support standard PSCI functions for power management
and lack of convenient method to allow the users to extend the PSCI functions
to support platform specific services. Most of the u-boot users still rely
on ATF (ARM Trusted Firmware) to handle the standard power management and
platform specific PSCI services.
The purpose of this patchsets is to allow u-boot users to support their
own platform specific secure SMC/PSCI services without making any SMC calls to ATF. This will benefit the users who need to use u- boot as the
only bootloader and secure service provider without relying on ATF.Below is a simple code example for adding your own PSCI functions:
#include <
common.h>
#include <errno.h>
#include <asm/io.h>
#include <asm/psci.h>
#include <asm/secure.h>#define
PSCI_SMC64_FUNC_ID10xC2000001
#definePSCI_SMC64_FUNC_ID20xC2000002static void
__securepsci_plat_specific_func1(unsigned long function_id){ /* Your code for handling the SMC/PSCI platform specificservice 1 */
}static void
__securepsci_plat_specific_func2(unsigned long function_id){ /* Your code for handling the SMC/PSCI platform specificservice 2 */
}DECLARE_SECURE_SVC(plat_specific_func1,
PSCI_SMC64_FUNC_ID1,psci_plat_specific_func1); DECLARE_SECURE_SVC(plat_specific_func2, PSCI_SMC64_FUNC_ID2, psci_plat_specific_func2);Ang, Chee Hong (1):
ARMv8: Disable fwcall when PSCI is enabled
Quoted 7 lines
Quoted 2 lines
Chee Hong Ang (1):
ARMv8: Allow SiP service extensions on top of PSCI codeConceptually, I suppose this is a logical step. In specifics, would we
want to make this functionality opt-in, or no, that doesn't make sense?
Allowing user to add platform specific service is part of SMC/PSCI specification as specifed in ARM document (Table 2-1):
http://infocenter.arm.com/help/topic/com.arm.doc.den0028b/ARM_DEN0028B_
SMC_Calling_Convention.pdf
So I think this functionality should be part of the standard PSCI/SMC implementation. Currently u-boot only support standard PSCI call which is:
----------------------------------------------
| 0x84000000-0x8400001F | PSCI 32-bit calls | | 0xC4000000-0xC400001F | PSCI 64-bit calls |
----------------------------------------------
My implementation do not affect or alter the behavior of any existing standard PSCI calls.
Users can simply add their own platform specific services by using the service call range as below:
----------------------------------------------------
| 0xC2000000-0xC200FFFF | SMC64: SiP Service Calls | | 0xC3000000-0xC300FFFF | SMC64: OEM Service Calls |
----------------------------------------------------
For complete service call ranges please refer to Table 6-2 in the ARM document.