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: