summaryrefslogtreecommitdiffstats
path: root/sys/sys/ipmi.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-09-22 22:11:29 +0000
committerjhb <jhb@FreeBSD.org>2006-09-22 22:11:29 +0000
commitcdd54d372bfbeaef61a9ae75207eb95fcea95a5a (patch)
treeb4530401f4d668bcc04bd21e8a352cd811260fba /sys/sys/ipmi.h
parent22a36e67f2dc507b9d579ccc4b1a81de4741c860 (diff)
downloadFreeBSD-src-cdd54d372bfbeaef61a9ae75207eb95fcea95a5a.zip
FreeBSD-src-cdd54d372bfbeaef61a9ae75207eb95fcea95a5a.tar.gz
Update the ipmi(4) driver:
- Split out the communication protocols into their own files and use a couple of function pointers in the softc that the commuication protocols setup in their own attach routine. - Add support for the SSIF interface (talking to IPMI over SMBus). - Add an ACPI attachment. - Add a PCI attachment that attaches to devices with the IPMI interface subclass. - Split the ISA attachment out into its own file: ipmi_isa.c. - Change the code to probe the SMBIOS table for an IPMI entry to just use pmap_mapbios() to map the table in rather than trying to setup a fake resource on an isa device and then activating the resource to map in the table. - Make bus attachments leaner by adding attach functions for each communication interface (ipmi_kcs_attach(), ipmi_smic_attach(), etc.) that setup per-interface data. - Formalize the model used by the driver to handle requests by adding an explicit struct ipmi_request object that holds the state of a given request and reply for the entire lifetime of the request. By bundling the request into an object, it is easier to add retry logic to the various communication backends (as well as eventually support BT mode which uses a slightly different message format than KCS, SMIC, and SSIF). - Add a per-softc lock and remove D_NEEDGIANT as the driver is now MPSAFE. - Add 32-bit compatibility ioctl shims so you can use a 32-bit ipmitool on FreeBSD/amd64. - Add ipmi(4) to i386 and amd64 NOTES. Submitted by: ambrisko (large portions of 2 and 3) Sponsored by: IronPort Systems, Yahoo! MFC after: 6 days
Diffstat (limited to 'sys/sys/ipmi.h')
-rw-r--r--sys/sys/ipmi.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/sys/sys/ipmi.h b/sys/sys/ipmi.h
index 8832030..578d78c 100644
--- a/sys/sys/ipmi.h
+++ b/sys/sys/ipmi.h
@@ -26,6 +26,9 @@
* $FreeBSD$
*/
+#ifndef __SYS_IPMI_H__
+#define __SYS_IPMI_H__
+
#define IPMI_MAX_ADDR_SIZE 0x20
#define IPMI_MAX_RX 1024
#define IPMI_BMC_SLAVE_ADDR 0x20 /* Linux Default slave address */
@@ -117,3 +120,36 @@ struct ipmi_ipmb_addr {
unsigned char slave_addr;
unsigned char lun;
};
+
+#if defined(__amd64__)
+/* Compatiblity with 32-bit binaries. */
+
+#define IPMICTL_RECEIVE_MSG_TRUNC_32 _IOWR(IPMI_IOC_MAGIC, 11, struct ipmi_recv32)
+#define IPMICTL_RECEIVE_MSG_32 _IOWR(IPMI_IOC_MAGIC, 12, struct ipmi_recv32)
+#define IPMICTL_SEND_COMMAND_32 _IOW(IPMI_IOC_MAGIC, 13, struct ipmi_req32)
+
+struct ipmi_msg32 {
+ unsigned char netfn;
+ unsigned char cmd;
+ unsigned short data_len;
+ uint32_t data;
+};
+
+struct ipmi_req32 {
+ uint32_t addr;
+ unsigned int addr_len;
+ int32_t msgid;
+ struct ipmi_msg32 msg;
+};
+
+struct ipmi_recv32 {
+ int recv_type;
+ uint32_t addr;
+ unsigned int addr_len;
+ int32_t msgid;
+ struct ipmi_msg32 msg;
+};
+
+#endif
+
+#endif /* !__SYS_IPMI_H__ */
OpenPOWER on IntegriCloud