summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/Bds/BdsHelper.c
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-09 10:51:13 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-09 10:51:13 +0000
commit2ccfb71ebebd54c57aad8f9bb5fb20539e7b892f (patch)
treea5afdd24b8939bb90f385cc05453c2ec67c88a27 /ArmPlatformPkg/Bds/BdsHelper.c
parent74b961324c1cc3ae3f97523e085fb169ec63b608 (diff)
downloadedk2-2ccfb71ebebd54c57aad8f9bb5fb20539e7b892f.zip
edk2-2ccfb71ebebd54c57aad8f9bb5fb20539e7b892f.tar.gz
edk2-2ccfb71ebebd54c57aad8f9bb5fb20539e7b892f.tar.bz2
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.c31
1 files changed, 31 insertions, 0 deletions
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;
+ }
+}
+