PhysicalPresenceData.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /** @file
  2. Define the variable data structures used for TCG physical presence.
  3. The TPM request from firmware or OS is saved to variable. And it is
  4. cleared after it is processed in the next boot cycle. The TPM response
  5. is saved to variable.
  6. Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
  7. SPDX-License-Identifier: BSD-2-Clause-Patent
  8. **/
  9. #ifndef __PHYSICAL_PRESENCE_DATA_GUID_H__
  10. #define __PHYSICAL_PRESENCE_DATA_GUID_H__
  11. #define EFI_PHYSICAL_PRESENCE_DATA_GUID \
  12. { \
  13. 0xf6499b1, 0xe9ad, 0x493d, { 0xb9, 0xc2, 0x2f, 0x90, 0x81, 0x5c, 0x6c, 0xbc }\
  14. }
  15. #define PHYSICAL_PRESENCE_VARIABLE L"PhysicalPresence"
  16. typedef struct {
  17. UINT8 PPRequest; ///< Physical Presence request command.
  18. UINT8 LastPPRequest;
  19. UINT32 PPResponse;
  20. } EFI_PHYSICAL_PRESENCE;
  21. //
  22. // The definition of physical presence operation actions
  23. //
  24. #define PHYSICAL_PRESENCE_NO_ACTION 0
  25. #define PHYSICAL_PRESENCE_ENABLE 1
  26. #define PHYSICAL_PRESENCE_DISABLE 2
  27. #define PHYSICAL_PRESENCE_ACTIVATE 3
  28. #define PHYSICAL_PRESENCE_DEACTIVATE 4
  29. #define PHYSICAL_PRESENCE_CLEAR 5
  30. #define PHYSICAL_PRESENCE_ENABLE_ACTIVATE 6
  31. #define PHYSICAL_PRESENCE_DEACTIVATE_DISABLE 7
  32. #define PHYSICAL_PRESENCE_SET_OWNER_INSTALL_TRUE 8
  33. #define PHYSICAL_PRESENCE_SET_OWNER_INSTALL_FALSE 9
  34. #define PHYSICAL_PRESENCE_ENABLE_ACTIVATE_OWNER_TRUE 10
  35. #define PHYSICAL_PRESENCE_DEACTIVATE_DISABLE_OWNER_FALSE 11
  36. #define PHYSICAL_PRESENCE_DEFERRED_PP_UNOWNERED_FIELD_UPGRADE 12
  37. #define PHYSICAL_PRESENCE_SET_OPERATOR_AUTH 13
  38. #define PHYSICAL_PRESENCE_CLEAR_ENABLE_ACTIVATE 14
  39. #define PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_FALSE 15
  40. #define PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_TRUE 16
  41. #define PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_FALSE 17
  42. #define PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_TRUE 18
  43. #define PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_FALSE 19
  44. #define PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_TRUE 20
  45. #define PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR 21
  46. #define PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE 22
  47. //
  48. // This variable is used to save TPM Management Flags and corresponding operations.
  49. // It should be protected from malicious software (e.g. Set it as read-only variable).
  50. //
  51. #define PHYSICAL_PRESENCE_FLAGS_VARIABLE L"PhysicalPresenceFlags"
  52. typedef struct {
  53. UINT8 PPFlags;
  54. } EFI_PHYSICAL_PRESENCE_FLAGS;
  55. //
  56. // The definition bit of the TPM Management Flags
  57. //
  58. #define FLAG_NO_PPI_PROVISION BIT0
  59. #define FLAG_NO_PPI_CLEAR BIT1
  60. #define FLAG_NO_PPI_MAINTENANCE BIT2
  61. #define FLAG_RESET_TRACK BIT3
  62. extern EFI_GUID gEfiPhysicalPresenceGuid;
  63. #endif