From c1ab36f54de61baa5afb53b4e4d87a0553a035e0 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Tue, 20 Feb 2018 19:21:34 +0000 Subject: [PATCH] lualoader: Ignore ACPI bits on !i386 --- stand/lua/core.lua | 6 +++++- stand/lua/menu.lua | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index 043b08be3b6..3c51cc3d544 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -218,6 +218,10 @@ function core.isSerialBoot() return false; end +function core.isSystem386() + return (loader.machine_arch == "i386"); +end + -- This may be a better candidate for a 'utility' module. function core.shallowCopyTable(tbl) local new_tbl = {}; @@ -235,7 +239,7 @@ end -- generally be set upon execution of the kernel. Because of this, we can't (or -- don't really want to) detect/disable ACPI on !i386 reliably. Just set it -- enabled if we detect it and leave well enough alone if we don't. -if (core.getACPIPresent(false)) then +if (core.isSystem386()) and (core.getACPIPresent(false)) then core.setACPI(true); end return core; diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index 9f67190ea34..53c6a19a86e 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -128,6 +128,7 @@ menu.boot_options = { -- acpi { entry_type = core.MENU_ENTRY, + visible = core.isSystem386, name = function() return OnOff(color.highlight("A") .. "CPI :", core.acpi);