From abb234751e4fbe58afc5e7c7e203db2a93aac0f8 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Fri, 6 Apr 2007 06:36:47 +0000 Subject: 1) Initialize gBS, gST, gImageHandle in UefiBootServicesTableLib.c to NULL 2) Add DxeCore infix to the module local variable gBS, gST, gRT, gDS in DxeMain.c. This is to solve the name conflict with UefiBootServicesTableLib which is defined in MDE Library Spec. 3) Add in check for gBS and gST in UefiDebugLibConOut/DebugLib.c and UefiDebugLibStdErr/DebugLib.c and MdePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c. If they are not initialized, the API will just return with a error message. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2546 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkModulePkg/Core/Dxe/Misc/DebugImageInfo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'EdkModulePkg/Core/Dxe/Misc/DebugImageInfo.c') diff --git a/EdkModulePkg/Core/Dxe/Misc/DebugImageInfo.c b/EdkModulePkg/Core/Dxe/Misc/DebugImageInfo.c index 3ba1eca..3512477 100644 --- a/EdkModulePkg/Core/Dxe/Misc/DebugImageInfo.c +++ b/EdkModulePkg/Core/Dxe/Misc/DebugImageInfo.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, 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 @@ -97,7 +97,7 @@ Notes: // mDebugTable = (EFI_SYSTEM_TABLE_POINTER *)(UINTN)Mem; mDebugTable->Signature = EFI_SYSTEM_TABLE_SIGNATURE; - mDebugTable->EfiSystemTableBase = (EFI_PHYSICAL_ADDRESS) (UINTN) gST; + mDebugTable->EfiSystemTableBase = (EFI_PHYSICAL_ADDRESS) (UINTN) gDxeCoreST; mDebugTable->Crc32 = 0; Status = CoreInstallConfigurationTable (&gEfiDebugImageInfoTableGuid, &mDebugInfoTableHeader); ASSERT_EFI_ERROR (Status); @@ -127,7 +127,7 @@ Returns: { ASSERT(mDebugTable != NULL); mDebugTable->Crc32 = 0; - gBS->CalculateCrc32 ((VOID *)mDebugTable, sizeof (EFI_SYSTEM_TABLE_POINTER), &mDebugTable->Crc32); + gDxeCoreBS->CalculateCrc32 ((VOID *)mDebugTable, sizeof (EFI_SYSTEM_TABLE_POINTER), &mDebugTable->Crc32); } VOID -- cgit v1.1