qemu support code added
This commit is contained in:
parent
feed7a2137
commit
f1a0cd859f
2
Makefile
2
Makefile
@ -21,7 +21,7 @@ LOCAL_INCLUDE_DIR?=./include
|
|||||||
LOCAL_LIB_DIR?=./lib
|
LOCAL_LIB_DIR?=./lib
|
||||||
INCLUDE_PATH=-I $(LOCAL_INCLUDE_DIR) -I $(INCLUDE_DIR) -I /usr/include/glib-2.0 -I /usr/lib/`uname -m`-linux-gnu/glib-2.0/include/ -I /usr/lib64/glib-2.0/include
|
INCLUDE_PATH=-I $(LOCAL_INCLUDE_DIR) -I $(INCLUDE_DIR) -I /usr/include/glib-2.0 -I /usr/lib/`uname -m`-linux-gnu/glib-2.0/include/ -I /usr/lib64/glib-2.0/include
|
||||||
LIB_PATH=-L $(LOCAL_LIB_DIR) -L $(LIB_DIR)
|
LIB_PATH=-L $(LOCAL_LIB_DIR) -L $(LIB_DIR)
|
||||||
LIBS=-l mctp -l fmapi -l emapi -l ptrqueue -l arrayutils -l uuid -l timeutils -l cxlstate -l pciutils
|
LIBS=-l mctp -l fmapi -l emapi -l ptrqueue -l arrayutils -l uuid -l timeutils -l cxlstate -l pciutils -l pci
|
||||||
TARGET=jack
|
TARGET=jack
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|||||||
@ -231,10 +231,10 @@ void print_ports(struct fmapi_psc_port_rsp *o)
|
|||||||
sprintf(&buf[i], "-");
|
sprintf(&buf[i], "-");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((p->nlw >> 0) == 0)
|
if (p->nlw == 0)
|
||||||
sprintf(&buf[i], "%d", p->mlw);
|
sprintf(&buf[i], "%d", p->mlw);
|
||||||
else
|
else
|
||||||
sprintf(&buf[i], "%d", p->nlw >> 4);
|
sprintf(&buf[i], "%d", p->nlw);
|
||||||
}
|
}
|
||||||
i += (cols[k++].width + 2);
|
i += (cols[k++].width + 2);
|
||||||
|
|
||||||
@ -254,7 +254,7 @@ void print_ports(struct fmapi_psc_port_rsp *o)
|
|||||||
sprintf(&buf[i], "-");
|
sprintf(&buf[i], "-");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char c = '0';
|
char c = '1';
|
||||||
for ( int v = 0 ; v < 8 ; v++ )
|
for ( int v = 0 ; v < 8 ; v++ )
|
||||||
{
|
{
|
||||||
if ((p->speeds >> v) & 0x01)
|
if ((p->speeds >> v) & 0x01)
|
||||||
@ -701,11 +701,11 @@ int fmapi_handler(struct mctp *m, struct mctp_msg *mr, struct mctp_msg *mm)
|
|||||||
struct fmapi_isc_id_rsp *o = &rsp.obj.isc_id_rsp;
|
struct fmapi_isc_id_rsp *o = &rsp.obj.isc_id_rsp;
|
||||||
|
|
||||||
printf("Show Identity:\n");
|
printf("Show Identity:\n");
|
||||||
printf("PCIe Vendor ID: 0x%x\n", o->vid);
|
printf("PCIe Vendor ID: 0x%04x\n", o->vid);
|
||||||
printf("PCIe Device ID: 0x%x\n", o->did);
|
printf("PCIe Device ID: 0x%04x\n", o->did);
|
||||||
printf("PCIe Subsystem Vendor ID: 0x%x\n", o->svid);
|
printf("PCIe Subsystem Vendor ID: 0x%04x\n", o->svid);
|
||||||
printf("PCIe Subsystem ID: 0x%x\n", o->ssid);
|
printf("PCIe Subsystem ID: 0x%04x\n", o->ssid);
|
||||||
printf("SN: 0x%llx\n", o->sn);
|
printf("SN: 0x%016llx\n", o->sn);
|
||||||
printf("Max Msg Size n of 2^n: %d - %d B\n", o->size, 1 << o->size);
|
printf("Max Msg Size n of 2^n: %d - %d B\n", o->size, 1 << o->size);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -766,7 +766,7 @@ int fmapi_handler(struct mctp *m, struct mctp_msg *mr, struct mctp_msg *mm)
|
|||||||
case FMOP_PSC_CFG:
|
case FMOP_PSC_CFG:
|
||||||
{
|
{
|
||||||
struct fmapi_psc_cfg_rsp *o = &rsp.obj.psc_cfg_rsp;
|
struct fmapi_psc_cfg_rsp *o = &rsp.obj.psc_cfg_rsp;
|
||||||
printf("Data: 0x%02x%02x%02x%02x\n", o->data[0], o->data[1], o->data[2], o->data[3]);
|
printf("Data: 0x%02x%02x%02x%02x\n", o->data[3], o->data[2], o->data[1], o->data[0]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -836,7 +836,7 @@ int fmapi_handler(struct mctp *m, struct mctp_msg *mr, struct mctp_msg *mm)
|
|||||||
{
|
{
|
||||||
if (rsp.hdr.return_code == FMRC_BACKGROUND_OP_STARTED)
|
if (rsp.hdr.return_code == FMRC_BACKGROUND_OP_STARTED)
|
||||||
{
|
{
|
||||||
printf("Bind operation started in the background\n");
|
//printf("Bind operation started in the background\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -845,7 +845,7 @@ int fmapi_handler(struct mctp *m, struct mctp_msg *mr, struct mctp_msg *mm)
|
|||||||
{
|
{
|
||||||
if (rsp.hdr.return_code == FMRC_BACKGROUND_OP_STARTED)
|
if (rsp.hdr.return_code == FMRC_BACKGROUND_OP_STARTED)
|
||||||
{
|
{
|
||||||
printf("Unbind operation started in the background\n");
|
//printf("Unbind operation started in the background\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
4
main.c
4
main.c
@ -272,8 +272,8 @@ void run(struct mctp *m)
|
|||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
// Initialize cached copy of remote switch state
|
// Initialize cached copy of remote switch state
|
||||||
if (opts[CLOP_NO_INIT].set == 0)
|
//if (opts[CLOP_NO_INIT].set == 0)
|
||||||
init_switch(m);
|
// init_switch(m);
|
||||||
|
|
||||||
if (opts[CLOP_CMD].val == CLCM_LIST)
|
if (opts[CLOP_CMD].val == CLCM_LIST)
|
||||||
list(m);
|
list(m);
|
||||||
|
|||||||
@ -108,7 +108,7 @@ static int pr_set_qos_limit(int key, char *arg, struct argp_state *state);
|
|||||||
*/
|
*/
|
||||||
struct opt *opts;
|
struct opt *opts;
|
||||||
|
|
||||||
const char *argp_program_version = "version 0.1";
|
const char *argp_program_version = "version 0.2";
|
||||||
const char *argp_program_bug_address = "code@jrlabs.io";
|
const char *argp_program_bug_address = "code@jrlabs.io";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user