mv64361: Add dummy gigabit ethernet PHY access registers
PATCH 1/1 mv64361: Add dummy gigabit ethernet PHY access registers
We don't emulate the gigabit ethernet part of the chip but the MorphOS driver accesses these and expects to get some valid looking result otherwise it hangs. Add some minimal dummy implementation to avoid rhis.
---
This is only used by MorphOS on pegasos2 so most likely could go via the ppc queue.
hw/pci-host/mv64361.c | 6 ++++++ hw/pci-host/mv643xx.h | 3 +++ 2 files changed, 9 insertions(+)
hw/pci-host/mv64361.c +6 -0
@@ -541,6 +541,12 @@ static uint64_t mv64361_read(void *opaque, hwaddr addr, unsigned int size) } }break ; +case MV64340_ETH_PHY_ADDR : + ret =0x98 ; +break ; +case MV64340_ETH_SMI : + ret =BIT (27 ); +break ;case MV64340_CUNIT_ARBITER_CONTROL_REG : ret =0x11ff0000 | (s->gpp_int_level <<10 );break ;
hw/pci-host/mv643xx.h +3 -0
@@ -656,6 +656,9 @@/* Ethernet Unit Registers */ /****************************************/ +#define MV64340_ETH_PHY_ADDR 0x2000 +#define MV64340_ETH_SMI 0x2004 +/*******************************************/ /* CUNIT Registers */ /*******************************************/
Signature · 1 line
2.30.9
Quoted 8 lines · BALATON Zoltan
We don't emulate the gigabit ethernet part of the chip but the MorphOS driver accesses these and expects to get some valid looking result otherwise it hangs. Add some minimal dummy implementation to avoid rhis.
Signed-off-by BALATON Zoltan <[email protected]>---
This is only used by MorphOS on pegasos2 so most likely could go via the ppc queue.
Ping?
Regards,
BALATON Zoltan
Quoted 36 lines
hw/pci-host/mv64361.c| 6 ++++++hw/pci-host/mv643xx.h| 3 +++2 files changed, 9 insertions(+)hw/pci-host/mv64361.c +6
-0@@ -541,6 +541,12 @@ static uint64_t mv64361_read(void *opaque, hwaddr addr, unsigned int size) } }break ; +case MV64340_ETH_PHY_ADDR : + ret =0x98 ; +break ; +case MV64340_ETH_SMI : + ret =BIT (27 ); +break ;case MV64340_CUNIT_ARBITER_CONTROL_REG : ret =0x11ff0000 | (s->gpp_int_level <<10 );break ;hw/pci-host/mv643xx.h +3
-0@@ -656,6 +656,9 @@/* Ethernet Unit Registers */ /****************************************/ +#define MV64340_ETH_PHY_ADDR 0x2000 +#define MV64340_ETH_SMI 0x2004 +/*******************************************/ /* CUNIT Registers */ /*******************************************/
Quoted 11 lines · BALATON Zoltan
Quoted 8 lines · BALATON Zoltan
We don't emulate the gigabit ethernet part of the chip but the MorphOS driver accesses these and expects to get some valid looking result otherwise it hangs. Add some minimal dummy implementation to avoid rhis.
Signed-off-by BALATON Zoltan <[email protected]>---
This is only used by MorphOS on pegasos2 so most likely could go via the ppc queue.Ping?
Ping?
Quoted 42 lines
Regards,
BALATON ZoltanQuoted 37 lines
hw/pci-host/mv64361.c| 6 ++++++hw/pci-host/mv643xx.h| 3 +++2 files changed, 9 insertions(+)hw/pci-host/mv64361.c +6
-0@@ -541,6 +541,12 @@ static uint64_t mv64361_read(void *opaque, hwaddr addr, unsigned int size) } }break ; +case MV64340_ETH_PHY_ADDR : + ret =0x98 ; +break ; +case MV64340_ETH_SMI : + ret =BIT (27 ); +break ;case MV64340_CUNIT_ARBITER_CONTROL_REG : ret =0x11ff0000 | (s->gpp_int_level <<10 );break;hw/pci-host/mv643xx.h +3
-0@@ -656,6 +656,9 @@/* Ethernet Unit Registers */ /****************************************/ +#define MV64340_ETH_PHY_ADDR 0x2000 +#define MV64340_ETH_SMI 0x2004 +/*******************************************/ /* CUNIT Registers */ /*******************************************/
Quoted 6 lines · BALATON Zoltan
Quoted 5 lines · BALATON Zoltan
Quoted 4 lines · BALATON Zoltan
We don't emulate the gigabit ethernet part of the chip but the MorphOS driver accesses these and expects to get some valid looking result otherwise it hangs. Add some minimal dummy implementation to avoid rhis.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Signed-off-by BALATON Zoltan <[email protected]>---
This is only used by MorphOS on pegasos2 so most likely could go via the ppc queue.Ping?
Ping?
Ping?
https://patchew.org/QEMU/[email protected]/
It's unlikely this will get a review so can you please just merge it? It's my code so if I break it I'll fix it but this was tested a bit and no problem reported so far.
Regards,
BALATON Zoltan
Quoted 43 lines
Quoted 41 lines
Quoted 39 lines
hw/pci-host/mv64361.c| 6 ++++++hw/pci-host/mv643xx.h| 3 +++2 files changed, 9 insertions(+)hw/pci-host/mv64361.c +6
-0@@ -541,6 +541,12 @@ static uint64_t mv64361_read(void *opaque, hwaddr addr, unsigned int size) } }break ; +case MV64340_ETH_PHY_ADDR : + ret =0x98 ; +break ; +case MV64340_ETH_SMI : + ret =BIT (27 ); +break ;case MV64340_CUNIT_ARBITER_CONTROL_REG : ret =0x11ff0000 | (s->gpp_int_level <<10 );break;hw/pci-host/mv643xx.h +1
-0@@ -656,6 +656,9 @@/* Ethernet Unit Registers */ /****************************************/ +#define MV64340_ETH_PHY_ADDR
0x2000
+#defineMV64340_ETH_SMI0x2004
+
/*******************************************/
/* CUNIT Registers */
/*******************************************/
Cédric Le Goater
Acked-byQuoted 12 lines · BALATON Zoltan
Quoted 11 lines · BALATON Zoltan
Quoted 10 lines · BALATON Zoltan
Quoted 8 lines · BALATON Zoltan
We don't emulate the gigabit ethernet part of the chip but the MorphOS driver accesses these and expects to get some valid looking result otherwise it hangs. Add some minimal dummy implementation to avoid rhis.
Signed-off-by BALATON Zoltan <[email protected]>---
This is only used by MorphOS on pegasos2 so most likely could go via the ppc queue.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Ping?
Ping?
Ping?
https://patchew.org/QEMU/[email protected]/
It's unlikely this will get a review so can you please just merge it? It's my code so if I break it I'll fix it but this was tested a bit and no problem reported so far.
Thanks,
C.
Quoted 44 lines
Regards,
BALATON ZoltanQuoted 40 lines
Quoted 38 lines
Quoted 36 lines
hw/pci-host/mv64361.c| 6 ++++++hw/pci-host/mv643xx.h| 3 +++2 files changed, 9 insertions(+)hw/pci-host/mv64361.c +6
-0@@ -541,6 +541,12 @@ static uint64_t mv64361_read(void *opaque, hwaddr addr, unsigned int size) } } break; + case MV64340_ETH_PHY_ADDR: + ret = 0x98; + break; + case MV64340_ETH_SMI: + ret = BIT(27); + break;case
MV64340_CUNIT_ARBITER_CONTROL_REG:
ret =0x11ff0000| (s->gpp_int_level<< 10); break;hw/pci-host/mv643xx.h +3
-0@@ -656,6 +656,9 @@/* Ethernet Unit Registers */ /****************************************/ +#define MV64340_ETH_PHY_ADDR 0x2000 +#define MV64340_ETH_SMI 0x2004 +/*******************************************/ /* CUNIT Registers */ /*******************************************/
Quoted 12 lines · BALATON Zoltan
Quoted 11 lines · BALATON Zoltan
Quoted 10 lines · BALATON Zoltan
Quoted 8 lines · BALATON Zoltan
We don't emulate the gigabit ethernet part of the chip but the MorphOS driver accesses these and expects to get some valid looking result otherwise it hangs. Add some minimal dummy implementation to avoid rhis.
Signed-off-by BALATON Zoltan <[email protected]>---
This is only used by MorphOS on pegasos2 so most likely could go via the ppc queue.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Ping?
Ping?
Ping?
https://patchew.org/QEMU/[email protected]/
It's unlikely this will get a review so can you please just merge it? It's my code so if I break it I'll fix it but this was tested a bit and no problem reported so far.
Don't worry about it. I'll queue this up.
Daniel
Quoted 43 lines
Regards,
BALATON ZoltanQuoted 40 lines
Quoted 38 lines
Quoted 36 lines
hw/pci-host/mv64361.c| 6 ++++++hw/pci-host/mv643xx.h| 3 +++2 files changed, 9 insertions(+)hw/pci-host/mv64361.c +6
-0@@ -541,6 +541,12 @@ static uint64_t mv64361_read(void *opaque, hwaddr addr, unsigned int size) } } break; + case MV64340_ETH_PHY_ADDR: + ret = 0x98; + break; + case MV64340_ETH_SMI: + ret = BIT(27); + break;case
MV64340_CUNIT_ARBITER_CONTROL_REG:
ret =0x11ff0000| (s->gpp_int_level<< 10); break;hw/pci-host/mv643xx.h +3
-0@@ -656,6 +656,9 @@/* Ethernet Unit Registers */ /****************************************/ +#define MV64340_ETH_PHY_ADDR 0x2000 +#define MV64340_ETH_SMI 0x2004 +/*******************************************/ /* CUNIT Registers */ /*******************************************/
Daniel Henrique Barboza
AppliedQuoted 9 lines · BALATON Zoltan
Quoted 8 lines · BALATON Zoltan
We don't emulate the gigabit ethernet part of the chip but the MorphOS driver accesses these and expects to get some valid looking result otherwise it hangs. Add some minimal dummy implementation to avoid rhis.
Signed-off-by BALATON Zoltan <[email protected]>---
This is only used by MorphOS on pegasos2 so most likely could go via the ppc queue.
And it will.
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks,
Daniel
Quoted 42 lines
Ping?
Regards,
BALATON ZoltanQuoted 36 lines
hw/pci-host/mv64361.c| 6 ++++++hw/pci-host/mv643xx.h| 3 +++2 files changed, 9 insertions(+)hw/pci-host/mv64361.c +6
-0@@ -541,6 +541,12 @@ static uint64_t mv64361_read(void *opaque, hwaddr addr, unsigned int size) } } break; + case MV64340_ETH_PHY_ADDR: + ret = 0x98; + break; + case MV64340_ETH_SMI: + ret = BIT(27); + break;case
MV64340_CUNIT_ARBITER_CONTROL_REG:
ret =0x11ff0000| (s->gpp_int_level<< 10); break;hw/pci-host/mv643xx.h +3
-0@@ -656,6 +656,9 @@/* Ethernet Unit Registers */ /****************************************/ +#define MV64340_ETH_PHY_ADDR 0x2000 +#define MV64340_ETH_SMI 0x2004 +/*******************************************/ /* CUNIT Registers */ /*******************************************/