\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
//\r
// DXE Core Global Variables for Protocols from PEI\r
EFI_GUID *gDxeCoreFileName;\r
EFI_LOADED_IMAGE_PROTOCOL *gDxeCoreLoadedImage;\r
\r
-//\r
-// BugBug: I'n not runtime, but is the PPI?\r
-//\r
-EFI_STATUS_CODE_PROTOCOL gStatusCodeInstance = {\r
- NULL\r
-};\r
-\r
-EFI_STATUS_CODE_PROTOCOL *gStatusCode = &gStatusCodeInstance;\r
-\r
//\r
// DXE Core Module Variables\r
//\r
-\r
EFI_BOOT_SERVICES mBootServices = {\r
{\r
EFI_BOOT_SERVICES_SIGNATURE, // Signature\r
// DXE Core Global Variables for the EFI System Table, Boot Services Table,\r
// DXE Services Table, and Runtime Services Table\r
//\r
-EFI_BOOT_SERVICES *gDxeCoreBS = &mBootServices;\r
EFI_DXE_SERVICES *gDxeCoreDS = &mDxeServices;\r
EFI_SYSTEM_TABLE *gDxeCoreST = NULL;\r
\r
/**\r
Main entry point to DXE Core.\r
\r
- @param HobStart Pointer to the beginning of the HOB List from PEI. \r
+ @param HobStart Pointer to the beginning of the HOB List from PEI.\r
\r
@return This function should never return.\r
\r
// Allocate the EFI System Table and EFI Runtime Service Table from EfiRuntimeServicesData\r
// Use the templates to initialize the contents of the EFI System Table and EFI Runtime Services Table\r
//\r
- gDxeCoreST = CoreAllocateRuntimeCopyPool (sizeof (EFI_SYSTEM_TABLE), &mEfiSystemTableTemplate);\r
+ gDxeCoreST = AllocateRuntimeCopyPool (sizeof (EFI_SYSTEM_TABLE), &mEfiSystemTableTemplate);\r
ASSERT (gDxeCoreST != NULL);\r
\r
- gDxeCoreRT = CoreAllocateRuntimeCopyPool (sizeof (EFI_RUNTIME_SERVICES), &mEfiRuntimeServicesTableTemplate);\r
+ gDxeCoreRT = AllocateRuntimeCopyPool (sizeof (EFI_RUNTIME_SERVICES), &mEfiRuntimeServicesTableTemplate);\r
ASSERT (gDxeCoreRT != NULL);\r
\r
gDxeCoreST->RuntimeServices = gDxeCoreRT;\r
Status = CoreInstallConfigurationTable (&gEfiMemoryTypeInformationGuid, &gMemoryTypeInformation);\r
ASSERT_EFI_ERROR (Status);\r
\r
- //\r
- // Initialize the ReportStatusCode with PEI version, if available\r
- //\r
- CoreGetPeiProtocol (&gEfiStatusCodeRuntimeProtocolGuid, (VOID **) &gStatusCode->ReportStatusCode);\r
-\r
//\r
// Report Status Code here for DXE_ENTRY_POINT once it is available\r
//\r
- CoreReportProgressCode (FixedPcdGet32(PcdStatusCodeValueDxeCoreEntry));\r
+ REPORT_STATUS_CODE (\r
+ EFI_PROGRESS_CODE,\r
+ FixedPcdGet32(PcdStatusCodeValueDxeCoreEntry)\r
+ );\r
\r
//\r
// Create the aligned system table pointer structure that is used by external\r
//\r
// Report Status code before transfer control to BDS\r
//\r
- CoreReportProgressCode (FixedPcdGet32 (PcdStatusCodeValueDxeCoreHandoffToBds));\r
- \r
+ REPORT_STATUS_CODE (\r
+ EFI_PROGRESS_CODE,\r
+ FixedPcdGet32 (PcdStatusCodeValueDxeCoreHandoffToBds)\r
+ );\r
+\r
//\r
// Display any drivers that were not dispatched because dependency expression\r
// evaluated to false if this is a debug build\r
Place holder function until all the Boot Services and Runtime Services are\r
available.\r
\r
- @param Arg1 Undefined \r
+ @param Arg1 Undefined\r
\r
@return EFI_NOT_AVAILABLE_YET\r
\r
/**\r
Place holder function until all the Boot Services and Runtime Services are available.\r
\r
- @param Arg1 Undefined \r
- @param Arg2 Undefined \r
+ @param Arg1 Undefined\r
+ @param Arg2 Undefined\r
\r
@return EFI_NOT_AVAILABLE_YET\r
\r
/**\r
Place holder function until all the Boot Services and Runtime Services are available.\r
\r
- @param Arg1 Undefined \r
- @param Arg2 Undefined \r
- @param Arg3 Undefined \r
+ @param Arg1 Undefined\r
+ @param Arg2 Undefined\r
+ @param Arg3 Undefined\r
\r
@return EFI_NOT_AVAILABLE_YET\r
\r
/**\r
Place holder function until all the Boot Services and Runtime Services are available.\r
\r
- @param Arg1 Undefined \r
- @param Arg2 Undefined \r
- @param Arg3 Undefined \r
- @param Arg4 Undefined \r
+ @param Arg1 Undefined\r
+ @param Arg2 Undefined\r
+ @param Arg3 Undefined\r
+ @param Arg4 Undefined\r
\r
@return EFI_NOT_AVAILABLE_YET\r
\r
/**\r
Place holder function until all the Boot Services and Runtime Services are available.\r
\r
- @param Arg1 Undefined \r
- @param Arg2 Undefined \r
- @param Arg3 Undefined \r
- @param Arg4 Undefined \r
- @param Arg5 Undefined \r
+ @param Arg1 Undefined\r
+ @param Arg2 Undefined\r
+ @param Arg3 Undefined\r
+ @param Arg4 Undefined\r
+ @param Arg5 Undefined\r
\r
@return EFI_NOT_AVAILABLE_YET\r
\r
}\r
\r
\r
-\r
-/**\r
- Searches for a Protocol Interface passed from PEI through a HOB.\r
-\r
- @param ProtocolGuid The Protocol GUID to search for in the HOB List \r
- @param Interface A pointer to the interface for the Protocol GUID \r
-\r
- @retval EFI_SUCCESS The Protocol GUID was found and its interface is \r
- returned in Interface \r
- @retval EFI_NOT_FOUND The Protocol GUID was not found in the HOB List\r
-\r
-**/\r
-EFI_STATUS\r
-CoreGetPeiProtocol (\r
- IN EFI_GUID *ProtocolGuid,\r
- IN VOID **Interface\r
- )\r
-{\r
- EFI_HOB_GUID_TYPE *GuidHob;\r
- VOID *Buffer;\r
-\r
- GuidHob = GetFirstGuidHob (ProtocolGuid);\r
- if (GuidHob == NULL) {\r
- return EFI_NOT_FOUND;\r
- }\r
-\r
- Buffer = GET_GUID_HOB_DATA (GuidHob);\r
- ASSERT (Buffer != NULL);\r
-\r
- *Interface = (VOID *)(*(UINTN *)(Buffer));\r
-\r
- return EFI_SUCCESS;\r
-}\r
-\r
-\r
-\r
/**\r
Calcualte the 32-bit CRC in a EFI table using the service provided by the\r
gRuntime service.\r
Hdr->CRC32 = 0;\r
\r
//\r
- // If gDxeCoreBS->CalculateCrce32 () == CoreEfiNotAvailableYet () then\r
+ // If gBS->CalculateCrce32 () == CoreEfiNotAvailableYet () then\r
// Crc will come back as zero if we set it to zero here\r
//\r
Crc = 0;\r
- gDxeCoreBS->CalculateCrc32 ((UINT8 *)Hdr, Hdr->HeaderSize, &Crc);\r
+ gBS->CalculateCrc32 ((UINT8 *)Hdr, Hdr->HeaderSize, &Crc);\r
Hdr->CRC32 = Crc;\r
}\r
\r
\r
-\r
-\r
/**\r
Terminates all boot services.\r
\r
- @param ImageHandle Handle that identifies the exiting image. \r
+ @param ImageHandle Handle that identifies the exiting image.\r
@param MapKey Key to the latest memory map.\r
\r
- @retval EFI_SUCCESS Boot Services terminated \r
+ @retval EFI_SUCCESS Boot Services terminated\r
@retval EFI_INVALID_PARAMETER MapKey is incorrect.\r
\r
**/\r
EFI_TCG_PLATFORM_PROTOCOL *TcgPlatformProtocol;\r
\r
//\r
- // Measure invocation of ExitBootServices, \r
+ // Measure invocation of ExitBootServices,\r
// which is defined by TCG_EFI_Platform_1_20_Final Specification\r
//\r
TcgPlatformProtocol = NULL;\r
//\r
// Report that ExitBootServices() has been called\r
//\r
- // We are using gEfiCallerIdGuid as the caller ID for Dxe Core\r
- //\r
- CoreReportProgressCode (FixedPcdGet32 (PcdStatusCodeValueBootServiceExit));\r
+ REPORT_STATUS_CODE (\r
+ EFI_PROGRESS_CODE,\r
+ FixedPcdGet32 (PcdStatusCodeValueBootServiceExit)\r
+ );\r
\r
//\r
// Clear the non-runtime values of the EFI System Table\r
//\r
// Zero out the Boot Service Table\r
//\r
- ZeroMem (gDxeCoreBS, sizeof (EFI_BOOT_SERVICES));\r
- gDxeCoreBS = NULL;\r
+ ZeroMem (gBS, sizeof (EFI_BOOT_SERVICES));\r
+ gBS = NULL;\r
\r
//\r
// Update the AtRuntime field in Runtiem AP.\r
StatusTemp = TcgPlatformProtocol->MeasureAction (EFI_EXIT_BOOT_SERVICES_SUCCEEDED);\r
ASSERT_EFI_ERROR (StatusTemp);\r
}\r
- \r
+\r
return Status;\r
}\r
\r
buffer that is required to decompress the\r
compressed buffer specified by Source and\r
SourceSize.\r
- \r
+\r
@retval EFI_SUCCESS The size of the uncompressed data was returned in\r
DestinationSize and the size of the scratch buffer\r
was returned in ScratchSize.\r
the decompression.\r
@param ScratchSize The size of scratch buffer. The size of the\r
scratch buffer needed is obtained from GetInfo().\r
- \r
+\r
@retval EFI_SUCCESS Decompression completed successfully, and the\r
uncompressed buffer is returned in Destination.\r
@retval EFI_INVALID_PARAMETER The source buffer specified by Source and\r
EFI_STATUS Status;\r
UINT32 TestDestinationSize;\r
UINT32 TestScratchSize;\r
- \r
+\r
if (Source == NULL || Destination== NULL || Scratch == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r
- \r
+\r
Status = UefiDecompressGetInfo (Source, SourceSize, &TestDestinationSize, &TestScratchSize);\r
if (EFI_ERROR (Status)) {\r
return Status;\r