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
This commit is contained in:
klu2 2008-05-07 09:38:31 +00:00
parent 6f33781141
commit df166ce574
4 changed files with 26 additions and 7 deletions

View File

@ -105,7 +105,10 @@
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseHardSerial|TRUE gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseHardSerial|TRUE
[Components.common] [Components.common]
DuetPkg/DxeIpl/DxeIpl.inf DuetPkg/DxeIpl/DxeIpl.inf {
<LibraryClasses>
DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
}
MdeModulePkg/Core/Dxe/DxeMain.inf MdeModulePkg/Core/Dxe/DxeMain.inf
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf

View File

@ -137,6 +137,7 @@ Returns:
VOID *NvStorageBase; VOID *NvStorageBase;
CHAR8 PrintBuffer[256]; CHAR8 PrintBuffer[256];
ClearScreen();
PrintString("Enter DxeIpl ...\n"); PrintString("Enter DxeIpl ...\n");
/* /*
ClearScreen(); ClearScreen();
@ -295,7 +296,6 @@ Returns:
PrintString("\n\n\n\n\n\n\n\n\n\n"); PrintString("\n\n\n\n\n\n\n\n\n\n");
PrintString(" WELCOME TO EFI WORLD!\n"); PrintString(" WELCOME TO EFI WORLD!\n");
EnterDxeMain (StackTop, Handoff->DxeCoreEntryPoint, gHob, PageTableBase); EnterDxeMain (StackTop, Handoff->DxeCoreEntryPoint, gHob, PageTableBase);
// //
@ -304,3 +304,12 @@ Returns:
CpuDeadLoop (); CpuDeadLoop ();
} }
EFI_STATUS
EFIAPI
_ModuleEntryPoint (
IN EFILDRHANDOFF *Handoff
)
{
DxeInit(Handoff);
return EFI_SUCCESS;
}

View File

@ -24,7 +24,6 @@
VERSION_STRING = 1.0 VERSION_STRING = 1.0
EDK_RELEASE_VERSION = 0x00020000 EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000 EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = DxeInit
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
@ -38,7 +37,6 @@
BaseMemoryLib BaseMemoryLib
PrintLib PrintLib
ReportStatusCodeLib ReportStatusCodeLib
UefiDriverEntryPoint
[Sources.common] [Sources.common]
DxeIpl.h DxeIpl.h

View File

@ -20,6 +20,7 @@ Revision History:
#include "DxeIpl.h" #include "DxeIpl.h"
#include "HobGeneration.h" #include "HobGeneration.h"
#include "Debug.h"
#define ACPI_RSD_PTR 0x2052545020445352LL #define ACPI_RSD_PTR 0x2052545020445352LL
#define MPS_PTR EFI_SIGNATURE_32('_','M','P','_') #define MPS_PTR EFI_SIGNATURE_32('_','M','P','_')
@ -225,7 +226,7 @@ FindAcpiPtr (
// //
// Check ACPI2.0 table // Check ACPI2.0 table
// //
if (Hob->Acpi20.Table > 0) { if ((int)Hob->Acpi20.Table != -1) {
Rsdp = (RSDP_TABLE *)(UINTN)Hob->Acpi20.Table; Rsdp = (RSDP_TABLE *)(UINTN)Hob->Acpi20.Table;
Rsdt = (RSDT_TABLE *)(UINTN)Rsdp->RsdtAddress; Rsdt = (RSDT_TABLE *)(UINTN)Rsdp->RsdtAddress;
Xsdt = NULL; Xsdt = NULL;
@ -249,7 +250,7 @@ FindAcpiPtr (
// //
// Check ACPI1.0 table // 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; Rsdp = (RSDP_TABLE *)(UINTN)Hob->Acpi.Table;
Rsdt = (RSDT_TABLE *)(UINTN)Rsdp->RsdtAddress; Rsdt = (RSDT_TABLE *)(UINTN)Rsdp->RsdtAddress;
// //
@ -411,10 +412,18 @@ PrepareHobLegacyTable (
IN HOB_TEMPLATE *Hob IN HOB_TEMPLATE *Hob
) )
{ {
CHAR8 PrintBuffer[256];
Hob->Acpi.Table = (EFI_PHYSICAL_ADDRESS)(UINTN)FindAcpiRsdPtr (); 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->Acpi20.Table = (EFI_PHYSICAL_ADDRESS)(UINTN)FindAcpiRsdPtr ();
Hob->Smbios.Table = (EFI_PHYSICAL_ADDRESS)(UINTN)FindSMBIOSPtr (); 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 (); 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); PrepareMcfgTable (Hob);