PchSmmIoTrapControl.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /** @file
  2. PCH SMM IO Trap Control Protocol
  3. Copyright (c) 2019 Intel Corporation. All rights reserved. <BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef _PCH_SMM_IO_TRAP_CONTROL_H_
  7. #define _PCH_SMM_IO_TRAP_CONTROL_H_
  8. //
  9. // Extern the GUID for protocol users.
  10. //
  11. extern EFI_GUID gPchSmmIoTrapControlGuid;
  12. //
  13. // Forward reference for ANSI C compatibility
  14. //
  15. typedef struct _PCH_SMM_IO_TRAP_CONTROL_PROTOCOL PCH_SMM_IO_TRAP_CONTROL_PROTOCOL;
  16. //
  17. // Related Definitions
  18. //
  19. //
  20. // Member functions
  21. //
  22. /**
  23. The Prototype of Pause and Resume IoTrap callback function.
  24. @param[in] This Pointer to the PCH_SMM_IO_TRAP_CONTROL_PROTOCOL instance.
  25. @param[in] DispatchHandle Handle of the child service to change state.
  26. @retval EFI_SUCCESS This operation is complete.
  27. @retval EFI_INVALID_PARAMETER The DispatchHandle is invalid.
  28. @retval EFI_ACCESS_DENIED The SMI status is alrady PAUSED/RESUMED.
  29. **/
  30. typedef
  31. EFI_STATUS
  32. (EFIAPI *PCH_SMM_IO_TRAP_CONTROL_FUNCTION) (
  33. IN PCH_SMM_IO_TRAP_CONTROL_PROTOCOL * This,
  34. IN EFI_HANDLE DispatchHandle
  35. );
  36. /**
  37. Interface structure for the SMM IO trap pause and resume protocol
  38. This protocol provides the functions to runtime control the IoTrap SMI enabled/disable.
  39. This applys the capability to the DispatchHandle which returned by IoTrap callback
  40. registration, and the DispatchHandle which must be MergeDisable = TRUE and Address != 0.
  41. Besides, when S3 resuem, it only restores the state of IoTrap callback registration.
  42. The Paused/Resume state won't be restored after S3 resume.
  43. **/
  44. struct _PCH_SMM_IO_TRAP_CONTROL_PROTOCOL {
  45. /**
  46. This runtime pauses a registered IoTrap handler.
  47. **/
  48. PCH_SMM_IO_TRAP_CONTROL_FUNCTION Pause;
  49. /**
  50. This runtime resumes a registered IoTrap handler.
  51. **/
  52. PCH_SMM_IO_TRAP_CONTROL_FUNCTION Resume;
  53. };
  54. #endif