Linux MIPS Architecture development
 help / color / mirror / Atom feed
* TLB on R10k
@ 2004-04-27 18:07 Stanislaw Skowronek
  2004-04-27 18:33 ` Thiemo Seufer
  2004-04-27 19:28 ` Ralf Baechle
  0 siblings, 2 replies; 9+ messages in thread
From: Stanislaw Skowronek @ 2004-04-27 18:07 UTC (permalink / raw)
  To: linux-mips

Why, in tlb-andes.c, all exception handlers are prefixed with an
ampersand (&) when copying them to main memory, only the r10k fill handler
isn't? I'm getting a blackhole-style crash (no messages, no panic,
interrupts dead as a doornail, nobody knows what is happening) as soon as
I try to jump to usermode.

Stanislaw Skowronek

--<=>--
  Paranoid: one who is truly in touch with reality.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TLB on R10k
  2004-04-27 18:07 TLB on R10k Stanislaw Skowronek
@ 2004-04-27 18:33 ` Thiemo Seufer
  2004-04-27 18:54   ` Stanislaw Skowronek
  2004-04-27 19:28 ` Ralf Baechle
  1 sibling, 1 reply; 9+ messages in thread
From: Thiemo Seufer @ 2004-04-27 18:33 UTC (permalink / raw)
  To: linux-mips

Stanislaw Skowronek wrote:
> Why, in tlb-andes.c, all exception handlers are prefixed with an
> ampersand (&) when copying them to main memory, only the r10k fill handler
> isn't?

Sloppiness, I guess. They resolve to function pointers anyway. But the
flush_icache_range should be fixed to cover all memcpy'ed memory.


Thiemo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TLB on R10k
  2004-04-27 18:33 ` Thiemo Seufer
@ 2004-04-27 18:54   ` Stanislaw Skowronek
  0 siblings, 0 replies; 9+ messages in thread
From: Stanislaw Skowronek @ 2004-04-27 18:54 UTC (permalink / raw)
  To: Thiemo Seufer; +Cc: linux-mips

> Sloppiness, I guess. They resolve to function pointers anyway. But the
> flush_icache_range should be fixed to cover all memcpy'ed memory.

Yes, I've done it, too. Still gets hung. I wonder why, I have looked at
all exception code and it is 64-bit-clean (except for some bit that is
only compiled on SMP, so I don't really care).

/s

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TLB on R10k
  2004-04-27 18:07 TLB on R10k Stanislaw Skowronek
  2004-04-27 18:33 ` Thiemo Seufer
@ 2004-04-27 19:28 ` Ralf Baechle
  2004-04-28  5:37   ` Stanislaw Skowronek
  1 sibling, 1 reply; 9+ messages in thread
From: Ralf Baechle @ 2004-04-27 19:28 UTC (permalink / raw)
  To: Stanislaw Skowronek; +Cc: linux-mips

On Tue, Apr 27, 2004 at 08:07:23PM +0200, Stanislaw Skowronek wrote:

> Why, in tlb-andes.c, all exception handlers are prefixed with an
> ampersand (&) when copying them to main memory, only the r10k fill handler
> isn't? I'm getting a blackhole-style crash (no messages, no panic,
> interrupts dead as a doornail, nobody knows what is happening) as soon as
> I try to jump to usermode.

Have you verified that the UX bit is set correctly by your kernel?  BEV
also plays a role but since you survive BogoMIPS it should be right.

  Ralf

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TLB on R10k
  2004-04-27 19:28 ` Ralf Baechle
@ 2004-04-28  5:37   ` Stanislaw Skowronek
  2004-04-28  5:37     ` Stanislaw Skowronek
  2004-04-28 17:27     ` Ralf Baechle
  0 siblings, 2 replies; 9+ messages in thread
From: Stanislaw Skowronek @ 2004-04-28  5:37 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

> Have you verified that the UX bit is set correctly by your kernel?  BEV
> also plays a role but since you survive BogoMIPS it should be right.

From what I remember, the UX bit is fixed set. I have made the machine
print a '*' (no, I didn't use printk, but since it's my own console
driver I'm pretty sure it can work in interrupts - all it does is
hardware writes) whenever it gets a TLB refill and flushed the TLB before
entering usermode. Guess what, I didn't get a single '*' after ERET. To
verify my method, I've made a single read from the usermode PC from the
kernel, and the '*' appeared. I don't know what's up.

