acpi-rs/acpid: fix broken initialize_namespace + wire _REG connect

Commit 0c11c2b5 captured a broken intermediate edit of initialize_namespace
(unterminated comment, missing _INI and the _REG hook) via git add -A, which
left the tree not compiling. Restore the correct opening (ACPICA init order)
and extract the _REG opregion connect into a public connect_op_regions()
(ACPICA evrgnini.c): \_SB._REG(space, 1) per installed handler space plus
<device>._REG(space, 1) per device holding an OpRegion of that space.
initialize_namespace() delegates to it. Call it from acpid's interpreter
init (AmlSymbols::init) after region handlers are installed — runs once
before the main loop, so a blocking _REG cannot wedge the scheme.
This commit is contained in:
Red Bear OS
2026-07-24 09:48:28 +09:00
parent 0c11c2b515
commit c3a2771780
+3
View File
@@ -286,6 +286,9 @@ impl AmlSymbols {
for (region, handler) in self.aml_region_handlers.drain(..) {
interpreter.install_region_handler(region, handler);
}
// _REG opregion connect (ACPICA evrgnini.c): runs once at interpreter
// init, before the main loop, so a blocking _REG cannot wedge the scheme.
interpreter.connect_op_regions();
self.aml_context = Some(interpreter);
Ok(())
}