VirtualBox

Changeset 90067 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Jul 6, 2021 1:36:02 PM (4 years ago)
Author:
vboxsync
Message:

Runtime/RTEfi*: Start of a VFS module to access a EFI variable store stored in the NVRAM file to allow changing the firmware config without having the VM running, bugref:9580 [build fix]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/efi/efivarstorevfs.cpp

    r90065 r90067  
    16111611    uint32_t const cBlocks = (uint32_t)(cbStore / cbBlock);
    16121612
     1613    EFI_GUID                   GuidVarStore = EFI_VARSTORE_FILESYSTEM_GUID;
     1614    EFI_GUID                   GuidVarAuth  = EFI_VARSTORE_HEADER_GUID_AUTHENTICATED_VARIABLE;
    16131615    EFI_FIRMWARE_VOLUME_HEADER FvHdr;       RT_ZERO(FvHdr);
    16141616    EFI_FW_BLOCK_MAP           BlockMap;    RT_ZERO(BlockMap);
     
    16161618
    16171619    /* Firmware volume header. */
    1618     FvHdr.GuidFilesystem = EFI_VARSTORE_FILESYSTEM_GUID;
     1620    memcpy(&FvHdr.GuidFilesystem, &GuidVarStore, sizeof(GuidVarStore));
    16191621    FvHdr.cbFv           = RT_H2LE_U64(cbStore);
    16201622    FvHdr.u32Signature   = RT_H2LE_U32(EFI_FIRMWARE_VOLUME_HEADER_SIGNATURE);
     
    16401642
    16411643    /* Variable store header. */
    1642     VarStoreHdr.GuidVarStore = EFI_VARSTORE_HEADER_GUID_AUTHENTICATED_VARIABLE;
     1644    memcpy(&VarStoreHdr.GuidVarStore, &GuidVarAuth, sizeof(GuidVarAuth));
    16431645    VarStoreHdr.cbVarStore   = cbStore - sizeof(FvHdr) - sizeof(BlockMap);
    16441646    VarStoreHdr.bFmt         = EFI_VARSTORE_HEADER_FMT_FORMATTED;
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