[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH 5/6] slirp/ncsi: add a "Get Parameter" response
From: |
Cédric Le Goater |
Subject: |
[Qemu-arm] [PATCH 5/6] slirp/ncsi: add a "Get Parameter" response |
Date: |
Tue, 29 May 2018 08:28:37 +0200 |
This is a minimum response to exercise the kernel.
Signed-off-by: Cédric Le Goater <address@hidden>
---
slirp/ncsi.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/slirp/ncsi.c b/slirp/ncsi.c
index 02d0e9def3e8..f00253641ea4 100644
--- a/slirp/ncsi.c
+++ b/slirp/ncsi.c
@@ -35,6 +35,27 @@ static int ncsi_rsp_handler_gls(struct ncsi_rsp_pkt_hdr *rnh)
return 0;
}
+/* Get Parameter */
+static int ncsi_rsp_handler_gp(struct ncsi_rsp_pkt_hdr *rnh)
+{
+ struct ncsi_rsp_gp_pkt *rsp = (struct ncsi_rsp_gp_pkt *) rnh;
+
+ rsp->mac_cnt = 0x0;
+ rsp->mac_enable = 0x0;
+
+ /* TODO: provide the guest configured MAC */
+ rsp->mac[0] = 0xaa;
+ rsp->mac[1] = 0xbb;
+ rsp->mac[2] = 0xcc;
+ rsp->mac[3] = 0xdd;
+ rsp->mac[4] = 0xee;
+ rsp->mac[5] = 0xff;
+
+ /* more data follows */
+
+ return 0;
+}
+
static const struct ncsi_rsp_handler {
unsigned char type;
int payload;
@@ -62,7 +83,7 @@ static const struct ncsi_rsp_handler {
{ NCSI_PKT_RSP_SNFC, 4, NULL },
{ NCSI_PKT_RSP_GVI, 40, NULL },
{ NCSI_PKT_RSP_GC, 32, ncsi_rsp_handler_gc },
- { NCSI_PKT_RSP_GP, -1, NULL },
+ { NCSI_PKT_RSP_GP, 40, ncsi_rsp_handler_gp },
{ NCSI_PKT_RSP_GCPS, 172, NULL },
{ NCSI_PKT_RSP_GNS, 172, NULL },
{ NCSI_PKT_RSP_GNPTS, 172, NULL },
--
2.13.6
- [Qemu-arm] [PATCH 2/6] ftgmac100: add IEEE 802.1Q VLAN support, (continued)
- [Qemu-arm] [PATCH 1/6] ftgmac100: compute maximum frame size depending on the protocol, Cédric Le Goater, 2018/05/29
- [Qemu-arm] [PATCH 3/6] net/ftgmac100: fix multicast hash routine, Cédric Le Goater, 2018/05/29
- [Qemu-arm] [PATCH 4/6] slirp/ncsi: fix "Get Version ID" payload length, Cédric Le Goater, 2018/05/29
- [Qemu-arm] [PATCH 5/6] slirp/ncsi: add a "Get Parameter" response,
Cédric Le Goater <=
- [Qemu-arm] [PATCH 6/6] slirp/ncsi: add checksum support, Cédric Le Goater, 2018/05/29
- Re: [Qemu-arm] [PATCH 0/6] ftgmac100 and NC-SI enhancements for the Aspeed SoC, Philippe Mathieu-Daudé, 2018/05/29
Re: [Qemu-arm] [Qemu-devel] [PATCH 0/6] ftgmac100 and NC-SI enhancements for the Aspeed SoC, Joel Stanley, 2018/05/30