// 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 *gBS = &mBootServices;\r
-EFI_DXE_SERVICES *gDS = &mDxeServices;\r
-EFI_SYSTEM_TABLE *gST = NULL;\r
+EFI_BOOT_SERVICES *gDxeCoreBS = &mBootServices;\r
+EFI_DXE_SERVICES *gDxeCoreDS = &mDxeServices;\r
+EFI_SYSTEM_TABLE *gDxeCoreST = NULL;\r
\r
//\r
-// For debug initialize gRT to template. gRT must be allocated from RT memory\r
-// but gRT is used for ASSERT () and DEBUG () type macros so lets give it\r
+// For debug initialize gDxeCoreRT to template. gDxeCoreRT must be allocated from RT memory\r
+// but gDxeCoreRT is used for ASSERT () and DEBUG () type macros so lets give it\r
// a value that will not cause debug infrastructure to crash early on.\r
//\r
-EFI_RUNTIME_SERVICES *gRT = &mEfiRuntimeServicesTableTemplate;\r
+EFI_RUNTIME_SERVICES *gDxeCoreRT = &mEfiRuntimeServicesTableTemplate;\r
EFI_HANDLE gDxeCoreImageHandle = NULL;\r
\r
VOID *mHobStart;\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
- gST = CoreAllocateRuntimeCopyPool (sizeof (EFI_SYSTEM_TABLE), &mEfiSystemTableTemplate);\r
- ASSERT (gST != NULL);\r
+ gDxeCoreST = CoreAllocateRuntimeCopyPool (sizeof (EFI_SYSTEM_TABLE), &mEfiSystemTableTemplate);\r
+ ASSERT (gDxeCoreST != NULL);\r
\r
- gRT = CoreAllocateRuntimeCopyPool (sizeof (EFI_RUNTIME_SERVICES), &mEfiRuntimeServicesTableTemplate);\r
- ASSERT (gRT != NULL);\r
+ gDxeCoreRT = CoreAllocateRuntimeCopyPool (sizeof (EFI_RUNTIME_SERVICES), &mEfiRuntimeServicesTableTemplate);\r
+ ASSERT (gDxeCoreRT != NULL);\r
\r
- gST->RuntimeServices = gRT;\r
+ gDxeCoreST->RuntimeServices = gDxeCoreRT;\r
\r
//\r
// Start the Image Services.\r
//\r
// Call constructor for all libraries\r
//\r
- ProcessLibraryConstructorList (gDxeCoreImageHandle, gST);\r
+ ProcessLibraryConstructorList (gDxeCoreImageHandle, gDxeCoreST);\r
PERF_END (0,PEI_TOK, NULL, 0) ;\r
PERF_START (0,DXE_TOK, NULL, 0) ;\r
\r
//\r
// Install the DXE Services Table into the EFI System Tables's Configuration Table\r
//\r
- Status = CoreInstallConfigurationTable (&gEfiDxeServicesTableGuid, gDS);\r
+ Status = CoreInstallConfigurationTable (&gEfiDxeServicesTableGuid, gDxeCoreDS);\r
ASSERT_EFI_ERROR (Status);\r
\r
//\r
//\r
// Produce Firmware Volume Protocols, one for each FV in the HOB list.\r
//\r
- Status = FwVolBlockDriverInit (gDxeCoreImageHandle, gST);\r
+ Status = FwVolBlockDriverInit (gDxeCoreImageHandle, gDxeCoreST);\r
ASSERT_EFI_ERROR (Status);\r
\r
- Status = FwVolDriverInit (gDxeCoreImageHandle, gST);\r
+ Status = FwVolDriverInit (gDxeCoreImageHandle, gDxeCoreST);\r
ASSERT_EFI_ERROR (Status);\r
\r
//\r
// Produce the Section Extraction Protocol\r
//\r
- Status = InitializeSectionExtraction (gDxeCoreImageHandle, gST);\r
+ Status = InitializeSectionExtraction (gDxeCoreImageHandle, gDxeCoreST);\r
ASSERT_EFI_ERROR (Status);\r
\r
//\r
Hdr->CRC32 = 0;\r
\r
//\r
- // If gBS->CalculateCrce32 () == CoreEfiNotAvailableYet () then\r
+ // If gDxeCoreBS->CalculateCrce32 () == CoreEfiNotAvailableYet () then\r
// Crc will come back as zero if we set it to zero here\r
//\r
Crc = 0;\r
- gBS->CalculateCrc32 ((UINT8 *)Hdr, Hdr->HeaderSize, &Crc);\r
+ gDxeCoreBS->CalculateCrc32 ((UINT8 *)Hdr, Hdr->HeaderSize, &Crc);\r
Hdr->CRC32 = Crc;\r
}\r
\r
//\r
// Clear the non-runtime values of the EFI System Table\r
//\r
- gST->BootServices = NULL;\r
- gST->ConIn = NULL;\r
- gST->ConsoleInHandle = NULL;\r
- gST->ConOut = NULL;\r
- gST->ConsoleOutHandle = NULL;\r
- gST->StdErr = NULL;\r
- gST->StandardErrorHandle = NULL;\r
+ gDxeCoreST->BootServices = NULL;\r
+ gDxeCoreST->ConIn = NULL;\r
+ gDxeCoreST->ConsoleInHandle = NULL;\r
+ gDxeCoreST->ConOut = NULL;\r
+ gDxeCoreST->ConsoleOutHandle = NULL;\r
+ gDxeCoreST->StdErr = NULL;\r
+ gDxeCoreST->StandardErrorHandle = NULL;\r
\r
//\r
// Recompute the 32-bit CRC of the EFI System Table\r
//\r
- CalculateEfiHdrCrc (&gST->Hdr);\r
+ CalculateEfiHdrCrc (&gDxeCoreST->Hdr);\r
\r
//\r
// Zero out the Boot Service Table\r
//\r
- SetMem (gBS, sizeof (EFI_BOOT_SERVICES), 0);\r
- gBS = NULL;\r
+ SetMem (gDxeCoreBS, sizeof (EFI_BOOT_SERVICES), 0);\r
+ gDxeCoreBS = NULL;\r
\r
//\r
// Update the AtRuntime field in Runtiem AP.\r