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

Re: [linux-mac68k] Re: PowerBook 540c



On Tue, 26 Oct 2004, Brad Boyer wrote:
> On Tue, Oct 26, 2004 at 09:16:35PM +1000, Finn Thain wrote:
> > As someone else pointed out recently, just having some way to determine
> > the presence or absence of the bug would be good.
> 
> Well, I don't know enough about the memory management code to write it,
> but a basic outline of a test that should work would be as follows:
> 
> create a page filled with NOP, and set the last word to an FPU instruction
> (must be an emulated/non-existent instruction)
> set the next page after it to exist, but be flagged as swapped out
> start up a thread on the page leading up to the FPU instruction
> if both the FPU handler and the page fault get called, the chip is good
> 
> My understanding of the bug is that the page fault handler gets called
> during instruction prefetch and the current machine state isn't properly
> preserved. This causes the emulated instruction to act like it completed,
> but the handler was not actually called. It leaves the chip in any of a
> number of unexpected states leading to errors.

For working around this bug, the page fault handler should check whether (a)
the page fault happened during an instruction fetch for the first word of the
page, and (b) the last word on the previous page is an emulated/non-existent
instruction?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds



Reply to: