9fans archive / 2001 / 06 / 469 / prev next From: David Gordon Hogan <dhog@pla...> Subject: Re: [9fans] booting an AlphaPC 164 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.