From dhog@plan9.bell-labs.com Sun Jul 8 15:53:24 2001 Received: from mailrelay2.lanl.gov (mailrelay2.lanl.gov [128.165.5.47]) by acl.lanl.gov (8.11.3/8.8.5) with ESMTP id f5PJNUp3549372; Mon, 25 Jun 2001 13:23:30 -0600 (MDT) Received: from mailproxy1.lanl.gov (mailproxy1.lanl.gov [128.165.0.26]) by mailrelay2.lanl.gov (8.11.4/8.11.4/(ccn-5)) with ESMTP id f5PJNUt29158; Mon, 25 Jun 2001 13:23:30 -0600 Received: from mail.cse.psu.edu (psuvax1.cse.psu.edu [130.203.4.6]) by mailproxy1.lanl.gov (8.11.4/8.11.4/(ccn-5)) with ESMTP id f5PJNTS24760; Mon, 25 Jun 2001 13:23:29 -0600 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 8C68019A0F; Mon, 25 Jun 2001 15:23:13 -0400 (EDT) Received: from plan9.cs.bell-labs.com (plan9.bell-labs.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 84863199FF for <9fans@cse.psu.edu>; Mon, 25 Jun 2001 15:22:57 -0400 (EDT) To: 9fans@cse.psu.edu Subject: Re: [9fans] booting an AlphaPC 164 From: David Gordon Hogan MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20010625192257.84863199FF@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 25 Jun 2001 15:22:53 -0400 > If i understand the boot process correctly, it has just jumped into > _main() in/sys/src/9/alphapc/l.s from gokernel() in /sys/src/9/boot/alphapc/exec.c > By adding RET to various points of _main() in l.s, i am thinking it is hanging > at the spot marked: > TEXT _main(SB), $-8 > MOVQ $setSB(SB), R29 > MOVQ R29, R16 > CALL_PAL $PALwrkgp > MOVQ $mach0(SB), R(MACH) > MOVQ $(BY2PG-8)(R(MACH)), R30 <------------- > MOVQ R31, R(USER) > MOVQ R31, 0(R(MACH)) > > If i understand correctly this just sets the stack pointer to last quadword > of the page containing the mach structure. Although the RET instruction doesn't use SP itself, the caller isn't going to be too happy after you change it. Use the "CALL_PAL $PALhalt" instruction to find out where it's really hanging. If it makes it to C, you can insert calls to firmware(). > We get the same behavior w/ both the terminal and cpu kernels, and > also the same if we try it on an ev6 machine. I found a post about > using the -x flag to 7l, but that does not seem to help. That's only neccessary for older CPUs. You'll be taking a significant performance hit by using it otherwise, and some of the device drivers may not work.