Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: 741ef9cec35fe392c8846aa428a9070895e6bc46
https://github.com/tianocore/edk2/commit/741ef9cec35fe392c8846aa428a9070895e6bc46
Author: Ard Biesheuvel <[email protected]>
Date: 2025-12-09 (Tue, 09 Dec 2025)
Changed paths:
M MdePkg/Library/UefiLib/UefiLib.c
Log Message:
-----------
MdePkg/UefiLib: Use CompareMem() to compare ISO639 language codes
ISO 639-3 language codes are 3 letter abbreviations that identify
natural languages. Comparing them for equality involves performing a
byte by byte check, without taking case into account.
So use CompareMem() rather than the peculiar ReadUnaligned24 () API,
given that we are not dealing with 24-bit integers here.
Signed-off-by: Ard Biesheuvel <[email protected]>
Commit: 2ba7e5be6cc6b83d5d4ce67d3225e87466c4ecf7
https://github.com/tianocore/edk2/commit/2ba7e5be6cc6b83d5d4ce67d3225e87466c4ecf7
Author: Ard Biesheuvel <[email protected]>
Date: 2025-12-09 (Tue, 09 Dec 2025)
Changed paths:
M MdePkg/Include/Library/BaseLib.h
M MdePkg/Library/BaseLib/Unaligned.c
Log Message:
-----------
MdePkg/BaseLib: Avoid undefined behavior in Unaligned() accessors
The C standard qualifies misaligned pointers as undefined behavior. This
means it is fundamentally impossible to define a conformant C API for
unaligned access that is expressed in terms of types with a minimum
alignment greater than 1 byte.
Undefined behavior means that the compiler is free to generate code that
assumes that only the defined behavior occurs. This means that a C
implementation of ReadUnaligned64() might be emitted using a 64-bit load
operation that does not tolerate misalignment, depending on the CPU
architecture.
So the only correct way to define such an API is in terms of types such
as VOID* that have no implied alignment.
Then, given that compilers today are perfectly capable of generating the
right code, given accurate annotations, let's rely on those in the
generic implementation. This will ensure that the correct access
sequences are used, depending on the CPU architecture, and on the
compiler flags (e.g., AArch64 uses -mstrict-align in XIP code as it may
execute with the MMU disabled).
Signed-off-by: Ard Biesheuvel <[email protected]>
Commit: 3e7107c7da655b0b65425ba99f066366b5b7a230
https://github.com/tianocore/edk2/commit/3e7107c7da655b0b65425ba99f066366b5b7a230
Author: Ard Biesheuvel <[email protected]>
Date: 2025-12-09 (Tue, 09 Dec 2025)
Changed paths:
R MdePkg/Library/BaseLib/AArch64/Unaligned.c
M MdePkg/Library/BaseLib/BaseLib.inf
Log Message:
-----------
MdePkg/BaseLib AARCH64: Drop special Unaligned.c version
Now that the generic code takes alignment constraints into account,
there is no longer a need for a special AArch64 version that performs
byte by byte access in C.
Signed-off-by: Ard Biesheuvel <[email protected]>
Compare: https://github.com/tianocore/edk2/compare/471c15b396a3...3e7107c7da65
To unsubscribe from these emails, change your notification settings at
https://github.com/tianocore/edk2/settings/notifications
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits