2 ; This file contains an 'Intel Sample Driver' and is
3 ; licensed for Intel CPUs and chipsets under the terms of your
4 ; license agreement with Intel or your vendor. This file may
5 ; be modified by the user, subject to additional terms of the
9 ; Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved
11 ; This program and the accompanying materials are licensed and made available under
12 ; the terms and conditions of the BSD License that accompanies this distribution.
13 ; The full text of the license may be found at
14 ; http://opensource.org/licenses/bsd-license.php.
16 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
17 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
31 ;---------------------------------------------------------------------------
36 ;---------------------------------------------------------------------------
50 EfiWbinvd PROC C PUBLIC
65 ;EfiCpuid (IN UINT32 RegisterInEax,
66 ; OUT EFI_CPUID_REGISTER *Reg OPTIONAL)
67 EfiCpuid PROC C PUBLIC
75 mov eax, dword ptr[ebp + 8] ;egisterInEax
77 cmp dword ptr[ebp + 0Ch], 0 ; Reg
79 mov edi,dword ptr [ebp+0Ch] ; Reg
81 mov dword ptr [edi],eax ; Reg->RegEax
82 mov dword ptr [edi+4],ebx ; Reg->RegEbx
83 mov dword ptr [edi+8],ecx ; Reg->RegEcx
84 mov dword ptr [edi+0Ch],edx ; Reg->RegEdx
101 EfiReadMsr PROC C PUBLIC
102 mov ecx, dword ptr [esp + 4]; Index
112 EfiWriteMsr PROC C PUBLIC
113 mov ecx, dword ptr [esp+4]; Index
114 mov eax, dword ptr [esp+8]; DWORD PTR Value[0]
115 mov edx, dword ptr [esp+0Ch]; DWORD PTR Value[4]
124 EfiReadTsc PROC C PUBLIC
133 EfiDisableCache PROC C PUBLIC
151 EfiEnableCache PROC C PUBLIC
163 EfiGetEflags PROC C PUBLIC
170 ;EfiDisableInterrupts (
173 EfiDisableInterrupts PROC C PUBLIC
176 EfiDisableInterrupts ENDP
179 ;EfiEnableInterrupts (
182 EfiEnableInterrupts PROC C PUBLIC
185 EfiEnableInterrupts ENDP
189 ; IN UINT32 RegisterInEax,
190 ; IN UINT32 CacheLevel,
191 ; OUT EFI_CPUID_REGISTER *Regs
193 EfiCpuidExt PROC C PUBLIC USES ebx edi esi
196 mov eax, dword ptr [esp + 30h] ; RegisterInEax
197 mov ecx, dword ptr [esp + 34h] ; CacheLevel
199 mov edi, dword ptr [esp + 38h] ; DWORD PTR Regs
201 mov dword ptr [edi], eax ; Reg->RegEax
202 mov dword ptr [edi + 4], ebx ; Reg->RegEbx
203 mov dword ptr [edi + 8], ecx ; Reg->RegEcx
204 mov dword ptr [edi + 0Ch], edx ; Reg->RegEdx