Skip to content

Commit cc5ada7

Browse files
committed
Merge tag 'for-linus-4.17' of git://github.com/cminyard/linux-ipmi
Pull IPMI updates from Corey Minyard: "Mostly small changes, as usual. This does add an IPMI BMC server-side driver, to allow a Linux system to act as an IPMI controller. That's the biggest change, but it is just a new driver that is fairly narrow in use. The other largish change is removing ACPI SPMI probe support, which should have never really been there in the beginning" * tag 'for-linus-4.17' of git://github.com/cminyard/linux-ipmi: ipmi/parisc: Add IPMI chassis poweroff for certain HP PA-RISC and IA-64 servers ipmi_ssif: Fix kernel panic at msg_done_handler ipmi:pci: Blacklist a Realtek "IPMI" device ipmi: Remove ACPI SPMI probing from the system interface driver ipmi: Remove ACPI SPMI probing from the SSIF (I2C) driver ipmi: missing error code in try_smi_init() ipmi: use ARRAY_SIZE for poweroff_functions array sizing calculation ipmi: Consolidate cleanup code ipmi: Remove some unnecessary initializations ipmi: Fix some error cleanup issues ipmi: Add or fix SPDX-License-Identifier in all files ipmi: Re-use existing macros for built-in properties ipmi:pci: Make the PCI defines consistent with normal Linux ones ipmi: kcs_bmc: coding-style fixes and use new poll type char/ipmi: add documentation for sysfs interface ipmi: kcs_bmc: mark expected switch fall-through in kcs_bmc_handle_data ipmi: add an Aspeed KCS IPMI BMC driver ipmi: add a KCS IPMI BMC driver
2 parents 77624cd + c6185e2 commit cc5ada7

35 files changed

+1349
-675
lines changed
Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
What: /sys/devices/platform/ipmi_bmc.*/firmware_revision
2+
Date: Mar, 2006
3+
KernelVersion: v2.6.17
4+
5+
Description:
6+
(RO) The major and minor revision of the firmware.
7+
8+
9+
What: /sys/devices/platform/ipmi_bmc.*/aux_firmware_revision
10+
Date: Mar, 2006
11+
KernelVersion: v2.6.17
12+
13+
Description:
14+
(RO) Holds additional information about the firmware revision,
15+
such as boot block or internal data structure version numbers.
16+
The meanings of the numbers are specific to the vendor
17+
identified by Manufacturer ID.
18+
19+
20+
What: /sys/devices/platform/ipmi_bmc.*/revision
21+
Date: Mar, 2006
22+
KernelVersion: v2.6.17
23+
24+
Description:
25+
(RO) Device revision. Useful for identifying if significant
26+
hardware changes have been made to the implementation of the
27+
management controller.
28+
29+
30+
What: /sys/devices/platform/ipmi_bmc.*/provides_device_sdrs
31+
Date: Mar, 2006
32+
KernelVersion: v2.6.17
33+
34+
Description:
35+
(RO) Indicates whether device provides device sensor data
36+
records (1) or not (0).
37+
38+
39+
What: /sys/devices/platform/ipmi_bmc.*/device_id
40+
Date: Mar, 2006
41+
KernelVersion: v2.6.17
42+
43+
Description:
44+
(RO) Device id is specified by the manufacturer identified by
45+
the Manufacturer ID field. This field allows controller specific
46+
software to identify the unique application command, OEM
47+
fields, and functionality that are provided by the controller
48+
49+
50+
What: /sys/devices/platform/ipmi_bmc.*/additional_device_support
51+
Date: Mar, 2006
52+
KernelVersion: v2.6.17
53+
54+
Description:
55+
(RO) Lists the IPMI ‘logical device’ commands and functions
56+
that the controller supports that are in addition to the
57+
mandatory IPM and Application commands.
58+
59+
60+
What: /sys/devices/platform/ipmi_bmc.*/ipmi_version
61+
Date: Mar, 2006
62+
KernelVersion: v2.6.17
63+
64+
Description:
65+
(RO) Displays the IPMI Command Specification Version.
66+
67+
68+
What: /sys/devices/platform/ipmi_bmc.*/manufacturer_id
69+
Date: Mar, 2006
70+
KernelVersion: v2.6.17
71+
72+
Description:
73+
(RO) Identifies the manufacturer responsible for the
74+
specification of functionality of the vendor (OEM)-specific
75+
commands, codes, and interfaces used in the controller.
76+
77+
78+
What: /sys/devices/platform/ipmi_bmc.*/product_id
79+
Date: Mar, 2006
80+
KernelVersion: v2.6.17
81+
82+
Description:
83+
(RO) Displays a number that identifies a particular system,
84+
module, add-in card, or board set. The number is specified
85+
according to the manufacturer given by Manufacturer ID.
86+
87+
For detailed definitions of the above attributes, refer to section 20.1 'Get
88+
Device ID Command' of the IPMI specification v2.0.
89+
90+
91+
What: /sys/devices/platform/ipmi_bmc.*/guid
92+
Date: Mar, 2006
93+
KernelVersion: v2.6.17
94+
95+
Description:
96+
(RO) A GUID (Globally Unique ID), also referred to as a UUID
97+
(Universally Unique Identifier), for the management controller,
98+
as described in section 20.8 'Get Device GUID Command' of the
99+
IPMI specification v2.0.
100+
101+
102+
What: /sys/devices/platform/ipmi_si.*/type
103+
Date: Sep, 2017
104+
KernelVersion: v4.15
105+
106+
Description:
107+
(RO) The device interface for IPMI "kcs", "smic", "bt" or
108+
"invalid"
109+
110+
What: /sys/devices/platform/ipmi_si.*/idles
111+
What: /sys/devices/platform/ipmi_si.*/watchdog_pretimeouts
112+
What: /sys/devices/platform/ipmi_si.*/complete_transactions
113+
What: /sys/devices/platform/ipmi_si.*/events
114+
What: /sys/devices/platform/ipmi_si.*/interrupts
115+
What: /sys/devices/platform/ipmi_si.*/hosed_count
116+
What: /sys/devices/platform/ipmi_si.*/long_timeouts
117+
What: /sys/devices/platform/ipmi_si.*/flag_fetches
118+
What: /sys/devices/platform/ipmi_si.*/attentions
119+
What: /sys/devices/platform/ipmi_si.*/incoming_messages
120+
What: /sys/devices/platform/ipmi_si.*/short_timeouts
121+
Date: Sep, 2017
122+
KernelVersion: v4.15
123+
124+
Description:
125+
126+
idles: (RO) Number of times the interface was
127+
idle while being polled.
128+
129+
watchdog_pretimeouts: (RO) Number of watchdog pretimeouts.
130+
131+
complete_transactions: (RO) Number of completed messages.
132+
133+
events: (RO) Number of IPMI events received from
134+
the hardware.
135+
136+
interrupts: (RO) Number of interrupts the driver
137+
handled.
138+
139+
hosed_count: (RO) Number of times the hardware didn't
140+
follow the state machine.
141+
142+
long_timeouts: (RO) Number of times the driver
143+
requested a timer while nothing was in
144+
progress.
145+
146+
flag_fetches: (RO) Number of times the driver
147+
requested flags from the hardware.
148+
149+
attentions: (RO) Number of time the driver got an
150+
ATTN from the hardware.
151+
152+
incoming_messages: (RO) Number of asynchronous messages
153+
received.
154+
155+
short_timeouts: (RO) Number of times the driver
156+
requested a timer while an operation was
157+
in progress.
158+
159+
160+
What: /sys/devices/platform/ipmi_si.*/interrupts_enabled
161+
Date: Sep, 2017
162+
KernelVersion: v4.15
163+
164+
Description:
165+
(RO) Indicates whether interrupts are enabled or not. The driver
166+
disables interrupts when it gets into a situation where it
167+
cannot handle messages due to lack of memory. Once that
168+
situation clears up, it will re-enable interrupts.
169+
170+
171+
What: /sys/devices/platform/ipmi_si.*/params
172+
Date: Sep, 2017
173+
KernelVersion: v4.15
174+
175+
Description:
176+
[to be documented]
177+
178+
179+
What: /sys/devices/platform/dmi-ipmi-ssif.*/type
180+
Date: Sep, 2017
181+
KernelVersion: v4.15
182+
183+
Description:
184+
(RO) Shows the IMPI device interface type - "ssif" here.
185+
186+
187+
What: /sys/devices/platform/dmi-ipmi-ssif.*/hosed
188+
What: /sys/devices/platform/dmi-ipmi-ssif.*/alerts
189+
What: /sys/devices/platform/dmi-ipmi-ssif.*/sent_messages
190+
What: /sys/devices/platform/dmi-ipmi-ssif.*/sent_messages_parts
191+
What: /sys/devices/platform/dmi-ipmi-ssif.*/received_messages
192+
What: /sys/devices/platform/dmi-ipmi-ssif.*/received_message_parts
193+
What: /sys/devices/platform/dmi-ipmi-ssif.*/events
194+
What: /sys/devices/platform/dmi-ipmi-ssif.*/watchdog_pretimeouts
195+
What: /sys/devices/platform/dmi-ipmi-ssif.*/flag_fetches
196+
What: /sys/devices/platform/dmi-ipmi-ssif.*/send_retries
197+
What: /sys/devices/platform/dmi-ipmi-ssif.*/receive_retries
198+
What: /sys/devices/platform/dmi-ipmi-ssif.*/send_errors
199+
What: /sys/devices/platform/dmi-ipmi-ssif.*/receive_errors
200+
Date: Sep, 2017
201+
KernelVersion: v4.15
202+
203+
Description:
204+
hosed: (RO) Number of times the hardware didn't
205+
follow the state machine.
206+
207+
alerts: (RO) Number of alerts received.
208+
209+
sent_messages: (RO) Number of total messages sent.
210+
211+
sent_message_parts: (RO) Number of message parts sent.
212+
Messages may be broken into parts if
213+
they are long.
214+
215+
receieved_messages: (RO) Number of message responses
216+
received.
217+
218+
received_message_parts: (RO) Number of message fragments
219+
received.
220+
221+
events: (RO) Number of received events.
222+
223+
watchdog_pretimeouts: (RO) Number of watchdog pretimeouts.
224+
225+
flag_fetches: (RO) Number of times a flag fetch was
226+
requested.
227+
228+
send_retries: (RO) Number of time a message was
229+
retried.
230+
231+
receive_retries: (RO) Number of times the receive of a
232+
message was retried.
233+
234+
send_errors: (RO) Number of times the send of a
235+
message failed.
236+
237+
receive_errors: (RO) Number of errors in receiving
238+
messages.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
* Aspeed KCS (Keyboard Controller Style) IPMI interface
2+
3+
The Aspeed SOCs (AST2400 and AST2500) are commonly used as BMCs
4+
(Baseboard Management Controllers) and the KCS interface can be
5+
used to perform in-band IPMI communication with their host.
6+
7+
Required properties:
8+
- compatible : should be one of
9+
"aspeed,ast2400-kcs-bmc"
10+
"aspeed,ast2500-kcs-bmc"
11+
- interrupts : interrupt generated by the controller
12+
- kcs_chan : The LPC channel number in the controller
13+
- kcs_addr : The host CPU IO map address
14+
15+
16+
Example:
17+
18+
kcs3: kcs3@0 {
19+
compatible = "aspeed,ast2500-kcs-bmc";
20+
reg = <0x0 0x80>;
21+
interrupts = <8>;
22+
kcs_chan = <3>;
23+
kcs_addr = <0xCA2>;
24+
status = "okay";
25+
};

