From owner-cvs-src@FreeBSD.ORG Mon May 26 18:00:14 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E29137B401; Mon, 26 May 2003 18:00:14 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B261A43F75; Mon, 26 May 2003 18:00:13 -0700 (PDT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4R10D0U032443; Mon, 26 May 2003 18:00:13 -0700 (PDT) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4R10DOj032442; Mon, 26 May 2003 18:00:13 -0700 (PDT) Message-Id: <200305270100.h4R10DOj032442@repoman.freebsd.org> From: Marcel Moolenaar Date: Mon, 26 May 2003 18:00:13 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/ia64/ia64 machdep.c support.s X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2003 01:00:14 -0000 marcel 2003/05/26 18:00:13 PDT FreeBSD src repository Modified files: sys/ia64/ia64 machdep.c support.s Log: Fix fu{byte|word*} and su{byte|word*}: o If the address was not within user space we jumped to fusufault where we would clear pcb_onfault and return 0. There are two bugs here: 1. We never got to the point where we assigned the address of pcb_onfault to r15, which means that we would clobber some random memory location, including I/O space or ROM. 2. We're supposed to return -1 on error. o Make sure we have proper memory ordering for setting pcb_onfault, doing the memory access to user space and clearing pcb_onfault. For the fu* family of functions this means that we need a mf instruction, because we don't have acquire semantics on stores and release semantics on loads (hence st;ld cannot be ordered without intermediate mf). While here, implement casuptr() so that we are a (small) step closer to supporting libthr and deobfuscate the non-implementation of {f|s}uswintr. Approved by: re@ (blanket) Revision Changes Path 1.135 +0 -6 src/sys/ia64/ia64/machdep.c 1.18 +455 -150 src/sys/ia64/ia64/support.s