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

Michael S. Tsirkin mst at redhat.com
Fri Aug 3 19:52:54 CEST 2012


On Fri, Aug 03, 2012 at 05:57:41PM +0200, Paolo Bonzini wrote:
> 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.

Long term, it is worth exploring whether we can load second
level dynamically when bridge is added by hotplug
or detected by bus scan.

Or even go wild and support bridges of arbitrary depth
(though in practice 1 level is enough for pci and 2 levels
 with level 1 always having 1 child for pci express).


> 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