PrmModule.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /** @file
  2. Common definitions needed for Platform Runtime Mechanism (PRM) modules.
  3. Copyright (c) Microsoft Corporation
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef PRM_MODULE_H_
  7. #define PRM_MODULE_H_
  8. #include <Prm.h>
  9. #include <PrmContextBuffer.h>
  10. #include <PrmDataBuffer.h>
  11. #include <PrmExportDescriptor.h>
  12. #include <PrmMmio.h>
  13. /**
  14. Macro that provides a condensed form of a PRM Handler.
  15. This macro can be used to define a PRM Handler that uses the standard PRM Handle
  16. signature. It is simply provided for convenience.
  17. **/
  18. #define PRM_HANDLER_EXPORT(Name) \
  19. STATIC_ASSERT (sizeof (PRM_STRING_(Name)) <= PRM_HANDLER_NAME_MAXIMUM_LENGTH, "The PRM handler exceeds the maximum allowed size of 128."); \
  20. \
  21. /** \
  22. A Platform Runtime Mechanism (PRM) handler. \
  23. \
  24. @param[in] ParameterBuffer A pointer to the PRM handler parameter buffer \
  25. @param[in] ContextBUffer A pointer to the PRM handler context buffer \
  26. \
  27. @retval EFI_STATUS The PRM handler executed successfully. \
  28. @retval Others An error occurred in the PRM handler. \
  29. \
  30. **/ \
  31. EFI_STATUS \
  32. PRM_EXPORT_API \
  33. EFIAPI \
  34. Name ( \
  35. IN VOID *ParameterBuffer, \
  36. IN PRM_CONTEXT_BUFFER *ContextBuffer \
  37. ) \
  38. #endif