Changeset 58459 in vbox for trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/Library/NvVarsFileLib
- Timestamp:
- Oct 28, 2015 8:17:18 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 103761
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
-
Property svn:mergeinfo
set to (toggle deleted branches)
/vendor/edk2/current 103735-103757
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/Library/NvVarsFileLib/FsAccess.c
r48674 r58459 2 2 File System Access for NvVarsFileLib 3 3 4 Copyright (c) 2004 - 201 1, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 277 277 278 278 /** 279 Writes a variable to indicate that the NV variables 280 have been loaded from the file system. 281 282 **/ 283 STATIC 284 VOID 285 SetNvVarsVariable ( 286 VOID 287 ) 288 { 289 BOOLEAN VarData; 290 UINTN Size; 291 292 // 293 // Write a variable to indicate we've already loaded the 294 // variable data. If it is found, we skip the loading on 295 // subsequent attempts. 296 // 297 Size = sizeof (VarData); 298 VarData = TRUE; 299 gRT->SetVariable ( 300 L"NvVars", 301 &gEfiSimpleFileSystemProtocolGuid, 302 EFI_VARIABLE_NON_VOLATILE | 303 EFI_VARIABLE_BOOTSERVICE_ACCESS | 304 EFI_VARIABLE_RUNTIME_ACCESS, 305 Size, 306 (VOID*) &VarData 307 ); 308 } 309 310 311 /** 279 312 Loads the non-volatile variables from the NvVars file on the 280 313 given file system. … … 333 366 // subsequent attempts. 334 367 // 335 Size = sizeof (VarData); 336 VarData = TRUE; 337 gRT->SetVariable ( 338 L"NvVars", 339 &gEfiSimpleFileSystemProtocolGuid, 340 EFI_VARIABLE_NON_VOLATILE | 341 EFI_VARIABLE_BOOTSERVICE_ACCESS | 342 EFI_VARIABLE_RUNTIME_ACCESS, 343 Size, 344 (VOID*) &VarData 345 ); 368 SetNvVarsVariable(); 346 369 347 370 DEBUG (( … … 409 432 VOID *VariableData; 410 433 EFI_HANDLE SerializedVariables; 434 435 SerializedVariables = NULL; 411 436 412 437 Status = SerializeVariablesNewInstance (&SerializedVariables); … … 476 501 477 502 if (!EFI_ERROR (Status)) { 503 // 504 // Write a variable to indicate we've already loaded the 505 // variable data. If it is found, we skip the loading on 506 // subsequent attempts. 507 // 508 SetNvVarsVariable(); 509 478 510 DEBUG ((EFI_D_INFO, "Saved NV Variables to NvVars file\n")); 479 511 }
Note:
See TracChangeset
for help on using the changeset viewer.