From 2ccfb71ebebd54c57aad8f9bb5fb20539e7b892f Mon Sep 17 00:00:00 2001 From: oliviermartin Date: Fri, 9 Sep 2011 10:51:13 +0000 Subject: ArmPlatformPkg/Bds: Add a signature in front of the Boot Argument propoer to this Bds Each application loader has its own OptionalData format. To avoid to start a Boot Entry that has not been created by ArmPlatform/Bds a signature has been added to the OptionalData. ArmPlatformPkg/Bds: Rename some internal structure from BDS_* to ARM_BDS_* git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12311 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/Bds/BdsHelper.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'ArmPlatformPkg/Bds/BdsHelper.c') diff --git a/ArmPlatformPkg/Bds/BdsHelper.c b/ArmPlatformPkg/Bds/BdsHelper.c index 0a69611..91b4234 100644 --- a/ArmPlatformPkg/Bds/BdsHelper.c +++ b/ArmPlatformPkg/Bds/BdsHelper.c @@ -343,3 +343,34 @@ BdsStartBootOption ( } return Status; } + +UINTN +GetUnalignedDevicePathSize ( + IN EFI_DEVICE_PATH* DevicePath + ) +{ + UINTN Size; + EFI_DEVICE_PATH* AlignedDevicePath; + + if ((UINTN)DevicePath & 0x1) { + AlignedDevicePath = DuplicateDevicePath (DevicePath); + Size = GetDevicePathSize (AlignedDevicePath); + FreePool (AlignedDevicePath); + } else { + Size = GetDevicePathSize (DevicePath); + } + return Size; +} + +EFI_DEVICE_PATH* +GetAlignedDevicePath ( + IN EFI_DEVICE_PATH* DevicePath + ) +{ + if ((UINTN)DevicePath & 0x1) { + return DuplicateDevicePath (DevicePath); + } else { + return DevicePath; + } +} + -- cgit v1.1