Declare CpuRegisters as a local structure instead of a pointer
This commit is contained in:
parent
3607a6d930
commit
d61b48740f
@ -79,22 +79,18 @@ XTCDECL
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
XtEnablePaging(IN PXTBL_PAGE_MAPPING PageMap)
|
XtEnablePaging(IN PXTBL_PAGE_MAPPING PageMap)
|
||||||
{
|
{
|
||||||
PCPUID_REGISTERS CpuRegisters = NULL;
|
CPUID_REGISTERS CpuRegisters;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
/* Prepare CPUID registers */
|
/* Prepare CPUID registers */
|
||||||
CpuRegisters->Leaf = CPUID_GET_CPU_FEATURES;
|
RtlZeroMemory(&CpuRegisters, sizeof(CPUID_REGISTERS));
|
||||||
CpuRegisters->SubLeaf = 0;
|
CpuRegisters.Leaf = CPUID_GET_CPU_FEATURES;
|
||||||
CpuRegisters->Eax = 0;
|
|
||||||
CpuRegisters->Ebx = 0;
|
|
||||||
CpuRegisters->Ecx = 0;
|
|
||||||
CpuRegisters->Edx = 0;
|
|
||||||
|
|
||||||
/* Get CPUID */
|
/* Get CPUID */
|
||||||
ArCpuId(CpuRegisters);
|
ArCpuId(&CpuRegisters);
|
||||||
|
|
||||||
/* Store PAE status from the CPUID results */
|
/* Store PAE status from the CPUID results */
|
||||||
if(!(CpuRegisters->Edx & CPUID_FEATURES_EDX_PAE))
|
if(!(CpuRegisters.Edx & CPUID_FEATURES_EDX_PAE))
|
||||||
{
|
{
|
||||||
/* No PAE support */
|
/* No PAE support */
|
||||||
XtLdrProtocol->Debug.Print(L"ERROR: PAE extension not supported by the CPU\n");
|
XtLdrProtocol->Debug.Print(L"ERROR: PAE extension not supported by the CPU\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user