2008-10-31 05:32:02 +01:00
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
;
|
2013-02-17 07:35:08 +01:00
|
|
|
; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
|
2010-04-23 18:00:47 +02:00
|
|
|
; This program and the accompanying materials
|
2008-10-31 05:32:02 +01:00
|
|
|
; are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
; which accompanies this distribution. The full text of the license may be found at
|
2010-06-11 02:02:51 +02:00
|
|
|
; http://opensource.org/licenses/bsd-license.php.
|
2008-10-31 05:32:02 +01:00
|
|
|
;
|
|
|
|
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
;
|
|
|
|
; Module Name:
|
|
|
|
;
|
2007-06-22 05:21:45 +02:00
|
|
|
; CpuIdEx.Asm
|
2008-10-31 05:32:02 +01:00
|
|
|
;
|
|
|
|
; Abstract:
|
|
|
|
;
|
2007-06-22 05:21:45 +02:00
|
|
|
; AsmCpuidEx function
|
2008-10-31 05:32:02 +01:00
|
|
|
;
|
|
|
|
; Notes:
|
|
|
|
;
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
2007-06-22 05:21:45 +02:00
|
|
|
.686
|
|
|
|
.model flat,C
|
2008-10-31 05:32:02 +01:00
|
|
|
.code
|
|
|
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
; UINT32
|
|
|
|
; EFIAPI
|
2007-06-22 05:21:45 +02:00
|
|
|
; AsmCpuidEx (
|
2008-10-31 05:32:02 +01:00
|
|
|
; IN UINT32 RegisterInEax,
|
|
|
|
; IN UINT32 RegisterInEcx,
|
|
|
|
; OUT UINT32 *RegisterOutEax OPTIONAL,
|
|
|
|
; OUT UINT32 *RegisterOutEbx OPTIONAL,
|
|
|
|
; OUT UINT32 *RegisterOutEcx OPTIONAL,
|
|
|
|
; OUT UINT32 *RegisterOutEdx OPTIONAL
|
|
|
|
; )
|
|
|
|
;------------------------------------------------------------------------------
|
2007-06-22 05:21:45 +02:00
|
|
|
AsmCpuidEx PROC USES ebx
|
|
|
|
push ebp
|
|
|
|
mov ebp, esp
|
|
|
|
mov eax, [ebp + 12]
|
|
|
|
mov ecx, [ebp + 16]
|
|
|
|
cpuid
|
|
|
|
push ecx
|
|
|
|
mov ecx, [ebp + 20]
|
|
|
|
jecxz @F
|
|
|
|
mov [ecx], eax
|
|
|
|
@@:
|
|
|
|
mov ecx, [ebp + 24]
|
|
|
|
jecxz @F
|
|
|
|
mov [ecx], ebx
|
|
|
|
@@:
|
2012-05-25 05:02:26 +02:00
|
|
|
mov ecx, [ebp + 32]
|
2007-06-22 05:21:45 +02:00
|
|
|
jecxz @F
|
2012-05-25 05:02:26 +02:00
|
|
|
mov [ecx], edx
|
2007-06-22 05:21:45 +02:00
|
|
|
@@:
|
2013-02-17 07:35:08 +01:00
|
|
|
mov ecx, [ebp + 28]
|
2007-06-22 05:21:45 +02:00
|
|
|
jecxz @F
|
2012-05-25 05:02:26 +02:00
|
|
|
pop [ecx]
|
2007-06-22 05:21:45 +02:00
|
|
|
@@:
|
|
|
|
mov eax, [ebp + 12]
|
|
|
|
leave
|
|
|
|
ret
|
|
|
|
AsmCpuidEx ENDP
|
2008-10-31 05:32:02 +01:00
|
|
|
|
|
|
|
END
|