From mboxrd@z Thu Jan 1 00:00:00 1970 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> Date: Mon, 25 Jun 2001 15:22:53 -0400 Topicbox-Message-UUID: c0117078-eac9-11e9-9e20-41e7f4b1d025 > 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.