Stanislaw

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TLB on R10k
  2004-04-28  5:37   ` Stanislaw Skowronek
@ 2004-04-28  5:37     ` Stanislaw Skowronek
  2004-04-28 17:27     ` Ralf Baechle
  1 sibling, 0 replies; 9+ messages in thread
From: Stanislaw Skowronek @ 2004-04-28  5:37 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

> Have you verified that the UX bit is set correctly by your kernel?  BEV
> also plays a role but since you survive BogoMIPS it should be right.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TLB on R10k
@ 2004-04-28 15:05 Alex Deucher
  2004-04-28 15:05 ` Alex Deucher
  0 siblings, 1 reply; 9+ messages in thread
From: Alex Deucher @ 2004-04-28 15:05 UTC (permalink / raw)
  To: sskowron; +Cc: linux-mips

This thread may be ARM specific, but it sounds like a similar problem. 
if it's of no use, please ignore.

http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2003-November/018303.html
http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2003-November/018409.html

Alex

-----------------------------

> Have you verified that the UX bit is set correctly by your kernel? 
BEV
> also plays a role but since you survive BogoMIPS it should be right.

From what I remember, the UX bit is fixed set. I have made the machine
print a '*' (no, I didn't use printk, but since it's my own console
driver I'm pretty sure it can work in interrupts - all it does is
hardware writes) whenever it gets a TLB refill and flushed the TLB
before
entering usermode. Guess what, I didn't get a single '*' after ERET. To
verify my method, I've made a single read from the usermode PC from the
kernel, and the '*' appeared. I don't know what's up.

Stanislaw


	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TLB on R10k
  2004-04-28 15:05 Alex Deucher
@ 2004-04-28 15:05 ` Alex Deucher
  0 siblings, 0 replies; 9+ messages in thread
From: Alex Deucher @ 2004-04-28 15:05 UTC (permalink / raw)
  To: sskowron; +Cc: linux-mips

This thread may be ARM specific, but it sounds like a similar problem. 
if it's of no use, please ignore.

http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2003-November/018303.html
http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2003-November/018409.html

Alex

-----------------------------

> Have you verified that the UX bit is set correctly by your kernel? 
BEV
> also plays a role but since you survive BogoMIPS it should be right.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TLB on R10k
  2004-04-28  5:37   ` Stanislaw Skowronek
  2004-04-28  5:37     ` Stanislaw Skowronek
@ 2004-04-28 17:27     ` Ralf Baechle
  1 sibling, 0 replies; 9+ messages in thread
From: Ralf Baechle @ 2004-04-28 17:27 UTC (permalink / raw)
  To: Stanislaw Skowronek; +Cc: linux-mips

On Wed, Apr 28, 2004 at 07:37:06AM +0200, Stanislaw Skowronek wrote:

> > Have you verified that the UX bit is set correctly by your kernel?  BEV
> > also plays a role but since you survive BogoMIPS it should be right.
> 
> >From what I remember, the UX bit is fixed set. I have made the machine
> print a '*' (no, I didn't use printk, but since it's my own console
> driver I'm pretty sure it can work in interrupts - all it does is
> hardware writes) whenever it gets a TLB refill and flushed the TLB before
> entering usermode. Guess what, I didn't get a single '*' after ERET. To
> verify my method, I've made a single read from the usermode PC from the
> kernel, and the '*' appeared. I don't know what's up.

printk can be used in exceptions.

Be careful when changing the TLB exception handlers.  They occupy slots
of just 128 bytes or 32 instructions.  Maybe your debugging code just
extended it beyond that maximum?

  Ralf

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-04-28 17:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-27 18:07 TLB on R10k Stanislaw Skowronek
2004-04-27 18:33 ` Thiemo Seufer
2004-04-27 18:54   ` Stanislaw Skowronek
2004-04-27 19:28 ` Ralf Baechle
2004-04-28  5:37   ` Stanislaw Skowronek
2004-04-28  5:37     ` Stanislaw Skowronek
2004-04-28 17:27     ` Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2004-04-28 15:05 Alex Deucher
2004-04-28 15:05 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox