Revision 3d0f4b9b
b/hw/eepro100.c | ||
---|---|---|
798 | 798 |
//~ missing("CU dump statistical counters"); |
799 | 799 |
} |
800 | 800 |
|
801 |
static void read_cb(EEPRO100State *s) |
|
802 |
{ |
|
803 |
cpu_physical_memory_read(s->cb_address, (uint8_t *) &s->tx, sizeof(s->tx)); |
|
804 |
s->tx.status = le16_to_cpu(s->tx.status); |
|
805 |
s->tx.command = le16_to_cpu(s->tx.command); |
|
806 |
s->tx.link = le32_to_cpu(s->tx.link); |
|
807 |
s->tx.tbd_array_addr = le32_to_cpu(s->tx.tbd_array_addr); |
|
808 |
s->tx.tcb_bytes = le16_to_cpu(s->tx.tcb_bytes); |
|
809 |
} |
|
810 |
|
|
801 | 811 |
static void tx_command(EEPRO100State *s) |
802 | 812 |
{ |
803 | 813 |
uint32_t tbd_array = le32_to_cpu(s->tx.tbd_array_addr); |
... | ... | |
901 | 911 |
static void action_command(EEPRO100State *s) |
902 | 912 |
{ |
903 | 913 |
for (;;) { |
904 |
s->cb_address = s->cu_base + s->cu_offset; |
|
905 |
cpu_physical_memory_read(s->cb_address, (uint8_t *)&s->tx, sizeof(s->tx)); |
|
906 |
uint16_t command = le16_to_cpu(s->tx.command); |
|
907 |
s->tx.status = le16_to_cpu(s->tx.status); |
|
908 |
logout("val=(cu start), status=0x%04x, command=0x%04x, link=0x%08x\n", |
|
909 |
s->tx.status, command, s->tx.link); |
|
910 |
bool bit_el = ((command & COMMAND_EL) != 0); |
|
911 |
bool bit_s = ((command & COMMAND_S) != 0); |
|
912 |
bool bit_i = ((command & COMMAND_I) != 0); |
|
913 |
bool bit_nc = ((command & COMMAND_NC) != 0); |
|
914 |
bool bit_el; |
|
915 |
bool bit_s; |
|
916 |
bool bit_i; |
|
917 |
bool bit_nc; |
|
914 | 918 |
bool success = true; |
915 |
//~ bool bit_sf = ((command & COMMAND_SF) != 0); |
|
916 |
uint16_t cmd = command & COMMAND_CMD; |
|
917 |
s->cu_offset = le32_to_cpu(s->tx.link); |
|
918 |
switch (cmd) { |
|
919 |
s->cb_address = s->cu_base + s->cu_offset; |
|
920 |
read_cb(s); |
|
921 |
bit_el = ((s->tx.command & COMMAND_EL) != 0); |
|
922 |
bit_s = ((s->tx.command & COMMAND_S) != 0); |
|
923 |
bit_i = ((s->tx.command & COMMAND_I) != 0); |
|
924 |
bit_nc = ((s->tx.command & COMMAND_NC) != 0); |
|
925 |
#if 0 |
|
926 |
bool bit_sf = ((s->tx.command & COMMAND_SF) != 0); |
|
927 |
#endif |
|
928 |
s->cu_offset = s->tx.link; |
|
929 |
TRACE(OTHER, |
|
930 |
logout("val=(cu start), status=0x%04x, command=0x%04x, link=0x%08x\n", |
|
931 |
s->tx.status, s->tx.command, s->tx.link)); |
|
932 |
switch (s->tx.command & COMMAND_CMD) { |
|
919 | 933 |
case CmdNOp: |
920 | 934 |
/* Do nothing. */ |
921 | 935 |
break; |
Also available in: Unified diff