Changeset 72631 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Jun 20, 2018 2:18:56 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/DevEFI.cpp
r72500 r72631 174 174 /** The size of the system EFI ROM. */ 175 175 uint64_t cbEfiRom; 176 /** Offset into the actual ROM within EFI FW volume. */ 177 uint64_t uEfiRomOfs; 176 178 /** The name of the EFI ROM file. */ 177 179 char *pszEfiRomFile; … … 198 200 /** The DMI tables. */ 199 201 uint8_t au8DMIPage[0x1000]; 202 203 /** Should NVRAM range be reserved for flash? */ 204 bool fSkipNvramRange; 200 205 201 206 /** I/O-APIC enabled? */ … … 1894 1899 if (pThis->pu8EfiRom) 1895 1900 { 1896 RTFileReadAllFree(pThis->pu8EfiRom, (size_t)pThis->cbEfiRom );1901 RTFileReadAllFree(pThis->pu8EfiRom, (size_t)pThis->cbEfiRom + pThis->uEfiRomOfs); 1897 1902 pThis->pu8EfiRom = NULL; 1898 1903 } … … 1985 1990 AssertLogRelMsgReturn(!(pThis->cbEfiRom & PAGE_OFFSET_MASK), ("%RX64\n", pThis->cbEfiRom), VERR_INVALID_PARAMETER); 1986 1991 1992 LogRel(("Found EFI FW Volume, %u bytes (%u %u-byte blocks)\n", pFwVolHdr->FvLength, pFwVolHdr->BlockMap[0].NumBlocks, pFwVolHdr->BlockMap[0].Length)); 1993 1994 /* Adjust the FW variables to skip the NVRAM volume. */ 1995 if (pThis->fSkipNvramRange) 1996 { 1997 pThis->cbEfiRom -= pFwVolHdr->FvLength; 1998 pThis->uEfiRomOfs = pFwVolHdr->FvLength; 1999 } 2000 1987 2001 pThis->GCLoadAddress = UINT32_C(0xfffff000) - pThis->cbEfiRom + PAGE_SIZE; 1988 2002 … … 2036 2050 pThis->GCLoadAddress, 2037 2051 cbQuart, 2038 pThis->pu8EfiRom ,2052 pThis->pu8EfiRom + pThis->uEfiRomOfs, 2039 2053 cbQuart, 2040 2054 PGMPHYS_ROM_FLAGS_SHADOWED | PGMPHYS_ROM_FLAGS_PERMANENT_BINARY, … … 2046 2060 pThis->GCLoadAddress + cbQuart, 2047 2061 cbQuart, 2048 pThis->pu8EfiRom + cbQuart,2062 pThis->pu8EfiRom + pThis->uEfiRomOfs + cbQuart, 2049 2063 cbQuart, 2050 2064 PGMPHYS_ROM_FLAGS_SHADOWED | PGMPHYS_ROM_FLAGS_PERMANENT_BINARY, … … 2055 2069 pThis->GCLoadAddress + cbQuart * 2, 2056 2070 cbQuart, 2057 pThis->pu8EfiRom + cbQuart * 2,2071 pThis->pu8EfiRom + pThis->uEfiRomOfs + cbQuart * 2, 2058 2072 cbQuart, 2059 2073 PGMPHYS_ROM_FLAGS_SHADOWED | PGMPHYS_ROM_FLAGS_PERMANENT_BINARY, … … 2064 2078 pThis->GCLoadAddress + cbQuart * 3, 2065 2079 pThis->cbEfiRom - cbQuart * 3, 2066 pThis->pu8EfiRom + cbQuart * 3,2080 pThis->pu8EfiRom + pThis->uEfiRomOfs + cbQuart * 3, 2067 2081 pThis->cbEfiRom - cbQuart * 3, 2068 2082 PGMPHYS_ROM_FLAGS_SHADOWED | PGMPHYS_ROM_FLAGS_PERMANENT_BINARY, … … 2198 2212 "BootArgs\0" 2199 2213 "DeviceProps\0" 2214 "SkipNvramRange\0" // legacy 2200 2215 "GopMode\0" // legacy 2201 2216 "GraphicsMode\0" … … 2270 2285 pThis->pszEfiRomFile = NULL; 2271 2286 } 2287 2288 rc = CFGMR3QueryBoolDef(pCfg, "SkipNvramRange", &pThis->fSkipNvramRange, false); 2289 if (RT_FAILURE(rc)) 2290 return PDMDEV_SET_ERROR(pDevIns, rc, 2291 N_("Configuration error: Querying \"SkipNvramRange\" as integer failed")); 2292 2272 2293 2273 2294 /*
Note:
See TracChangeset
for help on using the changeset viewer.