From owner-freebsd-alpha@FreeBSD.ORG Mon Aug 11 11:32:23 2003 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 373BB37B401 for ; Mon, 11 Aug 2003 11:32:23 -0700 (PDT) Received: from mail.speakeasy.net (mail14.speakeasy.net [216.254.0.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id 700ED43F93 for ; Mon, 11 Aug 2003 11:32:22 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 30135 invoked from network); 11 Aug 2003 18:32:21 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 11 Aug 2003 18:32:21 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h7BIWJ9s052443; Mon, 11 Aug 2003 14:32:20 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20030808232428.GA25847@athlon.pn.xcllnt.net> Date: Mon, 11 Aug 2003 14:32:42 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar cc: alpha@freebsd.org Subject: Re: [PATCH] Switch Alpha to new cpu_switch/throw conventions X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2003 18:32:23 -0000 On 08-Aug-2003 Marcel Moolenaar wrote: > On Fri, Aug 08, 2003 at 05:14:59PM -0400, John Baldwin wrote: >> I have a completely untested (but should work :-P) patch to convert >> Alpha over to the new cpu_throw/switch conventions of passing the >> threads in as arguments to the function. The patch is at >> http://www.FreeBSD.org/~jhb/patches/alpha_switch.patch I would >> appreciate it if someone could test it. Success would be making >> it to multiuser mode. Failure would probably be panic'ing very early >> after starting init since failure means context switches are broken. > > Kaboom: > > : > FreeBSD 5.1-CURRENT #19: Fri Aug 8 15:22:59 PDT 2003 > marcel@alpha.pn.xcllnt.net:/nfs/freebsd/5.x/src/sys/alpha/compile/ALPHA > Preloaded elf kernel "/boot/kernel/kernel" at 0xfffffc0000718000. > Digital Personal Workstation (Miata) > Digital Personal WorkStation 433au, 432MHz > : > Timecounter "i8254" frequency 1193182 Hz > Timecounter "alpha" frequency 433203210 Hz > Timecounters tick every 0.976 msec > acd0: CDROM at ata0-master PIO3 > Waiting 3 seconds for SCSI devices to settle > da0 at isp0 bus 0 target 0 lun 0 > da0: Fixed Direct Access SCSI-3 device > da0: 40.000MB/s transfers (20.000MHz, offset 8, 16bit), Tagged Queueing Enabled > da0: 8761MB (17942584 512 byte sectors: 255H 63S/T 1116C) > Mounting root from ufs:/dev/da0a > > fatal kernel trap: > > trap entry = 0x2 (memory management fault) > faulting va = 0x138 > type = access violation > cause = load instructon > pc = 0xfffffc000057e6ec > ra = 0xfffffc0000580174 > sp = 0xfffffe0013f75be0 > usp = 0x11fffc58 > curthread = 0xfffffc0003c9abe0 > pid = 37, comm = stty > > Stopped at pmap_deactivate+0xc: ldq t1,0x138(t0) <0x138> > db> trace > pmap_deactivate() at pmap_deactivate+0xc > Lcs1() at Lcs1+0x20 > --- root of call graph --- Hmm, ok, it seems we now call pmap_deactivate() from cpu_throw() when we didn't used to before. I've updated the patch to fix that and uploaded it to the same place. The only file that changed was swtch.s. Please test it to make sure the new one works, thanks. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/