summaryrefslogtreecommitdiff
path: root/DuetPkg/DxeIpl/LegacyTable.c
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-05-07 09:38:31 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-05-07 09:38:31 +0000
commitdf166ce57448db0df33b2ea77d1142610103677e (patch)
tree6bb507089920cb68dab5203141807058a5d508a7 /DuetPkg/DxeIpl/LegacyTable.c
parent6f33781141f0665187f9287a927f50bdcff449f3 (diff)
downloadedk2-platforms-df166ce57448db0df33b2ea77d1142610103677e.tar.xz
1) DxeIpl should not use UefiDriverEntryPointLib
2) Fix incorrect judgment for ACPI table in legacy region. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5177 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg/DxeIpl/LegacyTable.c')
-rw-r--r--DuetPkg/DxeIpl/LegacyTable.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/DuetPkg/DxeIpl/LegacyTable.c b/DuetPkg/DxeIpl/LegacyTable.c
index 1175d560d8..4b19064ee4 100644
--- a/DuetPkg/DxeIpl/LegacyTable.c
+++ b/DuetPkg/DxeIpl/LegacyTable.c
@@ -20,6 +20,7 @@ Revision History:
#include "DxeIpl.h"
#include "HobGeneration.h"
+#include "Debug.h"
#define ACPI_RSD_PTR 0x2052545020445352LL
#define MPS_PTR EFI_SIGNATURE_32('_','M','P','_')
@@ -225,7 +226,7 @@ FindAcpiPtr (
//
// Check ACPI2.0 table
//
- if (Hob->Acpi20.Table > 0) {
+ if ((int)Hob->Acpi20.Table != -1) {
Rsdp = (RSDP_TABLE *)(UINTN)Hob->Acpi20.Table;
Rsdt = (RSDT_TABLE *)(UINTN)Rsdp->RsdtAddress;
Xsdt = NULL;
@@ -249,7 +250,7 @@ FindAcpiPtr (
//
// Check ACPI1.0 table
//
- if ((AcpiTable == NULL) && (Hob->Acpi.Table > 0)) {
+ if ((AcpiTable == NULL) && ((int)Hob->Acpi.Table != -1)) {
Rsdp = (RSDP_TABLE *)(UINTN)Hob->Acpi.Table;
Rsdt = (RSDT_TABLE *)(UINTN)Rsdp->RsdtAddress;
//
@@ -411,10 +412,18 @@ PrepareHobLegacyTable (
IN HOB_TEMPLATE *Hob
)
{
+ CHAR8 PrintBuffer[256];
+
Hob->Acpi.Table = (EFI_PHYSICAL_ADDRESS)(UINTN)FindAcpiRsdPtr ();
+ AsciiSPrint (PrintBuffer, 256, "\nAcpiTable=0x%x ", (UINT32)(UINTN)Hob->Acpi.Table);
+ PrintString (PrintBuffer);
Hob->Acpi20.Table = (EFI_PHYSICAL_ADDRESS)(UINTN)FindAcpiRsdPtr ();
Hob->Smbios.Table = (EFI_PHYSICAL_ADDRESS)(UINTN)FindSMBIOSPtr ();
+ AsciiSPrint (PrintBuffer, 256, "SMBIOS Table=0x%x ", (UINT32)(UINTN)Hob->Smbios.Table);
+ PrintString (PrintBuffer);
Hob->Mps.Table = (EFI_PHYSICAL_ADDRESS)(UINTN)FindMPSPtr ();
+ AsciiSPrint (PrintBuffer, 256, "MPS Table=0x%x\n", (UINT32)(UINTN)Hob->Mps.Table);
+ PrintString (PrintBuffer);
PrepareMcfgTable (Hob);