#include <PrmDataBuffer.h>\r
#include <PrmExportDescriptor.h>\r
#include <PrmMmio.h>\r
-#include <PrmModuleUpdate.h>\r
#include <PrmOsServices.h>\r
\r
/**\r
IN PRM_CONTEXT_BUFFER *ContextBuffer \\r
) \\r
\r
-/**\r
- A macro that declares the PRM Module Update Lock Descriptor for a PRM Module.\r
-\r
- This macro is intended to be used once in a PRM Module so the module update lock descriptor is\r
- exported for the module.\r
-\r
-**/\r
-#define PRM_MODULE_UPDATE_LOCK_EXPORT \\r
- PRM_EXPORT_API PRM_MODULE_UPDATE_LOCK_DESCRIPTOR PRM_MODULE_UPDATE_LOCK_DESCRIPTOR_NAME = { \\r
- PRM_MODULE_UPDATE_LOCK_DESCRIPTOR_SIGNATURE, \\r
- PRM_MODULE_UPDATE_LOCK_REVISION, \\r
- { 0 } \\r
- } \\r
-\r
-//\r
-// A PRM module is required to export the PRM Module Update Lock\r
-//\r
-PRM_MODULE_UPDATE_LOCK_EXPORT;\r
-\r
#endif\r
+++ /dev/null
-/** @file\r
-\r
- Definition for the Platform Runtime Mechanism (PRM) module update structures.\r
-\r
- Copyright (c) Microsoft Corporation\r
- SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#ifndef PRM_MODULE_UPDATE_H_\r
-#define PRM_MODULE_UPDATE_H_\r
-\r
-#include <Uefi.h>\r
-\r
-#define PRM_MODULE_UPDATE_LOCK_DESCRIPTOR_NAME PrmModuleUpdateLock\r
-#define PRM_MODULE_UPDATE_LOCK_DESCRIPTOR_SIGNATURE SIGNATURE_64 ('P', 'R', 'M', '_', 'M', 'U', 'L', '_')\r
-#define PRM_MODULE_UPDATE_LOCK_REVISION 0x0\r
-\r
-#pragma pack(push, 1)\r
-\r
-///\r
-/// Maintains the PRM Module Update Lock state\r
-///\r
-typedef union {\r
- ///\r
- /// Individual bit fields\r
- ///\r
- struct {\r
- UINT8 Acquired : 1; ///< [0] - If 1 lock is acquired. If 0 lock is released.\r
- UINT8 Reserved : 7; ///< [7:1] - Reserved\r
- } Bits;\r
- ///\r
- /// All bit fields as an 8-bit value\r
- ///\r
- UINT8 Uint8;\r
-} PRM_MODULE_UPDATE_LOCK;\r
-\r
-typedef struct {\r
- UINT64 Signature;\r
- UINT16 Revision;\r
- PRM_MODULE_UPDATE_LOCK Lock;\r
-} PRM_MODULE_UPDATE_LOCK_DESCRIPTOR;\r
-\r
-#pragma pack(pop)\r
-\r
-#endif\r
UINT16 HandlerCount; ///< Number of entries in the Handler Info array\r
UINT32 HandlerInfoOffset; ///< Offset in bytes from the beginning of this\r
///< structure to the Handler Info array\r
- UINT64 ModuleUpdateLock; ///< Physical address of the PRM Module Update Lock\r
- ///< descriptor (PRM_MODULE_UPDATE_LOCK_DESCRIPTOR *)\r
UINT64 RuntimeMmioRanges; ///< Physical address of the PRM MMIO Ranges\r
///< structure (PRM_MODULE_RUNTIME_MMIO_RANGES *)\r
PRM_HANDLER_INFORMATION_STRUCT HandlerInfoStructure[1];\r
\r
#include <PrmContextBuffer.h>\r
#include <PrmMmio.h>\r
-#include <PrmModuleUpdate.h>\r
\r
LIST_ENTRY mPrmModuleList;\r
\r
);\r
ASSERT_EFI_ERROR (Status);\r
\r
- Status = GetExportEntryAddress (\r
- PRM_STRING (PRM_MODULE_UPDATE_LOCK_DESCRIPTOR_NAME),\r
- CurrentImageAddress,\r
- CurrentImageExportDirectory,\r
- (EFI_PHYSICAL_ADDRESS *) &(CurrentModuleInfoStruct->ModuleUpdateLock)\r
- );\r
- ASSERT_EFI_ERROR (Status);\r
- if (!EFI_ERROR (Status)) {\r
- DEBUG ((\r
- DEBUG_INFO,\r
- " %a %a: Found PRM module update lock physical address at 0x%016x.\n",\r
- _DBGMSGID_,\r
- __FUNCTION__,\r
- CurrentModuleInfoStruct->ModuleUpdateLock\r
- ));\r
- }\r
-\r
// It is currently valid for a PRM module not to use a context buffer\r
Status = GetModuleContextBuffers (\r
ByModuleGuid,\r
definition consistent between firmware and OS load.\r
\r
### PRM Module Exports\r
-A PRM module must contain at least three exports: A PRM Module Export Descriptor, a PRM Module Update Lock Descriptor,\r
-and at least one PRM handler. Here's an example of an export table from a PRM module that has a single PRM handler:\r
+A PRM module must contain at least two exports: A PRM Module Export Descriptor and at least one PRM handler. Here's\r
+an example of an export table from a PRM module that has a single PRM handler:\r
\r
```\r
- 0000000000005000: 00 00 00 00 FF FF FF FF 00 00 00 00 46 50 00 00 ....ÿÿÿÿ....FP..\r
- 0000000000005010: 01 00 00 00 03 00 00 00 03 00 00 00 28 50 00 00 ............(P..\r
- 0000000000005020: 34 50 00 00 40 50 00 00 78 13 00 00 30 40 00 00 4P..@P..x...0@..\r
- 0000000000005030: 20 40 00 00 67 50 00 00 86 50 00 00 A0 50 00 00 @..gP...P...P..\r
- 0000000000005040: 00 00 01 00 02 00 50 72 6D 53 61 6D 70 6C 65 43 ......PrmSampleC\r
- 0000000000005050: 6F 6E 74 65 78 74 42 75 66 66 65 72 4D 6F 64 75 ontextBufferModu\r
- 0000000000005060: 6C 65 2E 64 6C 6C 00 44 75 6D 70 53 74 61 74 69 le.dll.DumpStati\r
- 0000000000005070: 63 44 61 74 61 42 75 66 66 65 72 50 72 6D 48 61 cDataBufferPrmHa\r
- 0000000000005080: 6E 64 6C 65 72 00 50 72 6D 4D 6F 64 75 6C 65 45 ndler.PrmModuleE\r
- 0000000000005090: 78 70 6F 72 74 44 65 73 63 72 69 70 74 6F 72 00 xportDescriptor.\r
- 00000000000050A0: 50 72 6D 4D 6F 64 75 6C 65 55 70 64 61 74 65 4C PrmModuleUpdateL\r
- 00000000000050B0: 6F 63 6B 00 ock.\r
+ 0000000000005000: 00 00 00 00 FF FF FF FF 00 00 00 00 3C 50 00 00 ............<P..\r
+ 0000000000005010: 01 00 00 00 02 00 00 00 02 00 00 00 28 50 00 00 ............(P..\r
+ 0000000000005020: 30 50 00 00 38 50 00 00 78 13 00 00 20 40 00 00 0P..8P..x... @..\r
+ 0000000000005030: 5D 50 00 00 7C 50 00 00 00 00 01 00 50 72 6D 53 ]P..|P......PrmS\r
+ 0000000000005040: 61 6D 70 6C 65 43 6F 6E 74 65 78 74 42 75 66 66 ampleContextBuff\r
+ 0000000000005050: 65 72 4D 6F 64 75 6C 65 2E 64 6C 6C 00 44 75 6D erModule.dll.Dum\r
+ 0000000000005060: 70 53 74 61 74 69 63 44 61 74 61 42 75 66 66 65 pStaticDataBuffe\r
+ 0000000000005070: 72 50 72 6D 48 61 6E 64 6C 65 72 00 50 72 6D 4D rPrmHandler.PrmM\r
+ 0000000000005080: 6F 64 75 6C 65 45 78 70 6F 72 74 44 65 73 63 72 oduleExportDescr\r
+ 0000000000005090: 69 70 74 6F 72 00 iptor.\r
\r
00000000 characteristics\r
FFFFFFFF time date stamp\r
- 0.10 version\r
+ 0.00 version\r
1 ordinal base\r
- 3 number of functions\r
- 3 number of names\r
+ 2 number of functions\r
+ 2 number of names\r
\r
ordinal hint RVA name\r
+\r
1 0 00001378 DumpStaticDataBufferPrmHandler\r
- 2 1 00004030 PrmModuleExportDescriptor\r
- 3 2 00004020 PrmModuleUpdateLock\r
+ 2 1 00004020 PrmModuleExportDescriptor\r
+\r
```\r
### PRM Image Format\r
PRM modules are ultimately PE/COFF images. However, when packaged in firmware the PE/COFF image is placed into a\r