Hi,

> Could we just parse the static device tree into a local data structure
> though?

Sure.

> Something like:
> 
> struct hlist_head DSDTTree;
> 
> struct dsdt_entry {
>     struct hlist_node node;
>     char *name;  // eg, "_SB.PCI0.ISA.COM1._HID"
>     int type; // eg: Device, Name, Integer, String, ResourceTemplate, other
>     void *value; // points to integer, string, resource template, or NULL
> };
> 
> Once the tree is parsed, it should be simple to walk the in-memory
> linked-list to find desired values later.

I was thinking more about storing a list of devices with parsed data,
i.e. basically put into a linked list what the current code collects
in the parse_dev struct.

Then we can easily lookup the virtio-mmio devices later.  Maybe also
check for isa devices (don't bother waiting for ps2 probe timeout if
acpi says there isn't a keyboard ...).  I don't see any other use
cases.

> FWIW, it should not be difficult to detect the simple case above and
> treat it as simple integer locally.  As before, it does raise the
> question of how far one would want to go down that path though.

I don't want handle methods.

cheers,
  Gerd
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org

Reply via email to