diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2022-03-15 14:46:34 -0400 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-04-05 00:42:38 +0000 |
commit | a298a84478053872ed9da660a75f182ce81b8ddc (patch) | |
tree | 95b97a9ee3a91ec1340c15e5e3264bd5f8723292 /PrmPkg/Include | |
parent | f3c11224b55cbad10b357f83d0324588b85862bb (diff) | |
download | edk2-a298a84478053872ed9da660a75f182ce81b8ddc.tar.gz |
PrmPkg: Apply uncrustify changes
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Apply uncrustify changes to .c/.h files in PrmPkg.
Cc: Andrew Fish <afish@apple.com>
Cc: Kang Gao <kang.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Liu Yun <yun.y.liu@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
Reviewed-by: Ankit Sinha <ankit.sinha@intel.com>
Diffstat (limited to 'PrmPkg/Include')
-rw-r--r-- | PrmPkg/Include/Library/PrmContextBufferLib.h | 18 | ||||
-rw-r--r-- | PrmPkg/Include/Library/PrmModuleDiscoveryLib.h | 6 | ||||
-rw-r--r-- | PrmPkg/Include/Library/PrmPeCoffLib.h | 28 | ||||
-rw-r--r-- | PrmPkg/Include/Prm.h | 14 | ||||
-rw-r--r-- | PrmPkg/Include/PrmContextBuffer.h | 31 | ||||
-rw-r--r-- | PrmPkg/Include/PrmDataBuffer.h | 10 | ||||
-rw-r--r-- | PrmPkg/Include/PrmExportDescriptor.h | 31 | ||||
-rw-r--r-- | PrmPkg/Include/PrmMmio.h | 10 | ||||
-rw-r--r-- | PrmPkg/Include/PrmModule.h | 20 | ||||
-rw-r--r-- | PrmPkg/Include/PrmModuleImageContext.h | 6 | ||||
-rw-r--r-- | PrmPkg/Include/Protocol/PrmConfig.h | 11 |
11 files changed, 92 insertions, 93 deletions
diff --git a/PrmPkg/Include/Library/PrmContextBufferLib.h b/PrmPkg/Include/Library/PrmContextBufferLib.h index 93dcd1e766..8416b6a6c2 100644 --- a/PrmPkg/Include/Library/PrmContextBufferLib.h +++ b/PrmPkg/Include/Library/PrmContextBufferLib.h @@ -42,9 +42,9 @@ typedef enum { **/
EFI_STATUS
FindContextBufferInModuleBuffers (
- IN CONST EFI_GUID *HandlerGuid,
- IN CONST PRM_MODULE_CONTEXT_BUFFERS *ModuleContextBuffers,
- OUT CONST PRM_CONTEXT_BUFFER **ContextBuffer
+ IN CONST EFI_GUID *HandlerGuid,
+ IN CONST PRM_MODULE_CONTEXT_BUFFERS *ModuleContextBuffers,
+ OUT CONST PRM_CONTEXT_BUFFER **ContextBuffer
);
/**
@@ -68,9 +68,9 @@ FindContextBufferInModuleBuffers ( **/
EFI_STATUS
GetModuleContextBuffers (
- IN PRM_GUID_SEARCH_TYPE GuidSearchType,
- IN CONST EFI_GUID *Guid,
- OUT CONST PRM_MODULE_CONTEXT_BUFFERS **PrmModuleContextBuffers
+ IN PRM_GUID_SEARCH_TYPE GuidSearchType,
+ IN CONST EFI_GUID *Guid,
+ OUT CONST PRM_MODULE_CONTEXT_BUFFERS **PrmModuleContextBuffers
);
/**
@@ -91,9 +91,9 @@ GetModuleContextBuffers ( **/
EFI_STATUS
GetContextBuffer (
- IN CONST EFI_GUID *PrmHandlerGuid,
- IN CONST PRM_MODULE_CONTEXT_BUFFERS *PrmModuleContextBuffers OPTIONAL,
- OUT CONST PRM_CONTEXT_BUFFER **PrmContextBuffer
+ IN CONST EFI_GUID *PrmHandlerGuid,
+ IN CONST PRM_MODULE_CONTEXT_BUFFERS *PrmModuleContextBuffers OPTIONAL,
+ OUT CONST PRM_CONTEXT_BUFFER **PrmContextBuffer
);
#endif
diff --git a/PrmPkg/Include/Library/PrmModuleDiscoveryLib.h b/PrmPkg/Include/Library/PrmModuleDiscoveryLib.h index fe3a42586a..341b9b26a0 100644 --- a/PrmPkg/Include/Library/PrmModuleDiscoveryLib.h +++ b/PrmPkg/Include/Library/PrmModuleDiscoveryLib.h @@ -28,7 +28,7 @@ EFI_STATUS
EFIAPI
GetNextPrmModuleEntry (
- IN OUT PRM_MODULE_IMAGE_CONTEXT **ModuleImageContext
+ IN OUT PRM_MODULE_IMAGE_CONTEXT **ModuleImageContext
);
/**
@@ -53,8 +53,8 @@ GetNextPrmModuleEntry ( EFI_STATUS
EFIAPI
DiscoverPrmModules (
- OUT UINTN *ModuleCount OPTIONAL,
- OUT UINTN *HandlerCount OPTIONAL
+ OUT UINTN *ModuleCount OPTIONAL,
+ OUT UINTN *HandlerCount OPTIONAL
);
#endif
diff --git a/PrmPkg/Include/Library/PrmPeCoffLib.h b/PrmPkg/Include/Library/PrmPeCoffLib.h index 4698a94776..a3cbeba007 100644 --- a/PrmPkg/Include/Library/PrmPeCoffLib.h +++ b/PrmPkg/Include/Library/PrmPeCoffLib.h @@ -34,9 +34,9 @@ **/
EFI_STATUS
GetPrmModuleExportDescriptorTable (
- IN EFI_IMAGE_EXPORT_DIRECTORY *ImageExportDirectory,
- IN PE_COFF_LOADER_IMAGE_CONTEXT *PeCoffLoaderImageContext,
- OUT PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT **ExportDescriptor
+ IN EFI_IMAGE_EXPORT_DIRECTORY *ImageExportDirectory,
+ IN PE_COFF_LOADER_IMAGE_CONTEXT *PeCoffLoaderImageContext,
+ OUT PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT **ExportDescriptor
);
/**
@@ -57,9 +57,9 @@ GetPrmModuleExportDescriptorTable ( **/
EFI_STATUS
GetExportDirectoryInPeCoffImage (
- IN VOID *Image,
- IN PE_COFF_LOADER_IMAGE_CONTEXT *PeCoffLoaderImageContext,
- OUT EFI_IMAGE_EXPORT_DIRECTORY **ImageExportDirectory
+ IN VOID *Image,
+ IN PE_COFF_LOADER_IMAGE_CONTEXT *PeCoffLoaderImageContext,
+ OUT EFI_IMAGE_EXPORT_DIRECTORY **ImageExportDirectory
);
/**
@@ -80,10 +80,10 @@ GetExportDirectoryInPeCoffImage ( **/
EFI_STATUS
GetImageVersionInPeCoffImage (
- IN VOID *Image,
- IN PE_COFF_LOADER_IMAGE_CONTEXT *PeCoffLoaderImageContext,
- OUT UINT16 *ImageMajorVersion,
- OUT UINT16 *ImageMinorVersion
+ IN VOID *Image,
+ IN PE_COFF_LOADER_IMAGE_CONTEXT *PeCoffLoaderImageContext,
+ OUT UINT16 *ImageMajorVersion,
+ OUT UINT16 *ImageMinorVersion
);
/**
@@ -102,10 +102,10 @@ GetImageVersionInPeCoffImage ( **/
EFI_STATUS
GetExportEntryAddress (
- IN CONST CHAR8 *ExportName,
- IN EFI_PHYSICAL_ADDRESS ImageBaseAddress,
- IN EFI_IMAGE_EXPORT_DIRECTORY *ImageExportDirectory,
- OUT EFI_PHYSICAL_ADDRESS *ExportPhysicalAddress
+ IN CONST CHAR8 *ExportName,
+ IN EFI_PHYSICAL_ADDRESS ImageBaseAddress,
+ IN EFI_IMAGE_EXPORT_DIRECTORY *ImageExportDirectory,
+ OUT EFI_PHYSICAL_ADDRESS *ExportPhysicalAddress
);
#endif
diff --git a/PrmPkg/Include/Prm.h b/PrmPkg/Include/Prm.h index 0e3ccfffa3..e290e53510 100644 --- a/PrmPkg/Include/Prm.h +++ b/PrmPkg/Include/Prm.h @@ -13,16 +13,16 @@ #include <Uefi.h>
#include <PrmContextBuffer.h>
-#if defined(_MSC_VER)
- #define PRM_EXPORT_API __declspec(dllexport)
+#if defined (_MSC_VER)
+#define PRM_EXPORT_API __declspec(dllexport)
#else
- #define PRM_EXPORT_API
+#define PRM_EXPORT_API
#endif
-#define PRM_HANDLER_NAME_MAXIMUM_LENGTH 128
+#define PRM_HANDLER_NAME_MAXIMUM_LENGTH 128
-#define PRM_STRING_(x) #x
-#define PRM_STRING(x) PRM_STRING_(x)
+#define PRM_STRING_(x) #x
+#define PRM_STRING(x) PRM_STRING_(x)
/**
A Platform Runtime Mechanism (PRM) handler function.
@@ -38,7 +38,7 @@ **/
typedef
EFI_STATUS
-(EFIAPI PRM_HANDLER) (
+(EFIAPI PRM_HANDLER)(
IN VOID *ParameterBuffer OPTIONAL,
IN PRM_CONTEXT_BUFFER *ContextBuffer OPTIONAL
);
diff --git a/PrmPkg/Include/PrmContextBuffer.h b/PrmPkg/Include/PrmContextBuffer.h index 8694801017..781910d67e 100644 --- a/PrmPkg/Include/PrmContextBuffer.h +++ b/PrmPkg/Include/PrmContextBuffer.h @@ -27,8 +27,8 @@ // copy the ACPI parameter buffer address to the PRMT ACPI table.
//
typedef struct {
- EFI_GUID HandlerGuid;
- UINT64 AcpiParameterBufferAddress;
+ EFI_GUID HandlerGuid;
+ UINT64 AcpiParameterBufferAddress;
} ACPI_PARAMETER_BUFFER_DESCRIPTOR;
//
@@ -45,22 +45,22 @@ typedef struct { ///
/// Signature of this interface.
///
- UINT32 Signature;
+ UINT32 Signature;
///
/// Version of this interface.
///
- UINT16 Version;
+ UINT16 Version;
///
/// Reserved field.
///
- UINT16 Reserved;
+ UINT16 Reserved;
///
/// The GUID of the PRM handler represented by this context instance.
///
- EFI_GUID HandlerGuid;
+ EFI_GUID HandlerGuid;
///
/// A virtual address pointer to the static data buffer allocated for
@@ -71,7 +71,7 @@ typedef struct { ///
/// This pointer may be NULL if a static data buffer is not needed.
///
- PRM_DATA_BUFFER *StaticDataBuffer;
+ PRM_DATA_BUFFER *StaticDataBuffer;
///
/// A virtual address pointer to an array of PRM_RUNTIME_MMIO_RANGE
@@ -91,30 +91,29 @@ typedef struct { ///
/// This pointer may be NULL if runtime memory ranges are not needed.
///
- PRM_RUNTIME_MMIO_RANGES *RuntimeMmioRanges;
+ PRM_RUNTIME_MMIO_RANGES *RuntimeMmioRanges;
} PRM_CONTEXT_BUFFER;
//
// A firmware internal data structure used to track context buffer and
// runtime MMIO range usage across a PRM module.
//
-typedef struct
-{
+typedef struct {
///
/// The GUID of the PRM module.
///
- EFI_GUID ModuleGuid;
+ EFI_GUID ModuleGuid;
///
/// The number of PRM context buffers in ContextBuffers[].
/// This count should equal the number of PRM handlers in the module being configured.
///
- UINTN BufferCount;
+ UINTN BufferCount;
///
/// A pointer to an array of PRM context buffers
///
- PRM_CONTEXT_BUFFER *Buffer;
+ PRM_CONTEXT_BUFFER *Buffer;
/// The MMIO ranges are defined in the firmware boot environment.
/// The addresses within the PRM_RUNTIME_MMIO_RANGES structure will
@@ -135,13 +134,13 @@ typedef struct ///
/// This pointer may be NULL if runtime memory ranges are not needed.
///
- PRM_RUNTIME_MMIO_RANGES *RuntimeMmioRanges;
+ PRM_RUNTIME_MMIO_RANGES *RuntimeMmioRanges;
///
/// The number of ACPI parameter buffer descriptors in the array
/// AcpiParameterBufferDescriptors
///
- UINTN AcpiParameterBufferDescriptorCount;
+ UINTN AcpiParameterBufferDescriptorCount;
///
/// A pointer to an array of ACPI parameter buffer descriptors. PRM module
@@ -164,7 +163,7 @@ typedef struct /// for each PRM handler that actually uses an ACPI parameter buffer. If
/// no handlers use an ACPI parameter buffer this pointer should be NULL.
///
- ACPI_PARAMETER_BUFFER_DESCRIPTOR *AcpiParameterBufferDescriptors;
+ ACPI_PARAMETER_BUFFER_DESCRIPTOR *AcpiParameterBufferDescriptors;
} PRM_MODULE_CONTEXT_BUFFERS;
#pragma pack(pop)
diff --git a/PrmPkg/Include/PrmDataBuffer.h b/PrmPkg/Include/PrmDataBuffer.h index 70d690ca54..c5181f4719 100644 --- a/PrmPkg/Include/PrmDataBuffer.h +++ b/PrmPkg/Include/PrmDataBuffer.h @@ -12,7 +12,7 @@ #include <Uefi.h>
-#define PRM_DATA_BUFFER_HEADER_SIGNATURE SIGNATURE_32('P','R','M','D')
+#define PRM_DATA_BUFFER_HEADER_SIGNATURE SIGNATURE_32('P','R','M','D')
#pragma pack(push, 1)
@@ -23,11 +23,11 @@ typedef struct { ///
/// PRM Data Buffer signature.
///
- UINT32 Signature;
+ UINT32 Signature;
///
/// Length of the entire data buffer, including the size of the header.
///
- UINT32 Length;
+ UINT32 Length;
} PRM_DATA_BUFFER_HEADER;
///
@@ -37,12 +37,12 @@ typedef struct { ///
/// The header is required at the beginning of every PRM data buffer.
///
- PRM_DATA_BUFFER_HEADER Header;
+ PRM_DATA_BUFFER_HEADER Header;
///
/// The beginning of data immediately follows the header.
///
- UINT8 Data[1];
+ UINT8 Data[1];
} PRM_DATA_BUFFER;
#pragma pack(pop)
diff --git a/PrmPkg/Include/PrmExportDescriptor.h b/PrmPkg/Include/PrmExportDescriptor.h index 76b67a0545..85b38eace7 100644 --- a/PrmPkg/Include/PrmExportDescriptor.h +++ b/PrmPkg/Include/PrmExportDescriptor.h @@ -12,9 +12,9 @@ #include <Prm.h>
-#define PRM_MODULE_EXPORT_DESCRIPTOR_NAME PrmModuleExportDescriptor
-#define PRM_MODULE_EXPORT_DESCRIPTOR_SIGNATURE SIGNATURE_64 ('P', 'R', 'M', '_', 'M', 'E', 'D', 'T')
-#define PRM_MODULE_EXPORT_REVISION 0x0
+#define PRM_MODULE_EXPORT_DESCRIPTOR_NAME PrmModuleExportDescriptor
+#define PRM_MODULE_EXPORT_DESCRIPTOR_SIGNATURE SIGNATURE_64 ('P', 'R', 'M', '_', 'M', 'E', 'D', 'T')
+#define PRM_MODULE_EXPORT_REVISION 0x0
//
// Platform Runtime Mechanism (PRM) Export Descriptor Structures
@@ -22,30 +22,30 @@ #pragma pack(push, 1)
typedef struct {
- GUID PrmHandlerGuid;
- CHAR8 PrmHandlerName[PRM_HANDLER_NAME_MAXIMUM_LENGTH];
+ GUID PrmHandlerGuid;
+ CHAR8 PrmHandlerName[PRM_HANDLER_NAME_MAXIMUM_LENGTH];
} PRM_HANDLER_EXPORT_DESCRIPTOR_STRUCT;
typedef struct {
- UINT64 Signature;
- UINT16 Revision;
- UINT16 NumberPrmHandlers;
- GUID PlatformGuid;
- GUID ModuleGuid;
+ UINT64 Signature;
+ UINT16 Revision;
+ UINT16 NumberPrmHandlers;
+ GUID PlatformGuid;
+ GUID ModuleGuid;
} PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT_HEADER;
typedef struct {
- PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT_HEADER Header;
- PRM_HANDLER_EXPORT_DESCRIPTOR_STRUCT PrmHandlerExportDescriptors[1];
+ PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT_HEADER Header;
+ PRM_HANDLER_EXPORT_DESCRIPTOR_STRUCT PrmHandlerExportDescriptors[1];
} PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT;
#pragma pack(pop)
-#if defined(_MSC_VER)
- #define PRM_PACKED_STRUCT(definition) \
+#if defined (_MSC_VER)
+#define PRM_PACKED_STRUCT(definition) \
__pragma(pack(push, 1)) typedef struct definition __pragma(pack(pop))
#elif defined (__GNUC__) || defined (__clang__)
- #define PRM_PACKED_STRUCT(definition) \
+#define PRM_PACKED_STRUCT(definition) \
typedef struct __attribute__((packed)) definition
#endif
@@ -67,6 +67,7 @@ typedef struct { PRM_STRING_(Name) \
} \
+
/**
A macro that returns the count of the number of variable-length arguments given.
diff --git a/PrmPkg/Include/PrmMmio.h b/PrmPkg/Include/PrmMmio.h index fb216c27e8..6aca19f912 100644 --- a/PrmPkg/Include/PrmMmio.h +++ b/PrmPkg/Include/PrmMmio.h @@ -20,9 +20,9 @@ /// The memory range with the given base address and length will be marked as EFI_MEMORY_RUNTIME.
///
typedef struct {
- EFI_PHYSICAL_ADDRESS PhysicalBaseAddress;
- EFI_PHYSICAL_ADDRESS VirtualBaseAddress;
- UINT32 Length;
+ EFI_PHYSICAL_ADDRESS PhysicalBaseAddress;
+ EFI_PHYSICAL_ADDRESS VirtualBaseAddress;
+ UINT32 Length;
} PRM_RUNTIME_MMIO_RANGE;
///
@@ -33,11 +33,11 @@ typedef struct { ///
/// The number of runtime memory range elements in this buffer.
///
- UINT64 Count;
+ UINT64 Count;
///
/// The beginning of the runtime memory range data.
///
- PRM_RUNTIME_MMIO_RANGE Range[1];
+ PRM_RUNTIME_MMIO_RANGE Range[1];
} PRM_RUNTIME_MMIO_RANGES;
#pragma pack(pop)
diff --git a/PrmPkg/Include/PrmModule.h b/PrmPkg/Include/PrmModule.h index 1369adda1a..094f7d1226 100644 --- a/PrmPkg/Include/PrmModule.h +++ b/PrmPkg/Include/PrmModule.h @@ -26,16 +26,16 @@ #define PRM_HANDLER_EXPORT(Name) \
STATIC_ASSERT (sizeof (PRM_STRING_(Name)) <= PRM_HANDLER_NAME_MAXIMUM_LENGTH, "The PRM handler exceeds the maximum allowed size of 128."); \
\
-/** \
- A Platform Runtime Mechanism (PRM) handler. \
- \
- @param[in] ParameterBuffer A pointer to the PRM handler parameter buffer \
- @param[in] ContextBUffer A pointer to the PRM handler context buffer \
- \
- @retval EFI_STATUS The PRM handler executed successfully. \
- @retval Others An error occurred in the PRM handler. \
- \
-**/ \
+ /** \
+ A Platform Runtime Mechanism (PRM) handler. \
+ \
+ @param[in] ParameterBuffer A pointer to the PRM handler parameter buffer \
+ @param[in] ContextBUffer A pointer to the PRM handler context buffer \
+ \
+ @retval EFI_STATUS The PRM handler executed successfully. \
+ @retval Others An error occurred in the PRM handler. \
+ \
+ **/ \
EFI_STATUS \
PRM_EXPORT_API \
EFIAPI \
diff --git a/PrmPkg/Include/PrmModuleImageContext.h b/PrmPkg/Include/PrmModuleImageContext.h index 10146a272b..0e381442e1 100644 --- a/PrmPkg/Include/PrmModuleImageContext.h +++ b/PrmPkg/Include/PrmModuleImageContext.h @@ -18,9 +18,9 @@ #pragma pack(push, 1)
typedef struct {
- PE_COFF_LOADER_IMAGE_CONTEXT PeCoffImageContext;
- EFI_IMAGE_EXPORT_DIRECTORY *ExportDirectory;
- PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT *ExportDescriptor;
+ PE_COFF_LOADER_IMAGE_CONTEXT PeCoffImageContext;
+ EFI_IMAGE_EXPORT_DIRECTORY *ExportDirectory;
+ PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT *ExportDescriptor;
} PRM_MODULE_IMAGE_CONTEXT;
#pragma pack(pop)
diff --git a/PrmPkg/Include/Protocol/PrmConfig.h b/PrmPkg/Include/Protocol/PrmConfig.h index d90fe5a0dd..4cce6b3c2c 100644 --- a/PrmPkg/Include/Protocol/PrmConfig.h +++ b/PrmPkg/Include/Protocol/PrmConfig.h @@ -19,14 +19,13 @@ typedef struct _PRM_CONFIG_PROTOCOL PRM_CONFIG_PROTOCOL;
-#define PRM_CONFIG_PROTOCOL_SIGNATURE SIGNATURE_32('P','M','C','P')
-#define PRM_CONFIG_PROTOCOL_VERSION 1
+#define PRM_CONFIG_PROTOCOL_SIGNATURE SIGNATURE_32('P','M','C','P')
+#define PRM_CONFIG_PROTOCOL_VERSION 1
-struct _PRM_CONFIG_PROTOCOL
-{
- PRM_MODULE_CONTEXT_BUFFERS ModuleContextBuffers;
+struct _PRM_CONFIG_PROTOCOL {
+ PRM_MODULE_CONTEXT_BUFFERS ModuleContextBuffers;
};
-extern EFI_GUID gPrmConfigProtocolGuid;
+extern EFI_GUID gPrmConfigProtocolGuid;
#endif
|