5 Mar 2004 12:10
Re: Panic on suspend
Markus Hennecke <markus.hennecke <at> fh-swf.de>
2004-03-05 11:10:31 GMT
2004-03-05 11:10:31 GMT
On Fri, 20 Feb 2004, M. Warner Losh wrote:
> Yes. However, the panic of TLB not in universe is one that takes a
> great deal of time and effort to understand since it is in, effect, a
> 'can't happen' bug. I've only ever been able to understand one of
> these panics I've received. It was caused by a bad memory access of a
> free'd pointer which lead to bogus stuff being written to the TLB. By
> the time I understood it, the bug no longer existed in the -current
> sources.
I have found the bug. Executing the suspend instruction seems to change
the TLB entries, if I save the TLB entries right before this instruction
and restore them afterwards the device will suspend and wake up like it
should.
For now I have written functions saveTLB and restoreTLB in
locore_machdep.S and use them like this in hpcapm.c:
saveTLB();
__asm(".set noreorder");
__asm(".word " ___STRING(VR_OPCODE_SUSPEND));
__asm("nop");
__asm("nop");
__asm("nop");
__asm("nop");
__asm("nop");
__asm(".set reorder");
restoreTLB();
Is there a better place than locore_machdep.S to put these functions? Or
are there functions doing the same already in the kernel sources? I
(Continue reading)
(It's also midly out of date, I should upgrade to 1.6.2)
Anyone else have a more up-to-date one?
Joe.
RSS Feed