]>
git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Library/CpuIA32Lib/IA32/CpuIA32.c
3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
23 #include <Library/CpuIA32.h>
50 EfiCpuid (IN UINT32 RegisterInEax
,
51 OUT EFI_CPUID_REGISTER
*Reg OPTIONAL
)
56 mov eax
, RegisterInEax
60 mov edi
, DWORD PTR Reg
62 mov DWORD PTR
[edi
].RegEax
, eax
; Reg
->RegEax
63 mov DWORD PTR
[edi
].RegEbx
, ebx
; Reg
->RegEbx
64 mov DWORD PTR
[edi
].RegEcx
, ecx
; Reg
->RegEcx
65 mov DWORD PTR
[edi
].RegEdx
, edx
; Reg
->RegEdx
73 EfiReadMsr (IN UINT32 Index
)
89 mov eax
, DWORD PTR Value
[0]
90 mov edx
, DWORD PTR Value
[4]
104 EfiDisableCache (VOID
)
121 EfiEnableCache (VOID
)
143 EfiDisableInterrupts (VOID
)
151 EfiEnableInterrupts (
162 IN UINT32 RegisterInEax
,
163 IN UINT32 CacheLevel
,
164 OUT EFI_CPUID_REGISTER
*Regs
170 mov eax
, RegisterInEax
173 mov edi
, DWORD PTR Regs
175 mov DWORD PTR
[edi
].RegEax
, eax
; Reg
->RegEax
176 mov DWORD PTR
[edi
].RegEbx
, ebx
; Reg
->RegEbx
177 mov DWORD PTR
[edi
].RegEcx
, ecx
; Reg
->RegEcx
178 mov DWORD PTR
[edi
].RegEdx
, edx
; Reg
->RegEdx