freeipmi-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freeipmi-users] sparc64 compilation errors


From: Albert Chu
Subject: Re: [Freeipmi-users] sparc64 compilation errors
Date: Mon, 19 Mar 2007 06:54:42 -0700 (PDT)
User-agent: SquirrelMail/1.4.6

> ipmi-locate is the first tool we need to get to work. If you have
> already loaded kernel based IPMI modules, please unload them.

A.B.

How would this be an issue?  If the IPMI kernel module is loaded,
libfreeipmi uses it.  Otherwise it moves on into the freeipmi based
drivers.

Al

>> The other problem is, do my sparc have really IPMI?  The thing that
>> makes me thinking that is that the lm_sensors tools(sensors-detect)
>> say to me:
>> Probing for `IPMI BMC KCS' at 0xca0...                      Success!
>>      (confidence 4, driver `bmcsensors')
>> Probing for `IPMI BMC SMIC' at 0xca8...                     Success!
>>      (confidence 4, driver `bmcsensors')
>> but when i search the web for infos about ipmi on it, i don't find
>> anything.  I also tried to check this addresses with a home-prog and
>> i just read 0 value.  Same value in 0xca1 0xca2 etc.. so i think
>> that memory is initialized with zeroes, and so perhaps the
>> sensors-detect adresses!=FF test is false.
>>
>> If you have any idea for helping me to know if i have really IPMI on
>> it.  Anyway, i hope that my works was usefull for you, i saw that
>> some recent sun station have IPMI.
>
> Default IPMI KCS  port is 0x0CA2
> Default IPMI SMIC port is 0x0CA9
>
> It looks like your IPMI KCS and SMIC system interfaces is available on
> non-default port addresses. GNU FreeIPMI uses DMI, SMBIOS, ACPI and
> defaults to probe for system interfaces. May be SMBIOS tables are not
> available on SPARC architecture. Only your BIOS vendor can confirm
> this. If it is the case, we have to skip SMBIOS probe for SPARC
> architecture.
>
> See if any of the following commands shows any useful info about IPMI.
> # dmidecode
> # bmc-info --no-probing -D KCS --driver-address=3232
> and
> # bmc-info --no-probing -D SMIC --driver-address=3240
>
> SMIC is an alternative to KCS system interface. It is very unlikely to
> implement both of them on same board. This makes the validity of
> sensors-detect output suspicious. Best way to confirm is to look at
> the mother board manual or ask your mother board manufacturer.
> Some of Sun's system do support IPMI.
>
>> --- freeipmi-0.3.1/libfreeipmi/src/ipmi-inband.h        2006-09-13
>> 23:23:56.000000000 +0200
>> +++ /freeipmi-0.3.1/libfreeipmi/src/ipmi-inband.h      2007-03-17
>> 17:07:09.000000000 +0100
>> @@ -21,6 +21,8 @@
>>   #ifndef _IPMI_INBAND_H
>>   #define        _IPMI_INBAND_H 1
>>
>> +int devport;
>
> see below..
>
>>   #ifdef __cplusplus
>>   extern "C" {
>>   #endif
>> @@ -40,15 +42,22 @@
>>   # include <sys/io.h>
>>   #elif defined(HAVE_ASM_IO_H)
>>   /* PPC */
>> +#ifndef __ARCH_IS_SPARC__
>>   # include <asm/io.h>
>>   #endif
>> +#endif
>
> #if defined(__FreeBSD__)
> # include <machine/cpufunc.h>
> # include <machine/sysarch.h>
> #elif defined(__NetBSD__) || defined(__OpenBSD__)
> # include <machine/pio.h>       /* inb/outb */
> # include <machine/sysarch.h>   /* sysarch call */
> #elif defined(__ARCH_IS_SPARC__)
> # int _fi_inband_port_fd;
> #elif defined(HAVE_SYS_IO_H)
>
> Rest of the patch is fine, except use a more reserved name
> _fi_inband_port_fd instead of devport. Patch looks fine. Lets get it
> to work now.
>
>>   #if defined(__FreeBSD__) || defined(__NetBSD__) ||
>> defined(__OpenBSD__)
>>   # define _INB(port)  inb (port)
>>   # define _OUTB(data, port)  outb (port, data)
>>   #else
>> +#ifdef __ARCH_IS_SPARC__
>> +# define _INB(port)  printf ("read %d port=%d\n",devport,port)
>> +# define _OUTB(data, port) printf ("write %d port=%d
>> date=%d\n",devport, port,data)
>> +#else /* !__ARCH_IS_SPARC__ */
>>   # define _INB(port)  inb (port)
>>   # define _OUTB(data, port)  outb (data, port)
>> +#endif /* !__ARCH_IS_SPARC__*/
>>   #endif
>
>>   #ifdef __cplusplus
>> --- freeipmi-0.3.1/libfreeipmi/src/ipmi-smic-api.c      2006-09-13
>> 23:23:56.000000000 +0200
>> +++ /freeipmi-0.3.1/libfreeipmi/src/ipmi-smic-api.c    2007-03-17
>> 16:57:21.000000000 +0100
>> @@ -146,7 +146,12 @@
>>     return (ipmi_smic_dev_io_fd == -1 ? -1 : 0);
>>   #endif
>>   #else
>> +#ifdef __ARCH_IS_SPARC__
>> +devport = open("/dev/port",O_RDONLY);
>> +return devport;
>> +#else /* !__ARCH_IS_SPARC__ */
>>     return (iopl (3));
>> +#endif /* !__ARCH_IS_SPARC__ */
>>   #endif
>>   }
>>
>> --- freeipmi-0.3.1/libfreeipmi/src/ipmi-kcs-api.c       2006-07-29
>> 19:05:22.000000000 +0200
>> +++ /freeipmi-0.3.1/libfreeipmi/src/ipmi-kcs-api.c     2007-03-17
>> 16:53:41.000000000 +0100
>> @@ -371,6 +371,10 @@
>>       }
>>   #endif /* !USE_IOPERM */
>>   #else  /* !__FreeBSD__ */
>> +# ifdef __ARCH_IS_SPARC__
>> +devport = open("/dev/port",O_RDONLY);
>> +return devport;
>> +#else /*!__ARCH_IS_SPARC__*/
>>     if (iopl (3) < 0)
>>       {
>>         if (errno == EPERM || errno == EACCES)
>> @@ -379,6 +383,7 @@
>>           ERR_LOG(ctx->errnum = IPMI_KCS_CTX_ERR_INTERNAL);
>>         return (-1);
>>       }
>> +#endif /* !__ARCH_IS_SPARC__*/
>>   #endif/* !__FreeBSD__ */
>>
>>     ctx->io_init = 1;
>
> --
> Anand Babu
> GPG Key ID: 0x62E15A31
> Blog [http://ab.freeshell.org]
> The GNU Operating System [http://www.gnu.org]
> Z RESEARCH Inc [http://www.zresearch.com]
>
>
> _______________________________________________
> Freeipmi-users mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/freeipmi-users
>


-- 
Albert Chu
address@hidden
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory





reply via email to

[Prev in Thread] Current Thread [Next in Thread]