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>
This commit is contained in:
committed by
mergify[bot]
parent
f3c11224b5
commit
a298a84478
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
);
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
|
@@ -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.
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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 \
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user