summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Bds
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPlatformPkg/Bds')
-rw-r--r--ArmPlatformPkg/Bds/Bds.c4
-rw-r--r--ArmPlatformPkg/Bds/BootMenu.c18
2 files changed, 15 insertions, 7 deletions
diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c
index 2888843058..fa9dfbafc4 100644
--- a/ArmPlatformPkg/Bds/Bds.c
+++ b/ArmPlatformPkg/Bds/Bds.c
@@ -321,8 +321,8 @@ DefineDefaultBootEntries (
OptionalData = (UINT8*)BootArguments;
} else {
- OptionalData = NULL;
- OptionalDataSize = 0;
+ OptionalData = (UINT8*)DefaultBootArgument;
+ OptionalDataSize = CmdLineSize;
}
BootOptionCreate (LOAD_OPTION_ACTIVE | LOAD_OPTION_CATEGORY_BOOT,
diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c
index b04ebd35a2..9ca703842f 100644
--- a/ArmPlatformPkg/Bds/BootMenu.c
+++ b/ArmPlatformPkg/Bds/BootMenu.c
@@ -120,7 +120,8 @@ BootMenuAddBootOption (
BDS_SUPPORTED_DEVICE* SupportedBootDevice;
ARM_BDS_LOADER_ARGUMENTS* BootArguments;
CHAR16 BootDescription[BOOT_DEVICE_DESCRIPTION_MAX];
- CHAR8 CmdLine[BOOT_DEVICE_OPTION_MAX];
+ CHAR8 AsciiCmdLine[BOOT_DEVICE_OPTION_MAX];
+ CHAR16 CmdLine[BOOT_DEVICE_OPTION_MAX];
UINT32 Attributes;
ARM_BDS_LOADER_TYPE BootType;
BDS_LOAD_OPTION_ENTRY *BdsLoadOptionEntry;
@@ -188,13 +189,13 @@ BootMenuAddBootOption (
}
Print(L"Arguments to pass to the binary: ");
- Status = GetHIInputAscii (CmdLine,BOOT_DEVICE_OPTION_MAX);
+ Status = GetHIInputAscii (AsciiCmdLine, BOOT_DEVICE_OPTION_MAX);
if (EFI_ERROR(Status)) {
Status = EFI_ABORTED;
goto FREE_DEVICE_PATH;
}
- CmdLineSize = AsciiStrSize (CmdLine);
+ CmdLineSize = AsciiStrSize (AsciiCmdLine);
InitrdSize = GetDevicePathSize (InitrdPath);
OptionalDataSize = sizeof(ARM_BDS_LOADER_ARGUMENTS) + CmdLineSize + InitrdSize;
@@ -207,8 +208,15 @@ BootMenuAddBootOption (
OptionalData = (UINT8*)BootArguments;
} else {
- OptionalData = NULL;
- OptionalDataSize = 0;
+ Print (L"Arguments to pass to the EFI Application: ");
+ Status = GetHIInputStr (CmdLine, BOOT_DEVICE_OPTION_MAX);
+ if (EFI_ERROR (Status)) {
+ Status = EFI_ABORTED;
+ goto EXIT;
+ }
+
+ OptionalData = (UINT8*)CmdLine;
+ OptionalDataSize = StrSize (CmdLine);
}
Print(L"Description for this new Entry: ");