[SeaBIOS] [PATCH 18/20] acpi: move isa devices to separate file

Kevin O'Connor kevin at koconnor.net
Wed Nov 28 01:54:56 CET 2012


On Tue, Nov 27, 2012 at 07:29:15PM -0500, Kevin O'Connor wrote:
> On Tue, Nov 27, 2012 at 10:21:09AM +0100, Gerd Hoffmann wrote:
> > Stuff them parameterized into #defines, so we can (a) reuse them for
> > q35 and (b) don't duplicate the serial line.
> The only difference I see between the above and the q35 code is
> \_SB.PCI0.PX13 vs \_SB.PCI0.LPC.  However, as I understand it, the
> choice of PX13 or LPC is arbitrary - so I think we should just be able
> to choose a consistent name between the two dsdt codes.  That way we
> shouldn't need the macros.

On second thought - maybe a better solution is to just inject the
field definitons into \_SB.PCI0.ISA and \_SB.PCI0.LPC.

The OperationRegion has to be in the proper device (eg, PX13), but the
Field() can go anywhere.  So, if the PIIX dsdt code had something
like:

       Scope (\_SB.PCI0.ISA) {
           Field (\_SB.PCI0.PX13.P13C, AnyAcc, NoLock, Preserve)
           {
                Offset(0x5f),
               , 7,
               LPEN, 1,         // LPT
                Offset(0x67),
               , 3,
               CAEN, 1,         // COM1
               , 3,
               CBEN, 1,         // COM2
           }
       }

then the isa devices could just access LPEN/CAEN/etc without requiring
an explicit path.

-Kevin



More information about the SeaBIOS mailing list