VirtualBox

Ignore:
Timestamp:
Jun 7, 2023 5:58:00 PM (18 months ago)
Author:
vboxsync
Message:

Main/ConsoleImplConfigArmV8.cpp: Fix FDT generation for SMP configurations, bugref:10454

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp

    r100041 r100105  
    5757#include <iprt/stream.h>
    5858
     59#include <iprt/formats/arm-psci.h>
     60
    5961#include <VBox/vmm/vmmr3vtable.h>
    6062#include <VBox/vmm/vmapi.h>
     
    190192        /* Configure the Power State Coordination Interface. */
    191193        vrc = RTFdtNodeAdd(hFdt, "psci");                                                   VRC();
    192         vrc = RTFdtNodePropertyAddU32(   hFdt, "migrate",          0x84000005);             VRC();
    193         vrc = RTFdtNodePropertyAddU32(   hFdt, "cpu_on",           0x84000003);             VRC();
    194         vrc = RTFdtNodePropertyAddU32(   hFdt, "cpu_off",          0x84000002);             VRC();
    195         vrc = RTFdtNodePropertyAddU32(   hFdt, "cpu_suspend",      0x84000001);             VRC();
     194        vrc = RTFdtNodePropertyAddU32(   hFdt, "migrate",          ARM_PSCI_FUNC_ID_CREATE_FAST_32(ARM_PSCI_FUNC_ID_MIGRATE));             VRC();
     195        vrc = RTFdtNodePropertyAddU32(   hFdt, "cpu_on",           ARM_PSCI_FUNC_ID_CREATE_FAST_32(ARM_PSCI_FUNC_ID_CPU_ON));              VRC();
     196        vrc = RTFdtNodePropertyAddU32(   hFdt, "cpu_off",          ARM_PSCI_FUNC_ID_CREATE_FAST_32(ARM_PSCI_FUNC_ID_CPU_OFF));             VRC();
     197        vrc = RTFdtNodePropertyAddU32(   hFdt, "cpu_suspend",      ARM_PSCI_FUNC_ID_CREATE_FAST_32(ARM_PSCI_FUNC_ID_CPU_SUSPEND));         VRC();
    196198        vrc = RTFdtNodePropertyAddString(hFdt, "method",           "hvc");                  VRC();
    197199        vrc = RTFdtNodePropertyAddStringList(hFdt, "compatible",   3,
     
    287289            vrc = RTFdtNodeAddF(hFdt, "cpu@%u", i);                                         VRC();
    288290            vrc = RTFdtNodePropertyAddU32(hFdt, "phandle", aidPHandleCpus[i]);              VRC();
    289             vrc = RTFdtNodePropertyAddU32(hFdt, "reg", 0);                                  VRC();
     291            vrc = RTFdtNodePropertyAddU32(hFdt, "reg", i);                                  VRC();
    290292            vrc = RTFdtNodePropertyAddString(hFdt, "compatible",  "arm,cortex-a15");        VRC();
    291293            vrc = RTFdtNodePropertyAddString(hFdt, "device_type", "cpu");                   VRC();
     294            if (cCpus > 1)
     295            {
     296                vrc = RTFdtNodePropertyAddString(hFdt, "enable-method",  "psci");           VRC();
     297            }
    292298            vrc = RTFdtNodeFinalize(hFdt);                                                  VRC();
    293299        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette