6d48f80bea
- IOAPIC: enable full IOAPIC initialization on AMD/Intel bare metal, dual GSI 0/2 timer mapping for platform compatibility, NMI handler uses raw COM1 PIO writes to avoid mutex deadlock - HPET: counter validation, graceful fallback to PIT when HPET missing - PS/2: fix 0xFE RESEND handling in all MouseState variants, add controller flush/self-test retry/aux port test from Linux 7.0 - ACPI: defer AML evaluation to avoid blocking initfs driver spawn - VT chain: remove duplicate rootfs service files (inputd, vesad, fbcond, getty) that were already handled by initfs phase 1 and the legacy 30_console script from minimal.toml - QEMU verified: boots to login prompt, 20 rootfs units (was 26), single login prompt (was double), only 1 expected error (wifictl)
47 lines
1.8 KiB
Diff
47 lines
1.8 KiB
Diff
Defer AML initialization until PCI registration completes.
|
|
|
|
When acpid starts before pcid has registered the PCI fd, AML
|
|
initialization fails with a misleading ERROR-level message. This is
|
|
expected on every boot because the service ordering requires acpid to
|
|
start before pcid-spawner. The AML interpreter initializes successfully
|
|
after pcid registers via /scheme/acpi/register_pci.
|
|
|
|
Changes:
|
|
- aml_context_mut(): log at DEBUG instead of ERROR when PCI fd is None
|
|
(expected pre-registration state, not a fault)
|
|
- Fadt::init(): skip \\_S5 evaluation when PCI is not yet registered,
|
|
since refresh_s5_values() is retried in register_pci_fd() after PCI
|
|
registration completes
|
|
|
|
diff -urN a/drivers/acpid/src/acpi.rs b/drivers/acpid/src/acpi.rs
|
|
--- a/drivers/acpid/src/acpi.rs
|
|
+++ b/drivers/acpid/src/acpi.rs
|
|
@@ -896,7 +896,11 @@
|
|
match self.init(pci_fd) {
|
|
Ok(()) => (),
|
|
Err(err) => {
|
|
- log::error!("failed to initialize AML context: {}", err);
|
|
+ if pci_fd.is_none() {
|
|
+ log::debug!("AML init deferred until PCI registration: {}", err);
|
|
+ } else {
|
|
+ log::error!("failed to initialize AML context: {}", err);
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
@@ -2004,8 +2008,12 @@
|
|
|
|
context.tables.push(dsdt_sdt);
|
|
|
|
- if let Err(error) = context.refresh_s5_values() {
|
|
- log::warn!("Failed to evaluate \\_S5 during FADT init: {error}");
|
|
+ if context.pci_ready() {
|
|
+ if let Err(error) = context.refresh_s5_values() {
|
|
+ log::warn!("Failed to evaluate \\_S5 during FADT init: {error}");
|
|
+ }
|
|
+ } else {
|
|
+ log::debug!("Deferring \\_S5 evaluation until PCI registration");
|
|
}
|
|
}
|
|
}
|