diff options
author | Olivier Martin <olivier.martin@arm.com> | 2014-04-11 10:56:02 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-04-11 10:56:02 +0000 |
commit | 90a44ec4d85a03cf8feb4a95183aa3acfe246d13 (patch) | |
tree | 38c80b833e8b432a7e407b6e10187a0b17b3fb8c /ArmPlatformPkg/Bds/Bds.c | |
parent | 9fc9aa46ccf2d942b98d921bb22987fd232f6248 (diff) | |
download | edk2-platforms-90a44ec4d85a03cf8feb4a95183aa3acfe246d13.tar.xz |
ArmPlatformPkg/Bds: Decoupled OptionalData for the EFI application boot entry from the Linux loader
OptionalData for EFI Application does not contain any more specific information about the ArmPlatformPkg/Bds.
OptionalData now only contains the data pass to the EFI application.
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@15451 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds/Bds.c')
-rw-r--r-- | ArmPlatformPkg/Bds/Bds.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c index 76dd5465a2..2888843058 100644 --- a/ArmPlatformPkg/Bds/Bds.c +++ b/ArmPlatformPkg/Bds/Bds.c @@ -220,6 +220,8 @@ DefineDefaultBootEntries ( EFI_STATUS Status;
EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL* EfiDevicePathFromTextProtocol;
EFI_DEVICE_PATH* BootDevicePath;
+ UINT8* OptionalData;
+ UINTN OptionalDataSize;
ARM_BDS_LOADER_ARGUMENTS* BootArguments;
ARM_BDS_LOADER_TYPE BootType;
EFI_DEVICE_PATH* InitrdPath;
@@ -306,7 +308,8 @@ DefineDefaultBootEntries ( InitrdPath = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath ((CHAR16*)PcdGetPtr(PcdDefaultBootInitrdPath));
InitrdSize = GetDevicePathSize (InitrdPath);
- BootArguments = (ARM_BDS_LOADER_ARGUMENTS*)AllocatePool (sizeof(ARM_BDS_LOADER_ARGUMENTS) + CmdLineAsciiSize + InitrdSize);
+ OptionalDataSize = sizeof(ARM_BDS_LOADER_ARGUMENTS) + CmdLineAsciiSize + InitrdSize;
+ BootArguments = (ARM_BDS_LOADER_ARGUMENTS*)AllocatePool (OptionalDataSize);
if (BootArguments == NULL) {
return EFI_OUT_OF_RESOURCES;
}
@@ -315,15 +318,19 @@ DefineDefaultBootEntries ( CopyMem ((VOID*)(BootArguments + 1), AsciiDefaultBootArgument, CmdLineAsciiSize);
CopyMem ((VOID*)((UINTN)(BootArguments + 1) + CmdLineAsciiSize), InitrdPath, InitrdSize);
+
+ OptionalData = (UINT8*)BootArguments;
} else {
- BootArguments = NULL;
+ OptionalData = NULL;
+ OptionalDataSize = 0;
}
BootOptionCreate (LOAD_OPTION_ACTIVE | LOAD_OPTION_CATEGORY_BOOT,
(CHAR16*)PcdGetPtr(PcdDefaultBootDescription),
BootDevicePath,
BootType,
- BootArguments,
+ OptionalData,
+ OptionalDataSize,
&BdsLoadOption
);
FreePool (BdsLoadOption);
|