diff options
Diffstat (limited to 'DuetPkg/DxeIpl')
-rw-r--r-- | DuetPkg/DxeIpl/DxeInit.c | 49 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/HobGeneration.c | 46 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/HobGeneration.h | 6 |
3 files changed, 90 insertions, 11 deletions
diff --git a/DuetPkg/DxeIpl/DxeInit.c b/DuetPkg/DxeIpl/DxeInit.c index dff64b4856..bee7f11307 100644 --- a/DuetPkg/DxeIpl/DxeInit.c +++ b/DuetPkg/DxeIpl/DxeInit.c @@ -78,14 +78,16 @@ MemoryAbove1MB.PhysicalStart <-------------------------------------------------- <------------------------------+ | |
Permament Stack (0x20 Pages = 128K) | |
<- Phit.EfiMemoryTop ----------+-----------+---------------+
- DxeCore |
- DxeCore
- DxeIpl |
- <----------------------------------------------------------+
- NvFV + FtwFV |
+ NvFV (64K) |
MMIO
- BFV |
- <- Top of Free Memory reported by E820 --------------------+
+ FtwFV (128K) |
+ <----------------------------------------------------------+<---------+
+ DxeCore | |
+ DxeCore |
+ DxeIpl | Allocated in EfiLdr
+ <----------------------------------------------------------+ |
+ BFV MMIO |
+ <- Top of Free Memory reported by E820 --------------------+<---------+
ACPINVS or
ACPIReclaim or
Reserved
@@ -267,11 +269,44 @@ Returns: PrintString(" Length = ");
PrintValue64(gHob->NvFtwFvb.FvbInfo.Entries[0].Length);
PrintString("\n");
+ PrintString("BfvResource = ");
+ PrintValue64(gHob->BfvResource.PhysicalStart);
+ PrintString(" Length = ");
+ PrintValue64(gHob->BfvResource.ResourceLength);
+ PrintString("\n");
+ PrintString("NvStorageFvResource = ");
+ PrintValue64(gHob->NvStorageFvResource.PhysicalStart);
+ PrintString(" Length = ");
+ PrintValue64(gHob->NvStorageFvResource.ResourceLength);
+ PrintString("\n");
+ PrintString("NvStorage = ");
+ PrintValue64(gHob->NvStorage.FvbInfo.Entries[0].Base);
+ PrintString(" Length = ");
+ PrintValue64(gHob->NvStorage.FvbInfo.Entries[0].Length);
+ PrintString("\n");
+ PrintString("NvFtwFvResource = ");
+ PrintValue64(gHob->NvFtwFvResource.PhysicalStart);
+ PrintString(" Length = ");
+ PrintValue64(gHob->NvFtwFvResource.ResourceLength);
+ PrintString("\n");
+ PrintString("NvFtwWorking = ");
+ PrintValue64(gHob->NvFtwWorking.FvbInfo.Entries[0].Base);
+ PrintString(" Length = ");
+ PrintValue64(gHob->NvFtwWorking.FvbInfo.Entries[0].Length);
+ PrintString("\n");
+ PrintString("NvFtwSpare = ");
+ PrintValue64(gHob->NvFtwSpare.FvbInfo.Entries[0].Base);
+ PrintString(" Length = ");
+ PrintValue64(gHob->NvFtwSpare.FvbInfo.Entries[0].Length);
+ PrintString("\n");
PrintString("Stack = ");
PrintValue64(gHob->Stack.AllocDescriptor.MemoryBaseAddress);
PrintString(" StackLength = ");
PrintValue64(gHob->Stack.AllocDescriptor.MemoryLength);
PrintString("\n");
+ PrintString("PageTable = ");
+ PrintValue64((UINTN)PageTableBase);
+ PrintString("\n");
PrintString("MemoryFreeUnder1MB = ");
PrintValue64(gHob->MemoryFreeUnder1MB.PhysicalStart);
PrintString(" MemoryFreeUnder1MBLength = ");
diff --git a/DuetPkg/DxeIpl/HobGeneration.c b/DuetPkg/DxeIpl/HobGeneration.c index ebe6788877..224d6a710e 100644 --- a/DuetPkg/DxeIpl/HobGeneration.c +++ b/DuetPkg/DxeIpl/HobGeneration.c @@ -190,6 +190,26 @@ HOB_TEMPLATE gHobTemplate = { EFI_DXE_FILE_GUID,
0x0 // EFI_PHYSICAL_ADDRESS of EntryPoint;
},
+ { // MemoryDxeCore
+ {
+ EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, // HobType
+ sizeof (EFI_HOB_RESOURCE_DESCRIPTOR), // HobLength
+ 0 // Reserved
+ },
+ {
+ 0 // Owner Guid
+ },
+ EFI_RESOURCE_SYSTEM_MEMORY, // ResourceType
+ (EFI_RESOURCE_ATTRIBUTE_PRESENT |
+// EFI_RESOURCE_ATTRIBUTE_TESTED | // Do not mark as TESTED, or DxeCore will find it and use it before check Allocation
+ EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
+ EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
+ EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
+ EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
+ EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE),
+ 0x0, // PhysicalStart
+ 0 // ResourceLength
+ },
{ // Memory Map Hints to reduce fragmentation in the memory map
{
{
@@ -453,6 +473,23 @@ HOB_TEMPLATE gHobTemplate = { 0
}
},
+ { // NV Ftw FV Resource
+ {
+ EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, // HobType
+ sizeof (EFI_HOB_RESOURCE_DESCRIPTOR), // HobLength
+ 0 // Reserved
+ },
+ {
+ 0 // Owner Guid
+ },
+ EFI_RESOURCE_FIRMWARE_DEVICE, // ResourceType
+ (EFI_RESOURCE_ATTRIBUTE_PRESENT |
+ EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
+ EFI_RESOURCE_ATTRIBUTE_TESTED |
+ EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE), // ResourceAttribute
+ 0, // PhysicalStart (Fixed later)
+ NV_FTW_FVB_SIZE // ResourceLength
+ },
{ // FVB holding FTW spaces including Working & Spare space
{
{
@@ -703,9 +740,13 @@ PrepareHobDxeCore ( UINT64 DxeCoreLength
)
{
- gHob->DxeCore.MemoryAllocationHeader.MemoryBaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)DxeCoreImageBase;
+ gHob->DxeCore.MemoryAllocationHeader.MemoryBaseAddress = DxeCoreImageBase;
gHob->DxeCore.MemoryAllocationHeader.MemoryLength = DxeCoreLength;
gHob->DxeCore.EntryPoint = (EFI_PHYSICAL_ADDRESS)(UINTN)DxeCoreEntryPoint;
+
+
+ gHob->MemoryDxeCore.PhysicalStart = DxeCoreImageBase;
+ gHob->MemoryDxeCore.ResourceLength = DxeCoreLength;
}
VOID *
@@ -878,7 +919,8 @@ PrepareHobNvStorage ( // Create the FVB holding FTW spaces
//
FtwFvbBase = (EFI_PHYSICAL_ADDRESS)((UINTN) StorageFvbBase + NV_STORAGE_FVB_SIZE);
- gHob->NvFtwFvb.FvbInfo.Entries[0].Base = FtwFvbBase;
+ gHob->NvFtwFvResource.PhysicalStart =
+ gHob->NvFtwFvb.FvbInfo.Entries[0].Base = FtwFvbBase;
//
// Put FTW Working in front
//
diff --git a/DuetPkg/DxeIpl/HobGeneration.h b/DuetPkg/DxeIpl/HobGeneration.h index 61d2e9966f..021b3ed501 100644 --- a/DuetPkg/DxeIpl/HobGeneration.h +++ b/DuetPkg/DxeIpl/HobGeneration.h @@ -1,6 +1,6 @@ /** @file
-Copyright (c) 2006 - 2007, Intel Corporation
+Copyright (c) 2006 - 2009, 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
@@ -84,6 +84,7 @@ typedef struct { EFI_HOB_RESOURCE_DESCRIPTOR MemoryAbove1MB;
EFI_HOB_RESOURCE_DESCRIPTOR MemoryAbove4GB;
EFI_HOB_MEMORY_ALLOCATION_MODULE DxeCore;
+ EFI_HOB_RESOURCE_DESCRIPTOR MemoryDxeCore;
MEMORY_TYPE_INFORMATION_HOB MemoryTypeInfo;
TABLE_HOB Acpi;
TABLE_HOB Acpi20;
@@ -105,7 +106,8 @@ typedef struct { FVB_HOB NvStorageFvb;
FVB_HOB NvStorage;
-
+
+ EFI_HOB_RESOURCE_DESCRIPTOR NvFtwFvResource;
FVB_HOB NvFtwFvb;
FVB_HOB NvFtwWorking;
FVB_HOB NvFtwSpare;
|