Port-macppc archive

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

[PATCH] PMAC_G5: Add identity mapping for msgbuf




Hi,

i found another problem on PowerMac G5.

This line of code

__syncicache((void *)msgbuf_paddr, round_page(MSGBUFSIZE));

in file sys/arch/macppc/macppc/machdep.c
causes a DSI trap in kernel on PowerMac G5 when i try to reboot it.
The reason is that the msgbuf is allocated at a high address
which is > SEGMENT_LENGTH and therefore the msgbuf is not
identity mapped.

On my PMAC G5 the physical address of the msgbuf is 0x7f5ed000
which is outside of the segment0. Thefore, we have to map it too.
The patch is attached.

Regards
Index: sys/arch/powerpc/oea/ofwoea_machdep.c
===================================================================
RCS file: /pub/NetBSD-CVS/src/sys/arch/powerpc/oea/ofwoea_machdep.c,v
retrieving revision 1.32
diff -u -r1.32 ofwoea_machdep.c
--- sys/arch/powerpc/oea/ofwoea_machdep.c       11 Apr 2013 17:13:15 -0000      
1.32
+++ sys/arch/powerpc/oea/ofwoea_machdep.c       13 Apr 2013 20:02:22 -0000
@@ -242,7 +242,8 @@
                paddr_t pa;
                int i;
 
-               pmap_setup_segment0_map(0, 0x0);
+               pmap_setup_segment0_map(0, msgbuf_paddr, msgbuf_paddr,
+                   round_page(MSGBUFSIZE), 0x0);
 
                /* Map OFW code+data */
 


Home | Main Index | Thread Index | Old Index