Prm.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /** @file
  2. Common Platform Runtime Mechanism (PRM) definitions.
  3. Copyright (c) Microsoft Corporation
  4. Copyright (c) 2022, Arm Limited. All rights reserved.<BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #ifndef PRM_H_
  8. #define PRM_H_
  9. #include <Uefi.h>
  10. #include <PrmContextBuffer.h>
  11. #if defined (_MSC_VER)
  12. #define PRM_EXPORT_API __declspec(dllexport)
  13. #elif defined (__GNUC__)
  14. #define PRM_EXPORT_API __attribute__ ((visibility ("default")))
  15. #else
  16. #define PRM_EXPORT_API
  17. #endif
  18. #define PRM_HANDLER_NAME_MAXIMUM_LENGTH 128
  19. #define PRM_STRING_(x) #x
  20. #define PRM_STRING(x) PRM_STRING_(x)
  21. /**
  22. A Platform Runtime Mechanism (PRM) handler function.
  23. @param[in] ParameterBuffer A pointer to a buffer with arbitrary data that is allocated and populated
  24. by the PRM handler caller.
  25. @param[in] ContextBuffer A pointer to a buffer with arbitrary data that is allocated in the firmware
  26. boot environment.
  27. @retval EFI_STATUS The PRM handler executed successfully.
  28. @retval Others An error occurred in the PRM handler.
  29. **/
  30. typedef
  31. EFI_STATUS
  32. (EFIAPI PRM_HANDLER)(
  33. IN VOID *ParameterBuffer OPTIONAL,
  34. IN PRM_CONTEXT_BUFFER *ContextBuffer OPTIONAL
  35. );
  36. #endif