aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/edk2/Include
Commit message (Collapse)AuthorAgeFilesLines
* stand: Fix secureboot buildWarner Losh2025-11-173-0/+750
| | | | | | | | | | | | | | | | | | Make libesecureboot build, enabled when WITH_BEARSSL=y WITH_LOADER_EFI_SECUREBOOT=y. Copy EDK2 files related to secure boot to sys/contrib/edk2 and delete duplicates under libsecreboot/efi/include. Adjust efi_variables.c to build in the new environment. Undefine MIN and MAX before include sys/param.h in libsecureboot.h. I'm not sure that sys/param.h is needed here, but either the param.h or the Base.h definitions are fine. Fix include paths to reflect the new way. Fixes: 43b8edb32051 Sponsored by: Netflix
* edk2: Import UefiCpuPkg/Include/Protocol/RiscVBootProtocol.hWarner Losh2025-11-171-0/+34
| | | | | | | | | Import UefiCpuPkg/Include/Protocol/RiscVBootProtocol.h to Include/Protocol. This is another direct copy that needs to be carefully considered in future imports. For now, it's easier to add this incrementally here. Sponsored by: Netflix
* Base.h: Ifdef out always char purity test.Warner Losh2025-11-171-1/+1
| | | | | | | | | Now that we've moved to always using this, it turns out the the funky thing we have for L'a' is everywhere. Removing this check until I can sort it out. This breaks the build on armv7 otherwise. Fixes: 43b8edb32051 Sponsored by: Netflix
* edk2: Bring in Guid/Fdt.hWarner Losh2025-11-161-0/+22
| | | | | | | | This one is from EmbeddedPkg/Include/Guid/Fdt.h, which is our first EmbeddedPkg addition. For the moment, I'm doing this as an ad-hoc basis, but in the next import may need to reconsider the strategy. Sponsored by: Netflix
* tpm20: Bring in the edk2 includes for TPM 2.0 supportWarner Losh2025-11-164-0/+5035
| | | | | | | Bring these in from edk2-stable202502. They will be used in a forthcoming TPM 2.0 support code. Sponsored by: Netflix
* edk2: Pull in more headers from edk2Warner Losh2025-11-16107-0/+32156
| | | | | | | | | | | | | | | Pull in more headers from edk2-stable202502 that will be needed as we transition the building to using only EDK2 headers in the boot loader, finally ditching our home-grown ones from a super-obsolete SDK from the early days of EFI. Note to future importers: My apologies if this not being a mege commit causes problems. Except for ProcessorBind.h, all files should be exactly as we got them from EDK2, and if that breaks the build on future imports, we should adjust our code. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D53654
* edk2: Tweak the tests for UEFI Specification Data Type requirementsWarner Losh2025-11-161-0/+2
| | | | | | | | | | | | On x86 these trigger for 32-bit builds. We only ever (will) do that for the 32-bit loader that starts a 64 bit kernel for ia32. For the moment, take the training wheels off, though most likely some compile flags need to be used to change the i386 ABI to force *int64_t alignment to 64 bits or some other horror as yet ill-concieved. Despite this assertion, the ia32 to boot 64-bit kernels loaders seem to work. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D53653
* edk2: Move ProcessorBind.h to contrib/edk2Warner Losh2025-11-161-0/+11
| | | | | | | | | | | | | | | | | | | Have our own ProcessorBind.h. It just includes sys/efi-edk2.h, but undefines TRUE, FALSE and MAC. The first two are from acpica and are redefined to something almost the same. MAC is a global option that, well, interferes with using EDK2, dangit. I suppose I should redefine it after, but I don't think you can save the value of a pre-processor variable. This breaks a little with the tradition of having this in a seprate directory and using build magic. However, the build is already magical enough and having this here makes things less magical. Also, EDK2 puts this in a processor specific directory, so we won't have conflicts (they need it there since they run on more processors than we do: we can just include sys/efi-edk2.h which covers the smallar variance we have in processors). Sponsored by: Netflix
* edk2: #ifdef out STATIC_ASSERTS when !_STANDALONEWarner Losh2025-04-231-0/+7
| | | | | | | | | | | All FreeBSD ABIs do not conform to the EDK2 preconditions (except boot loader). These asserts test those things. Since the code from EDK2 that we use does not depend on L" and L' details, commenting them out is fine. Note: This was not in the update since I had to redo it too many times due to lost races and it was a tricky update. Sponsored by: Netflix
* edk2: Merge edk2-stable202502Warner Losh2025-04-2335-8215/+8050
| | | | | | | | | | | | | | | | | | | Merge in edk2 stable202502 to pick up latest definitions. This is a subset import, as outlined in FREEBSD-update, since the full thing has only gotten larger. I also had to disable building of libefivar for i386 build. The precondition for EDK2 isn't met by our ABI there. And we can't call EFIRT there anyway. We normally don't build the EFI binaries for i386 anyway. We likely never should have built this, but disabling one library in 32-bit mode is hard. I also had to ifdef the L" and L' asserts on _STANDALONE. In the boot loader build enviornment, we met these conditions. All the other places we do not. But we also are careful to massage the code so that we do not depend on these preconditions. Sponsored by: Netflix
* LoongArch: sys/contrib/edk2: add supportyu shan wei2025-04-223-1/+41
| | | | | | | | | copy from upstream: https://github.com/tianocore/edk2/tree/edk2-stable202408 commit: https://github.com/tianocore/edk2/commit/cd24eb578bb77e6a55d37c2e9afef4a6814a82ac Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1624
* Update edk2 headers to stable202005Mitchell Horne2020-06-0436-2806/+1866
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use these to compile libefivar. The particular motivation for this update is the inclusion of the RISC-V machine definitions that allow us to build the library on the platform. This support could easily have been submitted as a small local diff, but the timing of the release coincided with this work, and it has been over 3 years since these sources were initially imported. Note that this comes with a license change from regular BSD 2-clause to the BSD+Patent license. This has been approved by core@ for this particular project [1]. As with the original import, we retain only the subset of headers that we actually need to build libefivar. I adapted imp@'s process slightly for this update: # Generate list of the headers needed to build cp -r ../vendor/edk2/dist/MdePkg/Include sys/contrib/edk2 cd lib/libefivar make pushd `make -V .OBJDIR` cat .depend*.o | grep sys/contrib | cut -d' ' -f 3 | sort -u | sed -e 's=/full/path/sys/contrib/edk2/==' > /tmp/xxx popd # Merge the needed files cd ../../sys/contrib/edk2 svn revert -R . for i in `cat /tmp/xxx`; do svn merge -c VendorRevision svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/$i $i done svn merge -c VendorRevision svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/MdePkg.dec MdePkg.dec [1] https://www.freebsd.org/internal/software-license.html Notes: svn path=/head/; revision=361802
* Copy needed include files from EDK2. This is a minimal set gleenedWarner Losh2017-03-0836-0/+35402
from the .depend files after the build: cp -r ../vendor/edk2/MdePkg/Include sys/contrib/edk2 cd lib/libefivar make pushd `make -V .OBJDIR` cat .depend*.o | grep sys/contrib | cut -d' ' -f 3 | sort -u | sed -e 's=/full/path/sys/contrib/edk2/==' > /tmp/xxx popd cd ../../sys/contrib/edk2 rm -rf Include for i in `cat /tmp/xxx`; do svn cp svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/$i $i done svn cp svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/MdePkg.dec . The original EDK2 repo is ~265MB, the MdePkg is ~23MB, all MdePkg/Includes is ~7MB and this minimal set is ~1.3MB. Sponsored by: Netflix Notes: svn path=/head/; revision=314890