Skip to content

Commit 16a4df5

Browse files
committed
feat(psci): advertise PSCI 1.1 instead of 0.2
To enable vendor-specific SMCs that rely on SMCCC v1.1 semantics, the emulated PSCI version is updated from 0.2 to 1.1. The PSCI FEATURES handler is extended to advertise only the required PSCI 1.1 capability, PSCI_1_1_RESET_TYPE_VENDOR_START. This is required by platforms such as NXP S32G399A, where Linux will not issue certain vendor SMCs unless PSCI 1.1 is reported. Signed-off-by: João Peixoto <joaopeixotooficial@gmail.com>
1 parent 0ab3287 commit 16a4df5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/arch/armv8/inc/arch/psci.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#define PSCI_FEATURES (0x8400000A)
2323
#define PSCI_MIG_INFO_TYPE (0x84000006)
2424

25+
#define PSCI_1_1_RESET_TYPE_VENDOR_START (0x80000000)
26+
2527
#ifdef AARCH32
2628
#define PSCI_CPU_SUSPEND PSCI_CPU_SUSPEND_SMC32
2729
#define PSCI_CPU_ON PSCI_CPU_ON_SMC32
@@ -40,6 +42,7 @@
4042
#define PSCI_INVALID_ADDRESS (-1L)
4143

4244
#define PSCI_VERSION_0_2 (2U)
45+
#define PSCI_VERSION_1_1 (0x10001)
4346
#define PSCI_GET_VERSION_MAJOR(ver) (u16)((ver) >> 16)
4447
#define PSCI_GET_VERSION(major, minor) (((major) << 16) | (minor))
4548

src/arch/armv8/psci.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ static int32_t psci_features_handler(uint32_t feature_id)
170170
case PSCI_AFFINITY_INFO_SMC32:
171171
case PSCI_AFFINITY_INFO_SMC64:
172172
case PSCI_FEATURES:
173+
case PSCI_1_1_RESET_TYPE_VENDOR_START:
173174
ret = PSCI_E_SUCCESS;
174175
break;
175176
default:
@@ -186,7 +187,7 @@ int32_t psci_smc_handler(uint32_t smc_fid, unsigned long x1, unsigned long x2, u
186187

187188
switch (smc_fid) {
188189
case PSCI_VERSION:
189-
ret = PSCI_VERSION_0_2;
190+
ret = PSCI_VERSION_1_1;
190191
break;
191192

192193
case PSCI_CPU_OFF:

0 commit comments

Comments
 (0)