audk/MdePkg/Include
Marvin Häuser 836042ffd8 MdePkg/Base.h: Introduce various alignment-related macros
ALIGNOF: Determining the alignment requirement of data types is
crucial to ensure safe memory accesses when parsing untrusted data.

IS_POW2: Determining whether a value is a power of two is important
to verify whether untrusted values are valid alignment values.

IS_ALIGNED: In combination with ALIGNOF data offsets can be verified.
A more general version of the IS_ALIGNED macro previously defined by
several modules.

ADDRESS_IS_ALIGNED: Variant of IS_ALIGNED for pointers and addresses.
Replaces module-specific definitions throughout the code base.

ALIGN_VALUE_ADDEND: The addend to align up can be used to directly
determine the required offset for data alignment.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
2023-04-01 23:11:44 +00:00
..
AArch64 MdePkg/ProcessorBind AARCH64: Add asm macro to emit GNU BTI note 2023-03-30 11:05:22 +00:00
Arm MdePkg: Remove RVCT support 2022-05-13 14:58:54 +00:00
Ebc MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Guid MdePkg: Update MemoryAttributesTable to v2.10 2023-03-30 11:05:22 +00:00
Ia32 MdePkg: Remove the macro definitions regarding Opcode. 2022-03-01 01:45:47 +00:00
IndustryStandard MdePkg/Include: Add IPMI KCS definitions 2023-03-26 18:15:27 +00:00
Library MdePkg: Update code to be more C11 compliant by using __func__ 2023-03-17 17:55:48 +00:00
LoongArch64 MdePkg: Fix UINT64 and INT64 word length for LoongArch64 2023-02-01 02:12:41 +00:00
Pi MdeModulePkg: Correct memory type in PrePiDxeCis.h 2023-01-30 13:52:27 +00:00
Ppi MdePkg/Include/Ppi: Remove Itanium leftover data structure 2023-03-26 02:03:50 +00:00
Protocol MdePkg: Add Memory Attribute Protocol definition 2023-03-16 21:14:49 +00:00
Register MdePkg: Add TME-MK related CPUID and MSR definitions 2023-04-01 01:08:34 +00:00
RiscV64 MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Uefi MdePkg: Label CreateEvent NotifyFunction and NotifyContext optional 2023-02-03 07:41:01 +00:00
X64 MdePkg: Remove the macro definitions regarding Opcode. 2022-03-01 01:45:47 +00:00
Base.h MdePkg/Base.h: Introduce various alignment-related macros 2023-04-01 23:11:44 +00:00
ConfidentialComputingGuestAttr.h MdePkg: Add CC_GUEST_TYPE in ConfidentialComputingGuestAttr.h 2022-04-19 01:26:08 +00:00
PiDxe.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiMm.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiPei.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiSmm.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Uefi.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00