VirtualBox

Ignore:
Timestamp:
Oct 28, 2015 8:17:18 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103761
Message:

EFI/Firmware: 'svn merge /vendor/edk2/UDK2010.SR1 /vendor/edk2/current .', reverting and removing files+dirs listed in ReadMe.vbox, resolving conflicts with help from ../UDK2014.SP1/. This is a raw untested merge.

Location:
trunk/src/VBox/Devices/EFI/Firmware
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware

  • trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/Library/NvVarsFileLib/FsAccess.c

    r48674 r58459  
    22  File System Access for NvVarsFileLib
    33
    4   Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
     4  Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
    55  This program and the accompanying materials
    66  are licensed and made available under the terms and conditions of the BSD License
     
    277277
    278278/**
     279  Writes a variable to indicate that the NV variables
     280  have been loaded from the file system.
     281
     282**/
     283STATIC
     284VOID
     285SetNvVarsVariable (
     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/**
    279312  Loads the non-volatile variables from the NvVars file on the
    280313  given file system.
     
    333366  // subsequent attempts.
    334367  //
    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();
    346369
    347370  DEBUG ((
     
    409432  VOID                        *VariableData;
    410433  EFI_HANDLE                  SerializedVariables;
     434
     435  SerializedVariables = NULL;
    411436
    412437  Status = SerializeVariablesNewInstance (&SerializedVariables);
     
    476501
    477502  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
    478510    DEBUG ((EFI_D_INFO, "Saved NV Variables to NvVars file\n"));
    479511  }
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