VirtualBox

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


Ignore:
Timestamp:
Feb 8, 2013 12:27:08 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83682
Message:

Added EFI_VARIABLE_OP_QUERY_REWIND for getting to the first variable.

Location:
trunk/src/VBox/Devices/EFI
Files:
3 edited

Legend:

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

    r44592 r44601  
    460460    if (pEfiVar)
    461461        pEfiVar = RTListGetNext(&pThis->NVRAM.VarList, pEfiVar, EFIVAR, ListNode);
     462    else
     463        pEfiVar = RTListGetFirst(&pThis->NVRAM.VarList, EFIVAR, ListNode);
    462464    nvramWriteVariableOpQueryCopyResult(pThis, pEfiVar);
    463465    return VINF_SUCCESS;
     
    601603                case EFI_VARIABLE_OP_QUERY_NEXT:
    602604                    rc = nvramWriteVariableOpQueryNext(pThis);
     605                    break;
     606
     607                case EFI_VARIABLE_OP_QUERY_REWIND:
     608                    Log2(("EFI_VARIABLE_OP_QUERY_REWIND\n"));
     609                    pThis->NVRAM.pCurVar = NULL;
    603610                    break;
    604611
  • trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/Include/DevEFI.h

    r44591 r44601  
    112112#define EFI_VARIABLE_OP_QUERY        0xdead0001
    113113#define EFI_VARIABLE_OP_QUERY_NEXT   0xdead0002
     114#define EFI_VARIABLE_OP_QUERY_REWIND 0xdead0003
    114115#define EFI_VARIABLE_OP_ADD          0xdead0010
    115116
  • trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxVariable/InitVariable.c

    r44593 r44601  
    235235     * Tell DevEFI which the current variable is, then ask for the next one.
    236236     */
    237     VBoxWriteNVRAMGuidParam(VendorGuid);
    238     VBoxWriteNVRAMNameParam(VariableName);
    239 
    240     u32Rc = VBoxWriteNVRAMDoOp(EFI_VARIABLE_OP_QUERY);
     237    if (!VariableName[0])
     238        u32Rc = VBoxWriteNVRAMDoOp(EFI_VARIABLE_OP_QUERY_REWIND);
     239    else
     240    {
     241        VBoxWriteNVRAMGuidParam(VendorGuid);
     242        VBoxWriteNVRAMNameParam(VariableName);
     243        u32Rc = VBoxWriteNVRAMDoOp(EFI_VARIABLE_OP_QUERY);
     244    }
    241245    //if (u32Rc == EFI_VARIABLE_OP_STATUS_OK) - debug
    242246        u32Rc = VBoxWriteNVRAMDoOp(EFI_VARIABLE_OP_QUERY_NEXT);
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