/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/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)
|
H A D | Makefile.am | 21 systemd/system/mctp-demux.service \ 22 systemd/system/mctp-demux.socket 25 bin_PROGRAMS = utils/mctp-demux-daemon 26 noinst_PROGRAMS = utils/mctp-in utils/mctp-pipe 27 utils_mctp_demux_daemon_SOURCES = utils/mctp-demux-daemon.c 29 utils_mctp_demux_daemon_SOURCES += utils/mctp-capture.c
|
/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 22 - each MCTP network (as defined by section 3.2.31 of DSP0236) may consist of 36 - An interface for userspace applications to send and receive MCTP messages: A 37 mapping of the sockets API to MCTP usage [all …]
|
/openbmc/pldm/requester/ |
H A D | mctp_endpoint_discovery.hpp | 21 constexpr const char* MCTPInterface = "xyz.openbmc_project.MCTP.Endpoint"; 24 constexpr const char* MCTPInterfaceCC = "au.com.codeconstruct.MCTP.Endpoint1"; 47 * @param[in] addr - MCTP address of terminus 48 * @param[in] terminiNames - MCTP terminus name 68 /** @brief Constructs the MCTP Discovery object to handle discovery of 69 * MCTP enabled devices 81 /** @brief Used to watch for new MCTP endpoints */ 84 /** @brief Used to watch for the removed MCTP endpoints */ 87 /** @brief Used to watch for new MCTP endpoints */ 90 /** @brief List of handlers need to notify when new MCTP [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-utils.c | 61 struct mctp *mctp, mctp_eid_t eid) in mctp_binding_test_register_bus() argument 63 mctp_register_bus(mctp, &binding->binding, eid); in mctp_binding_test_register_bus() 66 void mctp_test_stack_init(struct mctp **mctp, in mctp_test_stack_init() argument 69 *mctp = mctp_init(); in mctp_test_stack_init() 70 assert(*mctp); in mctp_test_stack_init() 75 mctp_binding_test_register_bus(*binding, *mctp, eid); in mctp_test_stack_init()
|
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/openbmc/meta-facebook/meta-yosemite4/recipes-networking/mctp/files/ |
H A D | mctp-config | 10 # Enable MCTP-I3C for BMC 18 mctp route add $((eidBase + 0)) via mctpi3c${busnum} 19 mctp route add $((eidBase + 2)) via mctpi3c${busnum} 20 mctp route add $((eidBase + 4)) via mctpi3c${busnum} 21 mctp route add $((eidBase + 5)) via mctpi3c${busnum} 22 mctp neigh add $((eidBase + 0)) dev mctpi3c${busnum} lladdr "$lladdr" 23 mctp neigh add $((eidBase + 2)) dev mctpi3c${busnum} lladdr "$lladdr" 24 mctp neigh add $((eidBase + 4)) dev mctpi3c${busnum} lladdr "$lladdr" 25 mctp neigh add $((eidBase + 5)) dev mctpi3c${busnum} lladdr "$lladdr" 27 mctp link set mctpi3c${busnum} up [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()
|
/openbmc/openbmc/meta-facebook/meta-harma/recipes-networking/mctp/files/ |
H A D | setup-local-eid | 27 # Retry mctp link command 28 if ! retry_command "mctp link set mctpi2c${busNum} up"; then 29 echo "Failed to set mctp link after $maxRetries attempts." 34 mctpOutput=$(mctp address show) 38 # Retry mctp addr add command 39 if ! retry_command "mctp addr add ${localEid} dev mctpi2c${busNum}"; then 40 echo "Failed to add mctp address after $maxRetries attempts."
|
/openbmc/openbmc/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/mctp/files/ |
H A D | mctp-local.service | 2 Description=MCTP configuration for serial ttyAMA1 10 ExecStart=mctp link serial /dev/ttyAMA1 12 ExecStartPost=mctp link set mctpserial0 up 13 ExecStartPost=mctp addr add 8 dev mctpserial0 14 ExecStartPost=mctp route add 18 via mctpserial0 15 …1 /au/com/codeconstruct/mctp1/interfaces/mctpserial0 au.com.codeconstruct.MCTP.BusOwner1 SetupEndp…
|
/openbmc/openbmc/meta-phosphor/recipes-phosphor/libmctp/ |
H A D | libmctp_git.bb | 1 SUMMARY = "MCTP stack" 2 DESCRIPTION = "MCTP library implementing the MCTP base specification" 20 SYSTEMD_SERVICE:${PN} = "mctp-demux.service \ 21 mctp-demux.socket \ 30 install -m 0644 ${UNPACKDIR}/default ${D}${sysconfdir}/default/mctp 33 CONFFILES:${PN} = "${sysconfdir}/default/mctp"
|
/openbmc/pldm/fw-update/ |
H A D | manager.hpp | 24 * the MCTP devices 58 * the added MCTP endpoints 60 * @param[in] mctpInfos - information of discovered MCTP endpoints 78 * the removed MCTP endpoints 80 * @param[in] mctpInfos - information of removed MCTP endpoints 88 * updating the availability status of the MCTP endpoint 101 * @param[in] eid - Remote MCTP Endpoint ID 115 * @param[in] addr - MCTP address of terminus 116 * @param[in] terminiNames - MCTP terminus name 124 /** Descriptor information of all the discovered MCTP endpoints */ [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 FILES:${PN}:append = " ${systemd_system_unitdir}/mctp-demux.service.d/service-override.conf"
|
/openbmc/openbmc/meta-openembedded/meta-networking/recipes-support/mctp/mctp/ |
H A D | 0001-mctp-bench-Adjust-headers.patch | 4 Subject: [PATCH] mctp-bench: Adjust headers 10 ../git/src/mctp-bench.c:2:10: fatal error: 'bits/time.h' file not found 14 Upstream-Status: Submitted [https://github.com/CodeConstruct/mctp/pull/65] 17 src/mctp-bench.c | 3 +-- 20 diff --git a/src/mctp-bench.c b/src/mctp-bench.c 22 --- a/src/mctp-bench.c 23 +++ b/src/mctp-bench.c
|