Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Mar 2013 14:08:47 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Dheeraj Kandula <dkandula@gmail.com>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: Fields tf_addr and tf_err in struct trapframe.
Message-ID:  <20130322120847.GN3794@kib.kiev.ua>
In-Reply-To: <CA%2BqNgxQ%2BP=jjGTo8ci6si%2BSbYUm9J%2BbGcH7VedJDov-08eraFQ@mail.gmail.com>
References:  <CA%2BqNgxQ%2BP=jjGTo8ci6si%2BSbYUm9J%2BbGcH7VedJDov-08eraFQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--INL6U/dpJVbCQxtr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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.

--INL6U/dpJVbCQxtr
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQIcBAEBAgAGBQJRTEnOAAoJEJDCuSvBvK1BaY4P/ApQJQaz5dI50xRTZ99WWh7d
X/5OgWhMAUaUq5U6O2wNkabZ0+85kkNzL4L18YOLxJ8B1JrAcuUNZQ+t16TxcQZf
Rn8FuUPqPpVR7EQpXMNQ8m9Kj4K5SJDwUmVyY2D6AOwf5is+zYZ4i1kzUWA/wVVe
/Q658sJBdf+o4PlIj5MLWkOsynaLnebKXPzG3b7OwwMYcmVdovDLUR8npxk5idYQ
Fd+eQZiHCZXFyPuUyCClT7Ni0EKcQ8ZBZXOOzM0+LacNcen4BdJQK9DHSNbsJDC+
lBbRSEuXTeCaoF4nsadiFe3zU+ctrfhHuSg0K/eSWPv9beCnVeP6AOyBd6LAOHI8
oQ9FT832HoTtrIlIRLCZlED3J1wf4W1FC9UHymfMn7prN4Rv5LlIjCFTfGNgO/5C
EldOQyBRHJDiywW9kDbjOmOm0eflP14+CD+PyDWdnUV798RyGZ49VMm70h4x2490
xbCwSfACEzDkFSMVcc4UjsFyXl9l4YxH+ELewJOe5ROle8fT3o6nN0AFTBzpaCwm
VTnA7pQtE1P7DW50gSoJSk0oyVGR920IPABuKiqZb6tDrVlu4cwKEPAHXkIwE2wQ
eoWOBsb/IY2f2qdCS4275FpMGT69vvVVA6UL8cWnBomZf8qkYTsAzR1/h4VyrabY
+Xv4eIZGuBc1Xi9eST69
=uymp
-----END PGP SIGNATURE-----

--INL6U/dpJVbCQxtr--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130322120847.GN3794>