From 67c7e94315ffeaa55e3dcf2f6066cb8fe483b5c2 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sun, 16 Nov 2025 10:34:33 -0700 Subject: [PATCH] edk2: Move ProcessorBind.h to contrib/edk2 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 --- lib/libefivar/ProcessorBind.h | 3 --- sys/contrib/edk2/Include/ProcessorBind.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 lib/libefivar/ProcessorBind.h create mode 100644 sys/contrib/edk2/Include/ProcessorBind.h diff --git a/lib/libefivar/ProcessorBind.h b/lib/libefivar/ProcessorBind.h deleted file mode 100644 index 6985a193cff..00000000000 --- a/lib/libefivar/ProcessorBind.h +++ /dev/null @@ -1,3 +0,0 @@ -/* File in public domain */ -/* Brings in the glue for UEFI/EDK2 Tianocore code to run on this OS */ -#include diff --git a/sys/contrib/edk2/Include/ProcessorBind.h b/sys/contrib/edk2/Include/ProcessorBind.h new file mode 100644 index 00000000000..d67c4aa99b1 --- /dev/null +++ b/sys/contrib/edk2/Include/ProcessorBind.h @@ -0,0 +1,11 @@ +/* + * Copyright 2025 Netflix, Inc + * + * SPDX-License-Idnetifier: BSD-2-Clause + */ +/* These three will be redefined -- well MAC is an option that collides */ +#undef TRUE +#undef FALSE +#undef MAC +#include +