Code scrub DxeIpl, Runtime, DevicePath, FvbServicesLib, DiskIo, Partition, English, EBC.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7105 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
Master header file for DxeIpl PEIM. All source files in this module should
|
||||
include this file for common defininitions.
|
||||
include this file for common definitions.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -49,17 +49,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#define BSP_STORE_SIZE 0x4000
|
||||
|
||||
|
||||
//
|
||||
// This macro aligns the ActualSize with a given alignment and is used to
|
||||
// calculate the size an image occupies.
|
||||
//
|
||||
#define GET_OCCUPIED_SIZE(ActualSize, Alignment) ((ActualSize + (Alignment - 1)) & ~(Alignment - 1))
|
||||
|
||||
//
|
||||
// Indicate whether DxeIpl has been shadowed to memory.
|
||||
//
|
||||
extern BOOLEAN gInMemory;
|
||||
|
||||
//
|
||||
// This PPI is installed to indicate the end of the PEI usage of memory
|
||||
//
|
||||
@@ -103,18 +92,24 @@ DxeIplFindDxeCore (
|
||||
|
||||
|
||||
/**
|
||||
This function simply retrieves the function pointer of ImageRead in
|
||||
ImageContext structure.
|
||||
|
||||
@param ImageContext A pointer to the structure of
|
||||
PE_COFF_LOADER_IMAGE_CONTEXT
|
||||
|
||||
@retval EFI_SUCCESS This function always return EFI_SUCCESS.
|
||||
Support routine for the PE/COFF Loader that reads a buffer from a PE/COFF file
|
||||
|
||||
@param FileHandle The handle to the PE/COFF file
|
||||
@param FileOffset The offset, in bytes, into the file to read
|
||||
@param ReadSize The number of bytes to read from the file starting at
|
||||
FileOffset
|
||||
@param Buffer A pointer to the buffer to read the data into.
|
||||
|
||||
@retval EFI_SUCCESS ReadSize bytes of data were read into Buffer from the
|
||||
PE/COFF file starting at FileOffset
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
GetImageReadFunction (
|
||||
IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||
PeiImageRead (
|
||||
IN VOID *FileHandle,
|
||||
IN UINTN FileOffset,
|
||||
IN OUT UINTN *ReadSize,
|
||||
OUT VOID *Buffer
|
||||
);
|
||||
|
||||
|
||||
@@ -144,9 +139,9 @@ DxeLoadCore (
|
||||
|
||||
This function performs a CPU architecture specific operations to execute
|
||||
the entry point of DxeCore with the parameters of HobList.
|
||||
It also intalls EFI_END_OF_PEI_PPI to signal the end of PEI phase.
|
||||
It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.
|
||||
|
||||
@param DxeCoreEntryPoint The entrypoint of DxeCore.
|
||||
@param DxeCoreEntryPoint The entry point of DxeCore.
|
||||
@param HobList The start of HobList passed to DxeCore.
|
||||
|
||||
**/
|
||||
@@ -241,7 +236,7 @@ CustomGuidedSectionExtract (
|
||||
/**
|
||||
Decompresses a section to the output buffer.
|
||||
|
||||
This function lookes up the compression type field in the input section and
|
||||
This function looks up the compression type field in the input section and
|
||||
applies the appropriate compression algorithm to compress the section to a
|
||||
callee allocated buffer.
|
||||
|
||||
|
@@ -1,8 +1,10 @@
|
||||
#/** @file
|
||||
# Last PEIM executed in PEI phase to load DXE Core from a Firmware Volume.
|
||||
#
|
||||
# The responsibility of this module is to load the DXE Core from a Firmware Volume.
|
||||
# This implementation is used to load a 32-bit DXE Core.
|
||||
#
|
||||
# This module produces a special PPI named the DXE Initial Program Load (IPL)
|
||||
# PPI to discover and dispatch the DXE Foundation and components that are
|
||||
# needed to run the DXE Foundation.
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -79,8 +81,8 @@
|
||||
[Ppis]
|
||||
gEfiEndOfPeiSignalPpiGuid # PPI SOMETIMES_PRODUCED
|
||||
gEfiDxeIplPpiGuid # PPI SOMETIMES_PRODUCED
|
||||
gEfiPeiDecompressPpiGuid
|
||||
gEfiPeiReadOnlyVariable2PpiGuid
|
||||
gEfiPeiDecompressPpiGuid # PPI SOMETIMES_PRODUCED
|
||||
gEfiPeiReadOnlyVariable2PpiGuid # PPI SOMETIMES_CONSUMED
|
||||
|
||||
[Guids]
|
||||
gEfiMemoryTypeInformationGuid
|
||||
|
@@ -15,14 +15,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
#include "DxeIpl.h"
|
||||
|
||||
//
|
||||
// This global variable indicates whether this module has been shadowed
|
||||
// to memory.
|
||||
//
|
||||
BOOLEAN gInMemory = FALSE;
|
||||
|
||||
//
|
||||
// Module Globals used in the DXE to PEI handoff
|
||||
// Module Globals used in the DXE to PEI hand off
|
||||
// These must be module globals, so the stack can be switched
|
||||
//
|
||||
CONST EFI_DXE_IPL_PPI mDxeIplPpi = {
|
||||
@@ -37,7 +32,7 @@ CONST EFI_PEI_DECOMPRESS_PPI mDecompressPpi = {
|
||||
Decompress
|
||||
};
|
||||
|
||||
CONST EFI_PEI_PPI_DESCRIPTOR mPpiList[] = {
|
||||
CONST EFI_PEI_PPI_DESCRIPTOR mPpiList[] = {
|
||||
{
|
||||
EFI_PEI_PPI_DESCRIPTOR_PPI,
|
||||
&gEfiDxeIplPpiGuid,
|
||||
@@ -50,19 +45,24 @@ CONST EFI_PEI_PPI_DESCRIPTOR mPpiList[] = {
|
||||
}
|
||||
};
|
||||
|
||||
CONST EFI_PEI_PPI_DESCRIPTOR gEndOfPeiSignalPpi = {
|
||||
CONST EFI_PEI_PPI_DESCRIPTOR gEndOfPeiSignalPpi = {
|
||||
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
|
||||
&gEfiEndOfPeiSignalPpiGuid,
|
||||
NULL
|
||||
};
|
||||
|
||||
/**
|
||||
Initializes the Dxe Ipl PPI
|
||||
Entry point of DXE IPL PEIM.
|
||||
|
||||
This function installs DXE IPL PPI and Decompress PPI. It also reloads
|
||||
itself to memory on non-S3 resume boot path.
|
||||
|
||||
@param FileHandle Handle of the file being invoked.
|
||||
@param PeiServices Describes the list of possible PEI Services.
|
||||
|
||||
@return EFI_SUCESS
|
||||
@retval EFI_SUCESS The entry point of DXE IPL PEIM executes successfully.
|
||||
@retval Others Some error occurs during the execution of this function.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -83,33 +83,36 @@ PeimInitializeDxeIpl (
|
||||
Status = PeiServicesRegisterForShadow (FileHandle);
|
||||
if (Status == EFI_SUCCESS) {
|
||||
//
|
||||
// EFI_SUCESS means the first time call register for shadow
|
||||
// EFI_SUCESS means it is the first time to call register for shadow.
|
||||
//
|
||||
return Status;
|
||||
} else if (Status == EFI_ALREADY_STARTED) {
|
||||
|
||||
//
|
||||
// Get custom extract guided section method guid list
|
||||
//
|
||||
ExtractHandlerNumber = ExtractGuidedSectionGetGuidList (&ExtractHandlerGuidTable);
|
||||
|
||||
//
|
||||
// Install custom extraction guid ppi
|
||||
//
|
||||
if (ExtractHandlerNumber > 0) {
|
||||
GuidPpi = (EFI_PEI_PPI_DESCRIPTOR *) AllocatePool (ExtractHandlerNumber * sizeof (EFI_PEI_PPI_DESCRIPTOR));
|
||||
ASSERT (GuidPpi != NULL);
|
||||
while (ExtractHandlerNumber-- > 0) {
|
||||
GuidPpi->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
|
||||
GuidPpi->Ppi = (VOID *) &mCustomGuidedSectionExtractionPpi;
|
||||
GuidPpi->Guid = &(ExtractHandlerGuidTable [ExtractHandlerNumber]);
|
||||
Status = PeiServicesInstallPpi (GuidPpi++);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ASSERT (FALSE);
|
||||
}
|
||||
|
||||
//
|
||||
// Ensure that DXE IPL is shadowed to permanent memory.
|
||||
//
|
||||
ASSERT (Status == EFI_ALREADY_STARTED);
|
||||
|
||||
//
|
||||
// Get custom extract guided section method guid list
|
||||
//
|
||||
ExtractHandlerNumber = ExtractGuidedSectionGetGuidList (&ExtractHandlerGuidTable);
|
||||
|
||||
//
|
||||
// Install custom extraction guid PPI
|
||||
//
|
||||
if (ExtractHandlerNumber > 0) {
|
||||
GuidPpi = (EFI_PEI_PPI_DESCRIPTOR *) AllocatePool (ExtractHandlerNumber * sizeof (EFI_PEI_PPI_DESCRIPTOR));
|
||||
ASSERT (GuidPpi != NULL);
|
||||
while (ExtractHandlerNumber-- > 0) {
|
||||
GuidPpi->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
|
||||
GuidPpi->Ppi = (VOID *) &mCustomGuidedSectionExtractionPpi;
|
||||
GuidPpi->Guid = &ExtractHandlerGuidTable[ExtractHandlerNumber];
|
||||
Status = PeiServicesInstallPpi (GuidPpi++);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
@@ -123,6 +126,9 @@ PeimInitializeDxeIpl (
|
||||
|
||||
/**
|
||||
Main entry point to last PEIM.
|
||||
|
||||
This function finds DXE Core in the firmware volume and transfer the control to
|
||||
DXE core.
|
||||
|
||||
@param This Entry point for DXE IPL PPI.
|
||||
@param PeiServices General purpose services available to every PEIM.
|
||||
@@ -167,7 +173,7 @@ DxeLoadCore (
|
||||
}
|
||||
|
||||
//
|
||||
// Now should have a HOB with the DXE core w/ the old HOB destroyed
|
||||
// Now should have a HOB with the DXE core
|
||||
//
|
||||
}
|
||||
|
||||
@@ -205,7 +211,7 @@ DxeLoadCore (
|
||||
FileHandle = DxeIplFindDxeCore ();
|
||||
|
||||
//
|
||||
// Load the DXE Core from a Firmware Volume, may use LoadFile ppi to do this for save code size.
|
||||
// Load the DXE Core from a Firmware Volume, may use LoadFile PPI to do this to save code size.
|
||||
//
|
||||
Status = PeiLoadFile (
|
||||
FileHandle,
|
||||
@@ -227,28 +233,25 @@ DxeLoadCore (
|
||||
BuildModuleHob (
|
||||
&DxeCoreFileInfo.FileName,
|
||||
DxeCoreAddress,
|
||||
EFI_SIZE_TO_PAGES ((UINTN) DxeCoreSize) * EFI_PAGE_SIZE,
|
||||
ALIGN_VALUE (DxeCoreSize, EFI_PAGE_SIZE),
|
||||
DxeCoreEntryPoint
|
||||
);
|
||||
|
||||
//
|
||||
// Report Status Code EFI_SW_PEI_PC_HANDOFF_TO_NEXT
|
||||
//
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_PROGRESS_CODE,
|
||||
PcdGet32(PcdStatusCodeValuePeiHandoffToDxe)
|
||||
);
|
||||
REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdStatusCodeValuePeiHandoffToDxe));
|
||||
|
||||
DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Loading DXE CORE at 0x%11p EntryPoint=0x%11p\n", (VOID *)(UINTN)DxeCoreAddress, FUNCTION_ENTRY_POINT (DxeCoreEntryPoint)));
|
||||
|
||||
//
|
||||
// Transfer control to the DXE Core
|
||||
// The handoff state is simply a pointer to the HOB list
|
||||
// The hand off state is simply a pointer to the HOB list
|
||||
//
|
||||
HandOffToDxeCore (DxeCoreEntryPoint, HobList);
|
||||
//
|
||||
// If we get here, then the DXE Core returned. This is an error
|
||||
// Dxe Core should not return.
|
||||
// DxeCore should not return.
|
||||
//
|
||||
ASSERT (FALSE);
|
||||
CpuDeadLoop ();
|
||||
@@ -348,9 +351,8 @@ PeiLoadFile (
|
||||
|
||||
ZeroMem (&ImageContext, sizeof (ImageContext));
|
||||
ImageContext.Handle = Pe32Data;
|
||||
Status = GetImageReadFunction (&ImageContext);
|
||||
ImageContext.ImageRead = PeiImageRead;
|
||||
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
Status = PeCoffLoaderGetImageInfo (&ImageContext);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@@ -383,9 +385,9 @@ PeiLoadFile (
|
||||
}
|
||||
|
||||
//
|
||||
// Flush the instruction cache so the image data is written before we execute it
|
||||
// Flush the instruction cache so the image data are written before we execute it
|
||||
//
|
||||
InvalidateInstructionCacheRange ((VOID *)(UINTN)ImageContext.ImageAddress, (UINTN)ImageContext.ImageSize);
|
||||
InvalidateInstructionCacheRange ((VOID *)(UINTN) ImageContext.ImageAddress, (UINTN) ImageContext.ImageSize);
|
||||
|
||||
*ImageAddress = ImageContext.ImageAddress;
|
||||
*ImageSize = ImageContext.ImageSize;
|
||||
@@ -504,7 +506,7 @@ CustomGuidedSectionExtract (
|
||||
if (*OutputBuffer == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
DEBUG ((DEBUG_INFO, "Customed Guided section Memory Size required is 0x%x and address is 0x%p\n", OutputBufferSize, *OutputBuffer));
|
||||
DEBUG ((DEBUG_INFO, "Customized Guided section Memory Size required is 0x%x and address is 0x%p\n", OutputBufferSize, *OutputBuffer));
|
||||
//
|
||||
// *OutputBuffer still is one section. Adjust *OutputBuffer offset,
|
||||
// skip EFI section header to make section data at page alignment.
|
||||
@@ -517,7 +519,7 @@ CustomGuidedSectionExtract (
|
||||
OutputBuffer,
|
||||
ScratchBuffer,
|
||||
AuthenticationStatus
|
||||
);
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
//
|
||||
// Decode failed
|
||||
@@ -536,7 +538,7 @@ CustomGuidedSectionExtract (
|
||||
/**
|
||||
Decompresses a section to the output buffer.
|
||||
|
||||
This function lookes up the compression type field in the input section and
|
||||
This function looks up the compression type field in the input section and
|
||||
applies the appropriate compression algorithm to compress the section to a
|
||||
callee allocated buffer.
|
||||
|
||||
@@ -585,7 +587,7 @@ Decompress (
|
||||
case EFI_STANDARD_COMPRESSION:
|
||||
//
|
||||
// Load EFI standard compression.
|
||||
// For compressed data, decompress them to dstbuffer.
|
||||
// For compressed data, decompress them to destination buffer.
|
||||
//
|
||||
Status = UefiDecompressGetInfo (
|
||||
(UINT8 *) ((EFI_COMPRESSION_SECTION *) Section + 1),
|
||||
@@ -671,8 +673,6 @@ Decompress (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Updates the Stack HOB passed to DXE phase.
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/** @file
|
||||
x64-specifc functionality for DxeLoad.
|
||||
EBC-specific functionality for DxeLoad.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -21,9 +21,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
This function performs a CPU architecture specific operations to execute
|
||||
the entry point of DxeCore with the parameters of HobList.
|
||||
It also intalls EFI_END_OF_PEI_PPI to signal the end of PEI phase.
|
||||
It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.
|
||||
|
||||
@param DxeCoreEntryPoint The entrypoint of DxeCore.
|
||||
@param DxeCoreEntryPoint The entry point of DxeCore.
|
||||
@param HobList The start of HobList passed to DxeCore.
|
||||
|
||||
**/
|
||||
@@ -51,7 +51,7 @@ HandOffToDxeCore (
|
||||
TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);
|
||||
|
||||
//
|
||||
// End of PEI phase singal
|
||||
// End of PEI phase signal
|
||||
//
|
||||
Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/** @file
|
||||
Ia32-specifc functionality for DxeLoad.
|
||||
Ia32-specific functionality for DxeLoad.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -49,9 +49,9 @@ GLOBAL_REMOVE_IF_UNREFERENCED IA32_DESCRIPTOR gLidtDescriptor = {
|
||||
|
||||
This function performs a CPU architecture specific operations to execute
|
||||
the entry point of DxeCore with the parameters of HobList.
|
||||
It also intalls EFI_END_OF_PEI_PPI to signal the end of PEI phase.
|
||||
It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.
|
||||
|
||||
@param DxeCoreEntryPoint The entrypoint of DxeCore.
|
||||
@param DxeCoreEntryPoint The entry point of DxeCore.
|
||||
@param HobList The start of HobList passed to DxeCore.
|
||||
|
||||
**/
|
||||
@@ -102,7 +102,7 @@ HandOffToDxeCore (
|
||||
PageTables = CreateIdentityMappingPageTables ();
|
||||
|
||||
//
|
||||
// End of PEI phase singal
|
||||
// End of PEI phase signal
|
||||
//
|
||||
Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
@@ -165,7 +165,7 @@ HandOffToDxeCore (
|
||||
TopOfStack = (EFI_PHYSICAL_ADDRESS) (UINTN) ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);
|
||||
|
||||
//
|
||||
// End of PEI phase singal
|
||||
// End of PEI phase signal
|
||||
//
|
||||
Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
@@ -54,40 +54,3 @@ PeiImageRead (
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
This function simply retrieves the function pointer of ImageRead in
|
||||
ImageContext structure.
|
||||
|
||||
@param ImageContext A pointer to the structure of
|
||||
PE_COFF_LOADER_IMAGE_CONTEXT
|
||||
|
||||
@retval EFI_SUCCESS This function always returns EFI_SUCCESS.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
GetImageReadFunction (
|
||||
IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||
)
|
||||
{
|
||||
VOID *MemoryBuffer;
|
||||
|
||||
if (gInMemory) {
|
||||
ImageContext->ImageRead = PeiImageRead;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
//
|
||||
// BugBug; This code assumes PeiImageRead() is less than a page in size!
|
||||
// Allocate a page so we can shaddow the read function from FLASH into
|
||||
// memory to increase performance.
|
||||
//
|
||||
|
||||
MemoryBuffer = AllocateCopyPool (0x400, (VOID *)(UINTN) PeiImageRead);
|
||||
ASSERT (MemoryBuffer != NULL);
|
||||
|
||||
ImageContext->ImageRead = (PE_COFF_LOADER_READ_FILE) (UINTN) MemoryBuffer;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@@ -4,16 +4,16 @@
|
||||
enter Long Mode (x64 64-bit mode).
|
||||
|
||||
While we make a 1:1 mapping (identity mapping) for all physical pages
|
||||
we still need to use the MTRR's to ensure that the cachability attirbutes
|
||||
we still need to use the MTRR's to ensure that the cachability attributes
|
||||
for all memory regions is correct.
|
||||
|
||||
The basic idea is to use 2MB page table entries where ever possible. If
|
||||
more granularity of cachability is required then 4K page tables are used.
|
||||
|
||||
References:
|
||||
1) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 1:Basic Architecture, Intel
|
||||
2) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 2:Instruction Set Reference, Intel
|
||||
3) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 3:System Programmer's Guide, Intel
|
||||
1) IA-32 Intel(R) Architecture Software Developer's Manual Volume 1:Basic Architecture, Intel
|
||||
2) IA-32 Intel(R) Architecture Software Developer's Manual Volume 2:Instruction Set Reference, Intel
|
||||
3) IA-32 Intel(R) Architecture Software Developer's Manual Volume 3:System Programmer's Guide, Intel
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -29,11 +29,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include "DxeIpl.h"
|
||||
#include "VirtualMemory.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Allocates and fills in the Page Directory and Page Table Entries to
|
||||
establish a 1:1 Virtual to Physical mapping.
|
||||
@@ -43,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
table entries to the physical
|
||||
address space.
|
||||
|
||||
@return EFI_SUCCESS The 1:1 Virtual to Physical identity mapping was created
|
||||
@return The address of 4 level page map.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
|
@@ -110,7 +110,7 @@ typedef union {
|
||||
table entries to the physical
|
||||
address space.
|
||||
|
||||
@return EFI_SUCCESS The 1:1 Virtual to Physical identity mapping was created
|
||||
@return The address of 4 level page map.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
@@ -119,9 +119,6 @@ CreateIdentityMappingPageTables (
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Fix up the vector number in the vector code.
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/** @file
|
||||
Ipf-specifc functionality for DxeLoad.
|
||||
Ipf-specific functionality for DxeLoad.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -21,9 +21,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
This function performs a CPU architecture specific operations to execute
|
||||
the entry point of DxeCore with the parameters of HobList.
|
||||
It also intalls EFI_END_OF_PEI_PPI to signal the end of PEI phase.
|
||||
It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.
|
||||
|
||||
@param DxeCoreEntryPoint The entrypoint of DxeCore.
|
||||
@param DxeCoreEntryPoint The entry point of DxeCore.
|
||||
@param HobList The start of HobList passed to DxeCore.
|
||||
|
||||
**/
|
||||
@@ -62,7 +62,7 @@ HandOffToDxeCore (
|
||||
TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);
|
||||
|
||||
//
|
||||
// End of PEI phase singal
|
||||
// End of PEI phase signal
|
||||
//
|
||||
Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
@@ -49,22 +49,3 @@ PeiImageRead (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
This function simply retrieves the function pointer of ImageRead in
|
||||
ImageContext structure.
|
||||
|
||||
@param ImageContext A pointer to the structure of
|
||||
PE_COFF_LOADER_IMAGE_CONTEXT
|
||||
|
||||
@retval EFI_SUCCESS This function always returns EFI_SUCCESS.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
GetImageReadFunction (
|
||||
IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||
)
|
||||
{
|
||||
ImageContext->ImageRead = PeiImageRead;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@@ -22,9 +22,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
This function performs a CPU architecture specific operations to execute
|
||||
the entry point of DxeCore with the parameters of HobList.
|
||||
It also intalls EFI_END_OF_PEI_PPI to signal the end of PEI phase.
|
||||
It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.
|
||||
|
||||
@param DxeCoreEntryPoint The entrypoint of DxeCore.
|
||||
@param DxeCoreEntryPoint The entry point of DxeCore.
|
||||
@param HobList The start of HobList passed to DxeCore.
|
||||
|
||||
**/
|
||||
@@ -58,7 +58,7 @@ HandOffToDxeCore (
|
||||
PageTables = CreateIdentityMappingPageTables ();
|
||||
|
||||
//
|
||||
// End of PEI phase singal
|
||||
// End of PEI phase signal
|
||||
//
|
||||
Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
@@ -29,11 +29,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include "DxeIpl.h"
|
||||
#include "VirtualMemory.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Allocates and fills in the Page Directory and Page Table Entries to
|
||||
establish a 1:1 Virtual to Physical mapping.
|
||||
@@ -43,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
table entries to the physical
|
||||
address space.
|
||||
|
||||
@return EFI_SUCCESS The 1:1 Virtual to Physical identity mapping was created
|
||||
@return The address of 4 level page map.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
@@ -73,7 +68,7 @@ CreateIdentityMappingPageTables (
|
||||
|
||||
Hob = GetFirstHob (EFI_HOB_TYPE_CPU);
|
||||
if (Hob != NULL) {
|
||||
PhysicalAddressBits = ((EFI_HOB_CPU *) Hob)->SizeOfMemorySpace;
|
||||
PhysicalAddressBits = ((EFI_HOB_CPU *) Hob)->SizeOfMemorySpace;
|
||||
}
|
||||
|
||||
//
|
||||
|
@@ -2,9 +2,9 @@
|
||||
x64 Long Mode Virtual Memory Management Definitions
|
||||
|
||||
References:
|
||||
1) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 1:Basic Architecture, Intel
|
||||
2) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 2:Instruction Set Reference, Intel
|
||||
3) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 3:System Programmer's Guide, Intel
|
||||
1) IA-32 Intel(R) Architecture Software Developer's Manual Volume 1:Basic Architecture, Intel
|
||||
2) IA-32 Intel(R) Architecture Software Developer's Manual Volume 2:Instruction Set Reference, Intel
|
||||
3) IA-32 Intel(R) Architecture Software Developer's Manual Volume 3:System Programmer's Guide, Intel
|
||||
4) AMD64 Architecture Programmer's Manual Volume 2: System Programming
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
@@ -100,7 +100,6 @@ typedef union {
|
||||
#pragma pack()
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Allocates and fills in the Page Directory and Page Table Entries to
|
||||
establish a 1:1 Virtual to Physical mapping.
|
||||
@@ -110,7 +109,7 @@ typedef union {
|
||||
table entries to the physical
|
||||
address space.
|
||||
|
||||
@return EFI_SUCCESS The 1:1 Virtual to Physical identity mapping was created
|
||||
@return The address of 4 level page map.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
@@ -119,15 +118,11 @@ CreateIdentityMappingPageTables (
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Fix up the vector number in the vector code.
|
||||
|
||||
@param VectorBase Base address of the vector handler.
|
||||
|
||||
@param VectorNum Index of vector.
|
||||
|
||||
**/
|
||||
@@ -139,9 +134,6 @@ AsmVectorFixup (
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Get the information of vector template.
|
||||
|
Reference in New Issue
Block a user