From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <8c06d2c68998f806c7a0cb8b7fdcd2f9@caldo.demon.co.uk> To: 9fans@cse.psu.edu Subject: Re: [9fans] loading plan 9 directly from linuxbios From: Charles Forsyth In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Wed, 29 Oct 2003 08:08:48 +0000 Topicbox-Message-UUID: 7a7d77ca-eacc-11e9-9e20-41e7f4b1d025 >>Also what is a reasonable way to do this: >> $PADDR($tgdtptr(SB)) >>or is that impossible? that's impossible. masking it off as you do is fine. >>I suspect the tgdtptr is bogus ... probably an 0x8000xxxx address. i'd expect so, although nm on the executable will show you. the deeper problem is that (as i understand it) you're entering the code in real mode, which is of course quite unreal. in that case you'll need to do what 9load does in l.s (using x16.h) to write the real mode code, because 8a/8l isn't very good at 16-bit code (though 8l could make it easier, with some as yet unquantified amount of work). i'd put it what's needed a separate l16.s prefix, using x16.h to write it (most of what you need is at the start of 9load's l.s), then link l16.$O in front of a slightly modified l.$O and enter the kernel at l16.$O's start.