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.
23 #---------------------------------------------------------------------------
28 #---------------------------------------------------------------------------
30 .globl ASM_PFX(EfiHalt)
31 .globl ASM_PFX(EfiWbinvd)
32 .globl ASM_PFX(EfiInvd)
33 .globl ASM_PFX(EfiCpuid)
34 .globl ASM_PFX(EfiReadMsr)
35 .globl ASM_PFX(EfiWriteMsr)
36 .globl ASM_PFX(EfiReadTsc)
37 .globl ASM_PFX(EfiDisableCache)
38 .globl ASM_PFX(EfiEnableCache)
39 .globl ASM_PFX(EfiGetEflags)
40 .globl ASM_PFX(EfiDisableInterrupts)
41 .globl ASM_PFX(EfiEnableInterrupts)
42 .globl ASM_PFX(EfiCpuidExt)
73 #EfiCpuid (IN UINT32 RegisterInEax,
74 # OUT EFI_CPUID_REGISTER *Reg OPTIONAL)
83 movl 8(%ebp), %eax #RegisterInEax
85 cmpl $0, 0xC(%ebp) # Reg
87 movl 0xC(%ebp), %edi # Reg
89 movl %eax, (%edi) # Reg->RegEax
90 movl %ebx, 4(%edi) # Reg->RegEbx
91 movl %ecx, 8(%edi) # Reg->RegEcx
92 movl %edx, 0xC(%edi) # Reg->RegEdx
110 movl 4(%esp), %ecx # Index
120 ASM_PFX(EfiWriteMsr):
121 movl 4(%esp), %ecx # Index
122 movl 8(%esp), %eax # DWORD PTR Value[0]
123 movl 0xC(%esp), %edx # DWORD PTR Value[4]
141 ASM_PFX(EfiDisableCache):
148 orl $0x60000000, %eax
153 #EfiDisableCache ENDP
159 ASM_PFX(EfiEnableCache):
162 andl $0x9fffffff, %eax
171 ASM_PFX(EfiGetEflags):
178 #EfiDisableInterrupts (
181 ASM_PFX(EfiDisableInterrupts):
184 #EfiDisableInterrupts ENDP
187 #EfiEnableInterrupts (
190 ASM_PFX(EfiEnableInterrupts):
193 #EfiEnableInterrupts ENDP
197 # IN UINT32 RegisterInEax,
198 # IN UINT32 CacheLevel,
199 # OUT EFI_CPUID_REGISTER *Regs
201 ASM_PFX(EfiCpuidExt):
207 movl 0x30(%esp), %eax # RegisterInEax
208 movl 0x34(%esp), %ecx # CacheLevel
210 movl 0x38(%esp), %edi # DWORD PTR Regs
212 movl %eax, (%edi) # Reg->RegEax
213 movl %ebx, 4(%edi) # Reg->RegEbx
214 movl %ecx, 8(%edi) # Reg->RegEcx
215 movl %edx, 0xC(%edi) # Reg->RegEdx