Create a new PSCI error code and use it to signal that starting the CPU is
impossible as the PSCI firmware is missing. Sponsored by: ABT Systmes Ltd
This commit is contained in:
parent
96474ac2aa
commit
d01cc693f9
@ -461,9 +461,13 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg)
|
||||
|
||||
err = psci_cpu_on(target_cpu, pa, cpuid);
|
||||
if (err != PSCI_RETVAL_SUCCESS) {
|
||||
/* Panic here if INVARIANTS are enabled */
|
||||
KASSERT(0, ("Failed to start CPU %u (%lx)\n", id,
|
||||
target_cpu));
|
||||
/*
|
||||
* Panic here if INVARIANTS are enabled and PSCI failed to
|
||||
* start the requested CPU. If psci_cpu_on returns PSCI_MISSING
|
||||
* to indicate we are unable to use it to start the given CPU.
|
||||
*/
|
||||
KASSERT(err == PSCI_MISSING,
|
||||
("Failed to start CPU %u (%lx)\n", id, target_cpu));
|
||||
|
||||
pcpu_destroy(pcpup);
|
||||
kmem_free(kernel_arena, (vm_offset_t)dpcpu[cpuid - 1],
|
||||
|
@ -189,12 +189,12 @@ psci_cpu_on(unsigned long cpu, unsigned long entry, unsigned long context_id)
|
||||
node = ofw_bus_find_compatible(OF_peer(0), "arm,psci-0.2");
|
||||
if (node == 0)
|
||||
/* TODO: Handle psci 0.1 */
|
||||
return (PSCI_RETVAL_INTERNAL_FAILURE);
|
||||
return (PSCI_MISSING);
|
||||
|
||||
fnid = PSCI_FNID_CPU_ON;
|
||||
callfn = psci_get_callfn(node);
|
||||
if (callfn == NULL)
|
||||
return (PSCI_RETVAL_INTERNAL_FAILURE);
|
||||
return (PSCI_MISSING);
|
||||
} else {
|
||||
callfn = psci_softc->psci_call;
|
||||
fnid = psci_softc->psci_fnids[PSCI_FN_CPU_ON];
|
||||
|
@ -54,6 +54,10 @@ int psci_smc_despatch(register_t, register_t, register_t, register_t);
|
||||
#define PSCI_RETVAL_INTERNAL_FAILURE -6
|
||||
#define PSCI_RETVAL_NOT_PRESENT -7
|
||||
#define PSCI_RETVAL_DISABLED -8
|
||||
/*
|
||||
* Used to signal PSCI is not available, e.g. to start a CPU.
|
||||
*/
|
||||
#define PSCI_MISSING 1
|
||||
|
||||
/*
|
||||
* PSCI function codes (as per PSCI v0.2).
|
||||
|
Loading…
Reference in New Issue
Block a user