summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@linaro.org>2015-11-11 14:15:20 +0800
committerHaojian Zhuang <haojian.zhuang@linaro.org>2015-11-14 19:37:45 +0800
commitda0a4822e4f3c6e27a3c06cf2724da302350c209 (patch)
tree3dc9500a1249cbb185df722a3a59cc0bb7db795e
parentb3e188537b3a70ef7e5b015ba94d7fb006772cdc (diff)
HiKeyPkg: remove bootdevice command
Since boot priority is already implemented, needn't to config boot device any more. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
-rw-r--r--HisiPkg/HiKeyPkg/Drivers/HiKeyDxe/HiKeyDxe.c33
-rw-r--r--HisiPkg/HiKeyPkg/Drivers/HiKeyFastbootDxe/HiKeyFastboot.c44
2 files changed, 0 insertions, 77 deletions
diff --git a/HisiPkg/HiKeyPkg/Drivers/HiKeyDxe/HiKeyDxe.c b/HisiPkg/HiKeyPkg/Drivers/HiKeyDxe/HiKeyDxe.c
index 157baf4a8..4dd00a4f4 100644
--- a/HisiPkg/HiKeyPkg/Drivers/HiKeyDxe/HiKeyDxe.c
+++ b/HisiPkg/HiKeyPkg/Drivers/HiKeyDxe/HiKeyDxe.c
@@ -132,38 +132,6 @@ exit:
return Status;
}
-STATIC
-VOID
-EFIAPI
-HiKeyInitBootDevice (
- IN VOID
- )
-{
- EFI_STATUS Status;
- UINTN VariableSize;
- CHAR16 DefaultBootDevice[] = L"emmc";
-
- VariableSize = BOOT_DEVICE_LENGTH * sizeof (CHAR16);
- Status = gRT->GetVariable (
- (CHAR16 *)L"HiKeyBootDevice",
- &gArmGlobalVariableGuid,
- NULL,
- &VariableSize,
- &DefaultBootDevice
- );
- if (Status == EFI_NOT_FOUND) {
- Status = gRT->SetVariable (
- (CHAR16*)L"HiKeyBootDevice",
- &gArmGlobalVariableGuid,
- EFI_VARIABLE_NON_VOLATILE |
- EFI_VARIABLE_BOOTSERVICE_ACCESS |
- EFI_VARIABLE_RUNTIME_ACCESS,
- VariableSize,
- DefaultBootDevice
- );
- }
-}
-
EFI_STATUS
EFIAPI
HiKeyEntryPoint (
@@ -174,7 +142,6 @@ HiKeyEntryPoint (
EFI_STATUS Status;
HiKeyInitSerialNo ();
- HiKeyInitBootDevice ();
HiKeyInitPeripherals ();
// Try to install the Flat Device Tree (FDT). This function actually installs the
diff --git a/HisiPkg/HiKeyPkg/Drivers/HiKeyFastbootDxe/HiKeyFastboot.c b/HisiPkg/HiKeyPkg/Drivers/HiKeyFastbootDxe/HiKeyFastboot.c
index 834aa4daa..59f7375f8 100644
--- a/HisiPkg/HiKeyPkg/Drivers/HiKeyFastbootDxe/HiKeyFastboot.c
+++ b/HisiPkg/HiKeyPkg/Drivers/HiKeyFastbootDxe/HiKeyFastboot.c
@@ -630,7 +630,6 @@ HiKeyFastbootPlatformOemCommand (
)
{
CHAR16 CommandUnicode[65];
- CHAR16 BootDevice[BOOT_DEVICE_LENGTH];
UINTN Index = 0, VariableSize;
UINT16 AutoBoot, Data;
EFI_STATUS Status;
@@ -672,49 +671,6 @@ HiKeyFastbootPlatformOemCommand (
&AutoBoot
);
return Status;
- } else if (AsciiStrnCmp (Command, "bootdevice", AsciiStrLen ("bootdevice")) == 0) {
- Index += sizeof ("bootdevice");
- while (TRUE) {
- if (Command[Index] == '\0')
- goto out;
- else if (Command[Index] == ' ')
- Index++;
- else
- break;
- }
- AsciiStrToUnicodeStr (Command + Index, CommandUnicode);
- for (Index = 0; Index < BOOT_DEVICE_LENGTH; Index++) {
- if (IS_ALPHA (CommandUnicode[Index]) == 0)
- break;
- }
- if ((Index == 0) || (Index > BOOT_DEVICE_LENGTH)) {
- DEBUG ((EFI_D_ERROR,
- "HiKey: Invalid Fastboot OEM bootdevice command: %s\n",
- CommandUnicode
- ));
- return EFI_NOT_FOUND;
- }
-
- VariableSize = BOOT_DEVICE_LENGTH * sizeof (UINT16);
- Status = gRT->GetVariable (
- (CHAR16 *)L"HiKeyBootDevice",
- &gArmGlobalVariableGuid,
- NULL,
- &VariableSize,
- &BootDevice
- );
- if (EFI_ERROR (Status) == 0) {
- Status = gRT->SetVariable (
- (CHAR16*)L"HiKeyBootDevice",
- &gArmGlobalVariableGuid,
- EFI_VARIABLE_NON_VOLATILE |
- EFI_VARIABLE_BOOTSERVICE_ACCESS |
- EFI_VARIABLE_RUNTIME_ACCESS,
- VariableSize,
- CommandUnicode
- );
- }
- return Status;
} else {
AsciiStrToUnicodeStr (Command + Index, CommandUnicode);
DEBUG ((EFI_D_ERROR,