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/SmmSmiHandlerProfileLib | |
| parent | 27b044605cd5f6b33a3d231576003850b3fe305b (diff) | |
| download | edk2-trunk.tar.xz | |
Renormalized end-of-lines from master@27b044605cd5f6b33a3d231576003850b3fe305btrunk
Diffstat (limited to 'MdeModulePkg/Library/SmmSmiHandlerProfileLib')
7 files changed, 289 insertions, 289 deletions
diff --git a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfileLib.c b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfileLib.c index c5d840326e..d887df5ea2 100644 --- a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfileLib.c +++ b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfileLib.c @@ -1,103 +1,103 @@ -/** @file
- MM driver instance of SmiHandlerProfile Library.
-
- Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
- Copyright (c) Microsoft Corporation.
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include <PiMm.h>
-#include <Library/SmiHandlerProfileLib.h>
-#include <Library/MmServicesTableLib.h>
-#include <Guid/SmiHandlerProfile.h>
-
-SMI_HANDLER_PROFILE_PROTOCOL *mSmiHandlerProfile;
-
-/**
- This function is called by SmmChildDispatcher module to report
- a new SMI handler is registered, to SmmCore.
-
- @param HandlerGuid The GUID to identify the type of the handler.
- For the SmmChildDispatch protocol, the HandlerGuid
- must be the GUID of SmmChildDispatch protocol.
- @param Handler The SMI handler.
- @param CallerAddress The address of the module who registers the SMI handler.
- @param Context The context of the SMI handler.
- For the SmmChildDispatch protocol, the Context
- must match the one defined for SmmChildDispatch protocol.
- @param ContextSize The size of the context in bytes.
- For the SmmChildDispatch protocol, the Context
- must match the one defined for SmmChildDispatch protocol.
-
- @retval EFI_SUCCESS The information is recorded.
- @retval EFI_UNSUPPORTED The feature is unsupported.
- @retval EFI_OUT_OF_RESOURCES There is no enough resource to record the information.
-**/
-EFI_STATUS
-EFIAPI
-SmiHandlerProfileRegisterHandler (
- IN EFI_GUID *HandlerGuid,
- IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
- IN PHYSICAL_ADDRESS CallerAddress,
- IN VOID *Context OPTIONAL,
- IN UINTN ContextSize OPTIONAL
- )
-{
- if (mSmiHandlerProfile != NULL) {
- return mSmiHandlerProfile->RegisterHandler (mSmiHandlerProfile, HandlerGuid, Handler, CallerAddress, Context, ContextSize);
- }
-
- return EFI_UNSUPPORTED;
-}
-
-/**
- This function is called by SmmChildDispatcher module to report
- an existing SMI handler is unregistered, to SmmCore.
-
- @param HandlerGuid The GUID to identify the type of the handler.
- For the SmmChildDispatch protocol, the HandlerGuid
- must be the GUID of SmmChildDispatch protocol.
- @param Handler The SMI handler.
- @param Context The context of the SMI handler.
- If it is NOT NULL, it will be used to check what is registered.
- @param ContextSize The size of the context in bytes.
- If Context is NOT NULL, it will be used to check what is registered.
-
- @retval EFI_SUCCESS The original record is removed.
- @retval EFI_UNSUPPORTED The feature is unsupported.
- @retval EFI_NOT_FOUND There is no record for the HandlerGuid and handler.
-**/
-EFI_STATUS
-EFIAPI
-SmiHandlerProfileUnregisterHandler (
- IN EFI_GUID *HandlerGuid,
- IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
- IN VOID *Context OPTIONAL,
- IN UINTN ContextSize OPTIONAL
- )
-{
- if (mSmiHandlerProfile != NULL) {
- return mSmiHandlerProfile->UnregisterHandler (mSmiHandlerProfile, HandlerGuid, Handler, Context, ContextSize);
- }
-
- return EFI_UNSUPPORTED;
-}
-
-/**
- The common constructor function for SMI handler profile.
-
- @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
-**/
-EFI_STATUS
-MmSmiHandlerProfileLibInitialization (
- VOID
- )
-{
- gMmst->MmLocateProtocol (
- &gSmiHandlerProfileGuid,
- NULL,
- (VOID **)&mSmiHandlerProfile
- );
- return EFI_SUCCESS;
-}
+/** @file + MM driver instance of SmiHandlerProfile Library. + + Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> + Copyright (c) Microsoft Corporation. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include <PiMm.h> +#include <Library/SmiHandlerProfileLib.h> +#include <Library/MmServicesTableLib.h> +#include <Guid/SmiHandlerProfile.h> + +SMI_HANDLER_PROFILE_PROTOCOL *mSmiHandlerProfile; + +/** + This function is called by SmmChildDispatcher module to report + a new SMI handler is registered, to SmmCore. + + @param HandlerGuid The GUID to identify the type of the handler. + For the SmmChildDispatch protocol, the HandlerGuid + must be the GUID of SmmChildDispatch protocol. + @param Handler The SMI handler. + @param CallerAddress The address of the module who registers the SMI handler. + @param Context The context of the SMI handler. + For the SmmChildDispatch protocol, the Context + must match the one defined for SmmChildDispatch protocol. + @param ContextSize The size of the context in bytes. + For the SmmChildDispatch protocol, the Context + must match the one defined for SmmChildDispatch protocol. + + @retval EFI_SUCCESS The information is recorded. + @retval EFI_UNSUPPORTED The feature is unsupported. + @retval EFI_OUT_OF_RESOURCES There is no enough resource to record the information. +**/ +EFI_STATUS +EFIAPI +SmiHandlerProfileRegisterHandler ( + IN EFI_GUID *HandlerGuid, + IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, + IN PHYSICAL_ADDRESS CallerAddress, + IN VOID *Context OPTIONAL, + IN UINTN ContextSize OPTIONAL + ) +{ + if (mSmiHandlerProfile != NULL) { + return mSmiHandlerProfile->RegisterHandler (mSmiHandlerProfile, HandlerGuid, Handler, CallerAddress, Context, ContextSize); + } + + return EFI_UNSUPPORTED; +} + +/** + This function is called by SmmChildDispatcher module to report + an existing SMI handler is unregistered, to SmmCore. + + @param HandlerGuid The GUID to identify the type of the handler. + For the SmmChildDispatch protocol, the HandlerGuid + must be the GUID of SmmChildDispatch protocol. + @param Handler The SMI handler. + @param Context The context of the SMI handler. + If it is NOT NULL, it will be used to check what is registered. + @param ContextSize The size of the context in bytes. + If Context is NOT NULL, it will be used to check what is registered. + + @retval EFI_SUCCESS The original record is removed. + @retval EFI_UNSUPPORTED The feature is unsupported. + @retval EFI_NOT_FOUND There is no record for the HandlerGuid and handler. +**/ +EFI_STATUS +EFIAPI +SmiHandlerProfileUnregisterHandler ( + IN EFI_GUID *HandlerGuid, + IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, + IN VOID *Context OPTIONAL, + IN UINTN ContextSize OPTIONAL + ) +{ + if (mSmiHandlerProfile != NULL) { + return mSmiHandlerProfile->UnregisterHandler (mSmiHandlerProfile, HandlerGuid, Handler, Context, ContextSize); + } + + return EFI_UNSUPPORTED; +} + +/** + The common constructor function for SMI handler profile. + + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. +**/ +EFI_STATUS +MmSmiHandlerProfileLibInitialization ( + VOID + ) +{ + gMmst->MmLocateProtocol ( + &gSmiHandlerProfileGuid, + NULL, + (VOID **)&mSmiHandlerProfile + ); + return EFI_SUCCESS; +} diff --git a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfileLib.h b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfileLib.h index 8e390590ee..278a697eed 100644 --- a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfileLib.h +++ b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfileLib.h @@ -1,23 +1,23 @@ -/** @file
- MM driver instance of SmiHandlerProfile Library.
-
- Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
- Copyright (c) Microsoft Corporation.
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _MM_SMI_HANDLER_PROFILE_LIB_H_
-#define _MM_SMI_HANDLER_PROFILE_LIB_H_
-
-/**
- The common constructor function for SMI handler profile.
-
- @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
-**/
-EFI_STATUS
-MmSmiHandlerProfileLibInitialization (
- VOID
- );
-
-#endif //_SMM_SMI_HANDLER_PROFILE_LIB_H_
+/** @file + MM driver instance of SmiHandlerProfile Library. + + Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> + Copyright (c) Microsoft Corporation. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _MM_SMI_HANDLER_PROFILE_LIB_H_ +#define _MM_SMI_HANDLER_PROFILE_LIB_H_ + +/** + The common constructor function for SMI handler profile. + + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. +**/ +EFI_STATUS +MmSmiHandlerProfileLibInitialization ( + VOID + ); + +#endif //_SMM_SMI_HANDLER_PROFILE_LIB_H_ diff --git a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.c b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.c index da8cee7f15..f48358d6f8 100644 --- a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.c +++ b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.c @@ -1,30 +1,30 @@ -/** @file
- SMM driver instance of SmiHandlerProfile Library.
-
- Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
- Copyright (c) Microsoft Corporation.
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include <PiMm.h>
-
-#include "MmSmiHandlerProfileLib.h"
-
-/**
- The constructor function for traditional MM SMI handler profile.
-
- @param ImageHandle The firmware allocated handle for the EFI image.
- @param SystemTable A pointer to the EFI System Table.
-
- @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
-**/
-EFI_STATUS
-EFIAPI
-SmmSmiHandlerProfileLibConstructor (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-{
- return MmSmiHandlerProfileLibInitialization ();
-}
+/** @file + SMM driver instance of SmiHandlerProfile Library. + + Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> + Copyright (c) Microsoft Corporation. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include <PiMm.h> + +#include "MmSmiHandlerProfileLib.h" + +/** + The constructor function for traditional MM SMI handler profile. + + @param ImageHandle The firmware allocated handle for the EFI image. + @param SystemTable A pointer to the EFI System Table. + + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. +**/ +EFI_STATUS +EFIAPI +SmmSmiHandlerProfileLibConstructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + return MmSmiHandlerProfileLibInitialization (); +} diff --git a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.inf b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.inf index 56007d5021..39de9be6bc 100644 --- a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.inf +++ b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.inf @@ -1,43 +1,43 @@ -## @file
-# SMM driver instance of SmiHandlerProfile Library.
-#
-# This library instance provides real functionality for SmmChildDispatcher module.
-#
-# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = SmmSmiHandlerProfileLib
- MODULE_UNI_FILE = SmmSmiHandlerProfileLib.uni
- FILE_GUID = FC38CEAE-FB74-4049-A51C-68F0BA69DA7D
- MODULE_TYPE = DXE_SMM_DRIVER
- VERSION_STRING = 1.0
- LIBRARY_CLASS = SmiHandlerProfileLib|DXE_SMM_DRIVER
- CONSTRUCTOR = SmmSmiHandlerProfileLibConstructor
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64
-#
-
-[Sources]
- MmSmiHandlerProfileLib.c
- MmSmiHandlerProfileLib.h
- SmmSmiHandlerProfileLib.c
-
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
-
-[LibraryClasses]
- MmServicesTableLib
-
-[Guids]
- gSmiHandlerProfileGuid ## CONSUMES ## GUID # Locate protocol
-
+## @file +# SMM driver instance of SmiHandlerProfile Library. +# +# This library instance provides real functionality for SmmChildDispatcher module. +# +# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = SmmSmiHandlerProfileLib + MODULE_UNI_FILE = SmmSmiHandlerProfileLib.uni + FILE_GUID = FC38CEAE-FB74-4049-A51C-68F0BA69DA7D + MODULE_TYPE = DXE_SMM_DRIVER + VERSION_STRING = 1.0 + LIBRARY_CLASS = SmiHandlerProfileLib|DXE_SMM_DRIVER + CONSTRUCTOR = SmmSmiHandlerProfileLibConstructor + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 +# + +[Sources] + MmSmiHandlerProfileLib.c + MmSmiHandlerProfileLib.h + SmmSmiHandlerProfileLib.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + +[LibraryClasses] + MmServicesTableLib + +[Guids] + gSmiHandlerProfileGuid ## CONSUMES ## GUID # Locate protocol + diff --git a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.uni b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.uni index e90799f535..d9f017d9db 100644 --- a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.uni +++ b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.uni @@ -1,16 +1,16 @@ -// /** @file
-// SMM driver instance of SmiHandlerProfile Library.
-//
-// This library instance provides real functionality for SmmChildDispatcher module.
-//
-// Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
-//
-// SPDX-License-Identifier: BSD-2-Clause-Patent
-//
-// **/
-
-
-#string STR_MODULE_ABSTRACT #language en-US "SMM driver instance of SmiHandlerProfile Library"
-
-#string STR_MODULE_DESCRIPTION #language en-US "This library instance provides real functionality for SmmChildDispatcher module."
-
+// /** @file +// SMM driver instance of SmiHandlerProfile Library. +// +// This library instance provides real functionality for SmmChildDispatcher module. +// +// Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> +// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + + +#string STR_MODULE_ABSTRACT #language en-US "SMM driver instance of SmiHandlerProfile Library" + +#string STR_MODULE_DESCRIPTION #language en-US "This library instance provides real functionality for SmmChildDispatcher module." + diff --git a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHandlerProfileLib.c b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHandlerProfileLib.c index c426b11159..2ea2d0f770 100644 --- a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHandlerProfileLib.c +++ b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHandlerProfileLib.c @@ -1,30 +1,30 @@ -/** @file
- Standalone MM driver instance of SmiHandlerProfile Library.
-
- Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
- Copyright (c) Microsoft Corporation.
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include <PiMm.h>
-
-#include "MmSmiHandlerProfileLib.h"
-
-/**
- The constructor function for standalone MM SMI handler profile.
-
- @param ImageHandle The firmware allocated handle for the EFI image.
- @param SystemTable A pointer to the EFI System Table.
-
- @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
-**/
-EFI_STATUS
-EFIAPI
-StandaloneMmSmiHandlerProfileLibConstructor (
- IN EFI_HANDLE ImageHandle,
- IN EFI_MM_SYSTEM_TABLE *SystemTable
- )
-{
- return MmSmiHandlerProfileLibInitialization ();
-}
+/** @file + Standalone MM driver instance of SmiHandlerProfile Library. + + Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> + Copyright (c) Microsoft Corporation. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include <PiMm.h> + +#include "MmSmiHandlerProfileLib.h" + +/** + The constructor function for standalone MM SMI handler profile. + + @param ImageHandle The firmware allocated handle for the EFI image. + @param SystemTable A pointer to the EFI System Table. + + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. +**/ +EFI_STATUS +EFIAPI +StandaloneMmSmiHandlerProfileLibConstructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_MM_SYSTEM_TABLE *SystemTable + ) +{ + return MmSmiHandlerProfileLibInitialization (); +} diff --git a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHandlerProfileLib.inf b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHandlerProfileLib.inf index a885cc2b2a..eb6880820e 100644 --- a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHandlerProfileLib.inf +++ b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHandlerProfileLib.inf @@ -1,44 +1,44 @@ -## @file
-# Standalone MM driver instance of SmiHandlerProfile Library.
-#
-# This library instance provides real functionality for SmmChildDispatcher module.
-#
-# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
-# Copyright (c) Microsoft Corporation.
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = StandaloneMmSmiHandlerProfileLib
- FILE_GUID = 1F2ED27B-A01D-4867-B993-9B710E5926C5
- MODULE_TYPE = MM_STANDALONE
- VERSION_STRING = 1.0
- PI_SPECIFICATION_VERSION = 0x10000032
- LIBRARY_CLASS = SmiHandlerProfileLib|MM_STANDALONE
- CONSTRUCTOR = StandaloneMmSmiHandlerProfileLibConstructor
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64
-#
-
-[Sources]
- MmSmiHandlerProfileLib.c
- MmSmiHandlerProfileLib.h
- StandaloneMmSmiHandlerProfileLib.c
-
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
-
-[LibraryClasses]
- MmServicesTableLib
-
-[Guids]
- gSmiHandlerProfileGuid ## CONSUMES ## GUID # Locate protocol
-
+## @file +# Standalone MM driver instance of SmiHandlerProfile Library. +# +# This library instance provides real functionality for SmmChildDispatcher module. +# +# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> +# Copyright (c) Microsoft Corporation. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = StandaloneMmSmiHandlerProfileLib + FILE_GUID = 1F2ED27B-A01D-4867-B993-9B710E5926C5 + MODULE_TYPE = MM_STANDALONE + VERSION_STRING = 1.0 + PI_SPECIFICATION_VERSION = 0x10000032 + LIBRARY_CLASS = SmiHandlerProfileLib|MM_STANDALONE + CONSTRUCTOR = StandaloneMmSmiHandlerProfileLibConstructor + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 +# + +[Sources] + MmSmiHandlerProfileLib.c + MmSmiHandlerProfileLib.h + StandaloneMmSmiHandlerProfileLib.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + +[LibraryClasses] + MmServicesTableLib + +[Guids] + gSmiHandlerProfileGuid ## CONSUMES ## GUID # Locate protocol + |
