mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
ArmPkg: Replace include guards with #pragma once
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.
`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.
Compared to macro-based include guards, `#pragma once`:
- Eliminates the risk of macro name collisions or copy/paste errors
where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
(e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
file entirely, rather than re-reading it to find the matching
`#endif` ("multiple-include optimization").
- Note that some compilers may already optimize traditional include
guards, by recognzining the idiomatic pattern.
This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.
However, this is considered acceptable given:
1. edk2 already defines a subset of supported compilers in
BaseTools/Conf/tools_def.template, all of which have supported
`#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
include guard naming and potential macro collisions.
Approximate compiler support dates:
- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
(http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
This commit is contained in:
parent
5ce48c03cb
commit
a0f4ffffff
49 changed files with 49 additions and 196 deletions
|
|
@ -6,8 +6,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||
|
||||
--*/
|
||||
|
||||
#ifndef ARM_GIC_DXE_H_
|
||||
#define ARM_GIC_DXE_H_
|
||||
#pragma once
|
||||
|
||||
#include <Library/ArmGicLib.h>
|
||||
#include <Library/ArmLib.h>
|
||||
|
|
@ -193,5 +192,3 @@ VOID
|
|||
ArmGicV3SetControlRegister (
|
||||
IN UINTN Value
|
||||
);
|
||||
|
||||
#endif // ARM_GIC_DXE_H_
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@
|
|||
*
|
||||
**/
|
||||
|
||||
#ifndef ARMGICV5_H_
|
||||
#define ARMGICV5_H_
|
||||
#pragma once
|
||||
|
||||
#define GICV5_IRS_CONFIG_FRAME_SIZE SIZE_64KB
|
||||
|
||||
|
|
@ -182,5 +181,3 @@ EFIAPI
|
|||
ArmGicV5AcknowledgeInterrupt (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif // ARMGICV5_H_
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||
|
||||
**/
|
||||
|
||||
#ifndef MP_SERVICES_INTERNAL_H_
|
||||
#define MP_SERVICES_INTERNAL_H_
|
||||
#pragma once
|
||||
|
||||
#include <Protocol/Cpu.h>
|
||||
#include <Protocol/MpService.h>
|
||||
|
|
@ -341,5 +340,3 @@ ReadyToBootSignaled (
|
|||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
);
|
||||
|
||||
#endif /* MP_SERVICES_INTERNAL_H_ */
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||
**/
|
||||
|
||||
#ifndef ARM_SCMI_BASE_PROTOCOL_PRIVATE_H_
|
||||
#define ARM_SCMI_BASE_PROTOCOL_PRIVATE_H_
|
||||
#pragma once
|
||||
|
||||
// Return values of BASE_DISCOVER_LIST_PROTOCOLS command.
|
||||
typedef struct {
|
||||
|
|
@ -36,5 +35,3 @@ EFI_STATUS
|
|||
ScmiBaseProtocolInit (
|
||||
IN OUT EFI_HANDLE *Handle
|
||||
);
|
||||
|
||||
#endif /* ARM_SCMI_BASE_PROTOCOL_PRIVATE_H_ */
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||
**/
|
||||
|
||||
#ifndef ARM_SCMI_CLOCK_PROTOCOL_PRIVATE_H_
|
||||
#define ARM_SCMI_CLOCK_PROTOCOL_PRIVATE_H_
|
||||
#pragma once
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
|
|
@ -80,5 +79,3 @@ EFI_STATUS
|
|||
ScmiClockProtocolInit (
|
||||
IN EFI_HANDLE *Handle
|
||||
);
|
||||
|
||||
#endif /* ARM_SCMI_CLOCK_PROTOCOL_PRIVATE_H_ */
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||
**/
|
||||
|
||||
#ifndef ARM_SCMI_PERFORMANCE_PROTOCOL_PRIVATE_H_
|
||||
#define ARM_SCMI_PERFORMANCE_PROTOCOL_PRIVATE_H_
|
||||
#pragma once
|
||||
|
||||
#include <Protocol/ArmScmiPerformanceProtocol.h>
|
||||
|
||||
|
|
@ -45,5 +44,3 @@ EFI_STATUS
|
|||
ScmiPerformanceProtocolInit (
|
||||
IN EFI_HANDLE *Handle
|
||||
);
|
||||
|
||||
#endif /* ARM_SCMI_PERFORMANCE_PROTOCOL_PRIVATE_H_ */
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||
**/
|
||||
|
||||
#ifndef SCMI_DXE_H_
|
||||
#define SCMI_DXE_H_
|
||||
#pragma once
|
||||
|
||||
#include "ScmiPrivate.h"
|
||||
|
||||
|
|
@ -33,5 +32,3 @@ typedef struct {
|
|||
SCMI_PROTOCOL_ID Id; // Protocol Id.
|
||||
SCMI_PROTOCOL_INIT_FXN InitFn; // Protocol init function.
|
||||
} SCMI_PROTOCOL_ENTRY;
|
||||
|
||||
#endif /* SCMI_DXE_H_ */
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||
**/
|
||||
|
||||
#ifndef SCMI_PRIVATE_H_
|
||||
#define SCMI_PRIVATE_H_
|
||||
#pragma once
|
||||
|
||||
// SCMI protocol IDs.
|
||||
typedef enum {
|
||||
|
|
@ -165,5 +164,3 @@ ScmiGetProtocolMessageAttributes (
|
|||
IN SCMI_PROTOCOL_ID ProtocolId,
|
||||
OUT UINT32 **ReturnValues
|
||||
);
|
||||
|
||||
#endif /* SCMI_PRIVATE_H_ */
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef CPU_DXE_H_
|
||||
#define CPU_DXE_H_
|
||||
#pragma once
|
||||
|
||||
#include <Uefi.h>
|
||||
|
||||
|
|
@ -142,5 +141,3 @@ UINT64
|
|||
RegionAttributeToGcdAttribute (
|
||||
IN UINTN PageAttributes
|
||||
);
|
||||
|
||||
#endif // CPU_DXE_H_
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@
|
|||
* https://developer.arm.com/documentation/den0094/c/
|
||||
**/
|
||||
|
||||
#ifndef GENERIC_WATCHDOG_H_
|
||||
#define GENERIC_WATCHDOG_H_
|
||||
#pragma once
|
||||
|
||||
// Refresh Frame:
|
||||
#define GENERIC_WDOG_REFRESH_REG ((UINTN)PcdGet64 (PcdGenericWatchdogRefreshBase) + 0x000)
|
||||
|
|
@ -30,5 +29,3 @@
|
|||
|
||||
#define GENERIC_WDOG_IID_ARCH_REV_SHIFT 16
|
||||
#define GENERIC_WDOG_IID_ARCH_REV_MASK 0xF
|
||||
|
||||
#endif // GENERIC_WATCHDOG_H_
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef MM_CPU_DRIVER_H_
|
||||
#define MM_CPU_DRIVER_H_
|
||||
#pragma once
|
||||
|
||||
#include <Protocol/MmCommunication2.h>
|
||||
#include <Protocol/MmConfiguration.h>
|
||||
|
|
@ -74,5 +73,3 @@ PiMmCpuTpFwRootMmiHandler (
|
|||
IN OUT VOID *CommBuffer OPTIONAL,
|
||||
IN OUT UINTN *CommBufferSize OPTIONAL
|
||||
);
|
||||
|
||||
#endif /* MM_CPU_DRIVER_H_ */
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
**/
|
||||
|
||||
#ifndef TIMER_DXE_H_
|
||||
#define TIMER_DXE_H_
|
||||
#pragma once
|
||||
|
||||
// Timer IntIDs are architecturally defined for GICv5
|
||||
#define GICV5_ARCH_TIMER_HYP_INTID 0x2000001a
|
||||
|
|
@ -14,5 +13,3 @@
|
|||
#define GICV5_ARCH_TIMER_HYP_VIRT_INTID 0x2000001c
|
||||
#define GICV5_ARCH_TIMER_SEC_INTID 0x2000001d
|
||||
#define GICV5_ARCH_TIMER_INTID 0x2000001e
|
||||
|
||||
#endif // TIMER_DXE_H_
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef SEMIHOST_FS_H_
|
||||
#define SEMIHOST_FS_H_
|
||||
#pragma once
|
||||
|
||||
EFI_STATUS
|
||||
VolumeOpen (
|
||||
|
|
@ -241,5 +240,3 @@ EFI_STATUS
|
|||
FileFlush (
|
||||
IN EFI_FILE *File
|
||||
);
|
||||
|
||||
#endif // SEMIHOST_FS_H_
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@
|
|||
*
|
||||
**/
|
||||
|
||||
#ifndef ARM_MP_CORE_INFO_GUID_H_
|
||||
#define ARM_MP_CORE_INFO_GUID_H_
|
||||
#pragma once
|
||||
|
||||
#define MAX_CPUS_PER_MPCORE_SYSTEM 0x04
|
||||
#define SCU_CONFIG_REG_OFFSET 0x04
|
||||
|
|
@ -27,5 +26,3 @@ typedef struct {
|
|||
{ 0xa4ee0728, 0xe5d7, 0x4ac5, {0xb2, 0x1e, 0x65, 0x8e, 0xd8, 0x57, 0xe8, 0x34} }
|
||||
|
||||
extern EFI_GUID gArmMpCoreInfoGuid;
|
||||
|
||||
#endif /* ARM_MP_CORE_INFO_GUID_H_ */
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef ARM_TRANSFER_LIST_HOB_H__
|
||||
#define ARM_TRANSFER_LIST_HOB_H__
|
||||
#pragma once
|
||||
|
||||
#define ARM_TRANSFER_LIST_HOB_GUID {\
|
||||
0xebe7bae8, 0xfe18, 0x43c5, \
|
||||
|
|
@ -19,5 +18,3 @@
|
|||
}
|
||||
|
||||
extern EFI_GUID gArmTransferListHobGuid;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef ARM_CACHE_H_
|
||||
#define ARM_CACHE_H_
|
||||
#pragma once
|
||||
|
||||
#include <Uefi/UefiBaseType.h>
|
||||
|
||||
|
|
@ -107,5 +106,3 @@ typedef enum {
|
|||
} CLIDR_CACHE_TYPE;
|
||||
|
||||
#define CLIDR_GET_CACHE_TYPE(x, level) ((x >> (3 * (level))) & 0b111)
|
||||
|
||||
#endif /* ARM_CACHE_H_ */
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@
|
|||
*
|
||||
**/
|
||||
|
||||
#ifndef ARM_MM_SVC_H_
|
||||
#define ARM_MM_SVC_H_
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
* SPM_MM FIDs to allow the secure partition to initialise itself, handle
|
||||
|
|
@ -62,5 +61,3 @@
|
|||
|
||||
#define ARM_SPM_MM_MINOR_VERSION_GET(version) \
|
||||
(((version) >> ARM_SPM_MM_MINOR_VERSION_SHIFT) & ARM_SPM_MM_VERSION_MASK)
|
||||
|
||||
#endif // ARM_MM_SVC_H_
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@
|
|||
- HOB - Hand off block.
|
||||
**/
|
||||
|
||||
#ifndef ARM_TRANSFER_LIST_
|
||||
#define ARM_TRANSFER_LIST_
|
||||
#pragma once
|
||||
|
||||
#include <Base.h>
|
||||
#include <Uefi.h>
|
||||
|
|
@ -156,5 +155,3 @@ typedef struct TransferListEventLog {
|
|||
/// TRNASFER_ENTRY_HEADER->DataSize - sizeof (TRANSFER_LIST_EVENTLOG)->Flags
|
||||
UINT8 EventLog[];
|
||||
} TRANSFER_LIST_EVENTLOG;
|
||||
|
||||
#endif // ARM_TRANSFER_LIST_
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef MM_COMMUNICATE_H_
|
||||
#define MM_COMMUNICATE_H_
|
||||
#pragma once
|
||||
|
||||
#define MM_MAJOR_VER_MASK 0xEFFF0000
|
||||
#define MM_MINOR_VER_MASK 0x0000FFFF
|
||||
|
|
@ -27,5 +26,3 @@
|
|||
|
||||
#define MM_CALLER_MAJOR_VER 0x1UL
|
||||
#define MM_CALLER_MINOR_VER 0x0
|
||||
|
||||
#endif /* MM_COMMUNICATE_H_ */
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef PSA_MM_FW_UPDATE_H_
|
||||
#define PSA_MM_FW_UPDATE_H_
|
||||
#pragma once
|
||||
|
||||
/** Macros defining the firmware store update ABI fuction Id.
|
||||
Cf Platform Security Firmware Update for the A-profile specification,
|
||||
|
|
@ -488,5 +487,3 @@ typedef struct {
|
|||
((Idx) * (sizeof (PSA_MM_FWU_IMG_INFO_ENTRY)))))
|
||||
|
||||
extern EFI_GUID gEfiMmFwuCommunicationGuid;
|
||||
|
||||
#endif // PSA_MM_FW_UPDATE_H_
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef ARM_GENERIC_TIMER_COUNTER_LIB_H_
|
||||
#define ARM_GENERIC_TIMER_COUNTER_LIB_H_
|
||||
#pragma once
|
||||
|
||||
VOID
|
||||
EFIAPI
|
||||
|
|
@ -81,5 +80,3 @@ EFIAPI
|
|||
ArmGenericTimerSetCompareVal (
|
||||
IN UINT64 Value
|
||||
);
|
||||
|
||||
#endif // ARM_GENERIC_TIMER_COUNTER_LIB_H_
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@
|
|||
*
|
||||
**/
|
||||
|
||||
#ifndef ARMGIC_H_
|
||||
#define ARMGIC_H_
|
||||
#pragma once
|
||||
|
||||
//
|
||||
// GIC SPI and extended SPI ranges
|
||||
|
|
@ -185,5 +184,3 @@
|
|||
|
||||
#define ARM_GICV5_ARCH_SPI_MIN 0x60000000
|
||||
#define ARM_GICV5_ARCH_SPI_MAX 0x60ffffff
|
||||
|
||||
#endif // ARMGIC_H_
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@
|
|||
*
|
||||
**/
|
||||
|
||||
#ifndef ARM_HVC_LIB_H_
|
||||
#define ARM_HVC_LIB_H_
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* The size of the HVC arguments are different between AArch64 and AArch32.
|
||||
|
|
@ -36,5 +35,3 @@ VOID
|
|||
ArmCallHvc (
|
||||
IN OUT ARM_HVC_ARGS *Args
|
||||
);
|
||||
|
||||
#endif // ARM_HVC_LIB_H_
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef ARM_MM_HANDLER_CONTEXT_H_
|
||||
#define ARM_MM_HANDLER_CONTEXT_H_
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
* Communication ABI protocol to communicate between normal/secure partition.
|
||||
|
|
@ -115,5 +114,3 @@ typedef struct {
|
|||
/// Context Data according to CommProtocol
|
||||
ARM_MM_HANDLER_CTX_DATA CtxData;
|
||||
} ARM_MM_HANDLER_CONTEXT;
|
||||
|
||||
#endif // ARM_MM_HANDLER_CONTEXT_H_
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef ARM_MONITOR_LIB_H_
|
||||
#define ARM_MONITOR_LIB_H_
|
||||
#pragma once
|
||||
|
||||
/** The size of the SMC arguments is different between AArch64 and AArch32.
|
||||
|
||||
|
|
@ -48,5 +47,3 @@ EFIAPI
|
|||
ArmMonitorCall (
|
||||
IN OUT ARM_MONITOR_ARGS *Args
|
||||
);
|
||||
|
||||
#endif // ARM_MONITOR_LIB_H_
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||
**/
|
||||
|
||||
#ifndef ARM_MTL_LIB_H_
|
||||
#define ARM_MTL_LIB_H_
|
||||
#pragma once
|
||||
|
||||
#include <Uefi/UefiBaseType.h>
|
||||
|
||||
|
|
@ -126,5 +125,3 @@ MtlReceiveMessage (
|
|||
OUT UINT32 *MessageHeader,
|
||||
OUT UINT32 *PayloadLength
|
||||
);
|
||||
|
||||
#endif /* ARM_MTL_LIB_H_ */
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef __STANDALONEMMCORE_ENTRY_POINT_H__
|
||||
#define __STANDALONEMMCORE_ENTRY_POINT_H__
|
||||
#pragma once
|
||||
|
||||
#include <Library/ArmSvcLib.h>
|
||||
#include <Library/ArmFfaLib.h>
|
||||
|
|
@ -213,5 +212,3 @@ EFIAPI
|
|||
ProcessModuleEntryPointList (
|
||||
IN VOID *HobStart
|
||||
);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
- https://github.com/FirmwareHandoff/firmware_handoff
|
||||
**/
|
||||
|
||||
#ifndef ARM_TRANSFER_LIST_LIB_
|
||||
#define ARM_TRANSFER_LIST_LIB_
|
||||
#pragma once
|
||||
|
||||
#include <Base.h>
|
||||
#include <Uefi.h>
|
||||
|
|
@ -193,5 +192,3 @@ TransferListGetEventLog (
|
|||
OUT UINTN *EventLogSize,
|
||||
OUT UINT32 *EventLogFlags OPTIONAL
|
||||
);
|
||||
|
||||
#endif // ARM_TRANSFER_LIST_LIB_
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef DEFAULT_EXCEPTION_HANDLER_LIB_H_
|
||||
#define DEFAULT_EXCEPTION_HANDLER_LIB_H_
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
This is the default action to take on an unexpected exception
|
||||
|
|
@ -21,5 +20,3 @@ DefaultExceptionHandler (
|
|||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
);
|
||||
|
||||
#endif // DEFAULT_EXCEPTION_HANDLER_LIB_H_
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
*
|
||||
**/
|
||||
|
||||
#ifndef OEM_MISC_LIB_H_
|
||||
#define OEM_MISC_LIB_H_
|
||||
#pragma once
|
||||
|
||||
#include <Uefi.h>
|
||||
#include <IndustryStandard/SmBios.h>
|
||||
|
|
@ -267,5 +266,3 @@ EFIAPI
|
|||
OemGetEmbeddedControllerFirmwareRelease (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif // OEM_MISC_LIB_H_
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef OPTEE_LIB_H_
|
||||
#define OPTEE_LIB_H_
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
* The 'Trusted OS Call UID' is supposed to return the following UUID for
|
||||
|
|
@ -116,5 +115,3 @@ EFIAPI
|
|||
OpteeInvokeFunction (
|
||||
IN OUT OPTEE_INVOKE_FUNCTION_ARG *InvokeFunctionArg
|
||||
);
|
||||
|
||||
#endif // OPTEE_LIB_H_
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef SEMIHOSTING_LIB_H_
|
||||
#define SEMIHOSTING_LIB_H_
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
*
|
||||
|
|
@ -128,5 +127,3 @@ UINT32
|
|||
SemihostSystem (
|
||||
IN CHAR8 *CommandLine
|
||||
);
|
||||
|
||||
#endif // SEMIHOSTING_LIB_H_
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef STANDALONE_MM_MMU_LIB_
|
||||
#define STANDALONE_MM_MMU_LIB_
|
||||
#pragma once
|
||||
|
||||
EFI_STATUS
|
||||
ArmSetMemoryRegionNoExec (
|
||||
|
|
@ -32,5 +31,3 @@ ArmClearMemoryRegionReadOnly (
|
|||
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||
IN UINT64 Length
|
||||
);
|
||||
|
||||
#endif /* STANDALONE_MM_MMU_LIB_ */
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@
|
|||
*
|
||||
**/
|
||||
|
||||
#ifndef ARM_MP_CORE_INFO_PPI_H_
|
||||
#define ARM_MP_CORE_INFO_PPI_H_
|
||||
#pragma once
|
||||
|
||||
#include <Guid/ArmMpCoreInfo.h>
|
||||
|
||||
|
|
@ -48,5 +47,3 @@ typedef struct {
|
|||
|
||||
extern EFI_GUID gArmMpCoreInfoPpiGuid;
|
||||
extern EFI_GUID gArmMpCoreInfoGuid;
|
||||
|
||||
#endif // ARM_MP_CORE_INFO_PPI_H_
|
||||
|
|
|
|||
|
|
@ -9,12 +9,9 @@
|
|||
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||
**/
|
||||
|
||||
#ifndef ARM_SCMI_H_
|
||||
#define ARM_SCMI_H_
|
||||
#pragma once
|
||||
|
||||
/* As per SCMI specification, maximum allowed ASCII string length
|
||||
for various return values/parameters of a SCMI message.
|
||||
*/
|
||||
#define SCMI_MAX_STR_LEN 16
|
||||
|
||||
#endif /* ARM_SCMI_H_ */
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
(https://developer.arm.com/documentation/den0056/)
|
||||
**/
|
||||
|
||||
#ifndef ARM_SCMI_BASE_PROTOCOL_H_
|
||||
#define ARM_SCMI_BASE_PROTOCOL_H_
|
||||
#pragma once
|
||||
|
||||
#include <Protocol/ArmScmi.h>
|
||||
|
||||
|
|
@ -164,5 +163,3 @@ typedef enum {
|
|||
ScmiMessageIdBaseDiscoverImplementationVersion = 0x5,
|
||||
ScmiMessageIdBaseDiscoverListProtocols = 0x6
|
||||
} SCMI_MESSAGE_ID_BASE;
|
||||
|
||||
#endif /* ARM_SCMI_BASE_PROTOCOL_H_ */
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||
**/
|
||||
|
||||
#ifndef ARM_SCMI_CLOCK2_PROTOCOL_H_
|
||||
#define ARM_SCMI_CLOCK2_PROTOCOL_H_
|
||||
#pragma once
|
||||
|
||||
#include <Protocol/ArmScmi.h>
|
||||
#include <Protocol/ArmScmiClockProtocol.h>
|
||||
|
|
@ -187,5 +186,3 @@ typedef struct _SCMI_CLOCK2_PROTOCOL {
|
|||
UINTN Version; // For future expandability
|
||||
SCMI_CLOCK2_ENABLE Enable;
|
||||
} SCMI_CLOCK2_PROTOCOL;
|
||||
|
||||
#endif /* ARM_SCMI_CLOCK2_PROTOCOL_H_ */
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||
**/
|
||||
|
||||
#ifndef ARM_SCMI_CLOCK_PROTOCOL_H_
|
||||
#define ARM_SCMI_CLOCK_PROTOCOL_H_
|
||||
#pragma once
|
||||
|
||||
#include <Protocol/ArmScmi.h>
|
||||
|
||||
|
|
@ -213,5 +212,3 @@ typedef struct _SCMI_CLOCK_PROTOCOL {
|
|||
SCMI_CLOCK_RATE_GET RateGet;
|
||||
SCMI_CLOCK_RATE_SET RateSet;
|
||||
} SCMI_CLOCK_PROTOCOL;
|
||||
|
||||
#endif /* ARM_SCMI_CLOCK_PROTOCOL_H_ */
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef ARM_SCMI_PERFORMANCE_PROTOCOL_H_
|
||||
#define ARM_SCMI_PERFORMANCE_PROTOCOL_H_
|
||||
#pragma once
|
||||
|
||||
#include <Protocol/ArmScmi.h>
|
||||
|
||||
|
|
@ -327,5 +326,3 @@ typedef struct _SCMI_PERFORMANCE_PROTOCOL {
|
|||
SCMI_PERFORMANCE_LEVEL_GET LevelGet;
|
||||
SCMI_PERFORMANCE_DESCRIBE_FASTCHANNEL DescribeFastchannel;
|
||||
} SCMI_PERFORMANCE_PROTOCOL;
|
||||
|
||||
#endif /* ARM_SCMI_PERFORMANCE_PROTOCOL_H_ */
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef PI_MM_CPU_DRIVER_EP_H_
|
||||
#define PI_MM_CPU_DRIVER_EP_H_
|
||||
#pragma once
|
||||
|
||||
#include <PiMm.h>
|
||||
#include <Library/ArmMmHandlerContext.h>
|
||||
|
|
@ -57,5 +56,3 @@ struct _EDKII_PI_MM_CPU_DRIVER_EP_PROTOCOL {
|
|||
};
|
||||
|
||||
extern EFI_GUID gEdkiiPiMmCpuDriverEpProtocolGuid;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef AARCH64_LIB_H_
|
||||
#define AARCH64_LIB_H_
|
||||
#pragma once
|
||||
|
||||
UINTN
|
||||
EFIAPI
|
||||
|
|
@ -80,5 +79,3 @@ EFIAPI
|
|||
ArmReadIdAA64Pfr2 (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif // AARCH64_LIB_H_
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef ARM_LIB_PRIVATE_H_
|
||||
#define ARM_LIB_PRIVATE_H_
|
||||
#pragma once
|
||||
|
||||
#define CACHE_SIZE_4_KB (3UL)
|
||||
#define CACHE_SIZE_8_KB (4UL)
|
||||
|
|
@ -62,5 +61,3 @@ UINT32
|
|||
CPSRRead (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif // ARM_LIB_PRIVATE_H_
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@
|
|||
- FID - Function ID
|
||||
**/
|
||||
|
||||
#ifndef ARM_FW_TRNG_DEFS_H_
|
||||
#define ARM_FW_TRNG_DEFS_H_
|
||||
#pragma once
|
||||
|
||||
#include <IndustryStandard/ArmStdSmc.h>
|
||||
|
||||
|
|
@ -32,5 +31,3 @@
|
|||
/** Maximum bits of entropy supported on AArch64.
|
||||
*/
|
||||
#define MAX_ENTROPY_BITS 192
|
||||
|
||||
#endif // ARM_FW_TRNG_DEFS_H_
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef PSA_FWU_LIB_H_
|
||||
#define PSA_FWU_LIB_H_
|
||||
#pragma once
|
||||
|
||||
#include <IndustryStandard/PsaMmFwUpdate.h>
|
||||
|
||||
|
|
@ -269,5 +268,3 @@ PsaFwuVirtualAddressChangeEvent (
|
|||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
);
|
||||
|
||||
#endif // PSA_FWU_LIB_H_
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef OPTEE_SMC_H_
|
||||
#define OPTEE_SMC_H_
|
||||
#pragma once
|
||||
|
||||
/* Returned in Arg0 only from Trusted OS functions */
|
||||
#define OPTEE_SMC_RETURN_OK 0x0
|
||||
|
|
@ -46,5 +45,3 @@ typedef struct {
|
|||
UINT16 Data3;
|
||||
UINT8 Data4[8];
|
||||
} RFC4122_UUID;
|
||||
|
||||
#endif // OPTEE_SMC_H_
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef PLATFORM_BM_H_
|
||||
#define PLATFORM_BM_H_
|
||||
#pragma once
|
||||
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
|
|
@ -49,5 +48,3 @@ EFI_STATUS
|
|||
DisableQuietBoot (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif // PLATFORM_BM_H_
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef SEMIHOST_PRIVATE_H_
|
||||
#define SEMIHOST_PRIVATE_H_
|
||||
#pragma once
|
||||
|
||||
typedef struct {
|
||||
CHAR8 *FileName;
|
||||
|
|
@ -93,5 +92,3 @@ GccSemihostCall (
|
|||
#define SEMIHOST_SYS_SYSTEM(SystemBlock) (-1)
|
||||
|
||||
#endif // __GNUC__
|
||||
|
||||
#endif // SEMIHOST_PRIVATE_H_
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef SMBIOS_PROCESSOR_H_
|
||||
#define SMBIOS_PROCESSOR_H_
|
||||
#pragma once
|
||||
|
||||
#include <Uefi.h>
|
||||
#include <IndustryStandard/SmBios.h>
|
||||
|
|
@ -108,5 +107,3 @@ PROCESSOR_CHARACTERISTIC_FLAGS
|
|||
SmbiosGetProcessorCharacteristics (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif // SMBIOS_PROCESSOR_H_
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@
|
|||
|
||||
**/
|
||||
|
||||
#ifndef SMBIOS_MISC_H_
|
||||
#define SMBIOS_MISC_H_
|
||||
#pragma once
|
||||
|
||||
#include <Protocol/Smbios.h>
|
||||
#include <IndustryStandard/SmBios.h>
|
||||
|
|
@ -126,5 +125,3 @@ extern SMBIOS_MISC_DATA_TABLE mSmbiosMiscDataTable[];
|
|||
//
|
||||
extern UINTN mSmbiosMiscDataTableEntries;
|
||||
extern UINT8 mSmbiosMiscDxeStrings[];
|
||||
|
||||
#endif // SMBIOS_MISC_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue