Age | Commit message (Collapse) | Author | Files | Lines |
|
As per IPMI message format NetFn value in present in first 6 bits
while last 2 bits contain LUN value. This needs to be taken care
while printing NetFn value in OPAL logs which is useful while debugging
fails.
[root@fir01 /]# ipmitool raw 0x0a 0x48
47 b1 d0 56
[root@fir01 /]#
>From OPAL Logs
---------------
[133969609199,7] BT: seq 0x3d netfn 0x0a cmd 0x48: Message sent to host
[133975465455,7] BT: seq 0x3d netfn 0x0a cmd 0x48: IPMI MSG done
>From BMC Logs
--------------
IPMIMain: [693 WARNING][corecmdselect.c:913]
Request: Channel:f; Netfn:a; Cmd:48;
IPMIMain: [693 INFO][corecmdselect.c:924]
Response: Channel:f; Netfn:a; Cmd:48; Data:0 47 b1 d0 56
Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com>
Reviewed-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Add a wrapper for the client to be able to invoke the backend
dequeue message function.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Cc: Alistair Popple <alistair@popple.id.au>
Acked-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Not all ipmi related functions check for a valid backend before
attempting to use it. Under normal circumstances this should not
happen as the platform should always register an ipmi backend. However
a system should be able to boot without a functional ipmi backend,
which is sometimes the case during system bringup.
This patch adds presence checks for an ipmi backend before attempting
to use it, thus allowing a system with a non-functional backend to
boot without ipmi.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Now that opal.h includes opal-api.h, there are a bunch of files that
include both but don't need to.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
The boot count sensor is a discrete sensor that is set once the system
is up and running.
On successful boot, the BMC expects the sensor to be set to 2.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
Skiboot now doesn't run the running pollers while holding a lock to
avoid dead-locks. The current implementation of ipmi_queue_msg_sync()
does exactly that while it waits for the pollers to be called.
This patch fixes the problem by releasing the lock prior to calling
the pollers.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Add support for an ipmi watchdog timer. During skiboot initialisation
this patch will cause the system to be reset if opal_run_pollers()
isn't called for more than 60 seconds.
Once the payload is started the watchdog timer will be reset and a
pre-timeout interrupt set. The payload should then receive the
interrupt and call into skiboot which will disable the watchdog timer.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
The read event mechanism is used when the BMC has an asynchronous message
for the host. It sets a flag that we read with Get Message Flags, and then
we read the message using Read Event. This event message contains a SEL
message. There are two OEM SEL messages we expect from the AMI BMC:
- graceful power operations. This is when the BMC wants the host to
power down or reboot.
- PNOR Locking. When the BMC wants to access the PNOR, it requests
that the host not touch it.
This patch implements the parsing.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
When the bt interface sets the SMS_ATN flag, we perform a Get Message
Flags to determine what messages are available.
The only message type currently processed is the Event Message Buffer,
which provides SEL messages for indicating OEM specific events such as
graceful system shutdown and PNOR access requested. These events will be
handled by the IPMI layer in skiboot.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This patch adds support for sending ipmi messages synchronously. This
is necessary to allow messages to be sent during skiboot
initialisation as interrupt servicing/polling is controlled by the
host operating system which is not yet running.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Currently the only functions we have for initialising ipmi messages
with the correct values also allocate memory for the message. In some
cases we want to reuse previously allocated messages to avoid
continually freeing/allocating memory.
This patch introduces a function which (re)initialises a previously
allocated message and converts existing instances of this behaviour
over to the new function.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This is probably not the best collection of things in the world,
but it means that opal.h is much closer to being directly usable
by an OS.
This triggers a bunch of #include fixes throughout the tree.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
By default new ipmi messages are added to the end of the transmission
queue. However sometimes it is necessary to add messages to the start
of the queue. This patch adds a new ipmi function that adds messages
to the start of the transmission queue.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Some tools (eg. ipmitool) that use the Linux ipmi stack send
potentially invalid commands to probe functionality. Currently skiboot
prints an error to the console whenever this happens resulting in
excessive noise when using the Linux ipmi stack.
This patch just removes and/or lowers the logging level of these
errors.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch adds two opal calls (opal_ipmi_send and opal_ipmi_recv)
to allow an operating system to send and receive arbitrary ipmi
messages to the BMC.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Most messages won't require their own error handler. This patch adds a
default handler to ensure we don't leak messages.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This patch adds validation of the ipmi cmd and netfn numbers returned
by the bmc. It also ensures the sequence number is correct by
searching the outstanding message queue for the corresponding sequence
number.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Similar to the use of fsp_present, this is so code can safely call
functions which may not work on the platform they are running on, or as
protection against calling before the device is initialised.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
We moved the rtc code out to its own ipmi driver, so we don't need these
headers anymore.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Previously we were doing synchronous messaging and cranking the bt
state machine from within OPAL. This was not ideal as it could
potentially take control away from the OS for long periods of
time if the BMC is busy. This patch solves the problem using the
opal_poll api to do asynchronous messaging.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The initial implementation of the ipmi stack was still tightly coupled
with the backend (in this case bt). This patch refactors the ipmi code
to use a generic backend device.
The core ipmi messaging functionality and the implementation of
specific commands has also been split into different files.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The original implementation of the bt and ipmi layers required the bt,
ipmi and message data to be allocated separately. This is sub-optimal
as it could cause excessive memory fragmentation. This patch fixes the
problem by adding a function to the bt layer to allocate space for
both the required data and bt/ipmi message.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Create a device-node which will be used by Linux for matching
and use a saner default time if IPMI doesn't work.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Add IPMI GET_SEL_TIME and SET_SEL_TIME commands to the IPMI stack.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
I misread the spec when implementing the chassis control message.
This fixes the message, as well as correcting the naming of the IPMI
fields to better reflect what they represent.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Acked-by: Jeremy Kerr <jeremy.kerr@au.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Rebooting and power down for the Palmetto is done by the BMC, which we
speak to over the BT interface using IPMI. Implement the IPMI chassis
commands which are used for power control, and hook them up to the
palmetto platform callbacks for shutdown and reboot.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch adds a basic IPMI layer to the sapphire core and support
for a BT IPMI interface as found on the Aspeed BMC of the Palmetto
platform
[ Changed the compatible property -- BenH ]
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|