Hi,

> If you mean a DSDT parser then I suspect a full implementation in
> SeaBIOS would be too burdensome.  However, it might be possible to
> introduce a minimal DSDT parser (eg, one that only supports extracting
> constants).

https://git.kraxel.org/cgit/seabios/commit/?h=dsdt&id=d7cdf49ec624f42fa6b42b7f590dd47552d4c92c

~500 lines of code.

qemu microvm:

[ ... ]
dsdt at 0x7ffe0040 (len 335)
    dsdt: RTC, hid PNP0b00, io 0x70 -> 0x71, 1 io+, irq 8
    dsdt: COM1, hid PNP0501, io 0x3f8 -> 0x3ff, irq 4
    dsdt: FWCF, hid QEMU0002, io 0x510 -> 0x51b, sta 0xb
    dsdt: VR07, hid LNRO0005, mem 0xc0000e00 -> 0xc0000fff, irq 23
    dsdt: VR06, hid LNRO0005, mem 0xc0000c00 -> 0xc0000dff, irq 22
[ ... ]

_HID == LNRO0005 are the virtio-mmio devices, so this can work.

qemu pc:
[ ... ]
dsdt at 0x07fe0040 (len 5131)
    dsdt: PCI0, hid PNP0a03
    dsdt: HPET, hid PNP0103, mem 0xfed00000 -> 0xfed003ff, sta method
    dsdt: PX13
    dsdt: ISA
    dsdt: RTC, hid PNP0b00, io 0x70 -> 0x71, 1 io+, irq 8
    dsdt: KBD, hid PNP0303, io 0x60 -> 0x60, 1 io+, irq 1, sta method
    dsdt: MOU, hid PNP0f13, irq 12, sta method
    dsdt: FLPA
    dsdt: FLPA
    dsdt: LPT, hid PNP0400, io 0x378 -> 0x37f, irq 7, sta method
    dsdt: COM1, hid PNP0501, io 0x3f8 -> 0x3ff, irq 4, sta method
    dsdt: COM2, hid PNP0501, io 0x2f8 -> 0x2ff, irq 3, sta method
    dsdt: LNKA, hid PNP0c0f, sta method
    dsdt: LNKB, hid PNP0c0f, sta method
    dsdt: LNKC, hid PNP0c0f, sta method
    dsdt: LNKD, hid PNP0c0f, sta method
    dsdt: LNKS, hid PNP0c0f, sta method
    dsdt: \_SB\PCI0\PRES, hid PNP0a06, io 0xaf00 -> 0xaf0b
    dsdt: \_SB\CPUS, hid ACPI0010
    dsdt: GPE0, hid PNP0A06, io 0xafe0 -> 0xafe3, sta 0xb
    dsdt: PHPR, hid PNP0A06, io 0xae00 -> 0xae13, sta 0xb
    dsdt: FWCF, hid QEMU0002, io 0x510 -> 0x51b, sta 0xb
    dsdt: S00
[ ... ]

If we have this _anyway_ we might use it to figure whenever specific
(isa) hardware is present, keyboard for example.  We need to fix qemu
to not use _STA methods for no good reason, like this one ...

        Device (KBD)
        {
            Name (_HID, EisaId ("PNP0303") 
            Method (_STA, 0, NotSerialized)
            {
                Return (0x0F)
            }

... so it can be checked without a full-blown acpi interpreter.

> FWIW, it's unclear to me if adding a parser would be a net gain when
> compared to adding adhoc fw_cfg files.  In particular, it seems some
> users don't want to enable acpi.

Well, at least for the microvm disk-boot use case there is not really a
way around ACPI, because otherwise the kernel doesn't find the
virtio-mmio devices.

With direct kernel boot (qemu -kernel) one can add the virtio-mmio
devices to the linux command line instead of depending on acpi, but in
that case seabios doesn't need to find virtio-mmio devices anyway so it
would be happy without acpi too.

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

Reply via email to