diff options
| author | kx <kx@radix.pro> | 2024-06-04 06:43:08 +0300 |
|---|---|---|
| committer | kx <kx@radix.pro> | 2024-06-04 06:43:08 +0300 |
| commit | 7e2ccccace24636f29ddc210b94606abd4c7e42b (patch) | |
| tree | 545d43ea12671048956cafeb12303e84d601e571 /MdeModulePkg/Library/PeiDebugPrintHobLib | |
| parent | 27b044605cd5f6b33a3d231576003850b3fe305b (diff) | |
| download | edk2-trunk.tar.xz | |
Renormalized end-of-lines from master@27b044605cd5f6b33a3d231576003850b3fe305btrunk
Diffstat (limited to 'MdeModulePkg/Library/PeiDebugPrintHobLib')
3 files changed, 133 insertions, 133 deletions
diff --git a/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.c b/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.c index 1228587b9d..ed32d0a1a7 100644 --- a/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.c +++ b/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.c @@ -1,71 +1,71 @@ -/** @file
- NULL Library class that reads Debug Mask variable and if it exists makes a
- HOB that contains the debug mask.
-
- Copyright (c) 2011, Apple, Inc. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include <PiPei.h>
-
-#include <Library/HobLib.h>
-#include <Library/DebugLib.h>
-#include <Library/PeiServicesLib.h>
-
-#include <Ppi/ReadOnlyVariable2.h>
-#include <Guid/DebugMask.h>
-
-/**
- The constructor reads variable and sets HOB
-
- @param FileHandle The handle of FFS header the loaded driver.
- @param PeiServices The pointer to the PEI services.
-
- @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
-
-**/
-EFI_STATUS
-EFIAPI
-PeiDebugPrintHobLibConstructor (
- IN EFI_PEI_FILE_HANDLE FileHandle,
- IN CONST EFI_PEI_SERVICES **PeiServices
- )
-{
- EFI_STATUS Status;
- EFI_PEI_READ_ONLY_VARIABLE2_PPI *Variable;
- UINTN Size;
- UINT64 GlobalErrorLevel;
- UINT32 HobErrorLevel;
-
- Status = PeiServicesLocatePpi (
- &gEfiPeiReadOnlyVariable2PpiGuid,
- 0,
- NULL,
- (VOID **)&Variable
- );
- if (!EFI_ERROR (Status)) {
- Size = sizeof (GlobalErrorLevel);
- Status = Variable->GetVariable (
- Variable,
- DEBUG_MASK_VARIABLE_NAME,
- &gEfiGenericVariableGuid,
- NULL,
- &Size,
- &GlobalErrorLevel
- );
- if (!EFI_ERROR (Status)) {
- //
- // Build the GUID'ed HOB for DXE
- //
- HobErrorLevel = (UINT32)GlobalErrorLevel;
- BuildGuidDataHob (
- &gEfiGenericVariableGuid,
- &HobErrorLevel,
- sizeof (HobErrorLevel)
- );
- }
- }
-
- return EFI_SUCCESS;
-}
+/** @file + NULL Library class that reads Debug Mask variable and if it exists makes a + HOB that contains the debug mask. + + Copyright (c) 2011, Apple, Inc. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include <PiPei.h> + +#include <Library/HobLib.h> +#include <Library/DebugLib.h> +#include <Library/PeiServicesLib.h> + +#include <Ppi/ReadOnlyVariable2.h> +#include <Guid/DebugMask.h> + +/** + The constructor reads variable and sets HOB + + @param FileHandle The handle of FFS header the loaded driver. + @param PeiServices The pointer to the PEI services. + + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. + +**/ +EFI_STATUS +EFIAPI +PeiDebugPrintHobLibConstructor ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + EFI_STATUS Status; + EFI_PEI_READ_ONLY_VARIABLE2_PPI *Variable; + UINTN Size; + UINT64 GlobalErrorLevel; + UINT32 HobErrorLevel; + + Status = PeiServicesLocatePpi ( + &gEfiPeiReadOnlyVariable2PpiGuid, + 0, + NULL, + (VOID **)&Variable + ); + if (!EFI_ERROR (Status)) { + Size = sizeof (GlobalErrorLevel); + Status = Variable->GetVariable ( + Variable, + DEBUG_MASK_VARIABLE_NAME, + &gEfiGenericVariableGuid, + NULL, + &Size, + &GlobalErrorLevel + ); + if (!EFI_ERROR (Status)) { + // + // Build the GUID'ed HOB for DXE + // + HobErrorLevel = (UINT32)GlobalErrorLevel; + BuildGuidDataHob ( + &gEfiGenericVariableGuid, + &HobErrorLevel, + sizeof (HobErrorLevel) + ); + } + } + + return EFI_SUCCESS; +} diff --git a/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.inf b/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.inf index 26a027e8de..63c9411b02 100644 --- a/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.inf +++ b/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.inf @@ -1,45 +1,45 @@ -## @file
-# NULL Library class that reads Debug Mask variable and if it exists makes a
-# HOB that contains the debug mask.
-#
-# Copyright (c) 2011, Apple, Inc. All rights reserved.<BR>
-# Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = PeiDebugPrintHobLib
- MODULE_UNI_FILE = PeiDebugPrintHobLib.uni
- FILE_GUID = EB0BDD73-DABB-E74B-BF51-62DC1DA521E1
- MODULE_TYPE = PEIM
- VERSION_STRING = 1.0
- LIBRARY_CLASS = NULL|PEIM
- CONSTRUCTOR = PeiDebugPrintHobLibConstructor
-
-
-[Sources]
- PeiDebugPrintHobLib.c
-
-
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
-
-[LibraryClasses]
- PeiServicesLib
- DebugLib
-
-[Ppis]
- gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES
-
-[Guids]
- ## SOMETIMES_CONSUMES ## Variable:L"EFIDebug"
- ## SOMETIMES_PRODUCES ## HOB
- gEfiGenericVariableGuid
-
-[Depex]
- gEfiPeiReadOnlyVariable2PpiGuid
+## @file +# NULL Library class that reads Debug Mask variable and if it exists makes a +# HOB that contains the debug mask. +# +# Copyright (c) 2011, Apple, Inc. All rights reserved.<BR> +# Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR> +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = PeiDebugPrintHobLib + MODULE_UNI_FILE = PeiDebugPrintHobLib.uni + FILE_GUID = EB0BDD73-DABB-E74B-BF51-62DC1DA521E1 + MODULE_TYPE = PEIM + VERSION_STRING = 1.0 + LIBRARY_CLASS = NULL|PEIM + CONSTRUCTOR = PeiDebugPrintHobLibConstructor + + +[Sources] + PeiDebugPrintHobLib.c + + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + +[LibraryClasses] + PeiServicesLib + DebugLib + +[Ppis] + gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES + +[Guids] + ## SOMETIMES_CONSUMES ## Variable:L"EFIDebug" + ## SOMETIMES_PRODUCES ## HOB + gEfiGenericVariableGuid + +[Depex] + gEfiPeiReadOnlyVariable2PpiGuid diff --git a/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.uni b/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.uni index bdc221b70b..9fa259a445 100644 --- a/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.uni +++ b/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.uni @@ -1,17 +1,17 @@ -// /** @file
-// NULL Library class that reads Debug Mask variable and if it exists makes a
-//
-// HOB that contains the debug mask.
-//
-// Copyright (c) 2011, Apple, Inc. All rights reserved.<BR>
-// Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>
-//
-// SPDX-License-Identifier: BSD-2-Clause-Patent
-//
-// **/
-
-
-#string STR_MODULE_ABSTRACT #language en-US "Reads Debug Mask variable and if it exists makes a HOB that contains the debug mask"
-
-#string STR_MODULE_DESCRIPTION #language en-US "NULL Library class that reads Debug Mask variable and if it exists makes a HOB that contains the debug mask."
-
+// /** @file +// NULL Library class that reads Debug Mask variable and if it exists makes a +// +// HOB that contains the debug mask. +// +// Copyright (c) 2011, Apple, Inc. All rights reserved.<BR> +// Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR> +// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + + +#string STR_MODULE_ABSTRACT #language en-US "Reads Debug Mask variable and if it exists makes a HOB that contains the debug mask" + +#string STR_MODULE_DESCRIPTION #language en-US "NULL Library class that reads Debug Mask variable and if it exists makes a HOB that contains the debug mask." + |
