mirror of https://github.com/acidanthera/audk.git
Sync function prototype of CpuId and CpuIdEx with MDE library specification.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6215 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1fa524e97d
commit
610204a84c
|
@ -25,13 +25,13 @@
|
||||||
|
|
||||||
@param Index The 32-bit value to load into EAX prior to invoking the CPUID
|
@param Index The 32-bit value to load into EAX prior to invoking the CPUID
|
||||||
instruction.
|
instruction.
|
||||||
@param RegisterEax Pointer to the 32-bit EAX value returned by the CPUID
|
@param Eax Pointer to the 32-bit EAX value returned by the CPUID
|
||||||
instruction. This is an optional parameter that may be NULL.
|
instruction. This is an optional parameter that may be NULL.
|
||||||
@param RegisterEbx Pointer to the 32-bit EBX value returned by the CPUID
|
@param Ebx Pointer to the 32-bit EBX value returned by the CPUID
|
||||||
instruction. This is an optional parameter that may be NULL.
|
instruction. This is an optional parameter that may be NULL.
|
||||||
@param RegisterEcx Pointer to the 32-bit ECX value returned by the CPUID
|
@param Ecx Pointer to the 32-bit ECX value returned by the CPUID
|
||||||
instruction. This is an optional parameter that may be NULL.
|
instruction. This is an optional parameter that may be NULL.
|
||||||
@param RegisterEdx Pointer to the 32-bit EDX value returned by the CPUID
|
@param Edx Pointer to the 32-bit EDX value returned by the CPUID
|
||||||
instruction. This is an optional parameter that may be NULL.
|
instruction. This is an optional parameter that may be NULL.
|
||||||
|
|
||||||
@return Index
|
@return Index
|
||||||
|
@ -41,30 +41,30 @@ UINT32
|
||||||
EFIAPI
|
EFIAPI
|
||||||
AsmCpuid (
|
AsmCpuid (
|
||||||
IN UINT32 Index,
|
IN UINT32 Index,
|
||||||
OUT UINT32 *RegisterEax, OPTIONAL
|
OUT UINT32 *Eax, OPTIONAL
|
||||||
OUT UINT32 *RegisterEbx, OPTIONAL
|
OUT UINT32 *Ebx, OPTIONAL
|
||||||
OUT UINT32 *RegisterEcx, OPTIONAL
|
OUT UINT32 *Ecx, OPTIONAL
|
||||||
OUT UINT32 *RegisterEdx OPTIONAL
|
OUT UINT32 *Edx OPTIONAL
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_asm {
|
_asm {
|
||||||
mov eax, Index
|
mov eax, Index
|
||||||
cpuid
|
cpuid
|
||||||
push ecx
|
push ecx
|
||||||
mov ecx, RegisterEax
|
mov ecx, Eax
|
||||||
jecxz SkipEax
|
jecxz SkipEax
|
||||||
mov [ecx], eax
|
mov [ecx], eax
|
||||||
SkipEax:
|
SkipEax:
|
||||||
mov ecx, RegisterEbx
|
mov ecx, Ebx
|
||||||
jecxz SkipEbx
|
jecxz SkipEbx
|
||||||
mov [ecx], ebx
|
mov [ecx], ebx
|
||||||
SkipEbx:
|
SkipEbx:
|
||||||
pop eax
|
pop eax
|
||||||
mov ecx, RegisterEcx
|
mov ecx, Ecx
|
||||||
jecxz SkipEcx
|
jecxz SkipEcx
|
||||||
mov [ecx], eax
|
mov [ecx], eax
|
||||||
SkipEcx:
|
SkipEcx:
|
||||||
mov ecx, RegisterEdx
|
mov ecx, Edx
|
||||||
jecxz SkipEdx
|
jecxz SkipEdx
|
||||||
mov [ecx], edx
|
mov [ecx], edx
|
||||||
SkipEdx:
|
SkipEdx:
|
||||||
|
|
|
@ -28,16 +28,16 @@
|
||||||
CPUID instruction.
|
CPUID instruction.
|
||||||
@param SubIndex The 32-bit value to load into ECX prior to invoking the
|
@param SubIndex The 32-bit value to load into ECX prior to invoking the
|
||||||
CPUID instruction.
|
CPUID instruction.
|
||||||
@param RegisterEax Pointer to the 32-bit EAX value returned by the CPUID
|
@param Eax Pointer to the 32-bit EAX value returned by the CPUID
|
||||||
instruction. This is an optional parameter that may be
|
instruction. This is an optional parameter that may be
|
||||||
NULL.
|
NULL.
|
||||||
@param RegisterEbx Pointer to the 32-bit EBX value returned by the CPUID
|
@param Ebx Pointer to the 32-bit EBX value returned by the CPUID
|
||||||
instruction. This is an optional parameter that may be
|
instruction. This is an optional parameter that may be
|
||||||
NULL.
|
NULL.
|
||||||
@param RegisterEcx Pointer to the 32-bit ECX value returned by the CPUID
|
@param Ecx Pointer to the 32-bit ECX value returned by the CPUID
|
||||||
instruction. This is an optional parameter that may be
|
instruction. This is an optional parameter that may be
|
||||||
NULL.
|
NULL.
|
||||||
@param RegisterEdx Pointer to the 32-bit EDX value returned by the CPUID
|
@param Edx Pointer to the 32-bit EDX value returned by the CPUID
|
||||||
instruction. This is an optional parameter that may be
|
instruction. This is an optional parameter that may be
|
||||||
NULL.
|
NULL.
|
||||||
|
|
||||||
|
@ -49,10 +49,10 @@ EFIAPI
|
||||||
AsmCpuidEx (
|
AsmCpuidEx (
|
||||||
IN UINT32 Index,
|
IN UINT32 Index,
|
||||||
IN UINT32 SubIndex,
|
IN UINT32 SubIndex,
|
||||||
OUT UINT32 *RegisterEax, OPTIONAL
|
OUT UINT32 *Eax, OPTIONAL
|
||||||
OUT UINT32 *RegisterEbx, OPTIONAL
|
OUT UINT32 *Ebx, OPTIONAL
|
||||||
OUT UINT32 *RegisterEcx, OPTIONAL
|
OUT UINT32 *Ecx, OPTIONAL
|
||||||
OUT UINT32 *RegisterEdx OPTIONAL
|
OUT UINT32 *Edx OPTIONAL
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_asm {
|
_asm {
|
||||||
|
@ -60,20 +60,20 @@ AsmCpuidEx (
|
||||||
mov ecx, SubIndex
|
mov ecx, SubIndex
|
||||||
cpuid
|
cpuid
|
||||||
push ecx
|
push ecx
|
||||||
mov ecx, RegisterEax
|
mov ecx, Eax
|
||||||
jecxz SkipEax
|
jecxz SkipEax
|
||||||
mov [ecx], eax
|
mov [ecx], eax
|
||||||
SkipEax:
|
SkipEax:
|
||||||
mov ecx, RegisterEbx
|
mov ecx, Ebx
|
||||||
jecxz SkipEbx
|
jecxz SkipEbx
|
||||||
mov [ecx], ebx
|
mov [ecx], ebx
|
||||||
SkipEbx:
|
SkipEbx:
|
||||||
pop eax
|
pop eax
|
||||||
mov ecx, RegisterEcx
|
mov ecx, Ecx
|
||||||
jecxz SkipEcx
|
jecxz SkipEcx
|
||||||
mov [ecx], eax
|
mov [ecx], eax
|
||||||
SkipEcx:
|
SkipEcx:
|
||||||
mov ecx, RegisterEdx
|
mov ecx, Edx
|
||||||
jecxz SkipEdx
|
jecxz SkipEdx
|
||||||
mov [ecx], edx
|
mov [ecx], edx
|
||||||
SkipEdx:
|
SkipEdx:
|
||||||
|
|
Loading…
Reference in New Issue