From owner-p4-projects@FreeBSD.ORG Thu Apr 17 00:14:51 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BB93B37B405; Thu, 17 Apr 2003 00:14:50 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 729C337B401 for ; Thu, 17 Apr 2003 00:14:50 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1569443FBF for ; Thu, 17 Apr 2003 00:14:50 -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 h3H7En0U072452 for ; Thu, 17 Apr 2003 00:14:49 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3H7En1q072449 for perforce@freebsd.org; Thu, 17 Apr 2003 00:14:49 -0700 (PDT) Date: Thu, 17 Apr 2003 00:14:49 -0700 (PDT) Message-Id: <200304170714.h3H7En1q072449@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29106 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2003 07:14:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=29106 Change 29106 by marcel@marcel_nfs on 2003/04/17 00:14:14 Use ar.k5 and not ar.k3 to pass the EPC gateway page to userland. Using ar.k3 is slightly less optimal in that we have to make sure ar.k3 is defined is we jump into user space because it can be clobbered by PAL code on exception. By using ar.k5 we make it an invariant register, which means we don't have to worry about it. Of course, using ar.k5 takes up one of the preserved kernel regs, which means that we don't have any left. I tried to avoid that, but the reduced complexity is slightly more pleasing now... Oh: minor style change (initialize ar.k4 immediately after we define pcpup) and remove a space. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#12 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#12 (text+ko) ==== @@ -389,8 +389,8 @@ __asm __volatile("mov psr.l=%0" :: "r" (psr)); __asm __volatile("srlz.i"); - /* Expose the mapping to userland in ar.k3 */ - ia64_set_k3(VM_MAX_ADDRESS); + /* Expose the mapping to userland in ar.k5 */ + ia64_set_k5(VM_MAX_ADDRESS); } static void @@ -715,9 +715,9 @@ /* * Setup the global data for the bootstrap cpu. */ - pcpup = (struct pcpu *) pmap_steal_memory(PAGE_SIZE); + pcpup = (struct pcpu *)pmap_steal_memory(PAGE_SIZE); + ia64_set_k4((u_int64_t)pcpup); pcpu_init(pcpup, 0, PAGE_SIZE); - ia64_set_k4((u_int64_t) pcpup); PCPU_SET(curthread, &thread0); /*