exception handling in kernel code
John-Mark Gurney
gurney_j at resnet.uoregon.edu
Mon Aug 14 20:42:37 UTC 2006
Stanislav Sedov wrote this message on Mon, Aug 14, 2006 at 23:12 +0600:
> On Mon, 14 Aug 2006 11:15:22 -0700
> John-Mark Gurney <gurney_j at resnet.uoregon.edu> mentioned:
> >
> > You should make a MD API for reading these out (if one doesn't already
> > exist) that handle the faulting for you, and then have your driver hook
> > into this api...
> >
> > I had to do something similar for accessing PCI config registers
> > that don't exist and cause a fault...
>
> Do you know some examples to look at? The problem is that i can't make
> modifications in trap.c or anywhere else in src tree as such driver
> isn't likely to become a part of FreeBSD kernel.
That will be very difficult to do then.... The work I did for accessing
PCI config registers had to be merged into the tree... Maybe introducing
a method for adding a MD callback to the trap handler for other modules
that need this? Short of modifing the function in real time to point
to your code, I don't have any suggestions...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
More information about the freebsd-hackers
mailing list