[SeaBIOS] [PATCH v2 0/6] Build PCI hotplug SSDT from a single template

Paolo Bonzini pbonzini at redhat.com
Fri Aug 3 17:57:41 CEST 2012


Il 03/08/2012 16:53, Jason Baron ha scritto:
> I think this patch should be ok. Its harder for me in the sense that I
> need to re-do my patch :)
> 
> Here's my current ssdt-pcihp.dsl patch, maybe Paolo can spot if there
> would be any conflicts. I suspect, the auto generation that Paolo is
> doing is actually going to simplify things in general for these typtes
> of nested tables.

There are two parts here.

One is the actual declaration of the devices, and here I think my patch
is actually going to simplify things a bit.  The second level of devices
can stay in ssdt-pcihp.dsl, and it will just work.

The second is the huge PCNT method.  I made a couple of (feeble)
attempts at rewriting it using DerefOf, like this:

        Name(DEVS, Package(32) { Zero,
            ".S01_", ".S02_", ".S03_", ".S04_", ".S05_", ".S06_",
            ".S07_",
            ".S08_", ".S09_", ".S0A_", ".S0B_", ".S0C_", ".S0D_",
            ".S0E_", ".S0F_",
            ".S10_", ".S11_", ".S12_", ".S13_", ".S14_", ".S15_",
            ".S16_", ".S17_",
            ".S18_", ".S19_", ".S1A_", ".S1B_", ".S1C_", ".S1D_",
            ".S1E_", ".S1F_" })

        Method(PCNT, 2) {
            If (LGreater(Arg0, Zero)) {
                Store("\\_SB.PCI0", Local0)
                Concatenate(Local0, DerefOf(Index(\_SB.PCI0.DEVS,
                                                  Arg1)), Local0)
                Notify(DerefOf(Local0), Arg1)
            }
        }

(the above for no bridges) but it doesn't work.

The simplest possibility here is to just move it to the DSDT, as in my
v1.  Generating the nested AML ifs is a bit tedious to write, but the
outcome should be easy to read.

Paolo



More information about the SeaBIOS mailing list