Fields tf_addr and tf_err in struct trapframe.

Konstantin Belousov kostikbel at gmail.com
Fri Mar 22 12:08:51 UTC 2013


On Fri, Mar 22, 2013 at 03:11:04PM +0530, Dheeraj Kandula wrote:
> Hey All,
>     Can anyone share what do the two fields "tf_addr" and "tf_err"
> represent in the structure trapframe for AMD64 processor. I need the info
> to debug a bug.

tf_err comes from the CPU, the value is pushed by the processor when
entering the trap handler. See the Intel Architecture Software Development
Manual for the description of the exceptions, where you also find the
specification of the error code format. It is almost the same for all
exceptions, except page fault.

tf_addr is used to pass the %cr2 value (the faulting address) from the
page fault assembly trampoline to the C exception handler code. Otherwise,
it is initialized to 0 by the trampolines for other exceptions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20130322/aee0e70e/attachment.sig>


More information about the freebsd-arch mailing list