Age | Commit message (Collapse) | Author | Files | Lines |
|
Encode a PLDM platform event message to send the heartbeat to the BMC.
Watchdog is "armed" when a
PLDM_EVENT_MESSAGE_GLOBAL_ENABLE_ASYNC_KEEP_ALIVE is received.
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
In the same way that ipmi-hiomap implements the PNOR access control
protocol, this patch allows to "virtualize" the content of a BMC flash
based on lid files.
Previously, flash PNOR partitions were viewed this way:
partitionXX=NAME, start address, end address, flags
The content of each partition is now stored in a lid file. In order to
continue to use the libflash library, we manually fill in the contents of
a fake flash header when accessing offset 0. This reproduces the behavior
via ipmi-hiomap of reading the flash header on the BMC.
For the reading and writing of BMC lids files, we convert the virtual
addresses of these 'fake' partitions by identifying: lid id.
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
This patch parses the "hb_lid_ids" string from bios tables and complete
the global list of lid files. Each entry in the list contains the name,
the id, the length of the lid file and the virtual address start access.
This virtual address is used for for PNOR Resource Provider operations.
16 MB of VMM address are reserved space per section.
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Retrieve the file handle and file length based on attribute name.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Send/receive a PLDM WriteFile request message.
Due to maximum transfer size for PLDM protocol, we have to send several
write requests, if necessary.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Send/receive a PLDM ReadFile request message.
Due to maximum transfer size for PLDM protocol, we have to send several
read requests, if necessary.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
The ibm/libpldm library implements IBM OEM commands support for PLDM and
specially encode and decode APIs for in-band readFile and writeFile
commands.
The GetFileTable request message is used to retrieve the file table which
contains the list of lid files available and their attributes.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Use the GetFruRecordByOptionReq command to retrieve the bmc information
with: "FRU Field Type": Version
"FRU Record Set Identifier": 1,
"FRU Record Type": "General(1)"
and update the "bmc-firmware-version" device-tree field.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Specification, defines a FRU data format that provides platform asset
information including part number, serial number and manufacturer.
Use the GetFruRecordByOptionReq command to get specific FRU (Field
Replaceable Unit) record according the Record Set Identifier, the Record
Type and the field Type.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
This specification defines the data structures and messages for
communicating BIOS settings, BIOS attributes, boot configurations, and
boot order settings.
Use the GetBIOSTable command to get STRING, Attribute and Attribute values
tables from the BIOS.
The contents of these tables are needed to read/write the desired lid
files located on the BMC.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
This specification defines the data structures and messages for
communicating BIOS settings, BIOS attributes, boot configurations, and
boot order settings.
Use the GetBIOSTable command to get STRING, Attribute and Attribute values
tables from the BIOS.
The content of these tables is useful to read/write the lid files located
on the BMC.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Set the state information of the PLDM effecter identified by:
the entity type (PLDM_ENTITY_SYSTEM_CHASSIS) and the state set
PLDM_STATE_SET_SYSTEM_POWER_STATE with the effecter state:
PLDM_STATE_SET_SYS_POWER_STATE_OFF_SOFT_GRACEFUL to request a platform off.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Set the state information of the PLDM effecter identified by:
the entity type (PLDM_ENTITY_SYS_FIRMWARE) and the state set
PLDM_STATE_SET_SW_TERMINATION_STATUS with the effecter state:
PLDM_SW_TERM_GRACEFUL_RESTART_REQUESTED to request a platform restart.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
PLDM effecters provide a general mechanism for controlling or configuring a
state or numeric setting of an entity.
The entity state and numeric setting values are written into an effecter.
PLDM commands are specified for writing the state or numeric setting to an
effecter. Effecters are identified by and accessed using an EffecterID that
is unique for each effecter within a given terminus.
PLDM State Effecters provide a regular command structure for setting state
information in order to change the state of an entity.
The SetStateEffecterStates command is used to set the state of one or more
effecters within a PLDM State Effecter.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
This specification defines the functions and data structures used for
discovering, describing, initializing, and accessing sensors and effecters
within the management controllers and management devices of a platform
management subsystem using PLDM messaging.
A PDR (Platform Descriptor Record) is a set of data that is used to
provide semantic information about sensors, effecters, monitored or
controller entities, and functions and services within a PLDM
implementation.
PDRs are mostly used to support PLDM monitoring and control and platform
events.
The PDRs for a PLDM subsystem are collected into a single, central PDR
Repository. A central repository provides a single place from which PDR
information can be retrieved.
The GetPDR command is used to retrieve individual PDRs from a PDR
Repository. The record is identified by the PDR recordHandle value that is
passed in the request.
The patch dump all the PDRs within a PDR Repository.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Implement a way for sending PLDM requests for specific PLDM commands.
Send a PLDM request message. Wait for corresponding response message,
which once received, is returned to the caller.
If there's data available, return success only if data is a PLDM response
message that matches instance, pldm_type and command code.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
The GetPLDMVersion command can be used to retrieve the PLDM base
specification versions that the PLDM terminus supports, as well as the
PLDM Type specification versions supported for each PLDM Type.
The reported version for Type 0 (PLDMbase) shall be encoded as 0xF1F1F000.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
The GetPLDMCommands command can be used to discover the PLDM command
capabilities supported by a PLDM terminus for a specific PLDM Type and
version as a responder.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
The GetPLDMTypes command can be used to discover the PLDM type capabilities
supported by a PLDM terminus and to get a list of the PLDM types that are
supported.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
A PLDM Terminus is defined as the point of communication termination for
PLDM messages and the PLDM functions associated with those messages.
Given a PLDM terminus, a mechanism is required that can uniquely identify
each terminus so that the semantic information can be bound to that
identification.
The Terminus ID (TID) is a value that identifies a PLDM terminus.
TIDs are used in PLDM messages when it is necessary to identify the PLDM
terminus that is the source of the PLDM Message.
The GetTID command is used to retrieve the present Terminus ID (TID)
setting for a PLDM Terminus.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
PLDM defines data representations and commands that abstract the platform
management hardware.
A PLDM Terminus (or responder) is defined as the point of communication
termination for PLDM messages and the PLDM functions associated with those
messages.
A PLDM terminus is not required to process more than one request at a time
(that is, it can be "single threaded" and does not have to accept and act
on new requests until it has finished responding to any previous request).
Some PLDM control and discovery requests (PLDM_TYPE = PLDM_BASE) are
mandatory a PLDM terminus has to answer.
These following mandatory PLDM command codes for PLDM messaging control
and discovery will be defined in next patches.
GetTID 0x02
GetPLDMVersion 0x03
GetPLDMTypes 0x04
GetPLDMCommands 0x05
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Enable the mctp binding over LPC bus interface and new wrappers to send
and receive PLDM messages over the mctp library.
PLDM is supported as a message type over MCTP. PLDM over MCTP binding
defines the format of PLDM over MCTP messages.
An MCTP Endpoint is the terminus for MCTP communication. A physical device
that supports MCTP may provide one or more MCTP Endpoints. Endpoints are
addressed using a logical address called the Endpoint ID, or EID. EIDs in
MCTP are analogous to IP Addresses in Internet Protocol networking.
The BMC EID default is 8.
First byte of the PLDM over MCTP Message Fields identifies the MCTP
message as carrying a PLDM message:
Message Type (7 bits) PLDM = 0x01 (000_0001b).
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
The Management Component Transport Protocol (MCTP) defines a communication
model intended to facilitate communication.
This patch initialize MCTP binding over LPC Bus interface.
Several steps must be performed:
- Initialize the MCTP core (mctp_init()).
- Initialize a hardware binding as AST LPC mode host (mctp_astlpc_init()).
- Register the hardware binding with the core (mctp_register_bus()), using
a predefined EID (Host default is 9).
To transmit a MCTP message, mctp_message_tx() is used.
To receive a MCTP message, a callback need to be provided and registered
through mctp_set_rx_all().
For the transfer of MCTP messages, two basics components are used:
- A window of the LPC FW address space, where reads and writes are
forwarded to BMC memory.
- An interrupt mechanism using the KCS interface.
hw/ast-bmc/ast-mctp.c is compilated if the compiler flag CONFIG_PLDM is
set.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Add new lpc helpers for doing a bulk io to firmware space.
Reviewed-by: Abhishek Singh Tomar <abhishek@linux.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
This library implements IBM OEM commands support for PLDM and specially
encode and decode APIs for in-band readFile and writeFile commands.
The source is located here:
https://github.com/openbmc/pldm/tree/master/oem/ibm/libpldm and use as is,
without any update.
The oem IBM libpldm code is integrated into the folder ./pldm/ibm/libpldm
as a set of sources, compilated if the compiler flag CONFIG_PLDM is set.
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Acked-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Platform Level Data Model (PLDM) is a standard application layer
communication protocol defined by the DMTF. PLDM is an effective data and
control source. PLDM defines a method to provide efficient access to
low-level platform inventory, monitoring, control, eventing, and
data/parameters transfer functions such as temperature, fan, voltage,
event logging, and boot control.
PLDM has defined data representations and commands that abstract the
platform management hardware.
The library deals with the encoding and decoding of PLDM messages.
The source is located here:
https://github.com/openbmc/pldm/tree/master/libpldm and use as is, without
any update.
The libpldm code is integrated into the folder ./pldm/libpldm as a set of
sources, compilated if the compiler flag CONFIG_PLDM is set.
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Acked-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
The Management Component Transport Protocol (MCTP) is a protocol defined by
the DMTF Platform Management Component Intercommunications sub-team of the
DMTF Pre-OS Workgroup. MCTP is designed to support communications between
different intelligent hardware components that make up a platform
management subsystem that is provides monitoring and control functions
inside a managed system. DMTF standard "DSP2016"
This library is intended to be a portable implementation of the Management
Component Transport Protocol (MCTP), as defined by DMTF standard "DSP0236",
plus transport binding specifications.
MCTP has been designed to carry multiple types of manageability-related
traffic across a common medium. The base MCTP specifications define
message types for supporting the initialization and configuration of MCTP
itself, and to support vendor-specific messages over MCTP.
Other message types, such as message types to support a Platform Level
Data Model (PLDM).
The source is located here: https://github.com/openbmc/libmctp and use as
is, without any update.
The libmctp code is integrated into the folder ./libmctp as a set of
sources, compiled if the compiler flag CONFIG_PLDM is set.
A config file is required. Not being generated automatically by 'configure',
it must be edited manually to match the environment.
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Acked-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
To retrieve specific log traces from the external library: libmctp, we
need to export the logging api.
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
This file is used by the external library: libpldm.
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Implement the BSD endian conversion functions in terms of the ccan
ones since the external libraries: libpldm and libmctp use them heavily.
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Add PRIxu macros into include inttypes file.
These macros are required by the external library: libmctp.
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Add ENXIO and EMSGSIZE error codes (No such device or address.) in skiboot libc.
This error code are required by the external library: libmctp.
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Add maximum native integer size and limits of specified-width integer
types.
These types are required by the external library: libpldm.
Signed-off-by: Christophe Lombard <clombard@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
|
|
No system loads skiboot as an ELF, so the segment information is not
used.
Avoids these warnings with binutils as of 2.39:
powerpc64-linux-gnu-ld: warning: skiboot.tmp.elf has a LOAD segment with RWX permissions
powerpc64-linux-gnu-ld: warning: skiboot.elf has a LOAD segment with RWX permissions
Signed-off-by: Joel Stanley <joel@jms.id.au>
[arbab: Use try-ldflag for builders with pre-2.39 binutils]
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
These callbacks were used by the p7ioc code that was removed a long time
ago. Add them to the list of removed calls and delete the dead code.
Linux has removed the code that called these functions in v6.5-rc1.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
The define for PSIHB_XIVR was removed with P7 support.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Compiling hmi.c with GCC 13.1.1 results in following error
core/hmi.c:860:25: error: ‘pau’ may be used uninitialized [-Werror=maybe-uninitialized]
860 | pau_opencapi_dump_scoms(pau);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by initializing variable 'pau' with NULL when defined in
npu_fir_errors(). Variable 'pau' is only assigned/referenced in switch-case
blocks when phb_type == phb_type_pau_opencapi. Hence this patch shouldn't
introduce any behavioral changes.
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
There is a QEMU model for ChipTOD (not yet upstream) that provides
enough to get through skiboot's sync sequence.
So run the chiptod init when running under QEMU, if it is being
provided in the device tree. If not, don't crash because the QEMU
patch has not been merged yet...
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
There doesn't seem to be any reason to call opal_mpipl_init so late,
after sleep, traps, interrupts, machine checks, watchdog, etc., are
all disabled. Move it earlier.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
This code hasn't been enabled, remove it.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Bring ipmi to a consistent state before booting a kernel by flushing
all outstanding messages. The OS may not start kicking the IPMI state
machine for some time.
For example, without this change, when booting in QEMU, the IPMI command
issued by ipmi_wdt_final_reset() to disable the watchdog is not sent to
the BMC before the OS boots, effectively leaving the watchdog enabled
until the OS begins to drive OPAL pollers.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Stewart Smith <stewart@flamingspork.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Move all platforms using astbmc_init() to use astbmc_exit().
Move ipmi_set_boot_count() to astbmc_exit from ipmi_wdt_final_reset().
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Current gcc with -Os happens to generate code that re-loads the variable
in the loop, but that could change without notice, and with -O2 it does
infinite loop if sync_msg is !NULL, because it is not declared volatile
and there is no compiler barrier in the loop.
Add the usual cpu_relax() there to provide the compiler barrier.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Stewart Smith <stewart@flamingspork.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Print a message if free or realloc are called on memory outside the
skiboot heap. Freeing is skipped to give the best chance of avoiding
a crash.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
free() asserts because local_alloc() doesn't allocate from the skiboot
heap region. Fix this by using local_free().
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
This allows memory to be allocated with local_alloc() to be freed.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
|
|
Fedora 36 has reached end-of-life. Remove it and add Fedora 38.
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Reviewed-by: Dan Horák <dan@danny.cz>
|