Compare commits
25 Commits
2020.03.17
...
system76-c
Author | SHA1 | Date | |
---|---|---|---|
f40dc199c2 | |||
3f54e8f57a | |||
55849a4a46 | |||
74f2015276 | |||
6dff36c9b2 | |||
814c0fa862 | |||
a05aa4aff0 | |||
30c84e8277 | |||
2ba9869baa | |||
826b9d30cf | |||
b0e7e3919f | |||
976842130a | |||
52d5d1b2c5 | |||
7050fc3a26 | |||
0eca9e3c1a | |||
19304f2144 | |||
b062ed0c86 | |||
d9cf95c6a2 | |||
75a5161506 | |||
d193b18023 | |||
061df3962f | |||
f6e7c15556 | |||
95fb70f34d | |||
900debdeec | |||
33006e4f4e |
@ -1169,6 +1169,19 @@ InstallReadyToLock (
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOLEAN ESCAPE_KEY_DETECTED = FALSE;
|
||||||
|
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
EscapeKeyNotify (
|
||||||
|
EFI_KEY_DATA *KeyData
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DEBUG((DEBUG_INFO, "Detected escape key\n"));
|
||||||
|
ESCAPE_KEY_DETECTED = TRUE;
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
PlatformBdsPolicyBehavior (
|
PlatformBdsPolicyBehavior (
|
||||||
@ -1198,9 +1211,13 @@ Returns:
|
|||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINT16 Timeout;
|
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *SimpleTextInEx;
|
||||||
|
EFI_KEY_DATA EscapeKeyData;
|
||||||
|
EFI_HANDLE EscapeKeyHandle;
|
||||||
EFI_EVENT UserInputDurationTime;
|
EFI_EVENT UserInputDurationTime;
|
||||||
|
EFI_EVENT Events[2];
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
UINT16 Timeout;
|
||||||
EFI_INPUT_KEY Key;
|
EFI_INPUT_KEY Key;
|
||||||
EFI_BOOT_MODE BootMode;
|
EFI_BOOT_MODE BootMode;
|
||||||
|
|
||||||
@ -1238,6 +1255,30 @@ Returns:
|
|||||||
PlatformBdsNoConsoleAction ();
|
PlatformBdsNoConsoleAction ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Find simple text input extension protocol for console in
|
||||||
|
SimpleTextInEx = NULL;
|
||||||
|
Status = gBS->HandleProtocol(
|
||||||
|
gST->ConsoleInHandle,
|
||||||
|
&gEfiSimpleTextInputExProtocolGuid,
|
||||||
|
(VOID **) &SimpleTextInEx
|
||||||
|
);
|
||||||
|
|
||||||
|
// Register a handler for escape key
|
||||||
|
ESCAPE_KEY_DETECTED = FALSE;
|
||||||
|
if (SimpleTextInEx != NULL) {
|
||||||
|
EscapeKeyData.Key.ScanCode = SCAN_ESC;
|
||||||
|
EscapeKeyData.Key.UnicodeChar = 0;
|
||||||
|
EscapeKeyData.KeyState.KeyShiftState = 0;
|
||||||
|
EscapeKeyData.KeyState.KeyToggleState = 0;
|
||||||
|
Status = SimpleTextInEx->RegisterKeyNotify(
|
||||||
|
SimpleTextInEx,
|
||||||
|
&EscapeKeyData,
|
||||||
|
EscapeKeyNotify,
|
||||||
|
&EscapeKeyHandle
|
||||||
|
);
|
||||||
|
ASSERT (Status == EFI_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Perform some platform specific connect sequence
|
// Perform some platform specific connect sequence
|
||||||
//
|
//
|
||||||
@ -1250,9 +1291,9 @@ Returns:
|
|||||||
|
|
||||||
//
|
//
|
||||||
BdsLibConnectAll ();
|
BdsLibConnectAll ();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create a 1s duration event to ensure user has enough input time to enter Setup
|
// Create a 2s duration event to ensure user has enough input time to enter Setup
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EVT_TIMER,
|
EVT_TIMER,
|
||||||
@ -1265,24 +1306,49 @@ Returns:
|
|||||||
Status = gBS->SetTimer (UserInputDurationTime, TimerRelative, 20000000);
|
Status = gBS->SetTimer (UserInputDurationTime, TimerRelative, 20000000);
|
||||||
ASSERT (Status == EFI_SUCCESS);
|
ASSERT (Status == EFI_SUCCESS);
|
||||||
|
|
||||||
//
|
// Connect all drivers, could be delayed
|
||||||
// To give the User a chance to enter Setup here, if user set TimeOut is 0.
|
BdsLibConnectAll ();
|
||||||
// BDS should still give user a chance to enter Setup
|
|
||||||
// Check whether the user input after the duration time has expired
|
// The escape key could have been pressed already
|
||||||
//
|
if (!ESCAPE_KEY_DETECTED) {
|
||||||
gBS->WaitForEvent (1, &UserInputDurationTime, &Index);
|
//
|
||||||
gBS->CloseEvent (UserInputDurationTime);
|
// To give the User a chance to enter Setup here, if user set TimeOut is 0.
|
||||||
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
// BDS should still give user a chance to enter Setup
|
||||||
|
// Check whether the user input after the duration time has expired
|
||||||
if (!EFI_ERROR (Status)) {
|
//
|
||||||
//
|
Events[0] = gST->ConIn->WaitForKey;
|
||||||
// Enter Setup if user input
|
Events[1] = UserInputDurationTime;
|
||||||
//
|
gBS->WaitForEvent (2, Events, &Index);
|
||||||
Timeout = 0xffff;
|
|
||||||
} else {
|
|
||||||
Timeout = 0;
|
|
||||||
}
|
}
|
||||||
|
gBS->CloseEvent (UserInputDurationTime);
|
||||||
|
|
||||||
|
if (SimpleTextInEx != NULL) {
|
||||||
|
// Remove escape key handler
|
||||||
|
Status = SimpleTextInEx->UnregisterKeyNotify(
|
||||||
|
SimpleTextInEx,
|
||||||
|
EscapeKeyHandle
|
||||||
|
);
|
||||||
|
ASSERT (Status == EFI_SUCCESS);
|
||||||
|
} else {
|
||||||
|
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
||||||
|
if (!EFI_ERROR (Status)) {
|
||||||
|
//
|
||||||
|
// Enter Setup if user input
|
||||||
|
//
|
||||||
|
ESCAPE_KEY_DETECTED = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ESCAPE_KEY_DETECTED) {
|
||||||
|
Timeout = 0xffff;
|
||||||
|
DEBUG((DEBUG_INFO, "Escape key detected, going to menu\n"));
|
||||||
|
|
||||||
|
// Clear pending keypresses if we are going to the menu
|
||||||
|
while (!EFI_ERROR (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key))) {}
|
||||||
|
} else {
|
||||||
|
Timeout = 0;
|
||||||
|
}
|
||||||
|
|
||||||
BdsLibEnumerateAllBootOption (BootOptionList);
|
BdsLibEnumerateAllBootOption (BootOptionList);
|
||||||
PlatformBdsEnterFrontPage (Timeout, FALSE);
|
PlatformBdsEnterFrontPage (Timeout, FALSE);
|
||||||
//not run/reached if Timeout = 0xffff
|
//not run/reached if Timeout = 0xffff
|
||||||
@ -1291,6 +1357,42 @@ Returns:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
PlatformBdsPreBoot (
|
||||||
|
IN BDS_COMMON_OPTION *Option
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
EFI_EVENT UserInputDurationTime;
|
||||||
|
EFI_EVENT Events[2];
|
||||||
|
UINTN Index;
|
||||||
|
|
||||||
|
if (!ESCAPE_KEY_DETECTED) {
|
||||||
|
// Did not enter menu, return immediately
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear screen before waiting for input
|
||||||
|
gST->ConOut->ClearScreen(gST->ConOut);
|
||||||
|
|
||||||
|
// Create a 1s duration event to ensure user has enough input time to provide a key to boot option
|
||||||
|
Status = gBS->CreateEvent (
|
||||||
|
EVT_TIMER,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
&UserInputDurationTime
|
||||||
|
);
|
||||||
|
ASSERT (Status == EFI_SUCCESS);
|
||||||
|
Status = gBS->SetTimer (UserInputDurationTime, TimerRelative, 10000000);
|
||||||
|
ASSERT (Status == EFI_SUCCESS);
|
||||||
|
|
||||||
|
Events[0] = gST->ConIn->WaitForKey;
|
||||||
|
Events[1] = UserInputDurationTime;
|
||||||
|
gBS->WaitForEvent (2, Events, &Index);
|
||||||
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
PlatformBdsBootSuccess (
|
PlatformBdsBootSuccess (
|
||||||
@ -1315,7 +1417,14 @@ Returns:
|
|||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
CHAR16 *TmpStr;
|
EFI_INPUT_KEY Key;
|
||||||
|
CHAR16 *TmpStr;
|
||||||
|
|
||||||
|
// Clear screen before showing success message
|
||||||
|
gST->ConOut->ClearScreen(gST->ConOut);
|
||||||
|
|
||||||
|
// Clear pending keypresses before showing success message
|
||||||
|
while (!EFI_ERROR (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key))) {}
|
||||||
|
|
||||||
//
|
//
|
||||||
// If Boot returned with EFI_SUCCESS and there is not in the boot device
|
// If Boot returned with EFI_SUCCESS and there is not in the boot device
|
||||||
@ -1358,7 +1467,14 @@ Returns:
|
|||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
CHAR16 *TmpStr;
|
EFI_INPUT_KEY Key;
|
||||||
|
CHAR16 *TmpStr;
|
||||||
|
|
||||||
|
// Clear screen before showing fail message
|
||||||
|
gST->ConOut->ClearScreen(gST->ConOut);
|
||||||
|
|
||||||
|
// Clear pending keypresses before showing fail message
|
||||||
|
while (!EFI_ERROR (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key))) {}
|
||||||
|
|
||||||
//
|
//
|
||||||
// If Boot returned with failed status then we need to pop up a UI and wait
|
// If Boot returned with failed status then we need to pop up a UI and wait
|
||||||
|
@ -110,6 +110,12 @@ INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
|
|||||||
INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
|
INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
|
||||||
INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
|
INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
|
||||||
INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
|
INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
|
||||||
|
!ifdef $(FIRMWARE_OPEN_FIRMWARE_SMMSTORE)
|
||||||
|
!if $(ARCH) == IA32
|
||||||
|
!else
|
||||||
|
INF RuleOverride=BINARY USE = X64 $(FIRMWARE_OPEN_FIRMWARE_SMMSTORE)
|
||||||
|
!endif
|
||||||
|
!endif
|
||||||
INF MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
|
INF MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
|
||||||
|
|
||||||
INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
|
INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
|
||||||
@ -119,6 +125,12 @@ INF PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
|
|||||||
INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
|
INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
|
||||||
INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
|
INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
|
||||||
INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
|
INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
|
||||||
|
!ifdef $(FIRMWARE_OPEN_FIRMWARE_SETUP)
|
||||||
|
!if $(ARCH) == IA32
|
||||||
|
!else
|
||||||
|
INF RuleOverride=BINARY USE = X64 $(FIRMWARE_OPEN_FIRMWARE_SETUP)
|
||||||
|
!endif
|
||||||
|
!endif
|
||||||
INF CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf
|
INF CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf
|
||||||
|
|
||||||
INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
|
INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
|
||||||
@ -213,10 +225,26 @@ FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
|
|||||||
SECTION RAW = CorebootPayloadPkg/Logo/Logo.bmp
|
SECTION RAW = CorebootPayloadPkg/Logo/Logo.bmp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
!ifdef $(FIRMWARE_OPEN_GOP_POLICY)
|
||||||
|
# Add PlatformGopPolicy implementation
|
||||||
|
!if $(ARCH) == IA32
|
||||||
|
!else
|
||||||
|
INF RuleOverride=BINARY USE = X64 $(FIRMWARE_OPEN_GOP_POLICY)
|
||||||
|
!endif
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef $(FIRMWARE_OPEN_GOP)
|
||||||
|
# Use IntelGopDriver binary
|
||||||
|
!if $(ARCH) == IA32
|
||||||
|
!else
|
||||||
|
INF RuleOverride=BINARY USE = X64 $(FIRMWARE_OPEN_GOP)
|
||||||
|
!endif
|
||||||
|
!else
|
||||||
#
|
#
|
||||||
# Framebuffer Gop
|
# Framebuffer Gop
|
||||||
#
|
#
|
||||||
INF CorebootPayloadPkg/FbGop/FbGop.inf
|
INF CorebootPayloadPkg/FbGop/FbGop.inf
|
||||||
|
!endif
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
|
@ -303,7 +303,7 @@
|
|||||||
# The following parameters are set by Library/PlatformHookLib
|
# The following parameters are set by Library/PlatformHookLib
|
||||||
#
|
#
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|FALSE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|FALSE
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x3f8
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x3e8
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|$(BAUD_RATE)
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|$(BAUD_RATE)
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|1
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|1
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@
|
|||||||
# The following parameters are set by Library/PlatformHookLib
|
# The following parameters are set by Library/PlatformHookLib
|
||||||
#
|
#
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|FALSE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|FALSE
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x3f8
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x3e8
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|$(BAUD_RATE)
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|$(BAUD_RATE)
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|1
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|1
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 315 KiB |
@ -91,6 +91,12 @@ PlatformBdsPolicyBehavior (
|
|||||||
IN BASEM_MEMORY_TEST BaseMemoryTest
|
IN BASEM_MEMORY_TEST BaseMemoryTest
|
||||||
);
|
);
|
||||||
|
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
PlatformBdsPreBoot (
|
||||||
|
IN BDS_COMMON_OPTION *Option
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Hook point for a user-provided function, for after a boot attempt fails.
|
Hook point for a user-provided function, for after a boot attempt fails.
|
||||||
|
|
||||||
|
@ -2964,6 +2964,7 @@ BdsDeleteAllInvalidEfiBootOption (
|
|||||||
UINTN Index2;
|
UINTN Index2;
|
||||||
UINT16 BootOption[BOOT_OPTION_MAX_CHAR];
|
UINT16 BootOption[BOOT_OPTION_MAX_CHAR];
|
||||||
EFI_DEVICE_PATH_PROTOCOL *OptionDevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *OptionDevicePath;
|
||||||
|
EFI_DEVICE_PATH_PROTOCOL *WorkingDevicePath;
|
||||||
UINT8 *TempPtr;
|
UINT8 *TempPtr;
|
||||||
CHAR16 *Description;
|
CHAR16 *Description;
|
||||||
BOOLEAN Corrupted;
|
BOOLEAN Corrupted;
|
||||||
@ -3018,6 +3019,24 @@ BdsDeleteAllInvalidEfiBootOption (
|
|||||||
Index++;
|
Index++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// If it's Device Path that starts with a hard drive path, append it with the front part to compose a
|
||||||
|
// full device path
|
||||||
|
//
|
||||||
|
WorkingDevicePath = NULL;
|
||||||
|
if ((DevicePathType (OptionDevicePath) == MEDIA_DEVICE_PATH) &&
|
||||||
|
(DevicePathSubType (OptionDevicePath) == MEDIA_HARDDRIVE_DP)) {
|
||||||
|
WorkingDevicePath = BdsExpandPartitionPartialDevicePathToFull (
|
||||||
|
(HARDDRIVE_DEVICE_PATH *)OptionDevicePath
|
||||||
|
);
|
||||||
|
if (WorkingDevicePath != NULL) {
|
||||||
|
OptionDevicePath = WorkingDevicePath;
|
||||||
|
} else {
|
||||||
|
// Ensure unexpandable HD paths are removed
|
||||||
|
Corrupted = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Corrupted || !BdsLibIsValidEFIBootOptDevicePathExt (OptionDevicePath, FALSE, Description)) {
|
if (Corrupted || !BdsLibIsValidEFIBootOptDevicePathExt (OptionDevicePath, FALSE, Description)) {
|
||||||
@ -3139,6 +3158,7 @@ BdsLibEnumerateAllBootOption (
|
|||||||
EFI_BLOCK_IO_PROTOCOL *BlkIo;
|
EFI_BLOCK_IO_PROTOCOL *BlkIo;
|
||||||
BOOLEAN Removable[2];
|
BOOLEAN Removable[2];
|
||||||
UINTN RemovableIndex;
|
UINTN RemovableIndex;
|
||||||
|
UINTN DPTIndex;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
UINTN NumOfLoadFileHandles;
|
UINTN NumOfLoadFileHandles;
|
||||||
EFI_HANDLE *LoadFileHandles;
|
EFI_HANDLE *LoadFileHandles;
|
||||||
@ -3234,6 +3254,7 @@ BdsLibEnumerateAllBootOption (
|
|||||||
);
|
);
|
||||||
|
|
||||||
for (RemovableIndex = 0; RemovableIndex < 2; RemovableIndex++) {
|
for (RemovableIndex = 0; RemovableIndex < 2; RemovableIndex++) {
|
||||||
|
for (DPTIndex = 0; DPTIndex < 2; DPTIndex++) {
|
||||||
for (Index = 0; Index < NumberBlockIoHandles; Index++) {
|
for (Index = 0; Index < NumberBlockIoHandles; Index++) {
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
BlockIoHandles[Index],
|
BlockIoHandles[Index],
|
||||||
@ -3256,6 +3277,22 @@ BdsLibEnumerateAllBootOption (
|
|||||||
DevicePath = DevicePathFromHandle (BlockIoHandles[Index]);
|
DevicePath = DevicePathFromHandle (BlockIoHandles[Index]);
|
||||||
DevicePathType = BdsGetBootTypeFromDevicePath (DevicePath);
|
DevicePathType = BdsGetBootTypeFromDevicePath (DevicePath);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Skip devices that do not have an EFI volume
|
||||||
|
//
|
||||||
|
if (BdsLibGetBootableHandle (DevicePath) == NULL) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do NVMe devices first, all others second
|
||||||
|
if (DPTIndex == 0) {
|
||||||
|
if (DevicePathType != BDS_EFI_MESSAGE_NVME_BOOT) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} else if (DevicePathType == BDS_EFI_MESSAGE_NVME_BOOT) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// get description for current block handle
|
// get description for current block handle
|
||||||
//
|
//
|
||||||
@ -3266,7 +3303,7 @@ BdsLibEnumerateAllBootOption (
|
|||||||
if (DevName != NULL) {
|
if (DevName != NULL) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"Floppy: %s", DevName);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"Floppy: %s", DevName);
|
||||||
} else if (FloppyNumber != 0) {
|
} else if (FloppyNumber != 0) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_FLOPPY)), FloppyNumber);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_FLOPPY)), FloppyNumber + 1);
|
||||||
} else {
|
} else {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_FLOPPY)));
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_FLOPPY)));
|
||||||
}
|
}
|
||||||
@ -3283,7 +3320,7 @@ BdsLibEnumerateAllBootOption (
|
|||||||
if (DevName != NULL) {
|
if (DevName != NULL) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"CD/DVD: %s", DevName);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"CD/DVD: %s", DevName);
|
||||||
} else if (CdromNumber != 0) {
|
} else if (CdromNumber != 0) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_CD_DVD)), CdromNumber);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_CD_DVD)), CdromNumber + 1);
|
||||||
} else {
|
} else {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_CD_DVD)));
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_CD_DVD)));
|
||||||
}
|
}
|
||||||
@ -3296,7 +3333,7 @@ BdsLibEnumerateAllBootOption (
|
|||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"SATA: %s", DevName);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"SATA: %s", DevName);
|
||||||
}
|
}
|
||||||
} else if (HarddriveNumber != 0) {
|
} else if (HarddriveNumber != 0) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_HARDDRIVE)), HarddriveNumber);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_HARDDRIVE)), HarddriveNumber + 1);
|
||||||
} else {
|
} else {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_HARDDRIVE)));
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_HARDDRIVE)));
|
||||||
}
|
}
|
||||||
@ -3310,7 +3347,7 @@ BdsLibEnumerateAllBootOption (
|
|||||||
if (DevName != NULL) {
|
if (DevName != NULL) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"USB: %s", DevName);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"USB: %s", DevName);
|
||||||
} else if (UsbNumber != 0) {
|
} else if (UsbNumber != 0) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_USB)), UsbNumber);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_USB)), UsbNumber + 1);
|
||||||
} else {
|
} else {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_USB)));
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_USB)));
|
||||||
}
|
}
|
||||||
@ -3322,7 +3359,7 @@ BdsLibEnumerateAllBootOption (
|
|||||||
if (DevName != NULL) {
|
if (DevName != NULL) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"SCSI: %s", DevName);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"SCSI: %s", DevName);
|
||||||
} else if (ScsiNumber != 0) {
|
} else if (ScsiNumber != 0) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_SCSI)), ScsiNumber);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_SCSI)), ScsiNumber + 1);
|
||||||
} else {
|
} else {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_SCSI)));
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_SCSI)));
|
||||||
}
|
}
|
||||||
@ -3334,7 +3371,7 @@ BdsLibEnumerateAllBootOption (
|
|||||||
if (DevName != NULL) {
|
if (DevName != NULL) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"eMMC: %s", DevName);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"eMMC: %s", DevName);
|
||||||
} else if (MiscNumber != 0) {
|
} else if (MiscNumber != 0) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"EFI eMMC Device %d", MiscNumber);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"EFI eMMC Device %d", MiscNumber + 1);
|
||||||
} else {
|
} else {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"EFI eMMC Device");
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"EFI eMMC Device");
|
||||||
}
|
}
|
||||||
@ -3346,7 +3383,7 @@ BdsLibEnumerateAllBootOption (
|
|||||||
if (DevName != NULL) {
|
if (DevName != NULL) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"SD: %s", DevName);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"SD: %s", DevName);
|
||||||
} else if (SdNumber != 0) {
|
} else if (SdNumber != 0) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"EFI SD Device %d", SdNumber);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"EFI SD Device %d", SdNumber + 1);
|
||||||
} else {
|
} else {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"EFI SD Device");
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"EFI SD Device");
|
||||||
}
|
}
|
||||||
@ -3358,7 +3395,7 @@ BdsLibEnumerateAllBootOption (
|
|||||||
if (DevName != NULL) {
|
if (DevName != NULL) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"NVMe: %s", DevName);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"NVMe: %s", DevName);
|
||||||
} else if (NvmeNumber != 0) {
|
} else if (NvmeNumber != 0) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"EFI NVMe Device %d", NvmeNumber);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"EFI NVMe Device %d", NvmeNumber + 1);
|
||||||
} else {
|
} else {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"EFI NVMe Device");
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"EFI NVMe Device");
|
||||||
}
|
}
|
||||||
@ -3376,6 +3413,7 @@ BdsLibEnumerateAllBootOption (
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NumberBlockIoHandles != 0) {
|
if (NumberBlockIoHandles != 0) {
|
||||||
@ -3431,7 +3469,7 @@ BdsLibEnumerateAllBootOption (
|
|||||||
BdsLibDeleteOptionFromHandle (FileSystemHandles[Index]);
|
BdsLibDeleteOptionFromHandle (FileSystemHandles[Index]);
|
||||||
} else {
|
} else {
|
||||||
if (NonBlockNumber != 0) {
|
if (NonBlockNumber != 0) {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_NON_BLOCK)), NonBlockNumber);
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_NON_BLOCK)), NonBlockNumber + 1);
|
||||||
} else {
|
} else {
|
||||||
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_NON_BLOCK)));
|
UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById (STRING_TOKEN (STR_DESCRIPTION_NON_BLOCK)));
|
||||||
}
|
}
|
||||||
|
@ -105,6 +105,8 @@ BdsBootDeviceSelect (
|
|||||||
BOOLEAN BootNextExist;
|
BOOLEAN BootNextExist;
|
||||||
LIST_ENTRY *LinkBootNext;
|
LIST_ENTRY *LinkBootNext;
|
||||||
EFI_EVENT ConnectConInEvent;
|
EFI_EVENT ConnectConInEvent;
|
||||||
|
UINTN Index;
|
||||||
|
EFI_INPUT_KEY Key;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Got the latest boot option
|
// Got the latest boot option
|
||||||
@ -261,6 +263,8 @@ BdsBootDeviceSelect (
|
|||||||
//
|
//
|
||||||
BdsSetConsoleMode (FALSE);
|
BdsSetConsoleMode (FALSE);
|
||||||
|
|
||||||
|
PlatformBdsPreBoot (BootOption);
|
||||||
|
|
||||||
//
|
//
|
||||||
// All the driver options should have been processed since
|
// All the driver options should have been processed since
|
||||||
// now boot will be performed.
|
// now boot will be performed.
|
||||||
@ -273,6 +277,16 @@ BdsBootDeviceSelect (
|
|||||||
BootOption->StatusString = GetStringById (STRING_TOKEN (STR_BOOT_FAILED));
|
BootOption->StatusString = GetStringById (STRING_TOKEN (STR_BOOT_FAILED));
|
||||||
PlatformBdsBootFail (BootOption, Status, ExitData, ExitDataSize);
|
PlatformBdsBootFail (BootOption, Status, ExitData, ExitDataSize);
|
||||||
|
|
||||||
|
// Wait for key
|
||||||
|
gST->ConOut->OutputString (
|
||||||
|
gST->ConOut,
|
||||||
|
GetStringById (STRING_TOKEN (STR_ANY_KEY_CONTINUE))
|
||||||
|
);
|
||||||
|
Status = gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &Index);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
ASSERT (Index == 0);
|
||||||
|
while (!EFI_ERROR (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key))) {}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check the next boot option
|
// Check the next boot option
|
||||||
//
|
//
|
||||||
|
@ -26,6 +26,14 @@ formset
|
|||||||
name = BmmData,
|
name = BmmData,
|
||||||
guid = BOOT_MAINT_FORMSET_GUID;
|
guid = BOOT_MAINT_FORMSET_GUID;
|
||||||
|
|
||||||
|
form formid = FORM_BOOT_CHG_ID,
|
||||||
|
title = STRING_TOKEN(STR_FORM_BOOT_CHG_TITLE);
|
||||||
|
|
||||||
|
label FORM_BOOT_CHG_ID;
|
||||||
|
label LABEL_END;
|
||||||
|
|
||||||
|
endform;
|
||||||
|
|
||||||
form formid = FORM_MAIN_ID,
|
form formid = FORM_MAIN_ID,
|
||||||
title = STRING_TOKEN(STR_FORM_MAIN_TITLE);
|
title = STRING_TOKEN(STR_FORM_MAIN_TITLE);
|
||||||
|
|
||||||
@ -74,14 +82,6 @@ formset
|
|||||||
label LABEL_END;
|
label LABEL_END;
|
||||||
endform;
|
endform;
|
||||||
|
|
||||||
form formid = FORM_BOOT_CHG_ID,
|
|
||||||
title = STRING_TOKEN(STR_FORM_BOOT_CHG_TITLE);
|
|
||||||
|
|
||||||
label FORM_BOOT_CHG_ID;
|
|
||||||
label LABEL_END;
|
|
||||||
|
|
||||||
endform;
|
|
||||||
|
|
||||||
form formid = FORM_DRV_DEL_ID,
|
form formid = FORM_DRV_DEL_ID,
|
||||||
title = STRING_TOKEN(STR_FORM_DRV_DEL_TITLE);
|
title = STRING_TOKEN(STR_FORM_DRV_DEL_TITLE);
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@
|
|||||||
#language fr-FR "Boot system from a file or device"
|
#language fr-FR "Boot system from a file or device"
|
||||||
#string STR_OPTIONAL_DATA #language en-US "Input Optional Data"
|
#string STR_OPTIONAL_DATA #language en-US "Input Optional Data"
|
||||||
#language fr-FR "Input Optional Data"
|
#language fr-FR "Input Optional Data"
|
||||||
#string STR_CHANGE_ORDER #language en-US "Change the order"
|
#string STR_CHANGE_ORDER #language en-US "Change Boot Order"
|
||||||
#language fr-FR "Change the order"
|
#language fr-FR "Change the order"
|
||||||
#string STR_BOOT_LEGACY #language en-US "Boot Legacy System"
|
#string STR_BOOT_LEGACY #language en-US "Boot Legacy System"
|
||||||
#language fr-FR "Boot Legacy System"
|
#language fr-FR "Boot Legacy System"
|
||||||
|
@ -1483,7 +1483,8 @@ FormSetDispatcher (
|
|||||||
EFI_BROWSER_ACTION_REQUEST ActionRequest;
|
EFI_BROWSER_ACTION_REQUEST ActionRequest;
|
||||||
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
UpdatePageId (CallbackData, FORM_MAIN_ID);
|
UpdatePageId (CallbackData, FORM_BOOT_CHG_ID);
|
||||||
|
UpdatePageBody (FORM_BOOT_CHG_ID, CallbackData);
|
||||||
|
|
||||||
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
|
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
|
||||||
Status = gFormBrowser2->SendForm (
|
Status = gFormBrowser2->SendForm (
|
||||||
|
@ -203,6 +203,7 @@ CallBootManager (
|
|||||||
CHAR16 *ExitData;
|
CHAR16 *ExitData;
|
||||||
UINTN ExitDataSize;
|
UINTN ExitDataSize;
|
||||||
EFI_STRING_ID Token;
|
EFI_STRING_ID Token;
|
||||||
|
UINTN Index;
|
||||||
EFI_INPUT_KEY Key;
|
EFI_INPUT_KEY Key;
|
||||||
CHAR16 *HelpString;
|
CHAR16 *HelpString;
|
||||||
UINTN HelpSize;
|
UINTN HelpSize;
|
||||||
@ -379,6 +380,8 @@ CallBootManager (
|
|||||||
//
|
//
|
||||||
BdsSetConsoleMode (FALSE);
|
BdsSetConsoleMode (FALSE);
|
||||||
|
|
||||||
|
PlatformBdsPreBoot (gOption);
|
||||||
|
|
||||||
//
|
//
|
||||||
// parse the selected option
|
// parse the selected option
|
||||||
//
|
//
|
||||||
@ -390,10 +393,15 @@ CallBootManager (
|
|||||||
} else {
|
} else {
|
||||||
gOption->StatusString = GetStringById (STRING_TOKEN (STR_BOOT_FAILED));
|
gOption->StatusString = GetStringById (STRING_TOKEN (STR_BOOT_FAILED));
|
||||||
PlatformBdsBootFail (gOption, Status, ExitData, ExitDataSize);
|
PlatformBdsBootFail (gOption, Status, ExitData, ExitDataSize);
|
||||||
|
|
||||||
|
// Wait for key
|
||||||
gST->ConOut->OutputString (
|
gST->ConOut->OutputString (
|
||||||
gST->ConOut,
|
gST->ConOut,
|
||||||
GetStringById (STRING_TOKEN (STR_ANY_KEY_CONTINUE))
|
GetStringById (STRING_TOKEN (STR_ANY_KEY_CONTINUE))
|
||||||
);
|
);
|
||||||
gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
Status = gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &Index);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
ASSERT (Index == 0);
|
||||||
|
while (!EFI_ERROR (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key))) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include "Bds.h"
|
#include "Bds.h"
|
||||||
#include "FrontPage.h"
|
#include "FrontPage.h"
|
||||||
|
|
||||||
#define BOOT_MANAGER_FORM_ID 0x1000
|
#define BOOT_MANAGER_FORM_ID 0x1030
|
||||||
|
|
||||||
#define LABEL_BOOT_OPTION 0x00
|
#define LABEL_BOOT_OPTION 0x00
|
||||||
#define LABEL_BOOT_OPTION_END 0x01
|
#define LABEL_BOOT_OPTION_END 0x01
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#langdef en-US "English"
|
#langdef en-US "English"
|
||||||
#langdef fr-FR "Français"
|
#langdef fr-FR "Français"
|
||||||
|
|
||||||
#string STR_BM_BANNER #language en-US "Boot Menu"
|
#string STR_BM_BANNER #language en-US "One Time Boot"
|
||||||
#language fr-FR "Boot Menu"
|
#language fr-FR "Boot Menu"
|
||||||
#string STR_HELP_FOOTER #language en-US "↑ and ↓ to change option, ENTER to select an option, ESC to exit"
|
#string STR_HELP_FOOTER #language en-US "↑ and ↓ to change option, ENTER to select an option, ESC to exit"
|
||||||
#language fr-FR "↑ pour ↓ changer l'option, ENTRER choisir une option, ESC pour sortir"
|
#language fr-FR "↑ pour ↓ changer l'option, ENTRER choisir une option, ESC pour sortir"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include <Guid/BdsHii.h>
|
#include <Guid/BdsHii.h>
|
||||||
|
|
||||||
#define BOOT_MANAGER_FORM_ID 0x1000
|
#define BOOT_MANAGER_FORM_ID 0x1030
|
||||||
|
|
||||||
#define LABEL_BOOT_OPTION 0x00
|
#define LABEL_BOOT_OPTION 0x00
|
||||||
#define LABEL_BOOT_OPTION_END 0x01
|
#define LABEL_BOOT_OPTION_END 0x01
|
||||||
@ -32,9 +32,9 @@ formset
|
|||||||
form formid = BOOT_MANAGER_FORM_ID,
|
form formid = BOOT_MANAGER_FORM_ID,
|
||||||
title = STRING_TOKEN(STR_BM_BANNER);
|
title = STRING_TOKEN(STR_BM_BANNER);
|
||||||
|
|
||||||
subtitle text = STRING_TOKEN(STR_LAST_STRING);
|
// subtitle text = STRING_TOKEN(STR_LAST_STRING);
|
||||||
subtitle text = STRING_TOKEN(STR_BOOT_OPTION_BANNER);
|
// subtitle text = STRING_TOKEN(STR_BOOT_OPTION_BANNER);
|
||||||
subtitle text = STRING_TOKEN(STR_LAST_STRING);
|
// subtitle text = STRING_TOKEN(STR_LAST_STRING);
|
||||||
|
|
||||||
//
|
//
|
||||||
// This is where we will dynamically add choices for the Boot Manager
|
// This is where we will dynamically add choices for the Boot Manager
|
||||||
|
@ -920,16 +920,16 @@ UpdateFrontPageStrings (
|
|||||||
SmbiosTable = GetSmbiosTableFromType (EntryPoint, EFI_SMBIOS_TYPE_BIOS_INFORMATION , 0);
|
SmbiosTable = GetSmbiosTableFromType (EntryPoint, EFI_SMBIOS_TYPE_BIOS_INFORMATION , 0);
|
||||||
if (SmbiosTable.Raw == NULL) {
|
if (SmbiosTable.Raw == NULL) {
|
||||||
} else {
|
} else {
|
||||||
NewString3 = AllocateZeroPool (0x60);
|
NewString3 = AllocateZeroPool (0xC0);
|
||||||
|
|
||||||
StrIndex = SmbiosTable.Type0->BiosVersion;
|
StrIndex = SmbiosTable.Type0->BiosVersion;
|
||||||
Str2Index = SmbiosTable.Type0->BiosReleaseDate;
|
Str2Index = SmbiosTable.Type0->BiosReleaseDate;
|
||||||
GetOptionalStringByIndex ((CHAR8*)((UINT8*)SmbiosTable.Raw + SmbiosTable.Hdr->Length), StrIndex, &NewString);
|
GetOptionalStringByIndex ((CHAR8*)((UINT8*)SmbiosTable.Raw + SmbiosTable.Hdr->Length), StrIndex, &NewString);
|
||||||
GetOptionalStringByIndex ((CHAR8*)((UINT8*)SmbiosTable.Raw + SmbiosTable.Hdr->Length), Str2Index, &NewString2);
|
GetOptionalStringByIndex ((CHAR8*)((UINT8*)SmbiosTable.Raw + SmbiosTable.Hdr->Length), Str2Index, &NewString2);
|
||||||
StrCatS (NewString3, 0x60 / sizeof (CHAR16), L"FW: ");
|
StrCatS (NewString3, 0x80 / sizeof (CHAR16), L"Version: ");
|
||||||
StrCatS (NewString3, 0x60 / sizeof (CHAR16), NewString);
|
StrCatS (NewString3, 0x80 / sizeof (CHAR16), NewString);
|
||||||
StrCatS (NewString3, 0x60 / sizeof (CHAR16), L" ");
|
// StrCatS (NewString3, 0x80 / sizeof (CHAR16), L" ");
|
||||||
StrCatS (NewString3, 0x60 / sizeof (CHAR16), NewString2);
|
// StrCatS (NewString3, 0x80 / sizeof (CHAR16), NewString2);
|
||||||
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_BIOS_VERSION);
|
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_BIOS_VERSION);
|
||||||
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString3, NULL);
|
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString3, NULL);
|
||||||
FreePool (NewString);
|
FreePool (NewString);
|
||||||
@ -956,6 +956,16 @@ UpdateFrontPageStrings (
|
|||||||
StrCatS (NewString3, 0x60 / sizeof (CHAR16), L" ");
|
StrCatS (NewString3, 0x60 / sizeof (CHAR16), L" ");
|
||||||
StrCatS (NewString3, 0x60 / sizeof (CHAR16), NewString);
|
StrCatS (NewString3, 0x60 / sizeof (CHAR16), NewString);
|
||||||
}
|
}
|
||||||
|
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_TITLE);
|
||||||
|
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString3, NULL);
|
||||||
|
FreePool (NewString);
|
||||||
|
|
||||||
|
NewString3 = AllocateZeroPool (0x60);
|
||||||
|
|
||||||
|
StrIndex = SmbiosTable.Type1->Version;
|
||||||
|
GetOptionalStringByIndex ((CHAR8*)((UINT8*)SmbiosTable.Raw + SmbiosTable.Hdr->Length), StrIndex, &NewString);
|
||||||
|
StrCatS (NewString3, 0x60 / sizeof (CHAR16), L"Model: ");
|
||||||
|
StrCatS (NewString3, 0x60 / sizeof (CHAR16), NewString);
|
||||||
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_COMPUTER_MODEL);
|
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_COMPUTER_MODEL);
|
||||||
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString3, NULL);
|
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString3, NULL);
|
||||||
FreePool (NewString);
|
FreePool (NewString);
|
||||||
|
@ -44,21 +44,21 @@
|
|||||||
#language fr-FR "ACME® EFI BIOS Version 13.5 Release 1039.92"
|
#language fr-FR "ACME® EFI BIOS Version 13.5 Release 1039.92"
|
||||||
#string STR_FRONT_PAGE_BANNER_3_LEFT #language en-US "Serial Number: 1Z123456789MARMAR (Need SMBIOS entries)"
|
#string STR_FRONT_PAGE_BANNER_3_LEFT #language en-US "Serial Number: 1Z123456789MARMAR (Need SMBIOS entries)"
|
||||||
#language fr-FR "Numéro de série: 1Z123456789MARMAR (Les entrées de SMBIOS de besoin)"
|
#language fr-FR "Numéro de série: 1Z123456789MARMAR (Les entrées de SMBIOS de besoin)"
|
||||||
#string STR_CONTINUE_PROMPT #language en-US "Default Boot"
|
#string STR_CONTINUE_PROMPT #language en-US "Boot Default"
|
||||||
#language fr-FR "Default Boot"
|
#language fr-FR "Default Boot"
|
||||||
#string STR_CONTINUE_HELP #language en-US "Boot the Default Selection"
|
#string STR_CONTINUE_HELP #language en-US "Boot the default entry"
|
||||||
#language fr-FR "Cette sélection dirigera le système pour continuer au charger de procédé"
|
#language fr-FR "Cette sélection dirigera le système pour continuer au charger de procédé"
|
||||||
#string STR_LANGUAGE_SELECT #language en-US "Select Language"
|
#string STR_LANGUAGE_SELECT #language en-US "Select Language"
|
||||||
#language fr-FR "Choisir la Langue"
|
#language fr-FR "Choisir la Langue"
|
||||||
#string STR_LANGUAGE_SELECT_HELP #language en-US "This is the option one adjusts to change the language for the current system"
|
#string STR_LANGUAGE_SELECT_HELP #language en-US "This is the option one adjusts to change the language for the current system"
|
||||||
#language fr-FR "Ceci est l'option que celui ajuste changer la langue pour le système actuel"
|
#language fr-FR "Ceci est l'option que celui ajuste changer la langue pour le système actuel"
|
||||||
#string STR_BOOT_MANAGER #language en-US "Boot Menu"
|
#string STR_BOOT_MANAGER #language en-US "One Time Boot"
|
||||||
#language fr-FR "Charger le Directeur"
|
#language fr-FR "Charger le Directeur"
|
||||||
#string STR_BOOT_MANAGER_HELP #language en-US "Show One-Time Boot Menu"
|
#string STR_BOOT_MANAGER_HELP #language en-US "Boot an entry one time"
|
||||||
#language fr-FR "Cette sélection vous prendra au Directeur de Botte"
|
#language fr-FR "Cette sélection vous prendra au Directeur de Botte"
|
||||||
#string STR_BOOT_MAINT_MANAGER #language en-US "Boot Manager"
|
#string STR_BOOT_MAINT_MANAGER #language en-US "Change Boot Order"
|
||||||
#language fr-FR "Directeur d'Entretien"
|
#language fr-FR "Directeur d'Entretien"
|
||||||
#string STR_BOOT_MAINT_MANAGER_HELP #language en-US "Change/Add/Remove Boot Menu Entries"
|
#string STR_BOOT_MAINT_MANAGER_HELP #language en-US "Change the order of boot entries"
|
||||||
#language fr-FR "Cette sélection vous prendra au Directeur d'Entretien"
|
#language fr-FR "Cette sélection vous prendra au Directeur d'Entretien"
|
||||||
#string STR_DEVICE_MANAGER #language en-US "Device Manager"
|
#string STR_DEVICE_MANAGER #language en-US "Device Manager"
|
||||||
#language fr-FR "Directeur d'appareil"
|
#language fr-FR "Directeur d'appareil"
|
||||||
|
@ -45,25 +45,29 @@ formset
|
|||||||
form formid = FRONT_PAGE_FORM_ID,
|
form formid = FRONT_PAGE_FORM_ID,
|
||||||
title = STRING_TOKEN(STR_FRONT_PAGE_TITLE);
|
title = STRING_TOKEN(STR_FRONT_PAGE_TITLE);
|
||||||
|
|
||||||
banner
|
subtitle text = STRING_TOKEN(STR_FRONT_PAGE_COMPUTER_MODEL);
|
||||||
title = STRING_TOKEN(STR_FRONT_PAGE_COMPUTER_MODEL),
|
subtitle text = STRING_TOKEN(STR_FRONT_PAGE_BIOS_VERSION);
|
||||||
line 1,
|
subtitle text = STRING_TOKEN(STR_NULL_STRING);
|
||||||
align center;
|
|
||||||
|
|
||||||
banner
|
//banner
|
||||||
title = STRING_TOKEN(STR_FRONT_PAGE_BIOS_VERSION),
|
// title = STRING_TOKEN(STR_FRONT_PAGE_COMPUTER_MODEL),
|
||||||
line 3,
|
// line 1,
|
||||||
align left;
|
// align center;
|
||||||
|
|
||||||
banner
|
//banner
|
||||||
title = STRING_TOKEN(STR_FRONT_PAGE_CPU_MODEL),
|
// title = STRING_TOKEN(STR_FRONT_PAGE_BIOS_VERSION),
|
||||||
line 4,
|
// line 3,
|
||||||
align left;
|
// align left;
|
||||||
|
|
||||||
banner
|
//banner
|
||||||
title = STRING_TOKEN(STR_FRONT_PAGE_MEMORY_SIZE),
|
// title = STRING_TOKEN(STR_FRONT_PAGE_CPU_MODEL),
|
||||||
line 5,
|
// line 4,
|
||||||
align left;
|
// align left;
|
||||||
|
|
||||||
|
//banner
|
||||||
|
// title = STRING_TOKEN(STR_FRONT_PAGE_MEMORY_SIZE),
|
||||||
|
// line 5,
|
||||||
|
// align left;
|
||||||
|
|
||||||
subtitle text = STRING_TOKEN(STR_NULL_STRING);
|
subtitle text = STRING_TOKEN(STR_NULL_STRING);
|
||||||
|
|
||||||
@ -73,7 +77,7 @@ formset
|
|||||||
flags = INTERACTIVE,
|
flags = INTERACTIVE,
|
||||||
key = FRONT_PAGE_KEY_CONTINUE;
|
key = FRONT_PAGE_KEY_CONTINUE;
|
||||||
|
|
||||||
subtitle text = STRING_TOKEN(STR_NULL_STRING);
|
//subtitle text = STRING_TOKEN(STR_NULL_STRING);
|
||||||
|
|
||||||
goto FRONT_PAGE_ITEM_THREE,
|
goto FRONT_PAGE_ITEM_THREE,
|
||||||
prompt = STRING_TOKEN(STR_BOOT_MANAGER),
|
prompt = STRING_TOKEN(STR_BOOT_MANAGER),
|
||||||
@ -81,7 +85,7 @@ formset
|
|||||||
flags = INTERACTIVE,
|
flags = INTERACTIVE,
|
||||||
key = FRONT_PAGE_KEY_BOOT_MANAGER;
|
key = FRONT_PAGE_KEY_BOOT_MANAGER;
|
||||||
|
|
||||||
subtitle text = STRING_TOKEN(STR_NULL_STRING);
|
//subtitle text = STRING_TOKEN(STR_NULL_STRING);
|
||||||
|
|
||||||
goto FRONT_PAGE_ITEM_FIVE,
|
goto FRONT_PAGE_ITEM_FIVE,
|
||||||
prompt = STRING_TOKEN(STR_BOOT_MAINT_MANAGER),
|
prompt = STRING_TOKEN(STR_BOOT_MAINT_MANAGER),
|
||||||
|
@ -77,6 +77,8 @@ HotkeyBoot (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINTN ExitDataSize;
|
UINTN ExitDataSize;
|
||||||
CHAR16 *ExitData;
|
CHAR16 *ExitData;
|
||||||
|
UINTN Index;
|
||||||
|
EFI_INPUT_KEY Key;
|
||||||
|
|
||||||
if (mHotkeyBootOption == NULL) {
|
if (mHotkeyBootOption == NULL) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
@ -89,6 +91,8 @@ HotkeyBoot (
|
|||||||
//
|
//
|
||||||
gST->ConOut->Reset (gST->ConOut, FALSE);
|
gST->ConOut->Reset (gST->ConOut, FALSE);
|
||||||
|
|
||||||
|
PlatformBdsPreBoot (mHotkeyBootOption);
|
||||||
|
|
||||||
Status = BdsLibBootViaBootOption (mHotkeyBootOption, mHotkeyBootOption->DevicePath, &ExitDataSize, &ExitData);
|
Status = BdsLibBootViaBootOption (mHotkeyBootOption, mHotkeyBootOption->DevicePath, &ExitDataSize, &ExitData);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -97,6 +101,16 @@ HotkeyBoot (
|
|||||||
//
|
//
|
||||||
mHotkeyBootOption->StatusString = GetStringById (STRING_TOKEN (STR_BOOT_FAILED));
|
mHotkeyBootOption->StatusString = GetStringById (STRING_TOKEN (STR_BOOT_FAILED));
|
||||||
PlatformBdsBootFail (mHotkeyBootOption, Status, ExitData, ExitDataSize);
|
PlatformBdsBootFail (mHotkeyBootOption, Status, ExitData, ExitDataSize);
|
||||||
|
|
||||||
|
// Wait for key
|
||||||
|
gST->ConOut->OutputString (
|
||||||
|
gST->ConOut,
|
||||||
|
GetStringById (STRING_TOKEN (STR_ANY_KEY_CONTINUE))
|
||||||
|
);
|
||||||
|
Status = gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &Index);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
ASSERT (Index == 0);
|
||||||
|
while (!EFI_ERROR (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key))) {}
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// Call platform action to indicate the boot success
|
// Call platform action to indicate the boot success
|
||||||
|
@ -339,7 +339,7 @@ Done:
|
|||||||
PlatformBdsShowProgress (
|
PlatformBdsShowProgress (
|
||||||
Foreground,
|
Foreground,
|
||||||
Background,
|
Background,
|
||||||
L"Press ESC for Boot Options/Settings",
|
L"Press ESC for Boot Options/Settings, or SPACE for Pop!_OS Recovery",
|
||||||
Color,
|
Color,
|
||||||
100,
|
100,
|
||||||
(UINTN) PreviousValue
|
(UINTN) PreviousValue
|
||||||
|
@ -44,8 +44,8 @@ EFI_DRIVER_BINDING_PROTOCOL gPartitionDriverBinding = {
|
|||||||
//
|
//
|
||||||
PARTITION_DETECT_ROUTINE mPartitionDetectRoutineTable[] = {
|
PARTITION_DETECT_ROUTINE mPartitionDetectRoutineTable[] = {
|
||||||
PartitionInstallGptChildHandles,
|
PartitionInstallGptChildHandles,
|
||||||
PartitionInstallMbrChildHandles,
|
|
||||||
PartitionInstallUdfChildHandles,
|
PartitionInstallUdfChildHandles,
|
||||||
|
PartitionInstallMbrChildHandles,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -944,6 +944,7 @@ UpdateVariable (
|
|||||||
UINTN VarSize;
|
UINTN VarSize;
|
||||||
VARIABLE_GLOBAL *Global;
|
VARIABLE_GLOBAL *Global;
|
||||||
UINTN NonVolatileVarableStoreSize;
|
UINTN NonVolatileVarableStoreSize;
|
||||||
|
BOOLEAN Delete = FALSE;
|
||||||
|
|
||||||
Global = &mVariableModuleGlobal->VariableGlobal[Physical];
|
Global = &mVariableModuleGlobal->VariableGlobal[Physical];
|
||||||
|
|
||||||
@ -976,10 +977,8 @@ UpdateVariable (
|
|||||||
// specified causes it to be deleted.
|
// specified causes it to be deleted.
|
||||||
//
|
//
|
||||||
if (DataSize == 0 || (Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == 0) {
|
if (DataSize == 0 || (Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == 0) {
|
||||||
Variable->CurrPtr->State &= VAR_DELETED;
|
DataSize = 0;
|
||||||
UpdateVariableInfo (VariableName, VendorGuid, Variable->Volatile, FALSE, FALSE, TRUE, FALSE);
|
Delete = TRUE;
|
||||||
Status = EFI_SUCCESS;
|
|
||||||
goto Done;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -989,8 +988,12 @@ UpdateVariable (
|
|||||||
if (Variable->CurrPtr->DataSize == DataSize &&
|
if (Variable->CurrPtr->DataSize == DataSize &&
|
||||||
CompareMem (Data, GetVariableDataPtr (Variable->CurrPtr), DataSize) == 0
|
CompareMem (Data, GetVariableDataPtr (Variable->CurrPtr), DataSize) == 0
|
||||||
) {
|
) {
|
||||||
Status = EFI_SUCCESS;
|
if (Delete) {
|
||||||
goto Done;
|
goto Update;
|
||||||
|
} else {
|
||||||
|
Status = EFI_SUCCESS;
|
||||||
|
goto Done;
|
||||||
|
}
|
||||||
} else if (Variable->CurrPtr->State == VAR_ADDED) {
|
} else if (Variable->CurrPtr->State == VAR_ADDED) {
|
||||||
//
|
//
|
||||||
// Mark the old variable as in delete transition
|
// Mark the old variable as in delete transition
|
||||||
@ -1032,6 +1035,10 @@ UpdateVariable (
|
|||||||
VarDataOffset = VarNameOffset + VarNameSize + GET_PAD_SIZE (VarNameSize);
|
VarDataOffset = VarNameOffset + VarNameSize + GET_PAD_SIZE (VarNameSize);
|
||||||
VarSize = VarDataOffset + DataSize + GET_PAD_SIZE (DataSize);
|
VarSize = VarDataOffset + DataSize + GET_PAD_SIZE (DataSize);
|
||||||
|
|
||||||
|
if (Delete) {
|
||||||
|
goto Store;
|
||||||
|
}
|
||||||
|
|
||||||
if ((Attributes & EFI_VARIABLE_NON_VOLATILE) != 0) {
|
if ((Attributes & EFI_VARIABLE_NON_VOLATILE) != 0) {
|
||||||
NonVolatileVarableStoreSize = ((VARIABLE_STORE_HEADER *)(UINTN)(Global->NonVolatileVariableBase))->Size;
|
NonVolatileVarableStoreSize = ((VARIABLE_STORE_HEADER *)(UINTN)(Global->NonVolatileVariableBase))->Size;
|
||||||
if ((((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0)
|
if ((((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0)
|
||||||
@ -1089,7 +1096,16 @@ UpdateVariable (
|
|||||||
DataSize
|
DataSize
|
||||||
);
|
);
|
||||||
|
|
||||||
if (storeInitialized && ((Attributes & EFI_VARIABLE_NON_VOLATILE) != 0)) {
|
Store:
|
||||||
|
// If the store is initialized
|
||||||
|
// And we are storing or deleting a non volatile variable
|
||||||
|
// Send the new data to SMMSTORE
|
||||||
|
if (storeInitialized && (
|
||||||
|
(Attributes & EFI_VARIABLE_NON_VOLATILE) != 0 || (
|
||||||
|
Delete &&
|
||||||
|
(Variable->CurrPtr->Attributes & EFI_VARIABLE_NON_VOLATILE) != 0
|
||||||
|
)
|
||||||
|
)) {
|
||||||
|
|
||||||
/* TODO: add hook for logging nv changes here */
|
/* TODO: add hook for logging nv changes here */
|
||||||
|
|
||||||
@ -1116,6 +1132,7 @@ UpdateVariable (
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Update:
|
||||||
//
|
//
|
||||||
// Mark the old variable as deleted
|
// Mark the old variable as deleted
|
||||||
//
|
//
|
||||||
@ -1123,7 +1140,11 @@ UpdateVariable (
|
|||||||
Variable->CurrPtr->State &= VAR_DELETED;
|
Variable->CurrPtr->State &= VAR_DELETED;
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateVariableInfo (VariableName, VendorGuid, Variable->Volatile, FALSE, TRUE, FALSE, FALSE);
|
if (Delete) {
|
||||||
|
UpdateVariableInfo (VariableName, VendorGuid, Variable->Volatile, FALSE, FALSE, TRUE, FALSE);
|
||||||
|
} else {
|
||||||
|
UpdateVariableInfo (VariableName, VendorGuid, Variable->Volatile, FALSE, TRUE, FALSE, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
@ -1935,7 +1956,7 @@ VariableCommonInitialize (
|
|||||||
while (i < read_cmd.bufsize) {
|
while (i < read_cmd.bufsize) {
|
||||||
// assume native endian
|
// assume native endian
|
||||||
UINT32 keysz = ((UINT32 *)(buf + i))[0];
|
UINT32 keysz = ((UINT32 *)(buf + i))[0];
|
||||||
if (keysz == 0xffffffff)
|
if (keysz == 0 || keysz == 0xffffffff)
|
||||||
break; // no more entries
|
break; // no more entries
|
||||||
UINTN valsz = ((UINT32 *)(buf + i))[1];
|
UINTN valsz = ((UINT32 *)(buf + i))[1];
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ CommonExceptionHandlerWorker (
|
|||||||
//
|
//
|
||||||
// Enter a dead loop if needn't to execute old IDT handler further
|
// Enter a dead loop if needn't to execute old IDT handler further
|
||||||
//
|
//
|
||||||
if (ReservedVectors[ExceptionType].Attribute != EFI_VECTOR_HANDOFF_HOOK_BEFORE) {
|
if (ReservedVectors[ExceptionType].Attribute != EFI_VECTOR_HANDOFF_HOOK_BEFORE && ExceptionType != EXCEPT_IA32_DEBUG) {
|
||||||
CpuDeadLoop ();
|
CpuDeadLoop ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -299,4 +299,3 @@ RegisterCpuInterruptHandlerWorker (
|
|||||||
ExternalInterruptHandler[InterruptType] = InterruptHandler;
|
ExternalInterruptHandler[InterruptType] = InterruptHandler;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user