mirror of
https://github.com/acidanthera/audk.git
synced 2025-08-17 15:48:10 +02:00
PCH SMM module would install SMM SW dispatch2 protocol. And it supports to register SMI handlers based on SMI APM interrupt from the bootloader information gSmmRegisterInfoGuid. It is possible to extend bootloader HOB to pass other information to support more SMI sources. If this module is not required by bootloader for some reason, the bootloader could skip this HOB or build a HOB without EOS info. Signed-off-by: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Benjamin You <benjamin.you@intel.com>
38 lines
1.0 KiB
C
38 lines
1.0 KiB
C
/** @file
|
|
The header file for SMM SwDispatch2 module.
|
|
|
|
Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#ifndef SMM_SW_DISPATCH2_H_
|
|
#define SMM_SW_DISPATCH2_H_
|
|
|
|
#include <PiDxe.h>
|
|
#include <Protocol/SmmSwDispatch2.h>
|
|
#include <Protocol/SmmCpu.h>
|
|
#include <Library/UefiDriverEntryPoint.h>
|
|
#include <Library/SmmServicesTableLib.h>
|
|
#include <Library/BaseLib.h>
|
|
#include <Library/IoLib.h>
|
|
#include <Library/DebugLib.h>
|
|
#include <Guid/SmmRegisterInfoGuid.h>
|
|
#include <Library/HobLib.h>
|
|
|
|
#define SMI_SW_HANDLER_SIGNATURE SIGNATURE_32('s','s','w','h')
|
|
#define MAXIMUM_SWI_VALUE 0xFF
|
|
#define SMM_CONTROL_PORT 0xB2
|
|
#define SMM_DATA_PORT 0xB3
|
|
|
|
typedef struct {
|
|
UINTN Signature;
|
|
LIST_ENTRY Link;
|
|
EFI_HANDLE DispatchHandle;
|
|
UINTN SwSmiInputValue;
|
|
UINTN DispatchFunction;
|
|
} EFI_SMM_SW_DISPATCH2_CONTEXT;
|
|
|
|
#endif
|
|
|