Skip to content

acpi: add DSDT device type#1165

Open
lgfa29 wants to merge 2 commits into
masterfrom
acpi-dsdt-device-type
Open

acpi: add DSDT device type#1165
lgfa29 wants to merge 2 commits into
masterfrom
acpi-dsdt-device-type

Conversation

@lgfa29

@lgfa29 lgfa29 commented Jul 2, 2026

Copy link
Copy Markdown
Member

Allow DsdtGenerator to specify the type of device it is generating code for. The DSDT can then organize devices types in a stable order, regardless of the component name and position in the device map.

Allow `DsdtGenerator` to specify the type of device it is generating
code for. The DSDT can then organize devices types in a stable order,
regardless of the component name and position in the device map.
&PciRootBridge { config: &self.config },
&DsdtGeneratorAml {
scope: DsdtScope::SystemBus,
device_type: None,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the main thought i've got here is: while i think this gives Propolis good control over how to lay out items in the tables (and so, broadly, i'm a fan!) if we have a device on SystemBus and forget to add a stanza to emit the AML here, it'll probably be really confusing and frustrating to debug.

i'm imagining that maybe we could have a bit on devices to report if we've printed their AML, though to_aml_bytes takes &self, so we'd either change that or otherwise do interior mutability. then finally we could have an impl Drop for DsdtConfig that checks our work (and warns or panics or something if there are devices we've forgotten about).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's a good point. Is 8d38895 more or less what you had in mind?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants