From owner-freebsd-arch@FreeBSD.ORG Fri Mar 22 12:08:51 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1A01BB14 for ; Fri, 22 Mar 2013 12:08:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 8795F217 for ; Fri, 22 Mar 2013 12:08:50 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r2MC8luM017074; Fri, 22 Mar 2013 14:08:47 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.0 kib.kiev.ua r2MC8luM017074 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r2MC8lYL017073; Fri, 22 Mar 2013 14:08:47 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 22 Mar 2013 14:08:47 +0200 From: Konstantin Belousov To: Dheeraj Kandula Subject: Re: Fields tf_addr and tf_err in struct trapframe. Message-ID: <20130322120847.GN3794@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="INL6U/dpJVbCQxtr" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Mar 2013 12:08:51 -0000 --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--