All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: qemu-devel@nongnu.org, hpoussin@reactos.org,
	aleksandar.rikalo@syrmia.com, f4bug@amsat.org,
	aurelien@aurel32.net, jiaxun.yang@flygoat.com,
	jasowang@redhat.com
Subject: [PATCH 0/5] dp8393x: fixes for MacOS toolbox ROM
Date: Sun, 13 Jun 2021 17:37:33 +0100	[thread overview]
Message-ID: <20210613163738.2141-1-mark.cave-ayland@ilande.co.uk> (raw)

Here is the next set of patches from my attempts to boot MacOS under QEMU's
Q800 machine related to the Sonic network adapter.

Patches 1 and 2 sort out checkpatch and convert from DPRINTF macros to
trace-events.

Patch 3 fixes the PROM checksum and MAC address storage format as found by
stepping through the MacOS toolbox.

Patch 4 ensures that the CPU loads/stores are correctly converted to 16-bit
accesses for the network card and patch 5 fixes a bug when selecting the
index specified for CAM entries.

NOTE TO MIPS MAINTAINERS:

- The Sonic network adapter is used as part of the MIPS jazz machine, however
  I don't have a working kernel and system to test it with. Any pointers to
  test images would be appreciated.

- The changes to the PROM checksum in patch 3 were determined by stepping
  through the MacOS toolbox, and is different from the existing algorithm.
  Has the current PROM checksum algorithm been validated on a MIPS guest or
  was it just a guess? It might be that 2 different algorithms are needed for
  the Q800 vs. Jazz machine.

- My current guess is the jazzsonic driver is broken since the last set of
  dp8393x changes as the MIPS jazz machine does not set the "big_endian"
  property on the dp8393x device. I'd expect that the following diff would
  be needed, but I can't confirm this without a suitable test image.

diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
index 1e1cf8154e..1df67035aa 100644
--- a/hw/mips/jazz.c
+++ b/hw/mips/jazz.c
@@ -280,6 +280,7 @@ static void mips_jazz_init(MachineState *machine,
             dev = qdev_new("dp8393x");
             qdev_set_nic_properties(dev, nd);
             qdev_prop_set_uint8(dev, "it_shift", 2);
+            qdev_prop_set_bit(dev, "big_endian", true);
             object_property_set_link(OBJECT(dev), "dma_mr",
                                      OBJECT(rc4030_dma_mr), &error_abort);
             sysbus = SYS_BUS_DEVICE(dev);

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

[q800-macos-upstream patchset series: 3]

Mark Cave-Ayland (5):
  dp8393x: checkpatch fixes
  dp8393x: convert to trace-events
  dp8393x: fix PROM checksum and MAC address storage
  dp8393x: don't force 32-bit register access
  dp8393x: fix CAM descriptor entry index

 hw/net/dp8393x.c    | 332 ++++++++++++++++++++++++--------------------
 hw/net/trace-events |  17 +++
 2 files changed, 198 insertions(+), 151 deletions(-)

-- 
2.20.1



             reply	other threads:[~2021-06-13 16:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-13 16:37 Mark Cave-Ayland [this message]
2021-06-13 16:37 ` [PATCH 1/5] dp8393x: checkpatch fixes Mark Cave-Ayland
2021-06-13 16:37 ` [PATCH 2/5] dp8393x: convert to trace-events Mark Cave-Ayland
2021-06-13 16:37 ` [PATCH 3/5] dp8393x: fix PROM checksum and MAC address storage Mark Cave-Ayland
2021-06-13 16:37 ` [PATCH 4/5] dp8393x: don't force 32-bit register access Mark Cave-Ayland
2021-06-13 16:37 ` [PATCH 5/5] dp8393x: fix CAM descriptor entry index Mark Cave-Ayland
2021-06-14  5:36 ` [PATCH 0/5] dp8393x: fixes for MacOS toolbox ROM Philippe Mathieu-Daudé
2021-06-14  7:51   ` Mark Cave-Ayland
2021-06-16  3:09     ` Finn Thain
2021-06-16  6:10       ` Mark Cave-Ayland
2021-06-18  6:22         ` Finn Thain
2021-06-24 14:42           ` Mark Cave-Ayland
2021-06-25  4:36             ` Finn Thain
2021-06-25  6:17               ` Mark Cave-Ayland
2021-06-25  9:32                 ` Finn Thain
2021-06-25 11:49                   ` Mark Cave-Ayland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210613163738.2141-1-mark.cave-ayland@ilande.co.uk \
    --to=mark.cave-ayland@ilande.co.uk \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=aurelien@aurel32.net \
    --cc=f4bug@amsat.org \
    --cc=hpoussin@reactos.org \
    --cc=jasowang@redhat.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.