/openbmc/libmctp/ |
H A D | core.c | 140 static void *mctp_msg_dup(const void *msg, size_t msg_len, struct mctp *mctp) in mctp_msg_dup() argument 142 void *copy = __mctp_msg_alloc(msg_len, mctp); in mctp_msg_dup() 153 static struct mctp_msg_ctx *mctp_msg_ctx_lookup(struct mctp *mctp, uint8_t src, in mctp_msg_ctx_lookup() argument 160 for (i = 0; i < ARRAY_SIZE(mctp->msg_ctxs); i++) { in mctp_msg_ctx_lookup() 161 struct mctp_msg_ctx *ctx = &mctp->msg_ctxs[i]; in mctp_msg_ctx_lookup() 170 static struct mctp_msg_ctx *mctp_msg_ctx_create(struct mctp *mctp, uint8_t src, in mctp_msg_ctx_create() argument 176 for (i = 0; i < ARRAY_SIZE(mctp->msg_ctxs); i++) { in mctp_msg_ctx_create() 177 struct mctp_msg_ctx *tmp = &mctp->msg_ctxs[i]; in mctp_msg_ctx_create() 192 ctx->buf_alloc_size = mctp->max_message_size; in mctp_msg_ctx_create() 193 ctx->buf = __mctp_msg_alloc(ctx->buf_alloc_size, mctp); in mctp_msg_ctx_create() [all …]
|
H A D | libmctp.h | 22 /* MCTP packet definitions */ 64 struct mctp; 87 /* MCTP core */ 89 /* Allocate and setup a MCTP instance */ 90 struct mctp *mctp_init(void); 91 /* Cleanup and deallocate a MCTP instance from mctp_init() */ 92 void mctp_destroy(struct mctp *mctp); 94 /* Setup a MCTP instance */ 95 int mctp_setup(struct mctp *mctp, size_t struct_mctp_size); 96 /* Release resource of a MCTP instance */ [all …]
|
H A D | README.md | 1 # libmctp: Implementation of MCTP (DTMF DSP0236) 4 Component Transport Protocol (MCTP), as defined by DMTF standard "DSP0236", plus 9 `libmctp` is a library that implements a straightforward MCTP stack. It will be 12 - where you are implementing MCTP in an embedded device; or 14 - with no kernel MCTP support, 15 - need a single application implementing all of the MCTP stack; and 16 - you are providing your own hardware drivers for MCTP transports. 18 Notably, if you are implementing an MCTP application on Linux, you _almost 19 certainly_ want to use the in-kernel MCTP support, which gives you a standard 20 sockets-based interface to transmit and receive MCTP messages. When using the [all …]
|
H A D | control.c | 42 __mctp_msg_alloc(sizeof(*resp), bus->mctp); in mctp_ctrl_set_endpoint_id() 54 int rc = mctp_message_tx_alloced(bus->mctp, src_eid, false, msg_tag, in mctp_ctrl_set_endpoint_id() 73 __mctp_msg_alloc(sizeof(*resp), bus->mctp); in mctp_ctrl_get_endpoint_id() 86 int rc = mctp_message_tx_alloced(bus->mctp, src_eid, false, msg_tag, in mctp_ctrl_get_endpoint_id() 131 /* Only have versions for MCTP base or control */ in mctp_ctrl_get_version() 137 /* Return only the versions for MCTP */ in mctp_ctrl_get_version() 142 __mctp_msg_alloc(total_sz, bus->mctp); in mctp_ctrl_get_version() 154 int rc = mctp_message_tx_alloced(bus->mctp, src_eid, false, msg_tag, in mctp_ctrl_get_version() 157 mctp_prdebug("mctp get_version response send failed: %d", rc); in mctp_ctrl_get_version() 172 bus->mctp->control.num_msg_types; in mctp_ctrl_get_types() [all …]
|
H A D | CMakeLists.txt | 25 add_library (mctp STATIC alloc.c astlpc.c crc32.c core.c log.c libmctp.h serial.c crc-16-ccitt.c co… target 27 target_include_directories (mctp PUBLIC 34 target_link_libraries (test_eid mctp) 38 target_link_libraries (test_seq mctp) 42 target_link_libraries (test_bridge mctp) 46 target_link_libraries (test_astlpc mctp) 50 target_link_libraries (test_serial mctp) 54 target_link_libraries (test_cmds mctp) 58 target_link_libraries (test_core mctp) 61 install (TARGETS mctp DESTINATION lib)
|
/openbmc/phosphor-dbus-interfaces/yaml/xyz/openbmc_project/MCTP/ |
H A D | Endpoint.interface.yaml | 2 Describe an MCTP endpoint. It is an MCTP communication terminus. An MCTP 3 endpoint is a terminus or origin of MCTP packets or messages. The combined 4 functionality within a physical device that communicates using the MCTP 5 transport protocol and handles MCTP control commands. This includes 6 MCTP-capable management controllers and managed devices. 12 A locally defined identifier to distinguish each independent MCTP 13 network within a platform. The network IDs are used by the MCTP stack 14 to index separate MCTP Networks. This along with EID is used by upper 20 The logical address used to route MCTP messages to a specific MCTP 22 a particular MCTP endpoint within a system for MCTP communication and [all …]
|
H A D | README.md | 3 MCTP D-Bus interfaces are implemented by the MCTP control process daemon alias 4 mcptd and aids in the discovery of MCTP enabled devices by application layer 7 `xyz.openbmc_project.MCTP.Endpoint` D-Bus interface to discover MCTP endpoints. 8 The supported MCTP message types in an endpoint are exposed by the 9 `SupportedMessageTypes` property in the `xyz.openbmc_project.MCTP.Endpoint` 11 complete the PLDM discovery flow with the MCTP endpoint. Also mctpd discovers 12 the removal of the MCTP endpoints and removes the D-Bus objects corresponding to 13 those endpoints. MCTP bridges are not modelled in the D-Bus. 17 The root D-Bus object path for the mctpd is `/xyz/openbmc_project/mctp`. There 19 lifetime of the D-Bus object is the lifetime of the connected MCTP device. [all …]
|
/openbmc/docs/designs/mctp/ |
H A D | mctp-userspace.md | 1 # OpenBMC platform communication channel: MCTP & PLDM in userspace 5 Please refer to the [MCTP Overview](mctp.md) document for general MCTP design 8 This document describes a userspace implementation of MCTP infrastructure, 9 allowing a straightforward mechanism of supporting MCTP messaging within an 14 The MCTP core specification just provides the packetisation, routing and 16 hardware binding of the MCTP transport. 18 For OpenBMC, we would introduce a MCTP daemon, which implements the transport 21 complete MCTP messages. This daemon is responsible for the packetisation and 22 routing of MCTP messages from external endpoints, and handling the forwarding 24 handling local MCTP-stack configuration, like local EID assignments. [all …]
|
H A D | mctp.md | 1 # OpenBMC platform communication channel: MCTP & PLDM 13 This design aims to use the Management Component Transport Protocol (MCTP) to 15 platforms provide. Then, on top of MCTP, we have the opportunity to move to 30 MCTP defines a standard transport protocol, plus a number of separate physical 31 layer bindings for the actual transport of MCTP packets. These are defined by 40  43 physical layer bindings; this means that an MCTP "stack" may be using either a 47 by an Entity ID (MCTP EID). These entities may be any element of the platform 48 that communicates over MCTP - for example, the host device, the BMC, or any 56 As part of the design, the references to MCTP "messages" and "packets" are [all …]
|
H A D | mctp-kernel.md | 1 # OpenBMC in-kernel MCTP 5 Please refer to the [MCTP Overview](mctp.md) document for general MCTP design 8 This document describes a kernel-based implementation of MCTP infrastructure, 9 providing a sockets-based API for MCTP communication within an OpenBMC-based 14 - The MCTP messaging API should be an obvious application of the existing POSIX 17 - Configuration should be simple for a straightforward MCTP endpoint: a single 20 - Infrastructure should be flexible enough to allow for more complex MCTP 23 - each MCTP network (as defined by section 3.2.31 of DSP0236) may consist of 37 - An interface for userspace applications to send and receive MCTP messages: A 38 mapping of the sockets API to MCTP usage [all …]
|
/openbmc/pldm/requester/ |
H A D | mctp_endpoint_discovery.hpp | 19 constexpr const char* MCTPInterface = "xyz.openbmc_project.MCTP.Endpoint"; 22 constexpr const char* MCTPInterfaceCC = "au.com.codeconstruct.MCTP.Endpoint1"; 39 * @param[in] addr - MCTP address of terminus 40 * @param[in] terminiNames - MCTP terminus name 58 /** @brief Constructs the MCTP Discovery object to handle discovery of 59 * MCTP enabled devices 71 /** @brief Used to watch for new MCTP endpoints */ 74 /** @brief Used to watch for the removed MCTP endpoints */ 77 /** @brief Used to watch for new MCTP endpoints */ 80 /** @brief List of handlers need to notify when new MCTP [all …]
|
/openbmc/linux/drivers/net/mctp/ |
H A D | Kconfig | 2 if MCTP 4 menu "MCTP Device Drivers" 7 tristate "MCTP serial transport" 11 This driver provides an MCTP-over-serial interface, through a 13 MCTP Serial Transport Binding". By attaching the ldisc to a serial 14 device, we get a new net device to transport MCTP packets. 16 This allows communication with external MCTP endpoints which use 18 provide MCTP connectivity between virtual machines, by forwarding 21 Say y here if you need to connect to MCTP endpoints over serial. To 22 compile as a module, use m; the module will be called mctp-serial. [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/net/ |
H A D | mctp-i2c-controller.yaml | 4 $id: http://devicetree.org/schemas/net/mctp-i2c-controller.yaml# 7 title: MCTP I2C transport 13 An mctp-i2c-controller defines a local MCTP endpoint on an I2C controller. 14 MCTP I2C is specified by DMTF DSP0237. 16 An mctp-i2c-controller must be attached to an I2C adapter which supports 18 busses) are attached to the mctp-i2c-controller with a 'mctp-controller' 19 property on each used bus. Each mctp-controller I2C bus will be presented 20 to the host system as a separate MCTP I2C instance. 24 const: mctp-i2c-controller 47 mctp-controller; [all …]
|
/openbmc/libmctp/tests/ |
H A D | test_core.c | 56 mctp_prdebug("MCTP message received: len %zd, tag %u", len, msg_tag); in rx_message() 81 * The memory allocated for the mctp packet is capped at MCTP_BTU 138 struct mctp *mctp = NULL; in mctp_core_test_simple_rx() local 147 mctp_test_stack_init(&mctp, &binding, TEST_DEST_EID); in mctp_core_test_simple_rx() 148 mctp_set_rx_all(mctp, rx_message, &test_param); in mctp_core_test_simple_rx() 161 mctp_destroy(mctp); in mctp_core_test_simple_rx() 166 struct mctp *mctp = NULL; in mctp_core_test_receive_equal_length_fragments() local 177 mctp_test_stack_init(&mctp, &binding, TEST_DEST_EID); in mctp_core_test_receive_equal_length_fragments() 178 mctp_set_rx_all(mctp, rx_message, &test_param); in mctp_core_test_receive_equal_length_fragments() 202 mctp_destroy(mctp); in mctp_core_test_receive_equal_length_fragments() [all …]
|
H A D | test_i2c.c | 43 struct mctp *mctp; member 91 /* Transmits a MCTP message and checks the received message matches */ 100 rc = mctp_message_tx(tx_test->mctp, dest_eid, tag_owner, msg_tag, in run_tx_test() 104 while (!mctp_is_tx_ready(tx_test->mctp, dest_eid)) { in run_tx_test() 130 mctp_message_tx(tx_test->mctp, eid, tag_owner, msg_tag, in test_neigh_expiry() 141 mctp_message_tx(tx_test->mctp, EID_B, tag_owner, msg_tag, mctp_msg_src, in test_neigh_expiry() 152 mctp_message_tx(tx_test->mctp, EID_B, tag_owner, msg_tag, mctp_msg_src, in test_neigh_expiry() 200 mctp_message_tx(tx_test->mctp, EID_B, tag_owner, msg_tag, in test_neigh_expiry() 211 mctp_message_tx(tx_test->mctp, EID_B, tag_owner, msg_tag, mctp_msg_src, in test_neigh_expiry() 232 tx_test->mctp = mctp_init(); in main() [all …]
|
H A D | test_serial.c | 57 mctp_prdebug("MCTP message received: len %zd, type %d, tag %d", len, in rx_message() 70 struct mctp *mctp; member 112 scenario[0].mctp = mctp_init(); in main() 113 assert(scenario[0].mctp); in main() 121 mctp_register_bus(scenario[0].mctp, mctp_binding_serial_core(a->serial), in main() 125 scenario[1].mctp = mctp_init(); in main() 126 assert(scenario[1].mctp); in main() 127 mctp_set_rx_all(scenario[1].mctp, rx_message, NULL); in main() 135 mctp_register_bus(scenario[1].mctp, mctp_binding_serial_core(b->serial), in main() 139 rc = mctp_message_tx(scenario[0].mctp, 9, tag_owner, msg_tag, in main() [all …]
|
/openbmc/libmctp/utils/ |
H A D | meson.build | 1 demux_sources = ['mctp-demux-daemon.c'] 4 # While mctp-demux-daemon will build without pcap, it won't 6 # TODO only build mctp-demux-daemon when pcap is available. 9 demux_sources += 'mctp-capture.c' 13 'mctp-demux-daemon', 22 'mctp-pipe', 23 'mctp-pipe.c', 30 'mctp-in', 31 'mctp-in.c',
|
H A D | mctp-astlpc-daemon.c | 21 struct mctp *mctp; member 32 mctp_message_tx(ctx->mctp, eid, 0, MCTP_MESSAGE_TO_SRC, msg, len); in tx_message() 55 struct mctp *mctp; in main() local 59 mctp = mctp_init(); in main() 60 assert(mctp); in main() 65 mctp_astlpc_register_bus(astlpc, mctp, local_eid); in main() 68 ctx->mctp = mctp; in main() 70 mctp_set_rx_all(mctp, rx_message, ctx); in main()
|
H A D | mctp-pipe.c | 34 struct mctp *mctp[2]; in main() local 36 mctp[0] = mctp_init(); in main() 37 mctp[1] = mctp_init(); in main() 39 assert(mctp[0] && mctp[1]); in main() 53 mctp_register_bus(mctp[0], mctp_binding_serial_core(serial[0]), in main() 55 mctp_register_bus(mctp[1], mctp_binding_serial_core(serial[1]), in main() 58 mctp_set_rx_all(mctp[1], rx_message, NULL); in main() 96 mctp_message_tx(mctp[0], eids[1], in main()
|
/openbmc/pldm/fw-update/ |
H A D | manager.hpp | 24 * the MCTP devices 50 * the added MCTP endpoints 52 * @param[in] mctpInfos - information of discovered MCTP endpoints 66 * the removed MCTP endpoints 68 * @param[in] mctpInfos - information of removed MCTP endpoints 76 * updating the availability status of the MCTP endpoint 89 * @param[in] eid - Remote MCTP Endpoint ID 103 * @param[in] addr - MCTP address of terminus 104 * @param[in] terminiNames - MCTP terminus name 112 /** Descriptor information of all the discovered MCTP endpoints */ [all …]
|
/openbmc/libpldm/include/libpldm/ |
H A D | pldm.h | 34 * @brief Connect to the MCTP socket and provide an fd to it. The fd can be 45 * @param[in] eid - destination MCTP eid 46 * @param[in] mctp_fd - MCTP socket fd 64 * async API. A user of this would typically have added the MCTP fd to an 68 * @param[in] eid - destination MCTP eid 69 * @param[in] mctp_fd - MCTP socket fd 79 * @brief Read MCTP socket. If there's data available, return success only if 82 * @param[in] eid - destination MCTP eid 83 * @param[in] mctp_fd - MCTP socket fd 98 * @brief Read MCTP socket. If there's data available, return success only if [all …]
|
/openbmc/dbus-sensors/src/mctp/ |
H A D | MCTPEndpoint.hpp | 23 * @brief Abstract and concrete classes representing MCTP concepts and 28 * @brief An exception type that may be thrown by implementations of the MCTP 31 * This exception should be the basis for all exceptions thrown out of the MCTP 49 * @brief An enum of the MCTP transports described in DSP0239 v1.10.0 Section 7. 60 * @brief Captures properties of MCTP interfaces. 62 * https://github.com/CodeConstruct/mctp/blob/v2.0/src/mctp.c#L668-L699 75 * @brief Captures the behaviour of an endpoint at the MCTP layer 97 * @return The MCTP endpoint ID of the endpoint in its network 105 * @param degraded The callback to execute when the MCTP layer indicates the 108 * @param available The callback to execute when the MCTP layer indicates [all …]
|
/openbmc/linux/net/mctp/ |
H A D | Kconfig | 2 menuconfig MCTP config 4 bool "MCTP core protocol support" 6 Management Component Transport Protocol (MCTP) is an in-system 11 This option enables core MCTP support. For communicating with other 16 bool "MCTP core tests" if !KUNIT_ALL_TESTS 17 depends on MCTP=y && KUNIT=y 22 depends on MCTP
|
/openbmc/pldm/platform-mc/ |
H A D | terminus_manager.hpp | 25 MCTP enumerator 69 * @param[in] mctpInfos - list information of the MCTP endpoints 73 /** @brief remove MCTP endpoints 75 * @param[in] mctpInfos - list information of the MCTP endpoints 111 /** @brief Member functions to response the TID of specific MCTP interface 113 * @param[in] mctpInfos - list information of the MCTP endpoints 119 /** @brief Member functions to find the TID for MCTP interface. Response the 123 * @param[in] mctpInfos - list information of the MCTP endpoints 129 /** @brief Member functions to store the mctp info and tid to terminus info 132 * @param[in] mctpInfos - list information of the MCTP endpoint [all...] |
/openbmc/openbmc/meta-ibm/recipes-phosphor/libmctp/ |
H A D | libmctp_%.bbappend | 5 install -m 0644 ${UNPACKDIR}/mctp ${D}${sysconfdir}/default/mctp 6 install -d ${D}${systemd_system_unitdir}/mctp-demux.service.d 7 …install -D -m 0644 ${UNPACKDIR}/service-override.conf ${D}${systemd_system_unitdir}/mctp-demux.ser… 10 SRC_URI:append:p10bmc = " file://mctp" 16 SRC_URI:append:witherspoon-tacoma = " file://mctp" 22 FILES:${PN}:append = " ${systemd_system_unitdir}/mctp-demux.service.d/service-override.conf"
|