VirtualBox

Changeset 99927 in vbox for trunk


Ignore:
Timestamp:
May 23, 2023 8:05:36 AM (20 months ago)
Author:
vboxsync
Message:

Devices/EFI,Main: Include EFI firmware images for ARMv8 in VBoxDD2 and provide a basic efi device specific for ARMv8 to get rid of the firmware loading hack by using a dedicated device implementation mapping the image as a ROM into the guest address space, bugref:10400

Location:
trunk/src/VBox
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/DevEFI-binaries.S

    r98103 r99927  
    7171.type g_cbEfiFirmware64 object
    7272#endif
     73
     74#ifdef VBOX_VMM_TARGET_ARMV8
     75;
     76; The ARMv8 bits
     77;
     78
     79; 32-bit firmware:
     80.p2align 6
     81.globl NAME(g_abEfiFirmwareAArch32)
     82NAME(g_abEfiFirmwareAArch32):
     83        .incbin "VBoxEFIAArch32.fd"
     84end_aarch32_firmware:
     85
     86.p2align 2
     87.globl NAME(g_cbEfiFirmwareAArch32)
     88NAME(g_cbEfiFirmwareAArch32):
     89        .long end_aarch32_firmware - NAME(g_abEfiFirmwareAArch32)
     90
     91
     92; 64-bit firmware:
     93.p2align 6
     94.globl NAME(g_abEfiFirmwareAArch64)
     95NAME(g_abEfiFirmwareAArch64):
     96        .incbin "VBoxEFIAArch64.fd"
     97end_aarch64_firmware:
     98
     99.p2align 2
     100.globl NAME(g_cbEfiFirmwareAArch64)
     101NAME(g_cbEfiFirmwareAArch64):
     102        .long  end_aarch64_firmware - NAME(g_abEfiFirmwareAArch64)
     103
     104# ifdef ASM_FORMAT_ELF
     105.size g_abEfiFirmwareAArch32 end_aarch32_firmware - NAME(g_abEfiFirmwareAArch32)
     106.type g_abEfiFirmwareAArch32 object
     107.size g_cbEfiFirmwareAArch32 4
     108.type g_cbEfiFirmwareAArch32 object
     109
     110.size g_abEfiFirmwareAArch64 end_aarch64_firmware - NAME(g_abEfiFirmwareAArch64)
     111.type g_abEfiFirmwareAArch64 object
     112.size g_cbEfiFirmwareAArch64 4
     113.type g_cbEfiFirmwareAArch64 object
     114# endif
     115#endif
  • trunk/src/VBox/Devices/Makefile.kmk

    r99918 r99927  
    926926  VBoxDD_SOURCES    += \
    927927        Bus/DevPciGenericEcam.cpp \
     928        EFI/DevEFI-armv8.cpp \
    928929        Gpio/DevPL061.cpp \
    929930        Misc/DevFlashCFI.cpp \
     
    12121213 VBoxDD2_DEFS            = \
    12131214        IN_VBOXDD2 \
    1214         $(if $(VBOX_WITH_PXE_ROM),VBOX_WITH_PXE_ROM,)
     1215        $(if $(VBOX_WITH_PXE_ROM),VBOX_WITH_PXE_ROM,) \
     1216        $(if $(VBOX_WITH_VIRT_ARMV8),VBOX_VMM_TARGET_ARMV8,)
    12151217 VBoxDD2_INCS           := \
    12161218        build \
     
    12431245        $(PATH_STAGE)/$(INST_BIN)VBoxEFI32.fd \
    12441246        $(PATH_STAGE)/$(INST_BIN)VBoxEFI64.fd
     1247  ifdef VBOX_WITH_VIRT_ARMV8
     1248   EFI/DevEFI-binaries.S_DEPS   += \
     1249        $(PATH_STAGE)/$(INST_BIN)VBoxEFIAArch32.fd \
     1250        $(PATH_STAGE)/$(INST_BIN)VBoxEFIAArch64.fd
     1251  endif
    12451252 endif
    12461253
  • trunk/src/VBox/Devices/build/VBoxDD.cpp

    r99893 r99927  
    249249#endif
    250250#ifdef VBOX_VMM_TARGET_ARMV8
     251    rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceEfiArmV8);
     252    if (RT_FAILURE(rc))
     253        return rc;
     254
    251255    rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePl011);
    252256    if (RT_FAILURE(rc))
  • trunk/src/VBox/Devices/build/VBoxDD.h

    r99893 r99927  
    230230
    231231#ifdef VBOX_VMM_TARGET_ARMV8
     232extern const PDMDEVREG g_DeviceEfiArmV8;
    232233extern const PDMDEVREG g_DevicePl011;
    233234extern const PDMDEVREG g_DevicePl031Rtc;
  • trunk/src/VBox/Devices/build/VBoxDD2.h

    r98103 r99927  
    6060extern DECLEXPORT(const unsigned char)  g_abEfiFirmware64[];
    6161extern DECLEXPORT(const unsigned)       g_cbEfiFirmware64;
     62#  ifdef VBOX_VMM_TARGET_ARMV8
     63extern DECLEXPORT(const unsigned char)  g_abEfiFirmwareAArch32[];
     64extern DECLEXPORT(const unsigned)       g_cbEfiFirmwareAArch32;
     65extern DECLEXPORT(const unsigned char)  g_abEfiFirmwareAArch64[];
     66extern DECLEXPORT(const unsigned)       g_cbEfiFirmwareAArch64;
     67#  endif
    6268# endif
    6369#else  /* !IN_VBOXDD2 */
     
    8389extern DECLIMPORT(const unsigned char)  g_abEfiFirmware64[];
    8490extern DECLIMPORT(const unsigned)       g_cbEfiFirmware64;
     91#  ifdef VBOX_VMM_TARGET_ARMV8
     92extern DECLIMPORT(const unsigned char)  g_abEfiFirmwareAArch32[];
     93extern DECLIMPORT(const unsigned)       g_cbEfiFirmwareAArch32;
     94extern DECLIMPORT(const unsigned char)  g_abEfiFirmwareAArch64[];
     95extern DECLIMPORT(const unsigned)       g_cbEfiFirmwareAArch64;
     96#  endif
    8597# endif
    8698#endif /* !IN_VBOXDD2 */
  • trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp

    r99925 r99927  
    178178
    179179        PCFGMNODE pMemRegion = NULL;
    180         InsertConfigNode(pMem, "Flash", &pMemRegion);
    181         InsertConfigInteger(pMemRegion, "GCPhysStart", 0);
    182         InsertConfigInteger(pMemRegion, "Size", 64 * _1M);
    183 
    184180        InsertConfigNode(pMem, "Conventional", &pMemRegion);
    185181        InsertConfigInteger(pMemRegion, "GCPhysStart", 0x40000000);
     
    285281
    286282        InsertConfigNode(pRoot, "Devices", &pDevices);
     283
     284        InsertConfigNode(pDevices, "efi-armv8",             &pDev);
     285        InsertConfigNode(pDev,     "0",                     &pInst);
     286        InsertConfigNode(pInst,    "Config",                &pCfg);
     287        InsertConfigInteger(pCfg,  "GCPhysLoadAddress",     0);
     288        InsertConfigString(pCfg,   "EfiRom",                "VBoxEFIAArch64.fd");
    287289
    288290        InsertConfigNode(pDevices, "gic",                   &pDev);
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