On 11/16/2015 12:29 AM, jung wrote:
> 2015-11-16 10:18 GMT+08:00, Corey Minyard <[email protected]>:
>> On 11/14/2015 09:59 PM, jung wrote:
>>> Hi,all
>>>     In X86 platform, host communication with BMC controller through BT
>>> protocol, and the underlayer of BT is LPC (Low Pin Count), usually we
>>> use LPC in a tranparent mode, if we want to write an 0xa5 to LPC slave
>>> addr 0x2f8, just call outb(0xa5, 0x2f8). Unfortunately, The
>>> recent platform we are developing for has a different case, we have
>>> wrote a lpc driver for it, to complete the same function I must call
>>> verderspecific_lpc_write(0xa5, 0x2f8), thus, the ipmi driver is not
>>> compatiable with our platform. Can you give me some sugguestions, can
>>> ipmi export some symbol for vendors to register their own lpc methold.
>>>
>> It should be easy enough to add a a new setup type.  If you search for
>> io_setup in ipmi_si_intf.c, you will find either mem or port setup.  You
>> could easy add a third that has your vendor-specific I/O.
> As your said, it is easy to add a new setup type.
>         case IPMI_MEM_ADDR_SPACE:
>                 info->io_setup = mem_setup;
>                 info->io.addr_type = IPMI_MEM_ADDR_SPACE;
>                 break;
>         case IPMI_IO_ADDR_SPACE:
>                 info->io_setup = port_setup;
>                 info->io.addr_type = IPMI_IO_ADDR_SPACE;
>                 break;
>         case IPMI_VENDOR_ADDR_SPACE:
>                 info->io_setup = vendor_specific_setup;
>                 info->io.addr_type = IPMI_VENDOR_ADDR_SPACE;
>                 break;
> my question is: I want to submit this code to to kernel. Do you mind
> a vendor-specific function in the general ipmi driver ? Although I will
> use #ifdef for it
> .

An ifdef is not required, though there needs to be some way to detect
this.  You don't need IPMI_VENDOR_ADDR_SPACE, necessarily, but
you need some automatic way to detect that this is your hardware and
it needs special handling.

>> However, my big question is: How you are going to discover the
>> interface?  IPMI has a lot of ways to be discovered (ACPI, DMI,
>> hardcoded, hot-add, openfirmware, and a few others).
> I can use DMI or DT.

DT on x86 is a little unusual, I guess, but not unheard of.

-corey

>> -corey
>>
>>> reguards.
>>>
>>> jung
>>
>
> 2015-11-16 10:18 GMT+08:00, Corey Minyard <[email protected]>:
>> On 11/14/2015 09:59 PM, jung wrote:
>>> Hi,all
>>>     In X86 platform, host communication with BMC controller through BT
>>> protocol, and the underlayer of BT is LPC (Low Pin Count), usually we
>>> use LPC in a tranparent mode, if we want to write an 0xa5 to LPC slave
>>> addr 0x2f8, just call outb(0xa5, 0x2f8). Unfortunately, The
>>> recent platform we are developing for has a different case, we have
>>> wrote a lpc driver for it, to complete the same function I must call
>>> verderspecific_lpc_write(0xa5, 0x2f8), thus, the ipmi driver is not
>>> compatiable with our platform. Can you give me some sugguestions, can
>>> ipmi export some symbol for vendors to register their own lpc methold.
>>>
>> It should be easy enough to add a a new setup type.  If you search for
>> io_setup in ipmi_si_intf.c, you will find either mem or port setup.  You
>> could easy add a third that has your vendor-specific I/O.
>>
>> However, my big question is: How you are going to discover the
>> interface?  IPMI has a lot of ways to be discovered (ACPI, DMI,
>> hardcoded, hot-add, openfirmware, and a few others).
>>
>> -corey
>>
>>> reguards.
>>>
>>> jung
>>
>


------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to