drivers/char/ipmi/Kconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,21 @@ config IPMI_POWEROFF
9696

9797
endif # IPMI_HANDLER
9898

99+
config IPMI_KCS_BMC
100+
tristate
101+
102+
config ASPEED_KCS_IPMI_BMC
103+
depends on ARCH_ASPEED || COMPILE_TEST
104+
select IPMI_KCS_BMC
105+
select REGMAP_MMIO
106+
tristate "Aspeed KCS IPMI BMC driver"
107+
help
108+
Provides a driver for the KCS (Keyboard Controller Style) IPMI
109+
interface found on Aspeed SOCs (AST2400 and AST2500).
110+
111+
The driver implements the BMC side of the KCS contorller, it
112+
provides the access of KCS IO space for BMC side.
113+
99114
config ASPEED_BT_IPMI_BMC
100115
depends on ARCH_ASPEED || COMPILE_TEST
101116
depends on REGMAP && REGMAP_MMIO && MFD_SYSCON

drivers/char/ipmi/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ obj-$(CONFIG_IPMI_SSIF) += ipmi_ssif.o
2121
obj-$(CONFIG_IPMI_POWERNV) += ipmi_powernv.o
2222
obj-$(CONFIG_IPMI_WATCHDOG) += ipmi_watchdog.o
2323
obj-$(CONFIG_IPMI_POWEROFF) += ipmi_poweroff.o
24+
obj-$(CONFIG_IPMI_KCS_BMC) += kcs_bmc.o
2425
obj-$(CONFIG_ASPEED_BT_IPMI_BMC) += bt-bmc.o
26+
obj-$(CONFIG_ASPEED_KCS_IPMI_BMC) += kcs_bmc_aspeed.o

