aboutsummaryrefslogtreecommitdiff
path: root/include/hw/net
diff options
context:
space:
mode:
authorJamin Lin <jamin_lin@aspeedtech.com>2024-07-04 16:29:17 +0800
committerCédric Le Goater <clg@redhat.com>2024-07-09 08:05:44 +0200
commit578c6e9ed5d0484da5b478f932c420ecc4f751f6 (patch)
tree808f369ea3729b8fb8ef733052e96a2353acf355 /include/hw/net
parent0b51fd0f99f09df4560c267922cabdbc67198ae8 (diff)
downloadqemu-578c6e9ed5d0484da5b478f932c420ecc4f751f6.zip
qemu-578c6e9ed5d0484da5b478f932c420ecc4f751f6.tar.gz
qemu-578c6e9ed5d0484da5b478f932c420ecc4f751f6.tar.bz2
hw/net:ftgmac100: introduce TX and RX ring base address high registers to support 64 bits
ASPEED AST2700 SOC is a 64 bits quad core CPUs (Cortex-a35) And the base address of dram is "0x4 00000000" which is 64bits address. It have "Normal Priority Transmit Ring Base Address Register High(0x17C)", "High Priority Transmit Ring Base Address Register High(0x184)" and "Receive Ring Base Address Register High(0x18C)" to save the high part physical address of descriptor manager. Ex: TX descriptor manager address [34:0] The "Normal Priority Transmit Ring Base Address Register High(0x17C)" bits [2:0] which corresponds the bits [34:32] of the 64 bits address of the TX ring buffer address. The "Normal Priority Transmit Ring Base Address Register(0x20)" bits [31:0] which corresponds the bits [31:0] of the 64 bits address of the TX ring buffer address. Introduce a new sub region which size is 0x100 for the set of new registers and map it at 0x100 in the container region. This sub region range is from 0x100 to 0x1ff. Introduce a new property and object attribute to activate the region for new registers. Introduce a new memop handlers for the new register read and write. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include/hw/net')
-rw-r--r--include/hw/net/ftgmac100.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/net/ftgmac100.h b/include/hw/net/ftgmac100.h
index aae57ae..24ccdf0 100644
--- a/include/hw/net/ftgmac100.h
+++ b/include/hw/net/ftgmac100.h
@@ -16,6 +16,8 @@ OBJECT_DECLARE_SIMPLE_TYPE(FTGMAC100State, FTGMAC100)
#define FTGMAC100_MEM_SIZE 0x1000
#define FTGMAC100_REG_MEM_SIZE 0x100
+#define FTGMAC100_REG_HIGH_MEM_SIZE 0x100
+#define FTGMAC100_REG_HIGH_OFFSET 0x100
#include "hw/sysbus.h"
#include "net/net.h"
@@ -35,6 +37,7 @@ struct FTGMAC100State {
qemu_irq irq;
MemoryRegion iomem_container;
MemoryRegion iomem;
+ MemoryRegion iomem_high;
uint8_t frame[FTGMAC100_MAX_FRAME_SIZE];
@@ -68,6 +71,7 @@ struct FTGMAC100State {
bool aspeed;
uint32_t txdes0_edotr;
uint32_t rxdes0_edorr;
+ bool dma64;
};
#define TYPE_ASPEED_MII "aspeed-mmi"