mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
ArmPkg: Fix Ecc error 8003
This patch fixes the following Ecc reported error: The #ifndef at the start of an include file should have one postfix underscore, and no prefix underscore character Some include guards have been modified to match the name of the header file. Some comments have also been added on the closing '#endif'. Cc: Bret Barkelew <bret.barkelew@microsoft.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
parent
5b90b8abb4
commit
cc15a619a6
@ -6,8 +6,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __ARM_GIC_DXE_H__
|
||||
#define __ARM_GIC_DXE_H__
|
||||
#ifndef ARM_GIC_DXE_H_
|
||||
#define ARM_GIC_DXE_H_
|
||||
|
||||
#include <Library/ArmGicLib.h>
|
||||
#include <Library/ArmLib.h>
|
||||
@ -76,4 +76,4 @@ GicGetDistributorIcfgBaseAndBit (
|
||||
OUT UINTN *Config1Bit
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // ARM_GIC_DXE_H_
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __CPU_DXE_ARM_EXCEPTION_H__
|
||||
#define __CPU_DXE_ARM_EXCEPTION_H__
|
||||
#ifndef CPU_DXE_H_
|
||||
#define CPU_DXE_H_
|
||||
|
||||
#include <Uefi.h>
|
||||
|
||||
@ -143,4 +143,4 @@ SetGcdMemorySpaceAttributes (
|
||||
IN UINT64 Attributes
|
||||
);
|
||||
|
||||
#endif // __CPU_DXE_ARM_EXCEPTION_H__
|
||||
#endif // CPU_DXE_H_
|
||||
|
@ -5,8 +5,8 @@
|
||||
* SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
*
|
||||
**/
|
||||
#ifndef __GENERIC_WATCHDOG_H__
|
||||
#define __GENERIC_WATCHDOG_H__
|
||||
#ifndef GENERIC_WATCHDOG_H_
|
||||
#define GENERIC_WATCHDOG_H_
|
||||
|
||||
// Refresh Frame:
|
||||
#define GENERIC_WDOG_REFRESH_REG ((UINTN)FixedPcdGet64 (PcdGenericWatchdogRefreshBase) + 0x000)
|
||||
@ -21,4 +21,4 @@
|
||||
#define GENERIC_WDOG_ENABLED 1
|
||||
#define GENERIC_WDOG_DISABLED 0
|
||||
|
||||
#endif // __GENERIC_WATCHDOG_H__
|
||||
#endif // GENERIC_WATCHDOG_H_
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __SEMIHOST_FS_H__
|
||||
#define __SEMIHOST_FS_H__
|
||||
#ifndef SEMIHOST_FS_H_
|
||||
#define SEMIHOST_FS_H_
|
||||
|
||||
EFI_STATUS
|
||||
VolumeOpen (
|
||||
@ -242,5 +242,5 @@ FileFlush (
|
||||
IN EFI_FILE *File
|
||||
);
|
||||
|
||||
#endif // __SEMIHOST_FS_H__
|
||||
#endif // SEMIHOST_FS_H_
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
||||
**/
|
||||
|
||||
|
||||
#ifndef __MACRO_IO_LIB_H__
|
||||
#define __MACRO_IO_LIB_H__
|
||||
#ifndef ASM_MACRO_IO_LIB_H_
|
||||
#define ASM_MACRO_IO_LIB_H_
|
||||
|
||||
#define _ASM_FUNC(Name, Section) \
|
||||
.global Name ; \
|
||||
@ -36,4 +36,4 @@
|
||||
movt Reg, #:upper16:(Sym) - (. + 12) ; \
|
||||
ldr Reg, [pc, Reg]
|
||||
|
||||
#endif
|
||||
#endif // ASM_MACRO_IO_LIB_H_
|
||||
|
@ -10,8 +10,8 @@
|
||||
**/
|
||||
|
||||
|
||||
#ifndef __MACRO_IO_LIBV8_H__
|
||||
#define __MACRO_IO_LIBV8_H__
|
||||
#ifndef ASM_MACRO_IO_LIBV8_H_
|
||||
#define ASM_MACRO_IO_LIBV8_H_
|
||||
|
||||
// CurrentEL : 0xC = EL3; 8 = EL2; 4 = EL1
|
||||
// This only selects between EL1 and EL2, else we die.
|
||||
@ -54,4 +54,4 @@
|
||||
movk Reg, ((Val) >> 16) & 0xffff, lsl #16 ; \
|
||||
movk Reg, (Val) & 0xffff
|
||||
|
||||
#endif // __MACRO_IO_LIBV8_H__
|
||||
#endif // ASM_MACRO_IO_LIBV8_H_
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __AARCH64_H__
|
||||
#define __AARCH64_H__
|
||||
#ifndef AARCH64_H_
|
||||
#define AARCH64_H_
|
||||
|
||||
#include <Chipset/AArch64Mmu.h>
|
||||
|
||||
@ -238,4 +238,4 @@ ArmWriteCntHctl (
|
||||
IN UINT32 CntHctl
|
||||
);
|
||||
|
||||
#endif // __AARCH64_H__
|
||||
#endif // AARCH64_H_
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
**/
|
||||
|
||||
#ifndef __AARCH64_MMU_H_
|
||||
#define __AARCH64_MMU_H_
|
||||
#ifndef AARCH64_MMU_H_
|
||||
#define AARCH64_MMU_H_
|
||||
|
||||
//
|
||||
// Memory Attribute Indirection register Definitions
|
||||
@ -194,5 +194,5 @@
|
||||
|
||||
// Uses LPAE Page Table format
|
||||
|
||||
#endif // __AARCH64_MMU_H_
|
||||
#endif // AARCH64_MMU_H_
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARM_CORTEX_A9_H__
|
||||
#define __ARM_CORTEX_A9_H__
|
||||
#ifndef ARM_CORTEX_A9_H_
|
||||
#define ARM_CORTEX_A9_H_
|
||||
|
||||
#include <Chipset/ArmV7.h>
|
||||
|
||||
@ -55,5 +55,5 @@ ArmGetScuBaseAddress (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // ARM_CORTEX_A9_H_
|
||||
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARM_V7_H__
|
||||
#define __ARM_V7_H__
|
||||
#ifndef ARM_V7_H_
|
||||
#define ARM_V7_H_
|
||||
|
||||
#include <Chipset/ArmV7Mmu.h>
|
||||
|
||||
@ -120,4 +120,4 @@ ArmWriteNsacr (
|
||||
IN UINT32 Nsacr
|
||||
);
|
||||
|
||||
#endif // __ARM_V7_H__
|
||||
#endif // ARM_V7_H_
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
**/
|
||||
|
||||
#ifndef __ARMV7_MMU_H_
|
||||
#define __ARMV7_MMU_H_
|
||||
#ifndef ARMV7_MMU_H_
|
||||
#define ARMV7_MMU_H_
|
||||
|
||||
#define TTBR_NOT_OUTER_SHAREABLE BIT5
|
||||
#define TTBR_RGN_OUTER_NON_CACHEABLE 0
|
||||
@ -235,4 +235,4 @@ ConvertSectionAttributesToPageAttributes (
|
||||
IN BOOLEAN IsLargePage
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // ARMV7_MMU_H_
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
**/
|
||||
|
||||
#ifndef __ARM_MP_CORE_INFO_GUID_H_
|
||||
#define __ARM_MP_CORE_INFO_GUID_H_
|
||||
#ifndef ARM_MP_CORE_INFO_GUID_H_
|
||||
#define ARM_MP_CORE_INFO_GUID_H_
|
||||
|
||||
#define MAX_CPUS_PER_MPCORE_SYSTEM 0x04
|
||||
#define SCU_CONFIG_REG_OFFSET 0x04
|
||||
@ -57,4 +57,4 @@ typedef struct {
|
||||
|
||||
extern EFI_GUID gArmMpCoreInfoGuid;
|
||||
|
||||
#endif /* MPCOREINFO_H_ */
|
||||
#endif /* ARM_MP_CORE_INFO_GUID_H_ */
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
**/
|
||||
|
||||
#ifndef __ARM_MM_SVC_H__
|
||||
#define __ARM_MM_SVC_H__
|
||||
#ifndef ARM_MM_SVC_H_
|
||||
#define ARM_MM_SVC_H_
|
||||
|
||||
/*
|
||||
* SVC IDs to allow the MM secure partition to initialise itself, handle
|
||||
@ -44,4 +44,4 @@
|
||||
#define SPM_MAJOR_VERSION 0
|
||||
#define SPM_MINOR_VERSION 1
|
||||
|
||||
#endif
|
||||
#endif // ARM_MM_SVC_H_
|
||||
|
@ -10,8 +10,8 @@
|
||||
* (https://developer.arm.com/documentation/den0028/c/?lang=en)
|
||||
**/
|
||||
|
||||
#ifndef __ARM_STD_SMC_H__
|
||||
#define __ARM_STD_SMC_H__
|
||||
#ifndef ARM_STD_SMC_H_
|
||||
#define ARM_STD_SMC_H_
|
||||
|
||||
/*
|
||||
* SMC function IDs for Standard Service queries
|
||||
@ -129,4 +129,4 @@
|
||||
/* 0xbf00ff02 is reserved */
|
||||
#define ARM_SMC_ID_TOS_REVISION 0xbf00ff03
|
||||
|
||||
#endif
|
||||
#endif // ARM_STD_SMC_H_
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARM_DISASSEBLER_LIB_H__
|
||||
#define __ARM_DISASSEBLER_LIB_H__
|
||||
#ifndef ARM_DISASSEMBLER_LIB_H_
|
||||
#define ARM_DISASSEMBLER_LIB_H_
|
||||
|
||||
/**
|
||||
Place a disassembly of **OpCodePtr into buffer, and update OpCodePtr to
|
||||
@ -34,4 +34,4 @@ DisassembleInstruction (
|
||||
OUT UINTN Size
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // ARM_DISASSEMBLER_LIB_H_
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARM_GENERIC_TIMER_COUNTER_LIB_H__
|
||||
#define __ARM_GENERIC_TIMER_COUNTER_LIB_H__
|
||||
#ifndef ARM_GENERIC_TIMER_COUNTER_LIB_H_
|
||||
#define ARM_GENERIC_TIMER_COUNTER_LIB_H_
|
||||
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -82,4 +82,4 @@ ArmGenericTimerSetCompareVal (
|
||||
IN UINT64 Value
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // ARM_GENERIC_TIMER_COUNTER_LIB_H_
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
**/
|
||||
|
||||
#ifndef __ARM_GIC_ARCH_LIB_H__
|
||||
#define __ARM_GIC_ARCH_LIB_H__
|
||||
#ifndef ARM_GIC_ARCH_LIB_H_
|
||||
#define ARM_GIC_ARCH_LIB_H_
|
||||
|
||||
//
|
||||
// GIC definitions
|
||||
@ -24,4 +24,4 @@ ArmGicGetSupportedArchRevision (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // ARM_GIC_ARCH_LIB_H_
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
**/
|
||||
|
||||
#ifndef __ARM_HVC_LIB__
|
||||
#define __ARM_HVC_LIB__
|
||||
#ifndef ARM_HVC_LIB_H_
|
||||
#define ARM_HVC_LIB_H_
|
||||
|
||||
/**
|
||||
* The size of the HVC arguments are different between AArch64 and AArch32.
|
||||
@ -37,4 +37,4 @@ ArmCallHvc (
|
||||
IN OUT ARM_HVC_ARGS *Args
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // ARM_HVC_LIB_H_
|
||||
|
@ -8,8 +8,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARM_LIB__
|
||||
#define __ARM_LIB__
|
||||
#ifndef ARM_LIB_H_
|
||||
#define ARM_LIB_H_
|
||||
|
||||
#include <Uefi/UefiBaseType.h>
|
||||
|
||||
@ -753,4 +753,4 @@ ArmHasSecurityExtensions (
|
||||
);
|
||||
#endif // MDE_CPU_ARM
|
||||
|
||||
#endif // __ARM_LIB__
|
||||
#endif // ARM_LIB_H_
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARM_MMU_LIB__
|
||||
#define __ARM_MMU_LIB__
|
||||
#ifndef ARM_MMU_LIB_H_
|
||||
#define ARM_MMU_LIB_H_
|
||||
|
||||
#include <Uefi/UefiBaseType.h>
|
||||
|
||||
@ -64,4 +64,4 @@ ArmSetMemoryAttributes (
|
||||
IN UINT64 Attributes
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // ARM_MMU_LIB_H_
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
**/
|
||||
|
||||
#ifndef __ARM_SMC_LIB__
|
||||
#define __ARM_SMC_LIB__
|
||||
#ifndef ARM_SMC_LIB_H_
|
||||
#define ARM_SMC_LIB_H_
|
||||
|
||||
/**
|
||||
* The size of the SMC arguments are different between AArch64 and AArch32.
|
||||
@ -37,4 +37,4 @@ ArmCallSmc (
|
||||
IN OUT ARM_SMC_ARGS *Args
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // ARM_SMC_LIB_H_
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
**/
|
||||
|
||||
#ifndef __ARM_SVC_LIB__
|
||||
#define __ARM_SVC_LIB__
|
||||
#ifndef ARM_SVC_LIB_H_
|
||||
#define ARM_SVC_LIB_H_
|
||||
|
||||
/**
|
||||
* The size of the SVC arguments are different between AArch64 and AArch32.
|
||||
@ -43,4 +43,4 @@ ArmCallSvc (
|
||||
IN OUT ARM_SVC_ARGS *Args
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // ARM_SVC_LIB_H_
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __DEFAULT_EXCEPTION_HANDLER_LIB_H__
|
||||
#define __DEFAULT_EXCEPTION_HANDLER_LIB_H__
|
||||
#ifndef DEFAULT_EXCEPTION_HANDLER_LIB_H_
|
||||
#define DEFAULT_EXCEPTION_HANDLER_LIB_H_
|
||||
|
||||
/**
|
||||
This is the default action to take on an unexpected exception
|
||||
@ -22,4 +22,4 @@ DefaultExceptionHandler (
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // DEFAULT_EXCEPTION_HANDLER_LIB_H_
|
||||
|
@ -8,8 +8,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _OPTEE_H_
|
||||
#define _OPTEE_H_
|
||||
#ifndef OPTEE_LIB_H_
|
||||
#define OPTEE_LIB_H_
|
||||
|
||||
/*
|
||||
* The 'Trusted OS Call UID' is supposed to return the following UUID for
|
||||
@ -117,4 +117,4 @@ OpteeInvokeFunction (
|
||||
IN OUT OPTEE_INVOKE_FUNCTION_ARG *InvokeFunctionArg
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // OPTEE_LIB_H_
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __SEMIHOSTING_H__
|
||||
#define __SEMIHOSTING_H__
|
||||
#ifndef SEMIHOSTING_LIB_H_
|
||||
#define SEMIHOSTING_LIB_H_
|
||||
|
||||
/*
|
||||
*
|
||||
@ -129,4 +129,4 @@ SemihostSystem (
|
||||
IN CHAR8 *CommandLine
|
||||
);
|
||||
|
||||
#endif // __SEMIHOSTING_H__
|
||||
#endif // SEMIHOSTING_LIB_H_
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __STANDALONEMM_MMU_LIB__
|
||||
#define __STANDALONEMM_MMU_LIB__
|
||||
#ifndef STANDALONE_MM_MMU_LIB_
|
||||
#define STANDALONE_MM_MMU_LIB_
|
||||
|
||||
EFI_STATUS
|
||||
ArmSetMemoryRegionNoExec (
|
||||
@ -33,4 +33,4 @@ ArmClearMemoryRegionReadOnly (
|
||||
IN UINT64 Length
|
||||
);
|
||||
|
||||
#endif /* __STANDALONEMM_MMU_LIB__ */
|
||||
#endif /* STANDALONE_MM_MMU_LIB_ */
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
**/
|
||||
|
||||
#ifndef __ARM_MP_CORE_INFO_PPI_H__
|
||||
#define __ARM_MP_CORE_INFO_PPI_H__
|
||||
#ifndef ARM_MP_CORE_INFO_PPI_H_
|
||||
#define ARM_MP_CORE_INFO_PPI_H_
|
||||
|
||||
#include <Guid/ArmMpCoreInfo.h>
|
||||
|
||||
@ -49,4 +49,4 @@ typedef struct {
|
||||
extern EFI_GUID gArmMpCoreInfoPpiGuid;
|
||||
extern EFI_GUID gArmMpCoreInfoGuid;
|
||||
|
||||
#endif
|
||||
#endif // ARM_MP_CORE_INFO_PPI_H_
|
||||
|
@ -8,8 +8,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __AARCH64_LIB_H__
|
||||
#define __AARCH64_LIB_H__
|
||||
#ifndef AARCH64_LIB_H_
|
||||
#define AARCH64_LIB_H_
|
||||
|
||||
typedef VOID (*AARCH64_CACHE_OPERATION)(UINTN);
|
||||
|
||||
@ -52,5 +52,5 @@ ArmReadIdAA64Mmfr2 (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif // __AARCH64_LIB_H__
|
||||
#endif // AARCH64_LIB_H_
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARM_V7_LIB_H__
|
||||
#define __ARM_V7_LIB_H__
|
||||
#ifndef ARM_V7_LIB_H_
|
||||
#define ARM_V7_LIB_H_
|
||||
|
||||
#define ID_MMFR0_SHARELVL_SHIFT 12
|
||||
#define ID_MMFR0_SHARELVL_MASK 0xf
|
||||
@ -64,5 +64,5 @@ ArmReadIdPfr1 (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif // __ARM_V7_LIB_H__
|
||||
#endif // ARM_V7_LIB_H_
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __ARM_LIB_PRIVATE_H__
|
||||
#define __ARM_LIB_PRIVATE_H__
|
||||
#ifndef ARM_LIB_PRIVATE_H_
|
||||
#define ARM_LIB_PRIVATE_H_
|
||||
|
||||
#define CACHE_SIZE_4_KB (3UL)
|
||||
#define CACHE_SIZE_8_KB (4UL)
|
||||
@ -186,4 +186,4 @@ ReadCLIDR (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif // __ARM_LIB_PRIVATE_H__
|
||||
#endif // ARM_LIB_PRIVATE_H_
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _OPTEE_SMC_H_
|
||||
#define _OPTEE_SMC_H_
|
||||
#ifndef OPTEE_SMC_H_
|
||||
#define OPTEE_SMC_H_
|
||||
|
||||
/* Returned in Arg0 only from Trusted OS functions */
|
||||
#define OPTEE_SMC_RETURN_OK 0x0
|
||||
@ -47,4 +47,4 @@ typedef struct {
|
||||
UINT8 Data4[8];
|
||||
} RFC4122_UUID;
|
||||
|
||||
#endif
|
||||
#endif // OPTEE_SMC_H_
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _PLATFORM_BM_H_
|
||||
#define _PLATFORM_BM_H_
|
||||
#ifndef PLATFORM_BM_H_
|
||||
#define PLATFORM_BM_H_
|
||||
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
@ -50,4 +50,4 @@ DisableQuietBoot (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif // _PLATFORM_BM_H_
|
||||
#endif // PLATFORM_BM_H_
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __SEMIHOST_PRIVATE_H__
|
||||
#define __SEMIHOST_PRIVATE_H__
|
||||
#ifndef SEMIHOST_PRIVATE_H_
|
||||
#define SEMIHOST_PRIVATE_H_
|
||||
|
||||
typedef struct {
|
||||
CHAR8 *FileName;
|
||||
@ -209,4 +209,4 @@ GccSemihostCall (
|
||||
|
||||
#endif // __CC_ARM
|
||||
|
||||
#endif //__SEMIHOST_PRIVATE_H__
|
||||
#endif // SEMIHOST_PRIVATE_H_
|
||||
|
Loading…
x
Reference in New Issue
Block a user