aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2025-11-16 17:34:33 +0000
committerWarner Losh <imp@FreeBSD.org>2025-11-16 18:29:03 +0000
commit67c7e94315ffeaa55e3dcf2f6066cb8fe483b5c2 (patch)
tree09152068ff7e95fa9ca6800d0ee683e4a5b6c49d
parentce1342883e03e6a021f03a49d13539a145d320e2 (diff)
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
-rw-r--r--lib/libefivar/ProcessorBind.h3
-rw-r--r--sys/contrib/edk2/Include/ProcessorBind.h11
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/libefivar/ProcessorBind.h b/lib/libefivar/ProcessorBind.h
deleted file mode 100644
index 6985a193cff9..000000000000
--- 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 <sys/efi-edk2.h>
diff --git a/sys/contrib/edk2/Include/ProcessorBind.h b/sys/contrib/edk2/Include/ProcessorBind.h
new file mode 100644
index 000000000000..d67c4aa99b19
--- /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 <sys/efi-edk2.h>
+