]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/RdRand.nasm
MdePkg/BaseLib: Add one wrapper on RdRand access for parameter check.
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / RdRand.nasm
index 1365dfcdbbe13d13c6f3557f2e99d66b4a0297e3..64e8cdbda464419db29a75b163965f3c225bfaac 100644 (file)
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------\r
 ;\r
-; Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
 ; This program and the accompanying materials\r
 ; are licensed and made available under the terms and conditions of the BSD License\r
 ; which accompanies this distribution.  The full text of the license may be found at\r
@@ -27,10 +27,10 @@ SECTION .text
 ;  Generates a 16 bit random number through RDRAND instruction.\r
 ;  Return TRUE if Rand generated successfully, or FALSE if not.\r
 ;\r
-;  BOOLEAN EFIAPI AsmRdRand16 (UINT16 *Rand);\r
+;  BOOLEAN EFIAPI InternalX86RdRand16 (UINT16 *Rand);\r
 ;------------------------------------------------------------------------------\r
-global ASM_PFX(AsmRdRand16)\r
-ASM_PFX(AsmRdRand16):\r
+global ASM_PFX(InternalX86RdRand16)\r
+ASM_PFX(InternalX86RdRand16):\r
     ; rdrand   ax                  ; generate a 16 bit RN into ax\r
                                    ; CF=1 if RN generated ok, otherwise CF=0\r
     db     0xf, 0xc7, 0xf0         ; rdrand r16: "0f c7 /6  ModRM:r/m(w)"\r
@@ -47,10 +47,10 @@ rn16_ok:
 ;  Generates a 32 bit random number through RDRAND instruction.\r
 ;  Return TRUE if Rand generated successfully, or FALSE if not.\r
 ;\r
-;  BOOLEAN EFIAPI AsmRdRand32 (UINT32 *Rand);\r
+;  BOOLEAN EFIAPI InternalX86RdRand32 (UINT32 *Rand);\r
 ;------------------------------------------------------------------------------\r
-global ASM_PFX(AsmRdRand32)\r
-ASM_PFX(AsmRdRand32):\r
+global ASM_PFX(InternalX86RdRand32)\r
+ASM_PFX(InternalX86RdRand32):\r
     ; rdrand   eax                 ; generate a 32 bit RN into eax\r
                                    ; CF=1 if RN generated ok, otherwise CF=0\r
     db     0xf, 0xc7, 0xf0         ; rdrand r32: "0f c7 /6  ModRM:r/m(w)"\r
@@ -67,10 +67,10 @@ rn32_ok:
 ;  Generates a 64 bit random number through RDRAND instruction.\r
 ;  Return TRUE if Rand generated successfully, or FALSE if not.\r
 ;\r
-;  BOOLEAN EFIAPI AsmRdRand64 (UINT64 *Rand);\r
+;  BOOLEAN EFIAPI InternalX86RdRand64 (UINT64 *Rand);\r
 ;------------------------------------------------------------------------------\r
-global ASM_PFX(AsmRdRand64)\r
-ASM_PFX(AsmRdRand64):\r
+global ASM_PFX(InternalX86RdRand64)\r
+ASM_PFX(InternalX86RdRand64):\r
     ; rdrand   eax                 ; generate a 32 bit RN into eax\r
                                    ; CF=1 if RN generated ok, otherwise CF=0\r
     db     0xf, 0xc7, 0xf0         ; rdrand r32: "0f c7 /6  ModRM:r/m(w)"\r