tech-kern archive

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

PowerBook 5xx instability fix.



Hi,

I've found that the PowerBook 5xx would crash randomly in pmap functions.  It 
seems as though PTEs were referenced beyond the end of ram.

Unless there is a better way to handle this I'd like to commit the attached 
patch.

I found the fix while limiting the available ram in the Booter.  Making the ram 
smaller in the Booter the PowerBook never crashed.  But to lose 1MB ram is 
wasteful so with the patch at least I only lose 48k.

Thoughts?


Best regards,

Nat
diff -r 7e5131a731a0 sys/arch/mac68k/mac68k/pmap_bootstrap.c
--- a/sys/arch/mac68k/mac68k/pmap_bootstrap.c	Wed Oct 23 12:47:39 2024 +0000
+++ b/sys/arch/mac68k/mac68k/pmap_bootstrap.c	Sun Oct 27 08:05:27 2024 +1100
@@ -163,6 +163,11 @@ pmap_bootstrap(paddr_t nextpa, paddr_t f
 	 * pages for that size.
 	 */
 	mem_size = 0;
+
+	/* Hack for instabilty on the PowerBook 5xx. */
+	if (mac68k_machine.machineid == MACH_MACPB500)
+		high[numranges - 1] -= 48 * 1024;
+
 	for (i = 0; i < numranges; i++)
 		mem_size += high[i] - low[i];
 	nptpages += howmany(m68k_btop(mem_size), NPTEPG);


Home | Main Index | Thread Index | Old Index