X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FDebugSupportDxe%2FDebugSupport.c;h=bf668b5a97369b997ea9aaba6ec4aee84b2cd9fe;hb=132f41f0a92082775d931067089a63ca50367225;hp=ed4d86038aa8d75b72f7d8a752e53e4d4139f613;hpb=9e604fe42d90c05adb08cf86bc1843c436f523dc;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c b/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c index ed4d86038a..bf668b5a97 100644 --- a/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c +++ b/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c @@ -1,7 +1,7 @@ /** @file Top level C file for debug support driver. Contains initialization function. -Copyright (c) 2006 - 2008, 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 @@ -12,15 +12,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -// -// private header files -// #include "PlDebugSupport.h" -// -// This is a global that is the actual interface -// -EFI_DEBUG_SUPPORT_PROTOCOL gDebugSupportProtocolInterface = { +EFI_DEBUG_SUPPORT_PROTOCOL mDebugSupportProtocolInterface = { EFI_ISA, GetMaximumProcessorIndex, RegisterPeriodicCallback, @@ -30,20 +24,21 @@ EFI_DEBUG_SUPPORT_PROTOCOL gDebugSupportProtocolInterface = { /** - Debug Port Driver entry point. + Debug Support Driver entry point. - Checks to see there's not already a DebugSupport protocol installed for - the selected processor before installing protocol. + Checks to see if there's not already a Debug Support protocol installed for + the selected processor before installing it. @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. @retval EFI_SUCCESS The entry point is executed successfully. - @retval EFI_ALREADY_STARTED DebugSupport protocol is installed already. + @retval EFI_ALREADY_STARTED Debug Support protocol is installed already. @retval other Some error occurs when executing this entry point. **/ EFI_STATUS +EFIAPI InitializeDebugSupportDriver ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable @@ -56,8 +51,6 @@ InitializeDebugSupportDriver ( UINTN NumHandles; EFI_DEBUG_SUPPORT_PROTOCOL *DebugSupportProtocolPtr; - // - // Install Protocol Interface... // // First check to see that the debug support protocol for this processor // type is not already installed @@ -81,7 +74,10 @@ InitializeDebugSupportDriver ( NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL ); - if (Status == EFI_SUCCESS && DebugSupportProtocolPtr->Isa == EFI_ISA) { + if ((Status == EFI_SUCCESS) && (DebugSupportProtocolPtr->Isa == EFI_ISA)) { + // + // a Debug Support protocol has been installed for this processor + // FreePool (HandlePtr); Status = EFI_ALREADY_STARTED; goto ErrExit; @@ -109,7 +105,7 @@ InitializeDebugSupportDriver ( LoadedImageProtocolPtr->Unload = PlUnloadDebugSupportDriver; // - // Call hook for platform specific initialization + // Call hook for processor specific initialization // Status = PlInitializeDebugSupportDriver (); ASSERT (!EFI_ERROR (Status)); @@ -118,14 +114,14 @@ InitializeDebugSupportDriver ( } // - // Install DebugSupport protocol to new handle + // Install Debug Support protocol to new handle // Handle = NULL; Status = gBS->InstallProtocolInterface ( &Handle, &gEfiDebugSupportProtocolGuid, EFI_NATIVE_INTERFACE, - &gDebugSupportProtocolInterface + &mDebugSupportProtocolInterface ); ASSERT (!EFI_ERROR (Status)); if (Status != EFI_SUCCESS) {