|
@@ -432,13 +432,12 @@ out:
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
-static void fdt_add_psci_node(void *fdt)
|
|
|
|
|
|
+static void fdt_add_psci_node(void *fdt, ARMCPU *armcpu)
|
|
{
|
|
{
|
|
uint32_t cpu_suspend_fn;
|
|
uint32_t cpu_suspend_fn;
|
|
uint32_t cpu_off_fn;
|
|
uint32_t cpu_off_fn;
|
|
uint32_t cpu_on_fn;
|
|
uint32_t cpu_on_fn;
|
|
uint32_t migrate_fn;
|
|
uint32_t migrate_fn;
|
|
- ARMCPU *armcpu = ARM_CPU(qemu_get_cpu(0));
|
|
|
|
const char *psci_method;
|
|
const char *psci_method;
|
|
int64_t psci_conduit;
|
|
int64_t psci_conduit;
|
|
int rc;
|
|
int rc;
|
|
@@ -512,7 +511,8 @@ static void fdt_add_psci_node(void *fdt)
|
|
}
|
|
}
|
|
|
|
|
|
int arm_load_dtb(hwaddr addr, const struct arm_boot_info *binfo,
|
|
int arm_load_dtb(hwaddr addr, const struct arm_boot_info *binfo,
|
|
- hwaddr addr_limit, AddressSpace *as, MachineState *ms)
|
|
|
|
|
|
+ hwaddr addr_limit, AddressSpace *as, MachineState *ms,
|
|
|
|
+ ARMCPU *cpu)
|
|
{
|
|
{
|
|
void *fdt = NULL;
|
|
void *fdt = NULL;
|
|
int size, rc, n = 0;
|
|
int size, rc, n = 0;
|
|
@@ -655,7 +655,7 @@ int arm_load_dtb(hwaddr addr, const struct arm_boot_info *binfo,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- fdt_add_psci_node(fdt);
|
|
|
|
|
|
+ fdt_add_psci_node(fdt, cpu);
|
|
|
|
|
|
if (binfo->modify_dtb) {
|
|
if (binfo->modify_dtb) {
|
|
binfo->modify_dtb(binfo, fdt);
|
|
binfo->modify_dtb(binfo, fdt);
|
|
@@ -1327,7 +1327,8 @@ void arm_load_kernel(ARMCPU *cpu, MachineState *ms, struct arm_boot_info *info)
|
|
* decided whether to enable PSCI and set the psci-conduit CPU properties.
|
|
* decided whether to enable PSCI and set the psci-conduit CPU properties.
|
|
*/
|
|
*/
|
|
if (!info->skip_dtb_autoload && have_dtb(info)) {
|
|
if (!info->skip_dtb_autoload && have_dtb(info)) {
|
|
- if (arm_load_dtb(info->dtb_start, info, info->dtb_limit, as, ms) < 0) {
|
|
|
|
|
|
+ if (arm_load_dtb(info->dtb_start, info, info->dtb_limit,
|
|
|
|
+ as, ms, cpu) < 0) {
|
|
exit(1);
|
|
exit(1);
|
|
}
|
|
}
|
|
}
|
|
}
|