]> git.proxmox.com Git - mirror_edk2.git/blame - PrmPkg/Include/PrmModule.h
PrmPkg: Publish PRM operation region to support PRM ACPI _DSM invocation
[mirror_edk2.git] / PrmPkg / Include / PrmModule.h
CommitLineData
d2998af2
MK
1/** @file\r
2\r
3 Common definitions needed for Platform Runtime Mechanism (PRM) modules.\r
4\r
5 Copyright (c) Microsoft Corporation\r
6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
7\r
8**/\r
9\r
10#ifndef PRM_MODULE_H_\r
11#define PRM_MODULE_H_\r
12\r
13#include <Prm.h>\r
14#include <PrmContextBuffer.h>\r
15#include <PrmDataBuffer.h>\r
16#include <PrmExportDescriptor.h>\r
17#include <PrmMmio.h>\r
18#include <PrmModuleUpdate.h>\r
19#include <PrmOsServices.h>\r
20\r
21/**\r
22 Macro that provides a condensed form of a PRM Handler.\r
23\r
24 This macro can be used to define a PRM Handler that uses the standard PRM Handle\r
25 signature. It is simply provided for convenience.\r
26\r
27**/\r
28#define PRM_HANDLER_EXPORT(Name) \\r
29 STATIC_ASSERT (sizeof (PRM_STRING_(Name)) <= PRM_HANDLER_NAME_MAXIMUM_LENGTH, "The PRM handler exceeds the maximum allowed size of 128."); \\r
30 \\r
31/** \\r
32 A Platform Runtime Mechanism (PRM) handler. \\r
33 \\r
34 @param[in] ParameterBuffer A pointer to the PRM handler parameter buffer \\r
35 @param[in] ContextBUffer A pointer to the PRM handler context buffer \\r
36 \\r
37 @retval EFI_STATUS The PRM handler executed successfully. \\r
38 @retval Others An error occurred in the PRM handler. \\r
39 \\r
40**/ \\r
41 EFI_STATUS \\r
42 PRM_EXPORT_API \\r
43 EFIAPI \\r
44 Name ( \\r
45 IN VOID *ParameterBuffer, \\r
46 IN PRM_CONTEXT_BUFFER *ContextBuffer \\r
47 ) \\r
48\r
49/**\r
50 A macro that declares the PRM Module Update Lock Descriptor for a PRM Module.\r
51\r
52 This macro is intended to be used once in a PRM Module so the module update lock descriptor is\r
53 exported for the module.\r
54\r
55**/\r
56#define PRM_MODULE_UPDATE_LOCK_EXPORT \\r
57 PRM_EXPORT_API PRM_MODULE_UPDATE_LOCK_DESCRIPTOR PRM_MODULE_UPDATE_LOCK_DESCRIPTOR_NAME = { \\r
58 PRM_MODULE_UPDATE_LOCK_DESCRIPTOR_SIGNATURE, \\r
59 PRM_MODULE_UPDATE_LOCK_REVISION, \\r
60 { 0 } \\r
61 } \\r
62\r
63//\r
64// A PRM module is required to export the PRM Module Update Lock\r
65//\r
66PRM_MODULE_UPDATE_LOCK_EXPORT;\r
67\r
68#endif\r