ArmPlatformPkg/Bds: Added support to pass parameters to EFI applications

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15452 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Olivier Martin 2014-04-11 10:57:00 +00:00 committed by oliviermartin
parent 90a44ec4d8
commit 06044819bb
2 changed files with 15 additions and 7 deletions

View File

@ -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,

View File

@ -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: ");