diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-09-06 19:19:55 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-09-15 10:29:48 +1000 |
commit | f85504b23a59f769f36f7c4d4e0ce8fd08c78749 (patch) | |
tree | df59b98523edd2802501912581b56cb546c9c6e9 /hw/net/trace-events | |
parent | 3dabde1128b671f36ac6cb36b97b273139964420 (diff) |
net: Add SunGEM device emulation as found on Apple UniNorth
This adds a simplistic emulation of the Sun GEM ethernet controller
found in Apple ASICs.
Currently we only support the Apple UniNorth 1.x variant, but the
other Apple or Sun variants should mostly be a matter of adding
PCI IDs options.
We have a very primitive emulation of a single Broadcom 5201 PHY
which is supported by the MacOS driver.
This model brings out-of-the-box networking to MacOS 9, and all
versions of OS X I tried with the mac99 platform.
Further improvements from Mark:
- Remove sungem.h file, moving constants into sungem.c as required
- Switch to using tracepoints for debugging
- Split register blocks into separate memory regions
- Use arrays in SunGEMState to hold register values
- Add state-saving support
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/net/trace-events')
-rw-r--r-- | hw/net/trace-events | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/hw/net/trace-events b/hw/net/trace-events index 27e5482765..5f816ef58e 100644 --- a/hw/net/trace-events +++ b/hw/net/trace-events @@ -278,3 +278,47 @@ spapr_vlan_h_send_logical_lan(uint64_t reg, uint64_t continue_token) "H_SEND_LOG spapr_vlan_h_send_logical_lan_rxbufs(uint32_t rx_bufs) "rxbufs = %"PRIu32 spapr_vlan_h_send_logical_lan_buf_desc(uint64_t buf) " buf desc: 0x%"PRIx64 spapr_vlan_h_send_logical_lan_total(int nbufs, unsigned total_len) "%d buffers, total length 0x%x" + +# hw/net/sungem.c +sungem_tx_checksum(uint16_t start, uint16_t off) "TX checksumming from byte %d, inserting at %d" +sungem_tx_checksum_oob(void) "TX checksum out of packet bounds" +sungem_tx_unfinished(void) "TX packet started without finishing the previous one" +sungem_tx_overflow(void) "TX packet queue overflow" +sungem_tx_finished(uint32_t size) "TX completing %"PRIu32 " bytes packet" +sungem_tx_kick(void) "TX Kick..." +sungem_tx_disabled(void) "TX not enabled" +sungem_tx_process(uint32_t comp, uint32_t kick, uint32_t size) "TX processing comp=%"PRIu32", kick=%"PRIu32" out of %"PRIu32 +sungem_tx_desc(uint32_t comp, uint64_t control, uint64_t buffer) "TX desc %"PRIu32 ": 0x%"PRIx64" 0x%"PRIx64 +sungem_tx_reset(void) "TX reset" +sungem_rx_mac_disabled(void) "Check RX MAC disabled" +sungem_rx_txdma_disabled(void) "Check RX TXDMA disabled" +sungem_rx_check(bool full, uint32_t kick, uint32_t done) "Check RX %d (kick=%"PRIu32", done=%"PRIu32")" +sungem_rx_mac_check(uint32_t mac0, uint32_t mac1, uint32_t mac2) "Word MAC: 0x%"PRIx32" 0x%"PRIx32" 0x%"PRIx32 +sungem_rx_mac_multicast(void) "Multicast" +sungem_rx_mac_compare(uint32_t mac0, uint32_t mac1, uint32_t mac2) "Compare MAC to 0x%"PRIx32" 0x%"PRIx32" 0x%"PRIx32".." +sungem_rx_packet(size_t size) "RX got %zu bytes packet" +sungem_rx_disabled(void) "RX not enabled" +sungem_rx_bad_frame_size(size_t size) "RX bad frame size %zu, dropped" +sungem_rx_unmatched(void) "No match, dropped" +sungem_rx_process(uint32_t done, uint32_t kick, uint32_t size) "RX processing done=%"PRIu32", kick=%"PRIu32" out of %"PRIu32 +sungem_rx_ringfull(void) "RX ring full" +sungem_rx_desc(uint64_t control, uint64_t buffer) "RX desc: 0x%"PRIx64" 0x%"PRIx64 +sungem_rx_reset(void) "RX reset" +sungem_rx_kick(uint64_t val) "RXDMA_KICK written to %"PRIu64 +sungem_reset(bool pci_reset) "Full reset (PCI:%d)" +sungem_mii_write(uint8_t phy_addr, uint8_t reg_addr, uint16_t val) "MII write addr 0x%x reg 0x%02x val 0x%04x" +sungem_mii_read(uint8_t phy_addr, uint8_t reg_addr, uint16_t val) "MII read addr 0x%x reg 0x%02x val 0x%04x" +sungem_mii_invalid_sof(uint32_t val) "MII op, invalid SOF field 0x%"PRIx32 +sungem_mii_invalid_op(uint8_t op) "MII op, invalid op field 0x%x" +sungem_mmio_greg_write(uint64_t addr, uint64_t val) "MMIO greg write to 0x%"PRIx64" val=0x%"PRIx64 +sungem_mmio_greg_read(uint64_t addr, uint64_t val) "MMIO greg read from 0x%"PRIx64" val=0x%"PRIx64 +sungem_mmio_txdma_write(uint64_t addr, uint64_t val) "MMIO txdma write to 0x%"PRIx64" val=0x%"PRIx64 +sungem_mmio_txdma_read(uint64_t addr, uint64_t val) "MMIO txdma read from 0x%"PRIx64" val=0x%"PRIx64 +sungem_mmio_rxdma_write(uint64_t addr, uint64_t val) "MMIO rxdma write to 0x%"PRIx64" val=0x%"PRIx64 +sungem_mmio_rxdma_read(uint64_t addr, uint64_t val) "MMIO rxdma read from 0x%"PRIx64" val=0x%"PRIx64 +sungem_mmio_mac_write(uint64_t addr, uint64_t val) "MMIO mac write to 0x%"PRIx64" val=0x%"PRIx64 +sungem_mmio_mac_read(uint64_t addr, uint64_t val) "MMIO mac read from 0x%"PRIx64" val=0x%"PRIx64 +sungem_mmio_mif_write(uint64_t addr, uint64_t val) "MMIO mif write to 0x%"PRIx64" val=0x%"PRIx64 +sungem_mmio_mif_read(uint64_t addr, uint64_t val) "MMIO mif read from 0x%"PRIx64" val=0x%"PRIx64 +sungem_mmio_pcs_write(uint64_t addr, uint64_t val) "MMIO pcs write to 0x%"PRIx64" val=0x%"PRIx64 +sungem_mmio_pcs_read(uint64_t addr, uint64_t val) "MMIO pcs read from 0x%"PRIx64" val=0x%"PRIx64 |