From 4a1db20fac1530bef90aebb358115c0e81c77fe0 Mon Sep 17 00:00:00 2001 From: mdkinney Date: Thu, 28 Jan 2010 21:44:35 +0000 Subject: Remove unused definitions git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9857 6f19259b-4bc3-4df7-8a09-765794883524 --- DuetPkg/DxeIpl/DxeIpl.h | 2 -- DuetPkg/DxeIpl/HobGeneration.c | 20 +++++++++----------- 2 files changed, 9 insertions(+), 13 deletions(-) (limited to 'DuetPkg/DxeIpl') diff --git a/DuetPkg/DxeIpl/DxeIpl.h b/DuetPkg/DxeIpl/DxeIpl.h index c07ee66eb2..af3b15dbc9 100644 --- a/DuetPkg/DxeIpl/DxeIpl.h +++ b/DuetPkg/DxeIpl/DxeIpl.h @@ -30,7 +30,5 @@ #include #include -#include - #endif // _DUET_DXEIPL_H_ diff --git a/DuetPkg/DxeIpl/HobGeneration.c b/DuetPkg/DxeIpl/HobGeneration.c index 224d6a710e..c5b6c7c1b2 100644 --- a/DuetPkg/DxeIpl/HobGeneration.c +++ b/DuetPkg/DxeIpl/HobGeneration.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2006 - 2007, Intel Corporation +Copyright (c) 2006 - 2010, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -26,7 +26,8 @@ Revision History: #define EFI_DXE_FILE_GUID \ { 0xb1644c1a, 0xc16a, 0x4c5b, {0x88, 0xde, 0xea, 0xfb, 0xa9, 0x7e, 0x74, 0xd8 }} -#define CPUID_EXTENDED_ADD_SIZE 0x80000008 +#define EFI_CPUID_EXTENDED_FUNCTION 0x80000000 +#define CPUID_EXTENDED_ADD_SIZE 0x80000008 HOB_TEMPLATE gHobTemplate = { { // Phit @@ -957,21 +958,18 @@ PrepareHobCpu ( VOID ) { - EFI_CPUID_REGISTER Reg; - UINT8 CpuMemoryAddrBitNumber; + UINT32 CpuidEax; // // Create a CPU hand-off information // - CpuMemoryAddrBitNumber = 36; - AsmCpuid (EFI_CPUID_EXTENDED_FUNCTION, &Reg.RegEax, &Reg.RegEbx, &Reg.RegEcx, &Reg.RegEdx); + gHob->Cpu.SizeOfMemorySpace = 36; - if (Reg.RegEax >= CPUID_EXTENDED_ADD_SIZE) { - AsmCpuid (CPUID_EXTENDED_ADD_SIZE, &Reg.RegEax, &Reg.RegEbx, &Reg.RegEcx, &Reg.RegEdx); - CpuMemoryAddrBitNumber = (UINT8)(UINTN)(Reg.RegEax & 0xFF); + AsmCpuid (EFI_CPUID_EXTENDED_FUNCTION, &CpuidEax, NULL, NULL, NULL); + if (CpuidEax >= CPUID_EXTENDED_ADD_SIZE) { + AsmCpuid (CPUID_EXTENDED_ADD_SIZE, &CpuidEax, NULL, NULL, NULL); + gHob->Cpu.SizeOfMemorySpace = (UINT8)(CpuidEax & 0xFF); } - - gHob->Cpu.SizeOfMemorySpace = CpuMemoryAddrBitNumber; } VOID -- cgit v1.2.3