diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-09-09 10:51:13 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-09-09 10:51:13 +0000 |
commit | 2ccfb71ebebd54c57aad8f9bb5fb20539e7b892f (patch) | |
tree | a5afdd24b8939bb90f385cc05453c2ec67c88a27 /ArmPlatformPkg/Bds/BdsHelper.c | |
parent | 74b961324c1cc3ae3f97523e085fb169ec63b608 (diff) | |
download | edk2-platforms-2ccfb71ebebd54c57aad8f9bb5fb20539e7b892f.tar.xz |
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
Diffstat (limited to 'ArmPlatformPkg/Bds/BdsHelper.c')
-rw-r--r-- | ArmPlatformPkg/Bds/BdsHelper.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ArmPlatformPkg/Bds/BdsHelper.c b/ArmPlatformPkg/Bds/BdsHelper.c index 0a6961183a..91b42341e6 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; + } +} + |