]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Base.h
Update SecurityStub function to align PI spec.
[mirror_edk2.git] / MdePkg / Include / Base.h
index fa6d0d5df22600e34b9c6c4ba37527cf6581a6d3..a2c5511750e75a5df0591604a1de4fabec3cabf8 100644 (file)
@@ -1,5 +1,4 @@
 /** @file\r
-\r
   Root include file for Mde Package Base type modules\r
 \r
   This is the include file for any module of type base. Base modules only use \r
@@ -282,5 +281,49 @@ typedef INTN RETURN_STATUS;
 #define RETURN_WARN_WRITE_FAILURE    ENCODE_WARNING (3)\r
 #define RETURN_WARN_BUFFER_TOO_SMALL ENCODE_WARNING (4)\r
 \r
+/**\r
+  Returns a 16-bit signature built from 2 ASCII characters.\r
+  \r
+  @param  A       The first ASCII character.\r
+  @param  B       The second ASCII character.\r
+\r
+  @return A 16-bit value built from the two ASCII characters specified by A and B.\r
+\r
+**/\r
+#define SIGNATURE_16(A, B)        ((A) | (B << 8))\r
+\r
+/**\r
+  Returns a 32-bit signature built from 4 ASCII characters.\r
+  \r
+  @param  A       The first ASCII character.\r
+  @param  B       The second ASCII character.\r
+  @param  C       The third ASCII character.\r
+  @param  D       The fourth ASCII character.\r
+\r
+  @return A 32-bit value built from the two ASCII characters specified by A, B,\r
+          C and D.\r
+\r
+**/\r
+#define SIGNATURE_32(A, B, C, D)  (SIGNATURE_16 (A, B) | (SIGNATURE_16 (C, D) << 16))\r
+\r
+/**\r
+  Returns a 64-bit signature built from 8 ASCII characters.\r
+  \r
+  @param  A       The first ASCII character.\r
+  @param  B       The second ASCII character.\r
+  @param  C       The third ASCII character.\r
+  @param  D       The fourth ASCII character.\r
+  @param  E       The fifth ASCII character.\r
+  @param  F       The sixth ASCII character.\r
+  @param  G       The seventh ASCII character.\r
+  @param  H       The eighth ASCII character.\r
+\r
+  @return A 64-bit value built from the two ASCII characters specified by A, B,\r
+          C, D, E, F, G and H.\r
+\r
+**/\r
+#define SIGNATURE_64(A, B, C, D, E, F, G, H) \\r
+    (SIGNATURE_32 (A, B, C, D) | ((UINT64) (SIGNATURE_32 (E, F, G, H)) << 32))\r
+\r
 #endif\r
 \r