]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/CpuIdEx.c
Fix the bug in x64 thunk code that it cannot handle the case when GDT is loaded in...
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / CpuIdEx.c
index 8e475d833da92621fb8bab249996e95acdbde5af..9e31ed168d7fccbb4aad6536f3a73bf8b5586324 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   AsmCpuidEx function.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. 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
 \r
 **/\r
 \r
+/**\r
+  Retrieves CPUID information using an extended leaf identifier.\r
+\r
+  Executes the CPUID instruction with EAX set to the value specified by Index\r
+  and ECX set to the value specified by SubIndex. This function always returns\r
+  Index. This function is only available on IA-32 and x64.\r
+\r
+  If Eax is not NULL, then the value of EAX after CPUID is returned in Eax.\r
+  If Ebx is not NULL, then the value of EBX after CPUID is returned in Ebx.\r
+  If Ecx is not NULL, then the value of ECX after CPUID is returned in Ecx.\r
+  If Edx is not NULL, then the value of EDX after CPUID is returned in Edx.\r
+\r
+  @param  Index         The 32-bit value to load into EAX prior to invoking the\r
+                        CPUID instruction.\r
+  @param  SubIndex      The 32-bit value to load into ECX prior to invoking the\r
+                        CPUID instruction.\r
+  @param  RegisterEax   Pointer to the 32-bit EAX value returned by the CPUID\r
+                        instruction. This is an optional parameter that may be\r
+                        NULL.\r
+  @param  RegisterEbx   Pointer to the 32-bit EBX value returned by the CPUID\r
+                        instruction. This is an optional parameter that may be\r
+                        NULL.\r
+  @param  RegisterEcx   Pointer to the 32-bit ECX value returned by the CPUID\r
+                        instruction. This is an optional parameter that may be\r
+                        NULL.\r
+  @param  RegisterEdx   Pointer to the 32-bit EDX value returned by the CPUID\r
+                        instruction. This is an optional parameter that may be\r
+                        NULL.\r
+\r
+  @return Index.\r
+\r
+**/\r
 UINT32\r
 EFIAPI\r
 AsmCpuidEx (\r