Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 1 | /* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ |
| 2 | |
Andrew Jeffery | 2cda40f | 2020-02-28 15:26:20 +1030 | [diff] [blame] | 3 | #ifdef HAVE_CONFIG_H |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 4 | #include "config.h" |
Andrew Jeffery | 2cda40f | 2020-02-28 15:26:20 +1030 | [diff] [blame] | 5 | #endif |
| 6 | |
Andrew Jeffery | df5f6b9 | 2020-05-12 21:39:06 +0930 | [diff] [blame] | 7 | #include "astlpc.c" |
| 8 | |
| 9 | #ifdef pr_fmt |
| 10 | #undef pr_fmt |
| 11 | #define pr_fmt(x) "test: " x |
| 12 | #endif |
| 13 | |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 14 | #include "libmctp-astlpc.h" |
| 15 | #include "libmctp-log.h" |
Przemyslaw Czarnowski | ff25d7e | 2020-03-26 11:39:37 +0100 | [diff] [blame] | 16 | #include "container_of.h" |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 17 | |
| 18 | #ifdef NDEBUG |
| 19 | #undef NDEBUG |
| 20 | #endif |
| 21 | |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 22 | #include <assert.h> |
| 23 | #include <stdint.h> |
| 24 | #include <stdio.h> |
| 25 | #include <stdlib.h> |
| 26 | #include <string.h> |
| 27 | |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 28 | struct mctp_binding_astlpc_mmio { |
| 29 | struct mctp_binding_astlpc astlpc; |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 30 | bool bmc; |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 31 | |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 32 | uint8_t (*kcs)[2]; |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 33 | |
| 34 | size_t lpc_size; |
| 35 | uint8_t *lpc; |
| 36 | }; |
| 37 | |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 38 | #define binding_to_mmio(b) \ |
| 39 | container_of(b, struct mctp_binding_astlpc_mmio, astlpc) |
| 40 | |
Andrew Jeffery | 53ea147 | 2020-05-23 21:06:24 +0930 | [diff] [blame] | 41 | static int mctp_astlpc_mmio_kcs_read(void *data, |
| 42 | enum mctp_binding_astlpc_kcs_reg reg, |
| 43 | uint8_t *val) |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 44 | { |
| 45 | struct mctp_binding_astlpc_mmio *mmio = binding_to_mmio(data); |
| 46 | |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 47 | *val = (*mmio->kcs)[reg]; |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 48 | |
| 49 | mctp_prdebug("%s: 0x%hhx from %s", __func__, *val, reg ? "status" : "data"); |
| 50 | |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 51 | if (reg == MCTP_ASTLPC_KCS_REG_DATA) { |
| 52 | uint8_t flag = mmio->bmc ? KCS_STATUS_IBF : KCS_STATUS_OBF; |
| 53 | (*mmio->kcs)[MCTP_ASTLPC_KCS_REG_STATUS] &= ~flag; |
| 54 | } |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 55 | |
| 56 | return 0; |
| 57 | } |
| 58 | |
Andrew Jeffery | 53ea147 | 2020-05-23 21:06:24 +0930 | [diff] [blame] | 59 | static int mctp_astlpc_mmio_kcs_write(void *data, |
| 60 | enum mctp_binding_astlpc_kcs_reg reg, |
| 61 | uint8_t val) |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 62 | { |
| 63 | struct mctp_binding_astlpc_mmio *mmio = binding_to_mmio(data); |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 64 | uint8_t *regp; |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 65 | |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 66 | assert(reg == MCTP_ASTLPC_KCS_REG_DATA || |
| 67 | reg == MCTP_ASTLPC_KCS_REG_STATUS); |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 68 | |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 69 | if (reg == MCTP_ASTLPC_KCS_REG_DATA) { |
| 70 | uint8_t flag = mmio->bmc ? KCS_STATUS_OBF : KCS_STATUS_IBF; |
| 71 | (*mmio->kcs)[MCTP_ASTLPC_KCS_REG_STATUS] |= flag; |
| 72 | } |
| 73 | |
| 74 | regp = &(*mmio->kcs)[reg]; |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 75 | if (reg == MCTP_ASTLPC_KCS_REG_STATUS) |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 76 | *regp = (val & ~0xbU) | (val & *regp & 1); |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 77 | else |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 78 | *regp = val; |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 79 | |
| 80 | mctp_prdebug("%s: 0x%hhx to %s", __func__, val, reg ? "status" : "data"); |
| 81 | |
| 82 | return 0; |
| 83 | } |
Andrew Jeffery | 06b2cd8 | 2020-03-17 23:12:27 +1030 | [diff] [blame] | 84 | int mctp_astlpc_mmio_lpc_read(void *data, void *buf, long offset, size_t len) |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 85 | { |
| 86 | struct mctp_binding_astlpc_mmio *mmio = binding_to_mmio(data); |
| 87 | |
Andrew Jeffery | 1dbf021 | 2020-05-12 13:53:50 +0930 | [diff] [blame] | 88 | mctp_prdebug("%s: %zu bytes from 0x%lx", __func__, len, offset); |
| 89 | |
Andrew Jeffery | 06b2cd8 | 2020-03-17 23:12:27 +1030 | [diff] [blame] | 90 | assert(offset >= 0L); |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 91 | assert(offset + len < mmio->lpc_size); |
| 92 | |
| 93 | memcpy(buf, mmio->lpc + offset, len); |
| 94 | |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 95 | return 0; |
| 96 | } |
| 97 | |
Andrew Jeffery | 06b2cd8 | 2020-03-17 23:12:27 +1030 | [diff] [blame] | 98 | int mctp_astlpc_mmio_lpc_write(void *data, void *buf, long offset, size_t len) |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 99 | { |
| 100 | struct mctp_binding_astlpc_mmio *mmio = binding_to_mmio(data); |
| 101 | |
Andrew Jeffery | 1dbf021 | 2020-05-12 13:53:50 +0930 | [diff] [blame] | 102 | mctp_prdebug("%s: %zu bytes to 0x%lx", __func__, len, offset); |
| 103 | |
Andrew Jeffery | 06b2cd8 | 2020-03-17 23:12:27 +1030 | [diff] [blame] | 104 | assert(offset >= 0L); |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 105 | assert(offset + len < mmio->lpc_size); |
| 106 | |
| 107 | memcpy(mmio->lpc + offset, buf, len); |
| 108 | |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 109 | return 0; |
| 110 | } |
| 111 | |
Andrew Jeffery | b93b611 | 2020-06-05 14:13:44 +0930 | [diff] [blame] | 112 | #define __unused __attribute__((unused)) |
| 113 | |
| 114 | static void rx_message(uint8_t eid __unused, void *data __unused, void *msg, |
| 115 | size_t len) |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 116 | { |
| 117 | uint8_t type; |
| 118 | |
| 119 | type = *(uint8_t *)msg; |
| 120 | |
| 121 | mctp_prdebug("MCTP message received: len %zd, type %d", |
| 122 | len, type); |
| 123 | } |
| 124 | |
Andrew Jeffery | 53ea147 | 2020-05-23 21:06:24 +0930 | [diff] [blame] | 125 | static const struct mctp_binding_astlpc_ops mctp_binding_astlpc_mmio_ops = { |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 126 | .kcs_read = mctp_astlpc_mmio_kcs_read, |
| 127 | .kcs_write = mctp_astlpc_mmio_kcs_write, |
| 128 | .lpc_read = mctp_astlpc_mmio_lpc_read, |
| 129 | .lpc_write = mctp_astlpc_mmio_lpc_write, |
| 130 | }; |
| 131 | |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 132 | struct astlpc_endpoint { |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 133 | struct mctp_binding_astlpc_mmio mmio; |
| 134 | struct mctp_binding_astlpc *astlpc; |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 135 | struct mctp *mctp; |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 136 | }; |
| 137 | |
| 138 | static void endpoint_init(struct astlpc_endpoint *ep, mctp_eid_t eid, |
| 139 | uint8_t mode, uint8_t (*kcs)[2], void *lpc_mem, |
| 140 | size_t lpc_size) |
| 141 | { |
| 142 | /* |
| 143 | * Configure the direction of the KCS interface so we know whether to |
| 144 | * set or clear IBF or OBF on writes or reads. |
| 145 | */ |
| 146 | ep->mmio.bmc = (mode == MCTP_BINDING_ASTLPC_MODE_BMC); |
| 147 | |
| 148 | ep->mctp = mctp_init(); |
| 149 | assert(ep->mctp); |
| 150 | |
| 151 | mctp_set_rx_all(ep->mctp, rx_message, NULL); |
| 152 | |
| 153 | /* Inject KCS registers */ |
| 154 | ep->mmio.kcs = kcs; |
| 155 | |
| 156 | /* Inject the heap allocation as the LPC mapping */ |
| 157 | ep->mmio.lpc_size = lpc_size; |
| 158 | ep->mmio.lpc = lpc_mem; |
| 159 | |
| 160 | /* Initialise the binding */ |
Andrew Jeffery | 129ef93 | 2020-05-22 16:24:19 +0930 | [diff] [blame^] | 161 | ep->astlpc = mctp_astlpc_init(mode, MCTP_BTU, lpc_mem, |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 162 | &mctp_binding_astlpc_mmio_ops, &ep->mmio); |
| 163 | |
| 164 | mctp_register_bus(ep->mctp, &ep->astlpc->binding, eid); |
| 165 | } |
| 166 | |
| 167 | static void endpoint_destroy(struct astlpc_endpoint *ep) |
| 168 | { |
| 169 | mctp_astlpc_destroy(ep->astlpc); |
| 170 | mctp_destroy(ep->mctp); |
| 171 | } |
| 172 | |
Andrew Jeffery | cb5d55c | 2020-05-22 13:26:27 +0930 | [diff] [blame] | 173 | struct astlpc_test { |
| 174 | struct astlpc_endpoint bmc; |
| 175 | struct astlpc_endpoint host; |
| 176 | uint8_t kcs[2]; |
| 177 | uint8_t *lpc_mem; |
| 178 | }; |
| 179 | |
| 180 | static void network_init(struct astlpc_test *ctx) |
| 181 | { |
| 182 | const size_t lpc_size = 1 * 1024 * 1024; |
| 183 | |
| 184 | ctx->lpc_mem = calloc(1, lpc_size); |
| 185 | assert(ctx->lpc_mem); |
| 186 | |
| 187 | /* BMC initialisation */ |
| 188 | endpoint_init(&ctx->bmc, 8, MCTP_BINDING_ASTLPC_MODE_BMC, &ctx->kcs, |
| 189 | ctx->lpc_mem, lpc_size); |
| 190 | |
| 191 | /* Host initialisation */ |
| 192 | endpoint_init(&ctx->host, 9, MCTP_BINDING_ASTLPC_MODE_HOST, &ctx->kcs, |
| 193 | ctx->lpc_mem, lpc_size); |
| 194 | |
| 195 | /* BMC processes host channel init request, alerts host */ |
| 196 | mctp_astlpc_poll(ctx->bmc.astlpc); |
| 197 | assert(ctx->kcs[KCS_REG_STATUS] & KCS_STATUS_CHANNEL_ACTIVE); |
| 198 | assert(ctx->kcs[KCS_REG_DATA] == 0xff); |
| 199 | |
| 200 | /* Host dequeues channel init result */ |
| 201 | mctp_astlpc_poll(ctx->host.astlpc); |
| 202 | } |
| 203 | |
| 204 | static void network_destroy(struct astlpc_test *ctx) |
| 205 | { |
| 206 | endpoint_destroy(&ctx->bmc); |
| 207 | endpoint_destroy(&ctx->host); |
| 208 | free(ctx->lpc_mem); |
| 209 | } |
| 210 | |
Andrew Jeffery | 129ef93 | 2020-05-22 16:24:19 +0930 | [diff] [blame^] | 211 | static void astlpc_assert_tx_packet(struct astlpc_endpoint *src, |
| 212 | const void *expected, size_t len) |
| 213 | { |
| 214 | const size_t tx_body = src->astlpc->layout.tx.offset + 4 + 4; |
| 215 | const void *test = ((char *)src->astlpc->lpc_map) + tx_body; |
| 216 | assert(!memcmp(test, expected, len)); |
| 217 | } |
| 218 | |
Andrew Jeffery | e756de8 | 2020-05-22 12:30:58 +0930 | [diff] [blame] | 219 | static void astlpc_test_packetised_message_bmc_to_host(void) |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 220 | { |
Andrew Jeffery | cb5d55c | 2020-05-22 13:26:27 +0930 | [diff] [blame] | 221 | struct astlpc_test ctx = { 0 }; |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 222 | uint8_t msg[2 * MCTP_BTU]; |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 223 | int rc; |
| 224 | |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 225 | /* Test harness initialisation */ |
| 226 | |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 227 | memset(&msg[0], 0x5a, MCTP_BTU); |
| 228 | memset(&msg[MCTP_BTU], 0xa5, MCTP_BTU); |
| 229 | |
Andrew Jeffery | cb5d55c | 2020-05-22 13:26:27 +0930 | [diff] [blame] | 230 | network_init(&ctx); |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 231 | |
| 232 | /* BMC sends a message */ |
Andrew Jeffery | cb5d55c | 2020-05-22 13:26:27 +0930 | [diff] [blame] | 233 | rc = mctp_message_tx(ctx.bmc.mctp, 9, msg, sizeof(msg)); |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 234 | assert(rc == 0); |
Andrew Jeffery | cb5d55c | 2020-05-22 13:26:27 +0930 | [diff] [blame] | 235 | assert(ctx.kcs[MCTP_ASTLPC_KCS_REG_STATUS] & KCS_STATUS_OBF); |
| 236 | assert(ctx.kcs[MCTP_ASTLPC_KCS_REG_DATA] == 0x01); |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 237 | |
Andrew Jeffery | 129ef93 | 2020-05-22 16:24:19 +0930 | [diff] [blame^] | 238 | astlpc_assert_tx_packet(&ctx.bmc, &msg[0], MCTP_BTU); |
Andrew Jeffery | d5e3cd7 | 2020-05-12 22:10:22 +0930 | [diff] [blame] | 239 | |
Andrew Jeffery | 129ef93 | 2020-05-22 16:24:19 +0930 | [diff] [blame^] | 240 | /* Host receives the first packet */ |
Andrew Jeffery | cb5d55c | 2020-05-22 13:26:27 +0930 | [diff] [blame] | 241 | mctp_astlpc_poll(ctx.host.astlpc); |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 242 | |
| 243 | /* Host returns Rx area ownership to BMC */ |
Andrew Jeffery | cb5d55c | 2020-05-22 13:26:27 +0930 | [diff] [blame] | 244 | assert(!(ctx.kcs[MCTP_ASTLPC_KCS_REG_STATUS] & KCS_STATUS_OBF)); |
| 245 | assert(ctx.kcs[MCTP_ASTLPC_KCS_REG_DATA] == 0x02); |
| 246 | assert(ctx.kcs[MCTP_ASTLPC_KCS_REG_STATUS] & KCS_STATUS_IBF); |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 247 | |
| 248 | /* BMC dequeues ownership hand-over and sends the queued packet */ |
Andrew Jeffery | cb5d55c | 2020-05-22 13:26:27 +0930 | [diff] [blame] | 249 | rc = mctp_astlpc_poll(ctx.bmc.astlpc); |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 250 | assert(rc == 0); |
| 251 | |
Andrew Jeffery | 129ef93 | 2020-05-22 16:24:19 +0930 | [diff] [blame^] | 252 | /* Host receives the next packet */ |
Andrew Jeffery | cb5d55c | 2020-05-22 13:26:27 +0930 | [diff] [blame] | 253 | assert(ctx.kcs[MCTP_ASTLPC_KCS_REG_STATUS] & KCS_STATUS_OBF); |
| 254 | assert(ctx.kcs[MCTP_ASTLPC_KCS_REG_DATA] == 0x01); |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 255 | |
Andrew Jeffery | 129ef93 | 2020-05-22 16:24:19 +0930 | [diff] [blame^] | 256 | astlpc_assert_tx_packet(&ctx.bmc, &msg[MCTP_BTU], MCTP_BTU); |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 257 | |
Andrew Jeffery | cb5d55c | 2020-05-22 13:26:27 +0930 | [diff] [blame] | 258 | network_destroy(&ctx); |
Andrew Jeffery | e756de8 | 2020-05-22 12:30:58 +0930 | [diff] [blame] | 259 | } |
| 260 | |
Andrew Jeffery | f1a2131 | 2020-05-22 12:48:21 +0930 | [diff] [blame] | 261 | static void astlpc_test_simple_init(void) |
| 262 | { |
| 263 | struct astlpc_endpoint bmc, host; |
| 264 | uint8_t kcs[2] = { 0 }; |
| 265 | size_t lpc_size; |
| 266 | void *lpc_mem; |
| 267 | |
| 268 | /* Test harness initialisation */ |
| 269 | lpc_size = 1 * 1024 * 1024; |
| 270 | lpc_mem = calloc(1, lpc_size); |
| 271 | assert(lpc_mem); |
| 272 | |
| 273 | /* Bus owner (BMC) initialisation */ |
| 274 | endpoint_init(&bmc, 8, MCTP_BINDING_ASTLPC_MODE_BMC, &kcs, lpc_mem, |
| 275 | lpc_size); |
| 276 | |
| 277 | /* Verify the BMC binding was initialised */ |
| 278 | assert(kcs[MCTP_ASTLPC_KCS_REG_STATUS] & KCS_STATUS_BMC_READY); |
| 279 | |
| 280 | /* Device (Host) initialisation */ |
| 281 | endpoint_init(&host, 9, MCTP_BINDING_ASTLPC_MODE_HOST, &kcs, lpc_mem, |
| 282 | lpc_size); |
| 283 | |
| 284 | /* Host sends channel init command */ |
| 285 | assert(kcs[MCTP_ASTLPC_KCS_REG_STATUS] & KCS_STATUS_IBF); |
| 286 | assert(kcs[MCTP_ASTLPC_KCS_REG_DATA] == 0x00); |
| 287 | |
| 288 | /* BMC receives host channel init request */ |
| 289 | mctp_astlpc_poll(bmc.astlpc); |
| 290 | |
| 291 | /* BMC sends init response */ |
| 292 | assert(kcs[MCTP_ASTLPC_KCS_REG_STATUS] & KCS_STATUS_OBF); |
| 293 | assert(kcs[MCTP_ASTLPC_KCS_REG_STATUS] & KCS_STATUS_CHANNEL_ACTIVE); |
| 294 | assert(kcs[MCTP_ASTLPC_KCS_REG_DATA] == 0xff); |
| 295 | |
| 296 | /* Host dequeues data */ |
| 297 | mctp_astlpc_poll(host.astlpc); |
| 298 | |
| 299 | endpoint_destroy(&bmc); |
| 300 | endpoint_destroy(&host); |
| 301 | free(lpc_mem); |
| 302 | } |
| 303 | |
Andrew Jeffery | e756de8 | 2020-05-22 12:30:58 +0930 | [diff] [blame] | 304 | int main(void) |
| 305 | { |
| 306 | mctp_set_log_stdio(MCTP_LOG_DEBUG); |
| 307 | |
Andrew Jeffery | f1a2131 | 2020-05-22 12:48:21 +0930 | [diff] [blame] | 308 | astlpc_test_simple_init(); |
Andrew Jeffery | e756de8 | 2020-05-22 12:30:58 +0930 | [diff] [blame] | 309 | astlpc_test_packetised_message_bmc_to_host(); |
Andrew Jeffery | 11b7e92 | 2020-03-10 23:37:09 +1030 | [diff] [blame] | 310 | |
Andrew Jeffery | 0247c73 | 2020-02-06 11:48:52 +1030 | [diff] [blame] | 311 | return 0; |
| 312 | } |