Date: Thu, 26 Jan 2006 16:54:12 +0100 From: Bruno Ducrot <ducrot@poupinou.org> To: Surer Dink <surerlistmail@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: CPU/case/disk temperature sensors for Dell PowerEdge 2850 Message-ID: <20060126155412.GB11603@poupinou.org> In-Reply-To: <b00a10c30601251239y3e345b0ci8ad23520c938691d@mail.gmail.com> References: <b00a10c30601241548p7bbdcdc5o8634226c65e911f3@mail.gmail.com> <20060125134441.GA11603@poupinou.org> <b00a10c30601251239y3e345b0ci8ad23520c938691d@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jan 25, 2006 at 03:39:44PM -0500, Surer Dink wrote: > On 1/25/06, Bruno Ducrot <ducrot@poupinou.org> wrote: > > > > On Tue, Jan 24, 2006 at 06:48:37PM -0500, Surer Dink wrote: > > > I have tried every means I could find to read the temperature sensors > > (CPU, > > > case, disk) on Dell PowerEdge 2850 machines, and none seem to work. Has > > > anyone had success in doing this? If such support does not exist, what > > > would be required to add it? If needed, I am willing to finance (within > > > reason) development of this feature. [I was told that Linux and Windows > > > software to read this information is available, so I assume this is > > > possible.] > > > > First, install sysutils/freeipmi, then try it by this command: > > # bmc-info > > > > If it don't work, or loop forever, please install > > dmidecode (sysutils/dmidecode) then give us the output from > > it for the type entry 38 (IPMI Device Information). > > > bmc-info hangs, output of dmidecode for type 38 is: > Handle 0x2600 > DMI type 38, 18 bytes. > IPMI Device Information > Interface Type: KCS (Keyboard Control Style) > Specification Version: 1.5 > I2C Slave Address: 0x10 > NV Storage Device: Not Present > Base Address: 0x0000000000000CA8 (I/O) > Register Spacing: 32-bit Boundaries > > Incidentally, I attempted the same on other servers (Dell 2550 and some > Supermicros) and they do not contain a "type 38" at all... The DMI stuff is more or less optional. If not present, this won't means IPMI is not there. For both Dell 2550 (this time..) and the Supermicros, if there are some remote cards control then FreeIPMI should work even if no such handle does not exist at all. If this won't work, for the supermicro at least I think sysutils/mbmon may work. Back to the Dell 2850, the problem is the 'Register Spacing: 32-bit Boundaries' line. FreeIPMI 0.1.3 does not implement this feature and use always the default 8-bit boundary. The symptom is that bmc-info hang forever. Fortunately, the next release will include this support. By now, there is a beta available but no port has been done. By now, you can try to copy the attached file to ports/sysutils/freeipmi/files and rebuild the port. -- Bruno Ducrot -- Which is worse: ignorance or apathy? -- Don't know. Don't care. --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-correct-sizes --- libfreeipmi/src/ipmi-kcs-interface.c 2006/01/26 11:20:55 1.1 +++ libfreeipmi/src/ipmi-kcs-interface.c 2006/01/26 11:24:14 @@ -70,11 +70,11 @@ #include "freeipmi.h" #if defined(__FreeBSD__) -#define _INB(port) inb (port) -#define _OUTB(data, port) outb (port, data) +#define _INL(port) inl (port) +#define _OUTL(data, port) outl (port, data) #else -#define _INB(port) inb (port) -#define _OUTB(data, port) outb (data, port) +#define _INL(port) inL (port) +#define _OUTL(data, port) outL (data, port) #endif static u_int64_t kcs_poll_count; @@ -115,7 +115,7 @@ #ifdef __FreeBSD__ #ifdef USE_IOPERM /* i386_set_ioperm has known problems on FBSD 5.x (bus errors). */ - return (i386_set_ioperm(sms_io_base, 0x02, 0x01)); + return (i386_set_ioperm(sms_io_base, 0x08, 0x01)); #else /* Opening /dev/io raises IOPL bits for current process. */ /* XXX This fd will remain open until exit as there is no @@ -206,7 +206,7 @@ int8_t ipmi_kcs_get_status (u_int16_t sms_io_base) { - return _INB (IPMI_KCS_REG_STATUS (sms_io_base)); + return _INL (IPMI_KCS_REG_STATUS (sms_io_base)); } /* @@ -244,7 +244,7 @@ int8_t ipmi_kcs_read_byte (u_int16_t sms_io_base) { - return _INB (IPMI_KCS_REG_DATAOUT (sms_io_base)); + return _INL (IPMI_KCS_REG_DATAOUT (sms_io_base)); } /* @@ -253,7 +253,7 @@ void ipmi_kcs_read_next (u_int16_t sms_io_base) { - _OUTB (IPMI_KCS_CTRL_READ, IPMI_KCS_REG_DATAIN (sms_io_base)); + _OUTL (IPMI_KCS_CTRL_READ, IPMI_KCS_REG_DATAIN (sms_io_base)); } /* * Set up channel for writing. @@ -261,7 +261,7 @@ void ipmi_kcs_start_write (u_int16_t sms_io_base) { - _OUTB (IPMI_KCS_CTRL_WRITE_START, IPMI_KCS_REG_CMD (sms_io_base)); + _OUTL (IPMI_KCS_CTRL_WRITE_START, IPMI_KCS_REG_CMD (sms_io_base)); } /* @@ -270,7 +270,7 @@ void ipmi_kcs_write_byte (u_int16_t sms_io_base, u_int8_t byte) { - _OUTB (byte, IPMI_KCS_REG_DATAIN (sms_io_base)); + _OUTL (byte, IPMI_KCS_REG_DATAIN (sms_io_base)); } /* @@ -279,7 +279,7 @@ void ipmi_kcs_end_write (u_int16_t sms_io_base) { - _OUTB (IPMI_KCS_CTRL_WRITE_END, IPMI_KCS_REG_CMD (sms_io_base)); + _OUTL (IPMI_KCS_CTRL_WRITE_END, IPMI_KCS_REG_CMD (sms_io_base)); } /* @@ -288,7 +288,7 @@ void ipmi_kcs_get_abort (u_int16_t sms_io_base) { - _OUTB (IPMI_KCS_CTRL_GET_ABORT, IPMI_KCS_REG_CMD (sms_io_base)); + _OUTL (IPMI_KCS_CTRL_GET_ABORT, IPMI_KCS_REG_CMD (sms_io_base)); } int8_t --- libfreeipmi/src/ipmi-kcs-interface.h 2006/01/26 11:20:55 1.1 +++ libfreeipmi/src/ipmi-kcs-interface.h 2006/01/26 11:24:42 @@ -49,8 +49,8 @@ /* IPMI KCS SMS Interface Registers */ #define IPMI_KCS_REG_DATAIN(sms_io_base) (sms_io_base) #define IPMI_KCS_REG_DATAOUT(sms_io_base) (sms_io_base) -#define IPMI_KCS_REG_CMD(sms_io_base) (sms_io_base+1) -#define IPMI_KCS_REG_STATUS(sms_io_base) (sms_io_base+1) +#define IPMI_KCS_REG_CMD(sms_io_base) (sms_io_base+4) +#define IPMI_KCS_REG_STATUS(sms_io_base) (sms_io_base+4) /* KCS Interface Status Register Bits */ /* Scheme BIT Calculator Example --7JfCtLOvnd9MIVvH--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060126155412.GB11603>