Subject: set_except_vector question

From: Lars Munch <[email-masked]>
Date: Sat, 1 Sep 2001 16:58:42 +0200

Hi

I have been looking at the set_except_vector function in
arch/mips[64]/kernel/traps.c and wondering why the handler
address is changed/recalculated before it is stored:

*(volatile u32 *)(KSEG0+0x200) = 0x08000000 | (0x03ffffff & (handler >> 2));
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  

Could someone please enlighten me?

Thanks
Lars Munch

---

From: "Bradley D. LaRonde" <[email-masked]>
Date: Sat, 1 Sep 2001 11:54:26 -0400

Looks like it is synthesizing a jump (j) instruction to forward interrupt
exceptions to the interrupt handler for cpus that have a dedicated interrupt
vector (DIVEC).  arch/mips/kernel/setup.c sets the DIVEC option for certain
cpus.

Regards,
Brad

---

From: Lars Munch <[email-masked]>
Date: Sat, 1 Sep 2001 18:10:09 +0200

What do you mean by "synthesizing a jump"?

My CPU is a 5Kc and it has a DIVEC which is set to the mipsIRQ function in
/arch/mips64/mips-boards/generic/mipsIRQ.S to handle interrupts. But I still do
not understand the address manipulation which is done before storing the
function pointer (handler).

Thanks
Lars Munch

---

From: "Bradley D. LaRonde" <[email-masked]>
Date: Sat, 1 Sep 2001 13:00:37 -0400

I haven't verified it, but it looks like it is making jump (j) instruction
that jumps to handler.  So the first instruction at the dedicated interrupt
vector becomes a jump to the handler.

Regards,
Brad

----- Original Message -----
From: "Lars Munch" <[email-masked]>
To: "Bradley D. LaRonde" <[email-masked]>
Cc: <[email-masked]>
Sent: Saturday, September 01, 2001 12:10 PM
Subject: Re: set_except_vector question

> > > *(volatile u32 *)(KSEG0+0x200) = 0x08000000 | (0x03ffffff & (handler
>>
> > 2));
> > >