ShellPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the ShellPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
c411b485b6
commit
47d20b54f9
@ -15,16 +15,16 @@
|
||||
#include "AcpiViewConfig.h"
|
||||
|
||||
// "The number of GT Block Timers must be less than or equal to 8"
|
||||
#define GT_BLOCK_TIMER_COUNT_MAX 8
|
||||
#define GT_BLOCK_TIMER_COUNT_MAX 8
|
||||
|
||||
// Local variables
|
||||
STATIC CONST UINT32* GtdtPlatformTimerCount;
|
||||
STATIC CONST UINT32* GtdtPlatformTimerOffset;
|
||||
STATIC CONST UINT8* PlatformTimerType;
|
||||
STATIC CONST UINT16* PlatformTimerLength;
|
||||
STATIC CONST UINT32* GtBlockTimerCount;
|
||||
STATIC CONST UINT32* GtBlockTimerOffset;
|
||||
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
|
||||
STATIC CONST UINT32 *GtdtPlatformTimerCount;
|
||||
STATIC CONST UINT32 *GtdtPlatformTimerOffset;
|
||||
STATIC CONST UINT8 *PlatformTimerType;
|
||||
STATIC CONST UINT16 *PlatformTimerLength;
|
||||
STATIC CONST UINT32 *GtBlockTimerCount;
|
||||
STATIC CONST UINT32 *GtBlockTimerOffset;
|
||||
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
|
||||
|
||||
/**
|
||||
This function validates the GT Block timer count.
|
||||
@ -37,13 +37,13 @@ STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
ValidateGtBlockTimerCount (
|
||||
IN UINT8* Ptr,
|
||||
IN VOID* Context
|
||||
IN UINT8 *Ptr,
|
||||
IN VOID *Context
|
||||
)
|
||||
{
|
||||
UINT32 BlockTimerCount;
|
||||
UINT32 BlockTimerCount;
|
||||
|
||||
BlockTimerCount = *(UINT32*)Ptr;
|
||||
BlockTimerCount = *(UINT32 *)Ptr;
|
||||
|
||||
if (BlockTimerCount > GT_BLOCK_TIMER_COUNT_MAX) {
|
||||
IncrementErrorCount ();
|
||||
@ -66,13 +66,13 @@ STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
ValidateGtFrameNumber (
|
||||
IN UINT8* Ptr,
|
||||
IN VOID* Context
|
||||
IN UINT8 *Ptr,
|
||||
IN VOID *Context
|
||||
)
|
||||
{
|
||||
UINT8 FrameNumber;
|
||||
UINT8 FrameNumber;
|
||||
|
||||
FrameNumber = *(UINT8*)Ptr;
|
||||
FrameNumber = *(UINT8 *)Ptr;
|
||||
|
||||
if (FrameNumber >= GT_BLOCK_TIMER_COUNT_MAX) {
|
||||
IncrementErrorCount ();
|
||||
@ -87,82 +87,82 @@ ValidateGtFrameNumber (
|
||||
/**
|
||||
An ACPI_PARSER array describing the ACPI GTDT Table.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GtdtParser[] = {
|
||||
STATIC CONST ACPI_PARSER GtdtParser[] = {
|
||||
PARSE_ACPI_HEADER (&AcpiHdrInfo),
|
||||
{L"CntControlBase Physical Address", 8, 36, L"0x%lx", NULL, NULL,
|
||||
NULL, NULL},
|
||||
{L"Reserved", 4, 44, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Secure EL1 timer GSIV", 4, 48, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Secure EL1 timer FLAGS", 4, 52, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{ L"CntControlBase Physical Address",8, 36, L"0x%lx", NULL, NULL,
|
||||
NULL, NULL },
|
||||
{ L"Reserved", 4, 44, L"0x%x", NULL, NULL,NULL, NULL },
|
||||
{ L"Secure EL1 timer GSIV", 4, 48, L"0x%x", NULL, NULL,NULL, NULL },
|
||||
{ L"Secure EL1 timer FLAGS", 4, 52, L"0x%x", NULL, NULL,NULL, NULL },
|
||||
|
||||
{L"Non-Secure EL1 timer GSIV", 4, 56, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Non-Secure EL1 timer FLAGS", 4, 60, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{ L"Non-Secure EL1 timer GSIV", 4, 56, L"0x%x", NULL, NULL,NULL, NULL },
|
||||
{ L"Non-Secure EL1 timer FLAGS", 4, 60, L"0x%x", NULL, NULL,NULL, NULL },
|
||||
|
||||
{L"Virtual timer GSIV", 4, 64, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Virtual timer FLAGS", 4, 68, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{ L"Virtual timer GSIV", 4, 64, L"0x%x", NULL, NULL,NULL, NULL },
|
||||
{ L"Virtual timer FLAGS", 4, 68, L"0x%x", NULL, NULL,NULL, NULL },
|
||||
|
||||
{L"Non-Secure EL2 timer GSIV", 4, 72, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Non-Secure EL2 timer FLAGS", 4, 76, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{ L"Non-Secure EL2 timer GSIV", 4, 72, L"0x%x", NULL, NULL,NULL, NULL },
|
||||
{ L"Non-Secure EL2 timer FLAGS", 4, 76, L"0x%x", NULL, NULL,NULL, NULL },
|
||||
|
||||
{L"CntReadBase Physical address", 8, 80, L"0x%lx", NULL, NULL, NULL, NULL},
|
||||
{L"Platform Timer Count", 4, 88, L"%d", NULL,
|
||||
(VOID**)&GtdtPlatformTimerCount, NULL, NULL},
|
||||
{L"Platform Timer Offset", 4, 92, L"0x%x", NULL,
|
||||
(VOID**)&GtdtPlatformTimerOffset, NULL, NULL},
|
||||
{L"Virtual EL2 Timer GSIV", 4, 96, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Virtual EL2 Timer Flags", 4, 100, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
{ L"CntReadBase Physical address", 8, 80, L"0x%lx", NULL, NULL,NULL, NULL },
|
||||
{ L"Platform Timer Count", 4, 88, L"%d", NULL,
|
||||
(VOID **)&GtdtPlatformTimerCount, NULL, NULL },
|
||||
{ L"Platform Timer Offset", 4, 92, L"0x%x", NULL,
|
||||
(VOID **)&GtdtPlatformTimerOffset,NULL, NULL },
|
||||
{ L"Virtual EL2 Timer GSIV", 4, 96, L"0x%x", NULL, NULL,NULL, NULL },
|
||||
{ L"Virtual EL2 Timer Flags", 4, 100, L"0x%x", NULL, NULL,NULL, NULL }
|
||||
};
|
||||
|
||||
/**
|
||||
An ACPI_PARSER array describing the Platform timer header.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GtPlatformTimerHeaderParser[] = {
|
||||
{L"Type", 1, 0, NULL, NULL, (VOID**)&PlatformTimerType, NULL, NULL},
|
||||
{L"Length", 2, 1, NULL, NULL, (VOID**)&PlatformTimerLength, NULL, NULL},
|
||||
{L"Reserved", 1, 3, NULL, NULL, NULL, NULL, NULL}
|
||||
STATIC CONST ACPI_PARSER GtPlatformTimerHeaderParser[] = {
|
||||
{ L"Type", 1, 0, NULL, NULL, (VOID **)&PlatformTimerType, NULL, NULL },
|
||||
{ L"Length", 2, 1, NULL, NULL, (VOID **)&PlatformTimerLength, NULL, NULL },
|
||||
{ L"Reserved", 1, 3, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
/**
|
||||
An ACPI_PARSER array describing the Platform GT Block.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GtBlockParser[] = {
|
||||
{L"Type", 1, 0, L"%d", NULL, NULL, NULL, NULL},
|
||||
{L"Length", 2, 1, L"%d", NULL, NULL, NULL, NULL},
|
||||
{L"Reserved", 1, 3, L"%x", NULL, NULL, NULL, NULL},
|
||||
{L"Physical address (CntCtlBase)", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL},
|
||||
{L"Timer Count", 4, 12, L"%d", NULL, (VOID**)&GtBlockTimerCount,
|
||||
ValidateGtBlockTimerCount, NULL},
|
||||
{L"Timer Offset", 4, 16, L"%d", NULL, (VOID**)&GtBlockTimerOffset, NULL,
|
||||
NULL}
|
||||
STATIC CONST ACPI_PARSER GtBlockParser[] = {
|
||||
{ L"Type", 1, 0, L"%d", NULL, NULL, NULL, NULL },
|
||||
{ L"Length", 2, 1, L"%d", NULL, NULL, NULL, NULL },
|
||||
{ L"Reserved", 1, 3, L"%x", NULL, NULL, NULL, NULL },
|
||||
{ L"Physical address (CntCtlBase)", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL },
|
||||
{ L"Timer Count", 4, 12, L"%d", NULL, (VOID **)&GtBlockTimerCount,
|
||||
ValidateGtBlockTimerCount, NULL },
|
||||
{ L"Timer Offset", 4, 16, L"%d", NULL, (VOID **)&GtBlockTimerOffset, NULL,
|
||||
NULL }
|
||||
};
|
||||
|
||||
/**
|
||||
An ACPI_PARSER array describing the GT Block timer.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GtBlockTimerParser[] = {
|
||||
{L"Frame Number", 1, 0, L"%d", NULL, NULL, ValidateGtFrameNumber, NULL},
|
||||
{L"Reserved", 3, 1, L"%x %x %x", Dump3Chars, NULL, NULL, NULL},
|
||||
{L"Physical address (CntBaseX)", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL},
|
||||
{L"Physical address (CntEL0BaseX)", 8, 12, L"0x%lx", NULL, NULL, NULL,
|
||||
NULL},
|
||||
{L"Physical Timer GSIV", 4, 20, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Physical Timer Flags", 4, 24, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Virtual Timer GSIV", 4, 28, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Virtual Timer Flags", 4, 32, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Common Flags", 4, 36, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
STATIC CONST ACPI_PARSER GtBlockTimerParser[] = {
|
||||
{ L"Frame Number", 1, 0, L"%d", NULL, NULL, ValidateGtFrameNumber, NULL },
|
||||
{ L"Reserved", 3, 1, L"%x %x %x", Dump3Chars, NULL, NULL, NULL },
|
||||
{ L"Physical address (CntBaseX)", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL },
|
||||
{ L"Physical address (CntEL0BaseX)", 8, 12, L"0x%lx", NULL, NULL, NULL,
|
||||
NULL },
|
||||
{ L"Physical Timer GSIV", 4, 20, L"0x%x", NULL, NULL, NULL, NULL },
|
||||
{ L"Physical Timer Flags", 4, 24, L"0x%x", NULL, NULL, NULL, NULL },
|
||||
{ L"Virtual Timer GSIV", 4, 28, L"0x%x", NULL, NULL, NULL, NULL },
|
||||
{ L"Virtual Timer Flags", 4, 32, L"0x%x", NULL, NULL, NULL, NULL },
|
||||
{ L"Common Flags", 4, 36, L"0x%x", NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
/**
|
||||
An ACPI_PARSER array describing the Platform Watchdog.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER ArmGenericWatchdogParser[] = {
|
||||
{L"Type", 1, 0, L"%d", NULL, NULL, NULL, NULL},
|
||||
{L"Length", 2, 1, L"%d", NULL, NULL, NULL, NULL},
|
||||
{L"Reserved", 1, 3, L"%x", NULL, NULL, NULL, NULL},
|
||||
{L"RefreshFrame Physical address", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL},
|
||||
{L"ControlFrame Physical address", 8, 12, L"0x%lx", NULL, NULL, NULL, NULL},
|
||||
{L"Watchdog Timer GSIV", 4, 20, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Watchdog Timer Flags", 4, 24, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
STATIC CONST ACPI_PARSER ArmGenericWatchdogParser[] = {
|
||||
{ L"Type", 1, 0, L"%d", NULL, NULL, NULL, NULL },
|
||||
{ L"Length", 2, 1, L"%d", NULL, NULL, NULL, NULL },
|
||||
{ L"Reserved", 1, 3, L"%x", NULL, NULL, NULL, NULL },
|
||||
{ L"RefreshFrame Physical address", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL },
|
||||
{ L"ControlFrame Physical address", 8, 12, L"0x%lx", NULL, NULL, NULL, NULL },
|
||||
{ L"Watchdog Timer GSIV", 4, 20, L"0x%x", NULL, NULL, NULL, NULL },
|
||||
{ L"Watchdog Timer Flags", 4, 24, L"0x%x", NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
/**
|
||||
@ -174,12 +174,12 @@ STATIC CONST ACPI_PARSER ArmGenericWatchdogParser[] = {
|
||||
STATIC
|
||||
VOID
|
||||
DumpGTBlock (
|
||||
IN UINT8* Ptr,
|
||||
IN UINT16 Length
|
||||
IN UINT8 *Ptr,
|
||||
IN UINT16 Length
|
||||
)
|
||||
{
|
||||
UINT32 Index;
|
||||
UINT32 Offset;
|
||||
UINT32 Index;
|
||||
UINT32 Offset;
|
||||
|
||||
ParseAcpi (
|
||||
TRUE,
|
||||
@ -193,7 +193,8 @@ DumpGTBlock (
|
||||
// Check if the values used to control the parsing logic have been
|
||||
// successfully read.
|
||||
if ((GtBlockTimerCount == NULL) ||
|
||||
(GtBlockTimerOffset == NULL)) {
|
||||
(GtBlockTimerOffset == NULL))
|
||||
{
|
||||
IncrementErrorCount ();
|
||||
Print (
|
||||
L"ERROR: Insufficient GT Block Structure length. Length = %d.\n",
|
||||
@ -203,12 +204,13 @@ DumpGTBlock (
|
||||
}
|
||||
|
||||
Offset = *GtBlockTimerOffset;
|
||||
Index = 0;
|
||||
Index = 0;
|
||||
|
||||
// Parse the specified number of GT Block Timer Structures or the GT Block
|
||||
// Structure buffer length. Whichever is minimum.
|
||||
while ((Index++ < *GtBlockTimerCount) &&
|
||||
(Offset < Length)) {
|
||||
(Offset < Length))
|
||||
{
|
||||
Offset += ParseAcpi (
|
||||
TRUE,
|
||||
2,
|
||||
@ -229,8 +231,8 @@ DumpGTBlock (
|
||||
STATIC
|
||||
VOID
|
||||
DumpWatchdogTimer (
|
||||
IN UINT8* Ptr,
|
||||
IN UINT16 Length
|
||||
IN UINT8 *Ptr,
|
||||
IN UINT16 Length
|
||||
)
|
||||
{
|
||||
ParseAcpi (
|
||||
@ -262,15 +264,15 @@ DumpWatchdogTimer (
|
||||
VOID
|
||||
EFIAPI
|
||||
ParseAcpiGtdt (
|
||||
IN BOOLEAN Trace,
|
||||
IN UINT8* Ptr,
|
||||
IN UINT32 AcpiTableLength,
|
||||
IN UINT8 AcpiTableRevision
|
||||
IN BOOLEAN Trace,
|
||||
IN UINT8 *Ptr,
|
||||
IN UINT32 AcpiTableLength,
|
||||
IN UINT8 AcpiTableRevision
|
||||
)
|
||||
{
|
||||
UINT32 Index;
|
||||
UINT32 Offset;
|
||||
UINT8* TimerPtr;
|
||||
UINT32 Index;
|
||||
UINT32 Offset;
|
||||
UINT8 *TimerPtr;
|
||||
|
||||
if (!Trace) {
|
||||
return;
|
||||
@ -288,7 +290,8 @@ ParseAcpiGtdt (
|
||||
// Check if the values used to control the parsing logic have been
|
||||
// successfully read.
|
||||
if ((GtdtPlatformTimerCount == NULL) ||
|
||||
(GtdtPlatformTimerOffset == NULL)) {
|
||||
(GtdtPlatformTimerOffset == NULL))
|
||||
{
|
||||
IncrementErrorCount ();
|
||||
Print (
|
||||
L"ERROR: Insufficient table length. AcpiTableLength = %d.\n",
|
||||
@ -298,13 +301,14 @@ ParseAcpiGtdt (
|
||||
}
|
||||
|
||||
TimerPtr = Ptr + *GtdtPlatformTimerOffset;
|
||||
Offset = *GtdtPlatformTimerOffset;
|
||||
Index = 0;
|
||||
Offset = *GtdtPlatformTimerOffset;
|
||||
Index = 0;
|
||||
|
||||
// Parse the specified number of Platform Timer Structures or the GTDT
|
||||
// buffer length. Whichever is minimum.
|
||||
while ((Index++ < *GtdtPlatformTimerCount) &&
|
||||
(Offset < AcpiTableLength)) {
|
||||
(Offset < AcpiTableLength))
|
||||
{
|
||||
// Parse the Platform Timer Header to obtain Length and Type
|
||||
ParseAcpi (
|
||||
FALSE,
|
||||
@ -318,11 +322,12 @@ ParseAcpiGtdt (
|
||||
// Check if the values used to control the parsing logic have been
|
||||
// successfully read.
|
||||
if ((PlatformTimerType == NULL) ||
|
||||
(PlatformTimerLength == NULL)) {
|
||||
(PlatformTimerLength == NULL))
|
||||
{
|
||||
IncrementErrorCount ();
|
||||
Print (
|
||||
L"ERROR: Insufficient remaining table buffer length to read the " \
|
||||
L"Platform Timer Structure header. Length = %d.\n",
|
||||
L"Platform Timer Structure header. Length = %d.\n",
|
||||
AcpiTableLength - Offset
|
||||
);
|
||||
return;
|
||||
@ -330,11 +335,12 @@ ParseAcpiGtdt (
|
||||
|
||||
// Validate Platform Timer Structure length
|
||||
if ((*PlatformTimerLength == 0) ||
|
||||
((Offset + (*PlatformTimerLength)) > AcpiTableLength)) {
|
||||
((Offset + (*PlatformTimerLength)) > AcpiTableLength))
|
||||
{
|
||||
IncrementErrorCount ();
|
||||
Print (
|
||||
L"ERROR: Invalid Platform Timer Structure length. " \
|
||||
L"Length = %d. Offset = %d. AcpiTableLength = %d.\n",
|
||||
L"Length = %d. Offset = %d. AcpiTableLength = %d.\n",
|
||||
*PlatformTimerLength,
|
||||
Offset,
|
||||
AcpiTableLength
|
||||
@ -359,6 +365,6 @@ ParseAcpiGtdt (
|
||||
} // switch
|
||||
|
||||
TimerPtr += *PlatformTimerLength;
|
||||
Offset += *PlatformTimerLength;
|
||||
Offset += *PlatformTimerLength;
|
||||
} // while
|
||||
}
|
||||
|
Reference in New Issue
Block a user