]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/RdRand.asm
MdePkg/BaseLib: Add one wrapper on RdRand access for parameter check.
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / RdRand.asm
index 21349b0918d4ec6e511da3d849360ae091561697..cb4e811098bd6cf9991a3675ba3bddea9fd94489 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
@@ -30,9 +30,9 @@
 ;  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
-AsmRdRand16  PROC\r
+InternalX86RdRand16  PROC\r
     ; rdrand   ax                  ; generate a 16 bit RN into ax\r
                                    ; CF=1 if RN generated ok, otherwise CF=0\r
     db     0fh, 0c7h, 0f0h         ; rdrand r16: "0f c7 /6  ModRM:r/m(w)"\r
@@ -44,15 +44,15 @@ rn16_ok:
     mov    [edx], ax\r
     mov    eax,  1\r
     ret\r
-AsmRdRand16 ENDP\r
+InternalX86RdRand16 ENDP\r
 \r
 ;------------------------------------------------------------------------------\r
 ;  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
-AsmRdRand32  PROC\r
+InternalX86RdRand32  PROC\r
     ; rdrand   eax                 ; generate a 32 bit RN into eax\r
                                    ; CF=1 if RN generated ok, otherwise CF=0\r
     db     0fh, 0c7h, 0f0h         ; rdrand r32: "0f c7 /6  ModRM:r/m(w)"\r
@@ -64,15 +64,15 @@ rn32_ok:
     mov    [edx], eax\r
     mov    eax,  1\r
     ret\r
-AsmRdRand32 ENDP\r
+InternalX86RdRand32 ENDP\r
 \r
 ;------------------------------------------------------------------------------\r
 ;  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
-AsmRdRand64  PROC\r
+InternalX86RdRand64  PROC\r
     ; rdrand   eax                 ; generate a 32 bit RN into eax\r
                                    ; CF=1 if RN generated ok, otherwise CF=0\r
     db     0fh, 0c7h, 0f0h         ; rdrand r32: "0f c7 /6  ModRM:r/m(w)"\r
@@ -89,6 +89,6 @@ AsmRdRand64  PROC
 rn64_ret:\r
     xor    eax, eax\r
     ret                            ; return with failure status\r
-AsmRdRand64 ENDP\r
+InternalX86RdRand64 ENDP\r
 \r
     END\r