qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Fix" for screamer patch on -current qemu (fwd)


From: BALATON Zoltan
Subject: Re: "Fix" for screamer patch on -current qemu (fwd)
Date: Fri, 21 Mar 2025 01:52:07 +0100 (CET)

On Thu, 20 Mar 2025, BALATON Zoltan wrote:
On Tue, 18 Mar 2025, BALATON Zoltan wrote:
The 0001-WIP-G4-ROM-hacks.patch is some changes that I've found are needed for mac99,via=pmu with an appropriate ROM but I did not get that working so probably a lot more is missing for this but I don't remember what as I did this two years ago.

In case this helps to find what's missing or debug some other problem I document here what I'm getting with this on the latest screamer-v9.1.0 with mac99,via=pmu and a G4 Mac ROM. I also picked 70f98ae150ab to fix gpio trace logs and enabled the DEBUG define in mac_dbdma. With this G4 ROM patch the ROM can poke the macio chip (without that it tries to set the bridge that was previously removed then looks for macio on PCI bus 1 behind the bridge so writes won't reach the macio device, this patch hacks around this) but since there's no i2c bus or SPD ROMs it's expected to not be able to detect memory yet. But I'm not sure it even gets to the point trying that and maybe fails earlier. What it does is reading a lot from macio register 0x61 seemingly waiting for a bit in there which is in the GPIO cell and shows as addr 0x9 (after substracting 8) that according to linux/arch/powerpc/include/asm/keylargo.h may be this:

#define KEYLARGO_GPIO_EXTINT_0          0x58

#define KL_GPIO_PMU_MESSAGE_IRQ         (KEYLARGO_GPIO_EXTINT_0+0x09)

but it also does mftb and mftbu during this so could be related to this:

#define KEYLARGO_GPIO_0                 0x6A

/* Hrm... this one is only to be used on Pismo. It seems to also
* control the timebase enable on other machines. Still to be
* experimented... --BenH.
*/
#define KL_GPIO_FW_CABLE_POWER          (KEYLARGO_GPIO_0+0x09)
#define KL_GPIO_TB_ENABLE               (KEYLARGO_GPIO_0+0x09)

but the register address does not seem to match. I don't know if this is a problem or not as it seems to continue eventually but instead of the startup sound it plays a continuous test tone. While doing that I see:

I still don't know what that GPIO line is but I tried setting the bit in it which it's looking for and that makes it take a different path and instead of playing the test tone it starts poking the same i2c bus that I saw MorphOS is trying to use (MorphOS looks for the hardware sensors there but maybe also the SPD eeproms are there) so to get this further somebody would need to finally implement this: https://codeberg.org/qmiga/pages/wiki/SubprojectMac99I2C then we could see what address it tries to access on the i2c bus and maybe adding SPD data there could get it to boot into OpenFirmware. I2c is a bit confusing but it's not too complex. I've implemented several of these for other machines I wanted to emulate but did not want to do for mac99 that I'm not that much interested in. That's why I wrote that wiki page hoping somebody could finish it but nobody picked that up so far since 2019 when I first wrote that (the 2023 date on the above page is when I moved it to codeberg from osdn but it was there for longer). Anybody wants to give it a try?

Regards,
BALATON Zoltan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]