[SeaBIOS] [PATCH v2 0/2] Add IPMI SMBIOS/ACPI support

Corey Minyard tcminyard at gmail.com
Mon Aug 13 21:30:52 CEST 2012


On 08/13/2012 10:15 AM, Gleb Natapov wrote:
> On Mon, Aug 13, 2012 at 09:47:50AM -0500, Corey Minyard wrote:
>> On 08/13/2012 01:25 AM, Gleb Natapov wrote:
>>> On Sun, Aug 12, 2012 at 08:22:12PM -0500, Corey Minyard wrote:
>>>>> Patch 2 is complex and I don't fully understand what it is doing.  A
>>>>> quick scan leads me to believe it is constructing a dynamic SSDT -
>>>>> though it's not clear why a dynamic SSDT is needed and why the
>>>>> existing mechanism (see build_ssdt()) for generating dynamic SSDTs is
>>>>> not used.
>>>> It is constructing an addition to the DSDT table that is tacked on
>>>> to the end of that table if IPMI is present.  It is complex, but
>>>> building ACPI namespace data is complex, and the data is not fixed
>>>> length.
>>>>
>>> You do not need to construct IPMI device dynamically in DSDT. Write it
>>> in AML and have _STA method that tells OSPM if device is present or not.
>> There are lots of different options for IPMI devices.  There are
>> three different interface types, with two string lengths.  They can
>> all appear at arbitrary places in I/O or memory space.  They can
>> have an interrupt or not.  I would like to be able to represent all
>> off the possibilities so users can simulate any arbitrary machine
>> they want.
>>
>> I considered writing it in AML 8 times and figuring the offsets to
>> set the various values, but that seems rather messy to me.
>>
> How different are they. Can you give human readable example?

Here are the examples from the IPMI spec.  I lied a little bit, there 
are actually four standard  interfaces (one can be on an SMBus), but 
it's a different thing to manage, I think.

-corey


Device(MI0) {
   Name(_HID, EISAID("IPI0001"))
   Name(_STR, Unicode("IPMI_SMIC"))
   Name(_UID, 0) // UID for the primary IPMI system interface in the system
   Name(_CRS,
     ResourceTemplate() {
       IO(Decode16, 0xCA9, 0, 3) // Ports 0xCA9, 0xCAA & 0xCAB
     }
   )
   Method(_IFT) {
     Return(0x02) // IPMI SMIC
   }
   Method(_SRV) {
     Return(0x0100) // IPMI Specification Revision 1.0
   }
   //This interface does not support interrupt
}

Device(MI0) {
   Name(_HID, EISAID("IPI0001"))
   Name(_STR, Unicode("IPMI_KCS"))
   Name(_UID, 0)
   Name(_CRS,
     ResourceTemplate() {
       QWordMemory(
         ResourceConsumer,
         PosDecode,
         MinFixed,
         MaxFixed,
         NonCacheable,
         ReadWrite,
         0xFFFFFFFFFFFFFFFF, // _GRA, Address granularity.
         0x80000FFFFC020CA2, // _MIN, Address range minimum
         0x80000FFFFC020CA4, // _MAX, Address range max
         0x0000000000000000, // _TRA, Translation.
         0x0000000000000002, // _LEN, Address range length
         ,                   // Resource Source Index
         ,                   // Resource Source Name
         ,                   // A name to refer back to this resource
         ,                   // _MTP, Nothing=>AddressRangeMemory
         ,                   // _TTP, Translation. Nothing=>TypeStatic
       )
     }
   )
   Method(_IFT) {
     Return(0x01) // IPMI KCS
   }
   Method(_SRV) {
     Return(0x0100) // IPMI Specification Revision 1.0
   }
   // This interface does not support interrupt
}

Device(MI0)
{
   Name(_HID, EISAID("IPI0001"))
   Name(_STR, Unicode("IPMI_BT"))
   Name(_UID, 0)
   Name(_CRS,
     ResourceTemplate() {
       IO(Decode16, 0x0E4, 0, 3) // Ports 0xE4h:E6h
       Interrupt(ResourceProducer,...){20} // GSI is 20
     }
   )
   // Returns the interface type
   Method(_IFT) {
     Return(0x03) // IPMI BT
   }
   // Returns the interface specification revision
   Method(_SRV) {
     Return(0x0150) // IPMI Specification Revision 1.5
   }
}


Device (SMB0) // example SMBus host controller
{
   Name(_HID, "<Vendor-Specific HID>") // Vendor-Specific HID
   Name(_UID, 0) // Unique ID of particular host controller
   :
   :
   Device (SSIF)
   {
     Name(_HID,"IPI0001") // IPMI system interface
     Name(_UID, 0) // Unique device identifier
     Name(_STR, Unicode("IPMI_SSIF"))
     // Returns the interface type
     Method _IFT
     {
       Return(0x04)
     }
     // Returns the SSIF slave address
     Method _ADR
     {
       Return(0x10)
     }
     Method(_SRV)
     {
       Return(0x0200) // IPMI Specification Version 2.0
     }
   } // end Device SSIF
} // end Device SMB0




More information about the SeaBIOS mailing list