summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Bds/BdsHelper.c
diff options
context:
space:
mode:
authorOlivier Martin <olivier.martin@arm.com>2014-04-11 10:55:02 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2014-04-11 10:55:02 +0000
commit9fc9aa46ccf2d942b98d921bb22987fd232f6248 (patch)
tree2b269251cf83aef4437cd41fc1087170fd7e014a /ArmPlatformPkg/Bds/BdsHelper.c
parente213ae45524e00441287176b962008a13a093804 (diff)
downloadedk2-9fc9aa46ccf2d942b98d921bb22987fd232f6248.tar.gz
edk2-9fc9aa46ccf2d942b98d921bb22987fd232f6248.tar.bz2
edk2-9fc9aa46ccf2d942b98d921bb22987fd232f6248.zip
ArmPlatformPkg/Bds: Add support to handle Unicode parameters
Most UEFI applications expect unicode string parameter. This change is allows to support Ascii or Unicode strings. 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@15450 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds/BdsHelper.c')
-rw-r--r--ArmPlatformPkg/Bds/BdsHelper.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ArmPlatformPkg/Bds/BdsHelper.c b/ArmPlatformPkg/Bds/BdsHelper.c
index 1c233d76c5..b5a3fa91b1 100644
--- a/ArmPlatformPkg/Bds/BdsHelper.c
+++ b/ArmPlatformPkg/Bds/BdsHelper.c
@@ -323,3 +323,18 @@ GetAlignedDevicePath (
}
}
+BOOLEAN
+IsUnicodeString (
+ IN VOID* String
+ )
+{
+ // We do not support NULL pointer
+ ASSERT (String != NULL);
+
+ if (*(CHAR16*)String < 0x100) {
+ //Note: We could get issue if the string is an empty Ascii string...
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}