VirtualBox

Changeset 26110 in vbox for trunk/src/VBox/Devices/EFI


Ignore:
Timestamp:
Jan 31, 2010 7:21:34 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57098
Message:

EFI: functional reset

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/DevEFI.cpp

    r26109 r26110  
    109109
    110110    /* Boot parameters passed to the firmware */
    111     char           pszBootArgs[256];
     111    char            pszBootArgs[256];
     112
     113    /* Host UUID (for DMI) */
     114    RTUUID          aUuid;
    112115} DEVEFI;
    113116typedef DEVEFI *PDEVEFI;
     
    406409{
    407410    PDEVEFI  pThis = PDMINS_2_DATA(pDevIns, PDEVEFI);
     411    int rc;
    408412
    409413    LogFlow(("efiReset\n"));
     
    417421    pThis->szPanicMsg[0] = '\0';
    418422
     423    /* Plant DMI and MPS tables */
     424    rc = FwCommonPlantDMITable(pDevIns,
     425                               pThis->au8DMIPage,
     426                               VBOX_DMI_TABLE_SIZE,
     427                               &pThis->aUuid,
     428                               pDevIns->pCfgHandle,
     429                               true /* fPutSmbiosHeaders */);
     430    Assert(RT_SUCCESS(rc));
     431
     432    FwCommonPlantMpsTable(pDevIns,
     433                          pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE,
     434                          pThis->cCpus);   
     435
    419436    /*
    420437     * Re-shadow the Firmware Volume and make it RAM/RAM.
     
    425442    {
    426443        uint8_t abPage[PAGE_SIZE];
    427         int     rc;
    428444
    429445        /* Read the (original) ROM page and write it back to the RAM page. */
     
    926942    uuid.Gen.u16TimeMid = RT_H2BE_U16(uuid.Gen.u16TimeMid);
    927943    uuid.Gen.u16TimeHiAndVersion = RT_H2BE_U16(uuid.Gen.u16TimeHiAndVersion);
    928     rc = FwCommonPlantDMITable(pDevIns, pThis->au8DMIPage, VBOX_DMI_TABLE_SIZE, &uuid, pCfgHandle, true /* fPutSmbiosHeaders */);
    929     if (RT_FAILURE(rc))
    930         return rc;
    931 
    932     FwCommonPlantMpsTable(pDevIns, pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE, pThis->cCpus);
    933 
    934     rc = PDMDevHlpROMRegister(pDevIns, VBOX_DMI_TABLE_BASE, _4K, pThis->au8DMIPage,
    935                               PGMPHYS_ROM_FLAGS_PERMANENT_BINARY, "DMI tables");
    936     if (RT_FAILURE(rc))
    937         return rc;
     944    memcpy(&pThis->aUuid, &uuid, sizeof pThis->aUuid);
     945
    938946
    939947    /* RAM sizes */
     
    10121020                                 efiIOPortWrite, efiIOPortRead,
    10131021                                 NULL, NULL, "EFI communication ports");
     1022    if (RT_FAILURE(rc))
     1023        return rc;
     1024
     1025    rc = PDMDevHlpROMRegister(pDevIns, VBOX_DMI_TABLE_BASE, _4K,
     1026                              pThis->au8DMIPage,
     1027                              PGMPHYS_ROM_FLAGS_PERMANENT_BINARY,
     1028                              "DMI tables");
    10141029    if (RT_FAILURE(rc))
    10151030        return rc;
Note: See TracChangeset for help on using the changeset viewer.

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