On Sat 7 Apr 2007 20:05, Marc Hoffman pondered:
> Some of the things that I have want to do are related specialized
> exception handlers.

After thinking about this a little more, (Marc and I briefly discussed this on 
Friday, and a few other times), what you are able to do in exception space is 
pretty limited...

You have limited access to a stack. (there is no exception stack - we store 
the existing stack pointer into the return from NMI register (retn), and load 
a fixed stack _exception_stack_top - in it's place).
You have no access to kernel functions (not all kernel memory/instruction is 
locked in the CPLB tables).
You don't really know if your module would be locked in the CPLB tables (but 
you could find where it is, and walk the table, and lock it in - today this 
would not be a big deal, since we use 4Meg CPLB pages to cover iCPLBs, but 
this will get more difficult in the future, as we actually do better memory 
protection, and have smaller CPLBs).
The same issue would exist for any data/bss for your module/exception handler.

> Places where this seems to be interesting to me are.
>
>  1. fast 2d-dma drivers for video

This seems like it would be just a few MMR writes via registers that are 
passed in? (or were you thinking anything more complex)? Getting the compiler 
to output the right code to call your custom exception might be a little 
tricky (a little inline assembly should be all that is necessary). Were you 
thinking that this would be C-callable, or just from a .S file?

>  2. performance modeling drivers i.e. install specialized excpt handler
>     for performance counters.
I'm not sure what is meant by this. Can you describe what you were thinking 
of?

Before we jump to allowing extending the exception handlers via run time 
modules, we should allow them to be extended with a static compile, without 
having to change the entry.S file. (this doesn't exist today)

There would need to be some defined method to how we should put all the 
exception handling code/data together in a section so - so we can make sure it 
is locked in the CPLB. What we do now, is just try to ensure it is all in the 
first 4Meg...  Which only works, because we cover things with 4Meg pages, and 
our kernel is normally small.

__ex_table is a symbol that we have defined in the vmlinux.lds.S file, but it 
doesn't seem to be used in the source anywhere (like it is in other ports). I 
am guessing that is what we should be using for a section name to start?

-Robin

_______________________________________________
Uclinux-dist-devel mailing list
Uclinux-dist-devel@blackfin.uclinux.org
http://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel

Reply via email to