]> Git Repo - qemu.git/commitdiff
hw/arm/musicpal: Remove nonexistent CDTP2, CDTP3 registers
authorPeter Maydell <[email protected]>
Wed, 26 Feb 2014 17:19:59 +0000 (17:19 +0000)
committerPeter Maydell <[email protected]>
Wed, 26 Feb 2014 17:19:59 +0000 (17:19 +0000)
The ethernet device in the musicpal only has two tx queues,
but we modelled it with four CTDP registers, presumably a
cut and paste from the rx queue registers. Since the tx_queue[]
array is only 2 entries long this allowed a guest to overrun
this buffer. Remove the nonexistent registers.

Signed-off-by: Peter Maydell <[email protected]>
Message-id: 1392737293[email protected]
Acked-by: Jan Kiszka <[email protected]>
Cc: [email protected]
hw/arm/musicpal.c

index 50a3b8fe4f264ede64f2ca8345d4c6bb5c90a576..cce71275985104de14cae53f8221129e1e29f13e 100644 (file)
@@ -92,8 +92,6 @@
 #define MP_ETH_CRDP3            0x4AC
 #define MP_ETH_CTDP0            0x4E0
 #define MP_ETH_CTDP1            0x4E4
-#define MP_ETH_CTDP2            0x4E8
-#define MP_ETH_CTDP3            0x4EC
 
 /* MII PHY access */
 #define MP_ETH_SMIR_DATA        0x0000FFFF
@@ -308,7 +306,7 @@ static uint64_t mv88w8618_eth_read(void *opaque, hwaddr offset,
     case MP_ETH_CRDP0 ... MP_ETH_CRDP3:
         return s->rx_queue[(offset - MP_ETH_CRDP0)/4];
 
-    case MP_ETH_CTDP0 ... MP_ETH_CTDP3:
+    case MP_ETH_CTDP0 ... MP_ETH_CTDP1:
         return s->tx_queue[(offset - MP_ETH_CTDP0)/4];
 
     default:
@@ -362,7 +360,7 @@ static void mv88w8618_eth_write(void *opaque, hwaddr offset,
             s->cur_rx[(offset - MP_ETH_CRDP0)/4] = value;
         break;
 
-    case MP_ETH_CTDP0 ... MP_ETH_CTDP3:
+    case MP_ETH_CTDP0 ... MP_ETH_CTDP1:
         s->tx_queue[(offset - MP_ETH_CTDP0)/4] = value;
         break;
     }
This page took 0.030601 seconds and 4 git commands to generate.