Skip to contentSkip to conversation

Linux prom mmu mapping expectations?

DISCUSSION Blue Swirl 2 participants 3 messages Oct 7, 2004 – Oct 8, 2004

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Hi,

What kind of memory mappings Linux expects from Prom side?

Background: I've been trying to get Qemu run Linux 2.6.8.1 for sparc32, but currently there is a MMU fault at srmmu_early_allocate_ptable_skeleton. The code in question is as follows:

0xf00fdec4:  ldd  [ %o1 + -64 ], %g2
0xf00fdec8:  ldd  [ %o1 + -56 ], %g4
0xf00fdecc:  st  %g2, [ %o0 + -64 ]
0xf00fded0:  st  %g3, [ %o0 + -60 ]
0xf00fded4:  st  %g4, [ %o0 + -56 ]
0xf00fded8:  st  %g5, [ %o0 + -52 ]
0xf00fdedc:  ldd  [ %o1 + -48 ], %g2
0xf00fdee0:  ldd  [ %o1 + -40 ], %g4

This code is in memcpy, but I can't find where it is called from in the function (srmmu_early_allocate_ptable_skeleton, srmmu.c).

The faulting address is 0xf00fdec4, %o1 is 0xf0000000. There is no MMU mapping at the address. I tried adding some code into Proll to map the area, but that didn't help.

Any clues, please?

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?pageþatures/featuredemail

#1 lore raw
Quoted 12 lines · On Thu, 07 Oct 2004 20:22:38 +0200 "Blue Swirl" <[email protected]> wrote:

Background: I've been trying to get Qemu run Linux 2.6.8.1 for sparc32, but currently there is a MMU fault at srmmu_early_allocate_ptable_skeleton. The code in question is as follows:

0xf00fdec4:  ldd  [ %o1 + -64 ], %g2
0xf00fdec8:  ldd  [ %o1 + -56 ], %g4
0xf00fdecc:  st  %g2, [ %o0 + -64 ]
0xf00fded0:  st  %g3, [ %o0 + -60 ]
0xf00fded4:  st  %g4, [ %o0 + -56 ]
0xf00fded8:  st  %g5, [ %o0 + -52 ]
0xf00fdedc:  ldd  [ %o1 + -48 ], %g2
0xf00fdee0:  ldd  [ %o1 + -40 ], %g4
Quoted 6 lines

This code is in memcpy, but I can't find where it is called from in the function (srmmu_early_allocate_ptable_skeleton, srmmu.c).

The faulting address is 0xf00fdec4, %o1 is 0xf0000000. There is no MMU mapping at the address. I tried adding some code into Proll to map the area, but that didn't help.

0xf0000000 is KERNBASE, and arch/sparc/kernel/head.S load mappings for the entire kernel image, starting at KERNBASE, into the MMU.

author
#2 lore raw
In reply to Blue Swirl
Quoted 2 lines

0xf0000000 is KERNBASE, and arch/sparc/kernel/head.S load mappings for the entire kernel image, starting at KERNBASE, into the MMU.

Thanks. I found the bug in Proll:

src/system.c 2004-10-08 18:08:50.000000000 +0200 renamed from src/system.c 2002-07-23 07:52:49.000000000 +0200 +2 -2
@@ -298,8 +298,8 @@
        }
 
        /* We need to start from LOADBASE, but kernel wants PAGE_SIZE. */
-       pa = PAGE_SIZE;
-       for (va = PAGE_SIZE; va < LOWMEMSZ; va += PAGE_SIZE) {
+       pa = 0;
+       for (va = 0; va < LOWMEMSZ; va += PAGE_SIZE) {
                map_page(l1, va, pa, 0, highbase);
                pa += PAGE_SIZE;
        }

Now we are stuck at poke_srmmu call faulting mysteriously, even though poke_srmmu is correctly initialized earlier at init_cypress_604. Kill one bug, advance 500 instructions, next bug halts progress.

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?pageþatures/junkmail