[Top] [All Lists]

Re: Booting Linux on Vadem Clio

To: <>, <>
Subject: Re: Booting Linux on Vadem Clio
From: "Bradley D. LaRonde" <>
Date: Mon, 19 Jul 1999 16:09:59 -0400
>You may be running code in kseg0, but you're apparently trying to load from
>or store to one of the TLB-mapped segments.  Be careful about what
>assumptions you make about where that exception is coming from.  You could
>be triggering some other exception, then that exception could be causing a
>TLB miss, possibly as a result of going haywire (or possibly normal).  If
>you don't have the exception handlers going into an infinite loop after
>turn on the LED blink, they're going to go on their merry way, handle the
>exception as best they can, then return (or panic and die if they discover
>something really bad).

Good thinking.  I put the exceptions into inifinite loop after the blink
code.  That showed me that the first exception I'm getting is an "other"

Interrupts are disabled, so it's not one of those.  But if I can't even jump
to a function (!), I'm miles away from dumping the exception info registers
to the screen or serial port to figure out what the "other" is.

So then I decided to set up a "heartbeat" blink (distinguishable from all
other blinks - dit, pause, dit) right off.

Aside: What would I do without the LED?

Then I put an infinte loop right *before* jal prom_init.

Heartbeat came on and continued as expected.

Then I removed the infinite loop right before prom_init and put one first
thing *inside* promp_init.  Guess what?  I get an "other" exception.

What?  Check this out.  It's not even touching the stack now, and it still

0000000080000784 <kernel_entry>:
    // disable interrupts
    80000784: 40086000  mfc0 $t0,$12
    80000788: 35080001  ori $t0,$t0,0x1
    8000078c: 39080001  xori $t0,$t0,0x1
    80000790: 40886000  mtc0 $t0,$12

    // setup heartbeat
    80000794: 24020001  li $v0,1
    80000798: 3c01ab00  lui $at,0xab00
    8000079c: a4220240  sh $v0,576($at)
    800007a0: 24020010  li $v0,16
    800007a4: 3c01ab00  lui $at,0xab00
    800007a8: a4220242  sh $v0,578($at)
    800007ac: 24020001  li $v0,1
    800007b0: 3c01ab00  lui $at,0xab00
    800007b4: a4220248  sh $v0,584($at)

    // probe the cpu
    800007b8: 1000001e  b 80000834 <cpu_probe>
    800007bc: 00000000  nop

00000000800007c0 <probe_done>:
    // setup the stack
    800007c0: 3c1c8000  lui $gp,0x8000
    800007c4: 279c6000  addiu $gp,$gp,24576
    800007c8: 27881fe0  addiu $t0,$gp,8160
    800007cc: 3c018008  lui $at,0x8008
    800007d0: ac2880cc  sw $t0,-32564($at)
    800007d4: 251dfff0  addiu $sp,$t0,-16

    // clear bss
    800007d8: 3c088008  lui $t0,0x8008
    800007dc: 25086a30  addiu $t0,$t0,27184
    800007e0: ad000000  sw $zero,0($t0)
    800007e4: 3c09800a  lui $t1,0x800a
    800007e8: 2529a40c  addiu $t1,$t1,-23540
    800007ec: 25080004  addiu $t0,$t0,4
    800007f0: 1509fffe  bne $t0,$t1,800007ec <probe_done+2c>
    800007f4: ad000000  sw $zero,0($t0)

    // when an infinite loop is placed here, the heartbeat continues
    // when one is not here, I get an "other" exception

    // jump and link to prom_init
    800007f8: 0c01db5b  jal 80076d6c <prom_init>
    800007fc: 00000000  nop


0000000080076d6c <prom_init>:
    // adjust the stack pointer for local vars
    80076d6c: 27bdfff0  addiu $sp,$sp,-16

    // endless loop
    80076d70: 0801db5c  j 80076d70 <prom_init+4>
    80076d74: 00000000  nop

How can that possibly except?  Any ideas?


<Prev in Thread] Current Thread [Next in Thread>