BootOrder 변수는 Boot####옵션의 정렬된 목록을 구성하는 UINT16의 배열을 포함한다. 배열의 첫 번째 요소는 첫 번째 논리적 부팅 옵션의 값이고 두 번째 요소는 두 번째 논리적 부팅 옵션의 값 등이다. BootOrder 순서 목록은 펌웨어의 부팅 관리자를 기본 부팅 순서로 지정한다.
FS0:\> dmpstore BootOrder -s BootOrder.bin
Save variable to file: BootOrder.bin.
Variable NV+RT+BS '8BE4DF61-93CA-11D2-AA0D-00E098032B8C:BootOrder' DataSize = 0x08
{
UINT32 NameSize; // Size of the variable name in bytes
UINT32 DataSize; // Size of the variable data in bytes
CHAR16 Name[NameSize/2]; // Variable name in CHAR16
EFI_GUID Guid; // Variable GUID
UINT32 Attributes; // Variable attributes
UINT8 Data[DataSize]; // Variable data
UINT32 Crc; // CRC32 checksum for the record
}
Boot0001
Boot0000
Boot0002
Boot0003
FS0:\> dmpstore -l BootOrder.bin
Load and set variables from file: BootOrder.bin.
dmpstore: Incorrect file format.
dmpstore: No matching variables found. Guid 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
EFI_BOOT_SERVICES.CalculateCrc32()
Summary:
Computes and returns a 32-bit CRC for a data buffer.
Prototype:
typedef
EFI_STATUS
(EFIAPI *EFI_CALCULATE_CRC32)
IN VOID *Data,
IN UINTN DataSize,
OUT UINT32 *Crc32
);
Parameters:
Data A pointer to the buffer on which the 32-bit CRC is to be computed.
DataSize The number of bytes in the buffer Data.
Crc32 The 32-bit CRC that was computed for the data buffer specified by Data and DataSize.
Description:
This function computes the 32-bit CRC for the data buffer specified by Data and DataSize. If the 32-bit CRC is computed, then it is returned in Crc32 and EFI_SUCCESS is returned.
UINTN ToWriteSize = sizeof(Crc32);
Status = ShellWriteFile(
FileHandle,
&ToWriteSize,
&Crc32
);
if (EFI_ERROR(Status) || (ToWriteSize != sizeof(Crc32))) {
Print(L"Error! Not all data was written\n");
FreePool(Buffer);
break;
}
FilePos += ToWriteSize;
FS0:\> UpdateDmpstoreDump.efi BootOrder.bin
FS0:\> dmpstore -l BootOrder.bin
Load and set variables from file: BootOrder.bin.
Variable NV+RT+BS '8BE4DF61-93CA-11D2-AA0D-00E098032B8C:BootOrder' DataSize = 0x08