Fix CpuInfo reading

This commit is contained in:
vit9696 2019-02-07 16:15:09 +03:00
parent 1672d8fbe6
commit 2c158e8068
2 changed files with 6 additions and 11 deletions

View File

@ -63,6 +63,7 @@ OcCpuScanProcessor (
Status = EFI_INVALID_PARAMETER;
if (Cpu != NULL) {
ZeroMem (Cpu, sizeof (*Cpu));
// Get vendor CPUID 0x00000000
AsmCpuid (CPUID_SIGNATURE, &CpuidEax, (UINT32 *)Cpu->Vendor, (UINT32 *)(Cpu->Vendor + 8), (UINT32 *)(Cpu->Vendor + 4));

View File

@ -1315,17 +1315,11 @@ CreateSmBios (
if (Buffer != NULL) {
CPU_INFO *CpuInfo;
UINT8 *Table;
CPU_INFO CpuInfo;
UINT8 *Table;
if (!EFI_ERROR (Status)) {
CpuInfo = NULL;
//FIXME:
/*Status = PlatformInfo->GetProcessorInfo (
PlatformInfo,
(VOID **)&CpuInfo
);*/
Status = OcCpuScanProcessor (&CpuInfo);
if (!EFI_ERROR (Status)) {
@ -1364,7 +1358,7 @@ CreateSmBios (
// Combine the following
PatchCacheInformation (&Table, &Handle, &L1CacheHandle, &L2CacheHandle, &L3CacheHandle);
PatchProcessorInformation (&Table, &Handle, L1CacheHandle, L2CacheHandle, L3CacheHandle, CpuInfo);
PatchProcessorInformation (&Table, &Handle, L1CacheHandle, L2CacheHandle, L3CacheHandle, &CpuInfo);
PatchSystemPorts (&Table, &Handle);
PatchSystemSlots (&Table, &Handle);
@ -1422,7 +1416,7 @@ CreateSmBios (
PatchBootInformation (&Table, &Handle);
CreateAppleProcessorType (&Table, &Handle, CpuInfo);
CreateAppleProcessorType (&Table, &Handle, &CpuInfo);
CreateAppleFirmwareVolume (&Table, &Handle);