1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-24 07:40:52 +00:00

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
This commit is contained in:
Warner Losh 2023-11-20 20:30:16 -07:00
parent f213da893c
commit 0abe05aeac
2 changed files with 12 additions and 1 deletions

View File

@ -27,6 +27,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW:
world, or to merely disable the most expensive debugging functionality
at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
20231120:
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.
20231113:
The WITHOUT_LLD_IS_LD option has been removed. When LLD is enabled
it is always installed as /usr/bin/ld.

View File

@ -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