]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/DxeIpl/HobGeneration.c
Remove unused definitions
[mirror_edk2.git] / DuetPkg / DxeIpl / HobGeneration.c
index 224d6a710e9a2fae3f18b266a8a9c56c6cf91965..c5b6c7c1b22cce6902a53986d475d5767e389cda 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2010, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -26,7 +26,8 @@ Revision History:
 #define EFI_DXE_FILE_GUID \\r
   { 0xb1644c1a, 0xc16a, 0x4c5b, {0x88, 0xde, 0xea, 0xfb, 0xa9, 0x7e, 0x74, 0xd8 }}\r
 \r
-#define CPUID_EXTENDED_ADD_SIZE  0x80000008\r
+#define EFI_CPUID_EXTENDED_FUNCTION  0x80000000\r
+#define CPUID_EXTENDED_ADD_SIZE      0x80000008\r
 \r
 HOB_TEMPLATE  gHobTemplate = {\r
   { // Phit\r
@@ -957,21 +958,18 @@ PrepareHobCpu (
   VOID\r
   )\r
 {\r
-  EFI_CPUID_REGISTER          Reg;\r
-  UINT8                       CpuMemoryAddrBitNumber;\r
+  UINT32  CpuidEax;\r
 \r
   //\r
   // Create a CPU hand-off information\r
   //\r
-  CpuMemoryAddrBitNumber = 36;\r
-  AsmCpuid (EFI_CPUID_EXTENDED_FUNCTION, &Reg.RegEax, &Reg.RegEbx, &Reg.RegEcx, &Reg.RegEdx);\r
+  gHob->Cpu.SizeOfMemorySpace = 36;\r
 \r
-  if (Reg.RegEax >= CPUID_EXTENDED_ADD_SIZE) {\r
-    AsmCpuid (CPUID_EXTENDED_ADD_SIZE, &Reg.RegEax, &Reg.RegEbx, &Reg.RegEcx, &Reg.RegEdx);\r
-    CpuMemoryAddrBitNumber = (UINT8)(UINTN)(Reg.RegEax & 0xFF);\r
+  AsmCpuid (EFI_CPUID_EXTENDED_FUNCTION, &CpuidEax, NULL, NULL, NULL);\r
+  if (CpuidEax >= CPUID_EXTENDED_ADD_SIZE) {\r
+    AsmCpuid (CPUID_EXTENDED_ADD_SIZE, &CpuidEax, NULL, NULL, NULL);\r
+    gHob->Cpu.SizeOfMemorySpace = (UINT8)(CpuidEax & 0xFF);\r
   }\r
-  \r
-  gHob->Cpu.SizeOfMemorySpace = CpuMemoryAddrBitNumber;\r
 }\r
 \r
 VOID\r