drivers/char/ipmi/bt-bmc.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1+
// SPDX-License-Identifier: GPL-2.0+
12
/*
23
* Copyright (c) 2015-2016, IBM Corporation.
3-
*
4-
* This program is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU General Public License
6-
* as published by the Free Software Foundation; either version
7-
* 2 of the License, or (at your option) any later version.
84
*/
95

106
#include <linux/atomic.h>

drivers/char/ipmi/ipmi_bt_sm.c

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,12 @@
1+
// SPDX-License-Identifier: GPL-2.0+
12
/*
23
* ipmi_bt_sm.c
34
*
45
* The state machine for an Open IPMI BT sub-driver under ipmi_si.c, part
56
* of the driver architecture at http://sourceforge.net/projects/openipmi
67
*
78
* Author: Rocky Craig <[email protected]>
8-
*
9-
* This program is free software; you can redistribute it and/or modify it
10-
* under the terms of the GNU General Public License as published by the
11-
* Free Software Foundation; either version 2 of the License, or (at your
12-
* option) any later version.
13-
*
14-
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15-
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17-
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18-
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
20-
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21-
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
22-
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
23-
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24-
*
25-
* You should have received a copy of the GNU General Public License along
26-
* with this program; if not, write to the Free Software Foundation, Inc.,
27-
* 675 Mass Ave, Cambridge, MA 02139, USA. */
9+
*/
2810

2911
#include <linux/kernel.h> /* For printk. */
3012
#include <linux/string.h>

drivers/char/ipmi/ipmi_devintf.c

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// SPDX-License-Identifier: GPL-2.0+
12
/*
23
* ipmi_devintf.c
34
*
@@ -8,27 +9,6 @@
89
910
*
1011
* Copyright 2002 MontaVista Software Inc.
11-
*
12-
* This program is free software; you can redistribute it and/or modify it
13-
* under the terms of the GNU General Public License as published by the
14-
* Free Software Foundation; either version 2 of the License, or (at your
15-
* option) any later version.
16-
*
17-
*
18-
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
19-
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21-
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22-
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
24-
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25-
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
26-
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
27-
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28-
*
29-
* You should have received a copy of the GNU General Public License along
30-
* with this program; if not, write to the Free Software Foundation, Inc.,
31-
* 675 Mass Ave, Cambridge, MA 02139, USA.
3212
*/
3313

3414
#include <linux/module.h>

0 commit comments

Comments
 (0)