Re: exception handling in kernel code
- From: John Baldwin <jhb@xxxxxxxxxxx>
- Date: Mon, 14 Aug 2006 09:32:57 -0400
On Monday 14 August 2006 02:46, Stanislav Sedov wrote:
Hi!
I'm trying to write kernel code where exceptions are unavoidable.
To clarify , I need to recover after GP (general protection) exception
on i386 cpu and return an error in that case.
Unfortunately, looking in trap.c kernel code I can't find any exception
handling mechanism except inserting hooks into trap.c.
So, the question is: how can one recover after exception in kernel
code? AFAIK, linux build special exception table from various __ex_table
sections to allow placing recover code into .fixup section. Does any such
mechanism exists in freebsd?
Thanks!
You can make use of pcb_onfault to recover from a page fault, but that's
about it. Kernel code is expected to not generate exceptions. :)
--
John Baldwin
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: exception handling in kernel code
- From: Stanislav Sedov
- Re: exception handling in kernel code
- References:
- exception handling in kernel code
- From: Stanislav Sedov
- exception handling in kernel code
- Prev by Date: Re: Unable to get RealTek 8139C+ to work with re(4) under FreeBSD 6.1
- Next by Date: Re: amd64 port on Prescott 2M?
- Previous by thread: exception handling in kernel code
- Next by thread: Re: exception handling in kernel code
- Index(es):
Relevant Pages
|