FreeBSD on an Efika

Andrew Turner andrew at fubar.geek.nz
Tue Dec 19 22:26:26 PST 2006


On Mon, 18 Dec 2006 16:25:16 -0800
Peter Grehan <grehan at freebsd.org> wrote:
>   a) Put in exception handlers at 0x1000, 0x1100 and 0x1200 to catch
> the TLB miss e.g.
> 
>    bcopy(&trapcode, (void *)0x1000, (size_t)&trapsize);
> 
>   As you can see in <machine/trap.h>, the existing vector definition 
> don't match these, or are incorrect for the G2 core.
There is EXC_IMISS, EXC_DLMISS and EXC_DSMISS.

>   d) Now the fun part: for those exceptions, change the handler to
> point to code that will walk the PTEG table and insert a TLB if
> found. If not found, fake a DSI or ISI trap. This can be done in C,
> though you will have to be careful to use a pre-allocated stack and
> not touch any virtual addresses while doing this, since it could
> result in another fault.
The attached patch adds the NetBSD handlers. There is a bug in the
patch where I can read data once but on the next read or write the
kernel crashes.

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: efika-1.diff
Type: text/x-patch
Size: 8924 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ppc/attachments/20061220/9a02f75f/efika-1.bin


More information about the freebsd-ppc mailing list