3 ;Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 ;This program and the accompanying materials
5 ;are licensed and made available under the terms and conditions of the BSD License
6 ;which accompanies this distribution. The full text of the license may be found at
7 ;http://opensource.org/licenses/bsd-license.php
9 ;THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 ;WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 ;---------------------------------------------------------------------------
27 ;---------------------------------------------------------------------------
41 EfiWbinvd PROC C PUBLIC
56 ;EfiCpuid (IN UINT32 RegisterInEax,
57 ; OUT EFI_CPUID_REGISTER *Reg OPTIONAL)
58 EfiCpuid PROC C PUBLIC
66 mov eax, dword ptr[ebp + 8] ;egisterInEax
68 cmp dword ptr[ebp + 0Ch], 0 ; Reg
70 mov edi,dword ptr [ebp+0Ch] ; Reg
72 mov dword ptr [edi],eax ; Reg->RegEax
73 mov dword ptr [edi+4],ebx ; Reg->RegEbx
74 mov dword ptr [edi+8],ecx ; Reg->RegEcx
75 mov dword ptr [edi+0Ch],edx ; Reg->RegEdx
92 EfiReadMsr PROC C PUBLIC
93 mov ecx, dword ptr [esp + 4]; Index
103 EfiWriteMsr PROC C PUBLIC
104 mov ecx, dword ptr [esp+4]; Index
105 mov eax, dword ptr [esp+8]; DWORD PTR Value[0]
106 mov edx, dword ptr [esp+0Ch]; DWORD PTR Value[4]
115 EfiReadTsc PROC C PUBLIC
124 EfiDisableCache PROC C PUBLIC
142 EfiEnableCache PROC C PUBLIC
154 EfiGetEflags PROC C PUBLIC
161 ;EfiDisableInterrupts (
164 EfiDisableInterrupts PROC C PUBLIC
167 EfiDisableInterrupts ENDP
170 ;EfiEnableInterrupts (
173 EfiEnableInterrupts PROC C PUBLIC
176 EfiEnableInterrupts ENDP
180 ; IN UINT32 RegisterInEax,
181 ; IN UINT32 CacheLevel,
182 ; OUT EFI_CPUID_REGISTER *Regs
184 EfiCpuidExt PROC C PUBLIC USES ebx edi esi
187 mov eax, dword ptr [esp + 30h] ; RegisterInEax
188 mov ecx, dword ptr [esp + 34h] ; CacheLevel
190 mov edi, dword ptr [esp + 38h] ; DWORD PTR Regs
192 mov dword ptr [edi], eax ; Reg->RegEax
193 mov dword ptr [edi + 4], ebx ; Reg->RegEbx
194 mov dword ptr [edi + 8], ecx ; Reg->RegEcx
195 mov dword ptr [edi + 0Ch], edx ; Reg->RegEdx