]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
loader: lua: assume late ACPI detection if the feature isn't enabled
authorKyle Evans <kevans@FreeBSD.org>
Fri, 8 Dec 2023 21:36:06 +0000 (15:36 -0600)
committerKyle Evans <kevans@FreeBSD.org>
Fri, 8 Dec 2023 21:43:59 +0000 (15:43 -0600)
commite183039f0882009c455c3b59fe1ab58a4fd25a5e
tree654db25ec8f4bbc8bd4332ce6c4806bb5db32325
parent1631382cf2820245cc72965498ff174bb548dd63
loader: lua: assume late ACPI detection if the feature isn't enabled

While we're here, enable the feature in the places we detect ACPI.  This
lets us side-step the existing issues and provide a path forward for
folks upgrading from previous releases that haven't updated their ESP
yet.

Let's also fix core.setACPI: the hint already indicates that the
user's disabled it more consistently than loader.acpi_disabled_by_user.
Even more, the latter is wrong because we set it by default if we did
not detect ACPI.  The ACPI hint remains even when we're setting defaults
because ACPI loaded into the kernel will make some noise if it's not
hinted off, even when we didn't detect it.

imp notes that this will result in some relatively harmless noise on
platforms that don't support ACPI but aren't using the UEFI loader, as
we would enable the ACPI module for loading on them and then loader
would not be able to find it.  These are non-fatal, but should probably
be fixed by just declaring support for EARLY_ACPI in those loaders since
we know they won't have ACPI early on -- punting on this for the time
being, though, in favor of providing a safer upgrade path sooner.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D42727
stand/efi/loader/main.c
stand/i386/libi386/biosacpi.c
stand/lua/core.lua