From 9408d0ba3d11ae59420706e0733cbcf0b022db85 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 20 Nov 2023 20:30:16 -0700 Subject: [PATCH] stand: bandaide for acpi Old binaries do not set acpi.rsdp early enough. So when we boot with an older loader.efi from an ESP that's not been updated, we assume there's no ACPI on this system. This is unwise. Put a band-aide on this until we can implement a proper 'feature' variable that the binary reports so we can do conditionals for things like this in the future. This is at best a rapid-response stop-gap. Glanced at by: kevans Sponsored by: Netflix (cherry picked from commit 0abe05aeac29d99786401b9078e97dcead35f7f3) --- UPDATING | 11 +++++++++++ stand/lua/core.lua | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index ee9fb7a3103..d211814b024 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,13 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20240415: + MFC e0f3dc82727f: If you have an arm64 system that uses ACPI, you will + need to update your loader.efi in the ESP when you update past this + point. Detection of ACPI was moved earlier in the binary so the scripts + could use it, but old binaries don't have this, so we default to 'no + ACPI' in this case. + 20240218: MFC of 713db49d06de changed 'struct ieee80211vap' internals in net80211. Given we do not have enough spares and the struct is allocated by @@ -25,6 +32,10 @@ and/or ports. non-compliant MTAs; please see the first 8.18.1 release note in contrib/sendmail/RELEASE_NOTES for mitigations. +20231113: + The WITHOUT_LLD_IS_LD option has been removed. When LLD is enabled + it is always installed as /usr/bin/ld. + 20240119: Commit d34f4baaf138 changed the internal interface between the nfscommon and nfscl modules. As such, both need to be diff --git a/stand/lua/core.lua b/stand/lua/core.lua index 3bbdca3de01..e7ffdc091c0 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -136,9 +136,14 @@ function core.hasACPI() return loader.getenv("acpi.rsdp") ~= nil end +function core.isX86() + return loader.machine_arch == "i386" or loader.machine_arch == "amd64" +end + function core.getACPI() if not core.hasACPI() then - return false + -- x86 requires ACPI pretty much + return false or core.isX86() end -- Otherwise, respect disabled if it's set