Callum Farmer
5aaf99b474
Update some things for v4
...
* Create macro to detect v4
* Update section info text
* Set version to 4.0.0
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-08-23 11:46:35 +01:00
Callum Farmer
b23462d47c
Add single option to revert to old ABI
...
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-08-04 19:13:32 +01:00
Callum Farmer
81321deb03
Move STATIC to efidef.h
...
* Allows use in legacy.h
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-08-03 16:21:38 +01:00
Callum Farmer
a093fe0378
Make CompareGuid match EDK2 ABI
...
* return BOOLEAN instead of INTN
* Use EFIAPI
* Opposite return codes
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-08-03 16:21:38 +01:00
Callum Farmer
3398bf0dd9
Align REL(A) def with GLIBC
...
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-07-28 15:43:37 +01:00
Callum Farmer
939dffb06f
Allow forcefully ignoring glibc headers on Linux
...
* Sometimes it may not be available so allow use of the substitute version
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-07-28 15:43:32 +01:00
Callum Farmer
8f5c321507
Better detect the correct MacOS toolchain
...
* We need ELF not Mach-O
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-07-16 14:49:52 +01:00
Callum Farmer
5d4ada9352
Add missing parts to elf.h
...
* Missing LGPL-2.1+ license
* Add missing REL definitions
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-07-16 14:49:36 +01:00
Callum Farmer
b6f99c7ac5
Add substitute elf.h for macOS
...
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-07-14 18:50:39 +01:00
Callum Farmer
9c953ddf27
Make old ABI func static
...
Otherwise, LLVM will emit an extern symbol if -O0 is used
which will break the build
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-07-04 15:44:02 +01:00
Callum Farmer
f8ebcfc077
Use char16_t literals
...
Add char16_t('u') literals
Remove wchar_t('L') literals
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-06-24 19:34:51 +01:00
Callum Farmer
ce1ec9d27b
Make CHAR8 use unsigned char
...
* Means we don't have to switch the implementation of char to unsigned char
* Matches the underlying type of char8_t from C++20
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-06-24 19:34:51 +01:00
Callum Farmer
edfda7c396
Make CHAR16 use uint16_t
...
musl-libc doesn't like fshort-wchar so remove wchar_t usage
Use uint16_t as char16_t can be up to 32bits
Fixes ncroxon/gnu-efi#16
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-06-24 19:34:18 +01:00
Pete Batard
96e3b8469c
Apply stdbool/stdint MSVC fixes
...
It seems that while Visual Studio can support the C23 standard, Microsoft didn't get the memo
about no longer requiring stdbool.h for true/false, so add an exception for that.
Also harmonize the inclusion of stdint.h for IA32 and IA64 so that, just like for other archs,
it is not limited to GNU-like compilers only.
Signed-off-by: Pete Batard <pete@akeo.ie>
2024-06-03 21:13:41 +01:00
Callum Farmer
eaa624e71d
Add legacy defines for CopyMem
...
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-05-20 12:15:19 +01:00
Callum Farmer
f3656c8800
Move ReallocatePool to EDK2 ABI
...
Fixes ncroxon/gnu-efi#9
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-05-20 12:14:01 +01:00
Callum Farmer
1e8900a92b
Switch everything to Unix line endings
...
I wondered why a patch didn't apply :(
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-05-19 14:22:26 +01:00
Callum Farmer
c339e077c8
Restore old CopyMem as CopyMemC
...
CopyMemC cos CONST Src
Reverts 6b9dae0bef
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-05-19 13:56:07 +01:00
Pete Batard
f719f7d838
Actually define STATIC as static
...
Should be the same as EDK2, per:
https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Base.h#L264
Signed-off-by: Pete Batard <pete@akeo.ie>
2024-05-16 13:01:13 +01:00
Pete Batard
f2f17bfb16
Add a new EFI_NOINLINE macro and clean up eficompiler.h
...
Guard the macros by the compilers they should explicitly apply to and
add a #error in case the compiler has no alignment directive defined,
as ignoring alignment is likely to produce runtime errors.
Also prefer _MSC_VER to _MSC_EXTENSIONS, as _MSC_EXTENSIONS may not
always be defined by the MSVC compiler.
Signed-off-by: Pete Batard <pete@akeo.ie>
2024-05-14 13:55:59 +01:00
Pete Batard
e2499f758a
Fix a copy/paste error with the SMBIOS3TableGuid definition
...
Signed-off-by: Pete Batard <pete@akeo.ie>
2024-05-13 11:30:26 +01:00
Pete Batard
91cb708816
Fix ‘asm’ undeclared error for MIPS builds
...
As explained at https://stackoverflow.com/a/49830956/1069307 , 'asm' is a GNU
extension that will produce an error when using a non GNU standard like -std=c11.
With recent commit 9b1e06cd0c
having fixed our use
of -std=c11, the MIPS build failed with the error above.
With this sorted, we also re-enable the MIPS gcc build in GitHub Actions.
2024-05-08 13:54:10 +01:00
Nigel Croxon
a77c70718d
Merge pull request #18 from pbatard/master
...
Add GitHub Actions Linux/gcc and Windows/VS2022 CI builds
2024-05-08 08:05:08 -04:00
Pete Batard
ac8d6944c2
Use EDK2 compatible names for SMBIOS and AsciiStr functions and GUIDs
2024-05-08 10:51:43 +01:00
Richard Hughes
8272cd905e
Replace 'Copright' with 'Copyright' in file headers
...
This was hopefully just a typo that has been cargo-culted around the codebase.
It certainly confuses the Red Hat license checker and makes the code copyright
clear.
2024-05-07 13:03:52 +01:00
Callum Farmer
f5bb548df5
Align RTLIB CopyMem/SetMem with normal versions
...
Looks like 699e452654
broke rEFInd
(189e405630
/)
2024-04-25 15:27:26 +01:00
Peter Jones
31913f8489
Make: make TOPDIR actually work and get rid of unused CDIR
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
2024-03-22 10:24:28 -04:00
Xiaotian Wu
fe31748c87
Add some definitions for LoongArch
...
Added CHAR8, CHAR16, WCHAR and VOID type definitions for LoongArch
2024-03-22 10:24:23 -04:00
Callum Farmer
d27431f679
Add EFI_NORETURN for declspec
...
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-03-22 10:24:23 -04:00
Callum Farmer
593e13f670
Rename ALIGN to EFI_ALIGN
...
Avoid conflict with other libraries
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-03-22 10:24:23 -04:00
Callum Farmer
2c47753ad3
Update OS Indications to 2.10
...
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-03-22 10:24:23 -04:00
Callum Farmer
86b8b5ea78
Update memory types to 2.10
...
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-03-22 10:24:23 -04:00
Callum Farmer
30bf99b81e
Update error/warning codes to 2.10
...
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-03-22 10:24:23 -04:00
Callum Farmer
b084081593
Update table revisions to 2.10
...
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-03-22 10:24:23 -04:00
Peter Jones
5df47d3527
Add missing EFI_VARIABLE_... definition.
...
This adds the definition for EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS.
Signed-off-by: Peter Jones <pjones@redhat.com>
2024-03-22 10:24:16 -04:00
Peter Jones
27477ba983
Add some missing definitions for system table revisions
...
Signed-off-by: Peter Jones <pjones@redhat.com>
2024-03-22 10:24:12 -04:00
Peter Jones
699e452654
Make CopyMem() and SetMem() be EFIAPI
...
For wildly unknown reasons, EFI Boot Services includes CopyMem() and
SetMem() functions, and they are marked as EFIAPI functions.
This patch marks gnu-efi's CopyMem() and SetMem() as EFIAPI functions,
and makes their exposed API match the misguided nonsense in the EFI
spec, so that they can be used there in a test environment.
Signed-off-by: Peter Jones <pjones@redhat.com>
2024-03-22 10:24:09 -04:00
Peter Jones
06574e4ecd
Add EFI_MEMORY_ATTRIBUTE_PROTOCOL
...
Signed-off-by: Peter Jones <pjones@redhat.com>
2024-03-22 10:24:05 -04:00
Peter Jones
907bf6ce94
Fix some EFI_MEMORY_FOO definitions
...
Signed-off-by: Peter Jones <pjones@redhat.com>
2024-03-22 10:23:56 -04:00
Callum Farmer
7f8e2d44ed
Move OPTNONE macro to eficompiler.h
...
This is also useful in downstream projects so add it
to public header
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-03-22 10:23:44 -04:00
Nigel Croxon
eab878741a
Tail calls break ctors/dtors
...
Add macro EFI_NO_TAIL_CALL which disables tail call
optimization on a per-function basis
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
2024-03-22 10:23:15 -04:00
Callum Farmer
9e47db1193
Add C++ extern C header markers
...
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-03-22 10:06:43 -04:00
Moody Liu
1de5094978
riscv64: adjust type definitions
...
CHAR8 needs to be defined while BOOLEAN should be removed
here to prevent typedef conflicts
Signed-off-by: Moody Liu <mooodyhunter@outlook.com>
2023-05-13 17:57:24 +01:00
b'Nigel Croxon
bc46fbdc84
Merge /u/gmbr3/gnu-efi/ branch TRUEFALSE into master
...
https://sourceforge.net/p/gnu-efi/code/merge-requests/49/
2023-04-17 11:39:01 +00:00
b'Nigel Croxon
dcced03469
Merge /u/gmbr3/gnu-efi/ branch CHAR16 into master
...
https://sourceforge.net/p/gnu-efi/code/merge-requests/48/
2023-04-17 11:38:41 +00:00
b'Nigel Croxon
362ef3db04
Merge /u/gmbr3/gnu-efi/ branch nullptr into master
...
https://sourceforge.net/p/gnu-efi/code/merge-requests/46/
2023-04-17 11:37:07 +00:00
b'Nigel Croxon
e0e1f53ce2
Merge /u/gmbr3/gnu-efi/ branch pkgconf2 into master
...
https://sourceforge.net/p/gnu-efi/code/merge-requests/45/
2023-04-17 11:36:22 +00:00
b'Nigel Croxon
7219aba42c
Merge /u/yetist/gnu-efi/ branch dev-master into master
...
https://sourceforge.net/p/gnu-efi/code/merge-requests/33/
2023-04-17 11:35:08 +00:00
Callum Farmer
2a599ea133
Make TRUE/FALSE compatible with C23/C++
...
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2023-04-15 14:45:19 +01:00
Callum Farmer
056bdaa53e
Make VOID a typedef
...
'void' is a type so VOID can be typedef instead of
a '#define' to improve compiler output
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2023-04-13 14:32:37 +01:00