| 0bd0ba87 | 11-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Map the RAM buffer as RAM memory region
Rather than using I/O registers for RAM buffer, having to swap endianness back and forth (because the core memory layer automatically s
hw/net/xilinx_ethlite: Map the RAM buffer as RAM memory region
Rather than using I/O registers for RAM buffer, having to swap endianness back and forth (because the core memory layer automatically swaps endiannes for us), declare the buffers as RAM regions. The "xlnx.xps-ethernetlite" MR doesn't have any more I/O regions. Remove the now unused s->regs[] array.
The memory flat view becomes:
FlatView #0 Root memory region: system 0000000081000000-00000000810007e3 (prio 0, ram): ethlite.tx[0]buf 00000000810007e4-00000000810007f3 (prio 0, i/o): ethlite.mdio 00000000810007f4-00000000810007ff (prio 0, i/o): ethlite.tx[0]io 0000000081000800-0000000081000fe3 (prio 0, ram): ethlite.tx[1]buf 0000000081000ff4-0000000081000fff (prio 0, i/o): ethlite.tx[1]io 0000000081001000-00000000810017e3 (prio 0, ram): ethlite.rx[0]buf 00000000810017fc-00000000810017ff (prio 0, i/o): ethlite.rx[0]io 0000000081001800-0000000081001fe3 (prio 0, ram): ethlite.rx[1]buf 0000000081001ffc-0000000081001fff (prio 0, i/o): ethlite.rx[1]io
Reported-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20241114210010.34502-18-philmd@linaro.org>
show more ...
|
| a34606db | 11-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Map TX_CTRL as MMIO
Add TX_CTRL to the TX registers MMIO region.
The memory flat view becomes:
(qemu) info mtree -f FlatView #0 Root memory region: system 0000000
hw/net/xilinx_ethlite: Map TX_CTRL as MMIO
Add TX_CTRL to the TX registers MMIO region.
The memory flat view becomes:
(qemu) info mtree -f FlatView #0 Root memory region: system 0000000081000000-00000000810007e3 (prio 0, i/o): xlnx.xps-ethernetlite 00000000810007e4-00000000810007f3 (prio 0, i/o): ethlite.mdio 00000000810007f4-00000000810007ff (prio 0, i/o): ethlite.tx[0]io 0000000081000800-0000000081000ff3 (prio 0, i/o): xlnx.xps-ethernetlite @0000000000000800 0000000081000ff4-0000000081000fff (prio 0, i/o): ethlite.tx[1]io 0000000081001000-00000000810017fb (prio 0, i/o): xlnx.xps-ethernetlite @0000000000001000 00000000810017fc-00000000810017ff (prio 0, i/o): ethlite.rx[0]io 0000000081001800-0000000081001ffb (prio 0, i/o): xlnx.xps-ethernetlite @0000000000001800 0000000081001ffc-0000000081001fff (prio 0, i/o): ethlite.rx[1]io
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-19-philmd@linaro.org>
show more ...
|
| 01198add | 11-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Map TX_GIE as MMIO
Add TX_GIE to the TX registers MMIO region.
Before TX_GIE1 was accessed as RAM, with no effect. Now it is accessed as MMIO, also without any effect.
The m
hw/net/xilinx_ethlite: Map TX_GIE as MMIO
Add TX_GIE to the TX registers MMIO region.
Before TX_GIE1 was accessed as RAM, with no effect. Now it is accessed as MMIO, also without any effect.
The memory flat view becomes:
(qemu) info mtree -f FlatView #0 Root memory region: system 0000000081000000-00000000810007e3 (prio 0, i/o): xlnx.xps-ethernetlite 00000000810007e4-00000000810007f3 (prio 0, i/o): ethlite.mdio 00000000810007f4-00000000810007fb (prio 0, i/o): ethlite.tx[0]io 00000000810007fc-0000000081000ff3 (prio 0, i/o): xlnx.xps-ethernetlite @00000000000007fc 0000000081000ff4-0000000081000ffb (prio 0, i/o): ethlite.tx[1]io 0000000081000ffc-00000000810017fb (prio 0, i/o): xlnx.xps-ethernetlite @0000000000000ffc 00000000810017fc-00000000810017ff (prio 0, i/o): ethlite.rx[0]io 0000000081001800-0000000081001ffb (prio 0, i/o): xlnx.xps-ethernetlite @0000000000001800 0000000081001ffc-0000000081001fff (prio 0, i/o): ethlite.rx[1]io
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-18-philmd@linaro.org>
show more ...
|
| 46dd6af2 | 10-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Map TX_LEN as MMIO
Declare TX registers as MMIO region, split it out of the current mixed RAM/MMIO region.
The memory flat view becomes:
(qemu) info mtree -f FlatView #0
hw/net/xilinx_ethlite: Map TX_LEN as MMIO
Declare TX registers as MMIO region, split it out of the current mixed RAM/MMIO region.
The memory flat view becomes:
(qemu) info mtree -f FlatView #0 Root memory region: system 0000000081000000-00000000810007e3 (prio 0, i/o): xlnx.xps-ethernetlite 00000000810007e4-00000000810007f3 (prio 0, i/o): ethlite.mdio 00000000810007f4-00000000810007f7 (prio 0, i/o): ethlite.tx[0]io 00000000810007f8-0000000081000ff3 (prio 0, i/o): xlnx.xps-ethernetlite @00000000000007f8 0000000081000ff4-0000000081000ff7 (prio 0, i/o): ethlite.tx[1]io 0000000081000ff8-00000000810017fb (prio 0, i/o): xlnx.xps-ethernetlite @0000000000000ff8 00000000810017fc-00000000810017ff (prio 0, i/o): ethlite.rx[0]io 0000000081001800-0000000081001ffb (prio 0, i/o): xlnx.xps-ethernetlite @0000000000001800 0000000081001ffc-0000000081001fff (prio 0, i/o): ethlite.rx[1]io
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-17-philmd@linaro.org>
show more ...
|
| 72294962 | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Map RX_CTRL as MMIO
Declare RX registers as MMIO region, split it out of the current mixed RAM/MMIO region. The memory flat view becomes:
(qemu) info mtree -f FlatView #0
hw/net/xilinx_ethlite: Map RX_CTRL as MMIO
Declare RX registers as MMIO region, split it out of the current mixed RAM/MMIO region. The memory flat view becomes:
(qemu) info mtree -f FlatView #0 Root memory region: system 0000000081000000-00000000810007e3 (prio 0, i/o): xlnx.xps-ethernetlite 00000000810007e4-00000000810007f3 (prio 0, i/o): ethlite.mdio 00000000810007f4-00000000810017fb (prio 0, i/o): xlnx.xps-ethernetlite @00000000000007f4 00000000810017fc-00000000810017ff (prio 0, i/o): ethlite.rx[0]io 0000000081001800-0000000081001ffb (prio 0, i/o): xlnx.xps-ethernetlite @0000000000001800 0000000081001ffc-0000000081001fff (prio 0, i/o): ethlite.rx[1]io
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20241112181044.92193-16-philmd@linaro.org>
show more ...
|
| a3750669 | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Access TX_CTRL register for each port
Rather than accessing the registers within the mixed RAM/MMIO region as indexed register, declare a per-port TX_CTRL. This will help to m
hw/net/xilinx_ethlite: Access TX_CTRL register for each port
Rather than accessing the registers within the mixed RAM/MMIO region as indexed register, declare a per-port TX_CTRL. This will help to map the RAM as RAM (keeping MMIO as MMIO) in few commits.
Previous s->regs[R_TX_CTRL0] and s->regs[R_TX_CTRL1] are now unused. Not a concern, this array will soon disappear.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-15-philmd@linaro.org>
show more ...
|
| c6297918 | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Access TX_LEN register for each port
Rather than accessing the registers within the mixed RAM/MMIO region as indexed register, declare a per-port TX_LEN. This will help to map
hw/net/xilinx_ethlite: Access TX_LEN register for each port
Rather than accessing the registers within the mixed RAM/MMIO region as indexed register, declare a per-port TX_LEN. This will help to map the RAM as RAM (keeping MMIO as MMIO) in few commits.
Previous s->regs[R_TX_LEN0] and s->regs[R_TX_LEN1] are now unused. Not a concern, this array will soon disappear.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-14-philmd@linaro.org>
show more ...
|
| 64fdbae7 | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Access TX_GIE register for each port
Rather than accessing the registers within the mixed RAM/MMIO region as indexed register, declare a per-port TX_GIE. This will help to map
hw/net/xilinx_ethlite: Access TX_GIE register for each port
Rather than accessing the registers within the mixed RAM/MMIO region as indexed register, declare a per-port TX_GIE. This will help to map the RAM as RAM (keeping MMIO as MMIO) in few commits.
Previous s->regs[R_TX_GIE0] and s->regs[R_TX_GIE1] are now unused. Not a concern, this array will soon disappear.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-13-philmd@linaro.org>
show more ...
|
| 785fd1a9 | 11-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Introduce rxbuf_ptr() helper
rxbuf_ptr() points to the beginning of a (RAM) RX buffer within the device state.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Revie
hw/net/xilinx_ethlite: Introduce rxbuf_ptr() helper
rxbuf_ptr() points to the beginning of a (RAM) RX buffer within the device state.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-11-philmd@linaro.org>
show more ...
|
| 8d956610 | 11-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Introduce txbuf_ptr() helper
For a particular physical address within the EthLite MMIO range, addr_to_port_index() returns which port is accessed.
txbuf_ptr() points to the b
hw/net/xilinx_ethlite: Introduce txbuf_ptr() helper
For a particular physical address within the EthLite MMIO range, addr_to_port_index() returns which port is accessed.
txbuf_ptr() points to the beginning of a (RAM) TX buffer within the device state.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-10-philmd@linaro.org>
show more ...
|
| fa3ca9aa | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Map MDIO registers (as unimplemented)
Rather than handling the MDIO registers as RAM, map them as unimplemented I/O within the device MR.
The memory flat view becomes:
(qe
hw/net/xilinx_ethlite: Map MDIO registers (as unimplemented)
Rather than handling the MDIO registers as RAM, map them as unimplemented I/O within the device MR.
The memory flat view becomes:
(qemu) info mtree -f FlatView #0 Root memory region: system 0000000081000000-00000000810007e3 (prio 0, i/o): xlnx.xps-ethernetlite 00000000810007e4-00000000810007f3 (prio 0, i/o): ethlite.mdio 00000000810007f4-0000000081001fff (prio 0, i/o): xlnx.xps-ethernetlite @00000000000007f4
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-7-philmd@linaro.org>
show more ...
|
| 0798e09f | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Rename rxbuf -> port_index
'rxbuf' is the index of the dual port RAM used. Rename it as 'port_index'.
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Signed-off-by: P
hw/net/xilinx_ethlite: Rename rxbuf -> port_index
'rxbuf' is the index of the dual port RAM used. Rename it as 'port_index'.
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20241112181044.92193-8-philmd@linaro.org>
show more ...
|
| 7eb77fa4 | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Correct maximum RX buffer size
The current max RX bufsize is set to 0x800. This is invalid, since it contains the MMIO registers region. Add the correct definition (valid for
hw/net/xilinx_ethlite: Correct maximum RX buffer size
The current max RX bufsize is set to 0x800. This is invalid, since it contains the MMIO registers region. Add the correct definition (valid for both TX & RX, see datasheet p. 20, Table 11 "XPS Ethernet Lite MAC Memory Map") and use it.
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20241112181044.92193-6-philmd@linaro.org>
show more ...
|
| 0fb867ed | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Update QOM style
Use XlnxXpsEthLite typedef, OBJECT_DECLARE_SIMPLE_TYPE macro; convert type_init() to DEFINE_TYPES().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org
hw/net/xilinx_ethlite: Update QOM style
Use XlnxXpsEthLite typedef, OBJECT_DECLARE_SIMPLE_TYPE macro; convert type_init() to DEFINE_TYPES().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-5-philmd@linaro.org>
show more ...
|
| 9dd886c0 | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Remove unuseful debug logs
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-
hw/net/xilinx_ethlite: Remove unuseful debug logs
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-4-philmd@linaro.org>
show more ...
|
| 973a2fac | 11-Dec-2024 |
Bernhard Beschow <shentey@gmail.com> |
hw/net/lan9118_phy: Add missing 100 mbps full duplex advertisement
The real device advertises this mode and the device model already advertises 100 mbps half duplex and 10 mbps full+half duplex. So
hw/net/lan9118_phy: Add missing 100 mbps full duplex advertisement
The real device advertises this mode and the device model already advertises 100 mbps half duplex and 10 mbps full+half duplex. So advertise this mode to make the model more realistic.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Bernhard Beschow <shentey@gmail.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Message-id: 20241102125724.532843-6-shentey@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| 212a52c8 | 11-Dec-2024 |
Bernhard Beschow <shentey@gmail.com> |
hw/net/lan9118_phy: Reuse MII constants
Prefer named constants over magic values for better readability.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Bernhard Beschow <shent
hw/net/lan9118_phy: Reuse MII constants
Prefer named constants over magic values for better readability.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Bernhard Beschow <shentey@gmail.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Message-id: 20241102125724.532843-5-shentey@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|