openMMC
Open Source Modular MMC for AMCs
|
IPMI module definitions. More...
Go to the source code of this file.
Data Structures | |
struct | t_req_handler_record |
IPMI Handler record structure used to index all handlers. More... | |
Typedefs | |
typedef void(* | t_req_handler) (ipmi_msg *req, ipmi_msg *resp) |
IPMI Handler function type definition. | |
Functions | |
void | IPMITask (void *pvParameters) |
IPMI dispatcher task. | |
void | ipmi_init (void) |
Initializes the IPMI Dispatcher. | |
t_req_handler | ipmi_retrieve_handler (uint8_t netfn, uint8_t cmd) |
Finds a handler associated with a given netfunction and command. | |
ipmb_error | ipmi_event_send (sensor_t *sensor, uint8_t assert_deassert, uint8_t *evData, uint8_t length) |
Sends an event message (Platform Event) via IPMI. | |
Variables | |
const t_req_handler_record * | _ipmi_handlers |
Pointer to IPMI Handler record list start byte stored in ROM. | |
const t_req_handler_record * | _eipmi_handlers |
Pointer to IPMI Handler record list final byte stored in ROM. | |
IPMI module definitions.
#define FRU_CTLCODE_COLD_RST 0x00 |
#define FRU_CTLCODE_DIAGNOSTIC_INTERRUPT 0x03 |
#define FRU_CTLCODE_QUIESCE 0x04 |
#define FRU_CTLCODE_REBOOT 0x02 |
#define FRU_CTLCODE_WARM_RST 0x01 |
#define FRU_DEVICE_ID 0x00 |
FRU Device ID for IPM Controller.
Indicates a FRU Device ID for the FRU containing the IPM Controller.
#define IPMI_APP_DEV_FW_REV_LOWER 0x01 |
Device Firmware Revision 2.
Minor Firmware Revision. BCD encoded.
#define IPMI_APP_DEV_FW_REV_UPPER 0x01 |
Device Firmware Revision 1.
[7] Device available: 0=normal operation, 1= device firmware, SDR
Repository update or self-initialization in progress.
[6:0] Major Firmware Revision, binary encoded.
#define IPMI_APP_DEV_ID 0x00 |
Device ID - User-defined.
#define IPMI_APP_DEV_REV 0x80 |
Device Revision.
[7] (1) = device provides Device SDRs
(0) = device does not provide Device SDRs
[6:4] reserved. Return as 0.
[3:0] Device Revision, binary encoded.
#define IPMI_APP_DEV_SUP 0x29 |
Additional Device Support.
[7] Chassis Device (device functions as chassis device per ICMB spec.)
[6] Bridge (device responds to Bridge NetFn commands)
[5] IPMB Event Generator (device generates event messages [platform event request messages] onto the IPMB)
[4] IPMB Event Receiver (device accepts event messages [platform event request messages] from the IPMB)
[3] FRU Inventory Device
[2] SEL Device
[1] SDR Repository Device
[0] Sensor Device
#define IPMI_APP_IPMI_VERSION 0x02 |
Supported IPMI Version ( BCD encoded )
[7:4] Least Significant bits
[3:0] Most Significant bits
#define IPMI_APP_MANUF_LSB 0x5A |
Manufacturer ID LSB.
#define IPMI_APP_MANUF_MIDB 0x31 |
Manufacturer ID MIDB.
#define IPMI_APP_MANUF_MSB 0x00 |
Manufacturer ID MSB.
#define IPMI_APP_PROD_ID_LSB 0x00 |
Product ID LSB (User-defined)
#define IPMI_APP_PROD_ID_MSB 0x00 |
Product ID MSB (User-defined)
#define IPMI_EXTENSION_VERSION 0x23 |
PICMG Extension Version.
Indicates the version of PICMG extensions implemented by this IPM Controller.
[7:4] = BCD encoded minor version
[3:0] = BCD encoded major version
#define IPMI_HANDLER | ( | name, | |
netfn_id, | |||
cmd_id, | |||
args... ) |
Macro to implement unique IPMI handler functions.
This macro declares a IPMI handler function with a specific name (based on Netfn and CMD). The handler is placed in a spefic memory region with all handlers, so we have all of them stored sequentially.
#define IPMI_MAX_DATA_LEN 24 |
Maximum data bytes in an IPMI message.
#define MAX_FRU_ID 0x00 |
Max FRU Device ID.
The numerically largest FRU Device ID for the managed FRUs implemented by this IPM Controller.
IPMI Handler function type definition.
All IPMI Handler functions must follow this signature, receiving pointers to both request and response structs and returning void.
ipmb_error ipmi_event_send | ( | sensor_t * | sensor, |
uint8_t | assert_deassert, | ||
uint8_t * | evData, | ||
uint8_t | length ) |
Sends an event message (Platform Event) via IPMI.
sensor | Pointer to sensor information struct |
assert_deassert | Evetn transition direction (0) for assertion, (1) for Deassertion |
evData | Pointer to event message buffer |
length | Event message buffer len (max len = 3) |
Sends an event message (Platform Event) via IPMI.
[in] | sensor | Pointer to sensor structure defined in sensor.h |
[in] | assert_deassert | Flag to indicate an (de)assertion event |
[in] | evData | Data buffer holding the event data, size indicated by length |
[in] | length | Lenght of evData buffer |
void ipmi_init | ( | void | ) |
Initializes the IPMI Dispatcher.
This function initializes the IPMB Layer, registers the RX queue for incoming requests and creates the IPMI task
t_req_handler ipmi_retrieve_handler | ( | uint8_t | netfn, |
uint8_t | cmd ) |
Finds a handler associated with a given netfunction and command.
netfn | 8-bit network function code |
cmd | 8-bit command code |
[in] | netfn | 8-bit network function code |
[in] | cmd | 8-bit command code |
void IPMITask | ( | void * | pvParameters | ) |
IPMI dispatcher task.
This task handles all the incoming IPMI messages previously decoded by IPMB tasks. Here the netfunction and commands are analyzed and the respective handler function is called.
pvParameters | Pointer to parameters buffer passed to this task in initialization |
Call user-defined function, give request data and retrieve required response
In case of error during IPMB response, the MMC may wait for a new command from the MCH. Check this for debugging purposes only.
If there is no function handler, use data from received message to send "invalid command" response (IPMI table 5-2, page 44).
|
extern |
Pointer to IPMI Handler record list final byte stored in ROM.
|
extern |
Pointer to IPMI Handler record list start byte stored in ROM.