Index: Include/Library/ShellLib.h
===================================================================
--- Include/Library/ShellLib.h	(revision 14892)
+++ Include/Library/ShellLib.h	(working copy)
@@ -1008,6 +1008,23 @@
   );
 
 /**
+  Function return the number converted from a hex representation of a number.
+
+  Note: this function cannot be used when (UINTN)(-1), (0xFFFFFFFF) may be a valid
+  result.  Use ShellConvertStringToUint64 instead.
+
+  @param[in] String   String representation of a number.
+
+  @return             The unsigned integer result of the conversion.
+  @retval (UINTN)(-1) An error occured.
+**/
+UINTN
+EFIAPI
+ShellHexStrToUintn(
+  IN CONST CHAR16 *String
+  );
+
+/**
   Safely append with automatic string resizing given length of Destination and
   desired length of copy from Source.
 
Index: Library/UefiShellLib/UefiShellLib.c
===================================================================
--- Library/UefiShellLib/UefiShellLib.c	(revision 14892)
+++ Library/UefiShellLib/UefiShellLib.c	(working copy)
@@ -3057,6 +3057,32 @@
 }
 
 /**
+  Function return the number converted from a hex representation of a number.
+
+  Note: this function cannot be used when (UINTN)(-1), (0xFFFFFFFF) may be a valid
+  result.  Use ShellConvertStringToUint64 instead.
+
+  @param[in] String   String representation of a number.
+
+  @return             The unsigned integer result of the conversion.
+  @retval (UINTN)(-1) An error occured.
+**/
+UINTN
+EFIAPI
+ShellHexStrToUintn(
+  IN CONST CHAR16 *String
+  )
+{
+  UINT64        RetVal;
+
+  if (!EFI_ERROR(ShellConvertStringToUint64(String, &RetVal, TRUE, TRUE))) {
+    return ((UINTN)RetVal);
+  }
+  
+  return ((UINTN)(-1));
+}
+
+/**
   Function to determine whether a string is decimal or hex representation of a number
   and return the number converted from the string.  Spaces are always skipped.
 
