From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 7 Mar 2011 13:07:55 +0200 From: Lucio De Re To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20110307110755.GA1893@fangle.proxima.alt.za> References: <12706287ffd78500298ce35f6a5728a5@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12706287ffd78500298ce35f6a5728a5@gmx.de> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [9fans] realemu update Topicbox-Message-UUID: b7f1eb22-ead6-11e9-9d60-3106f5b1d025 On Mon, Mar 07, 2011 at 11:39:10AM +0100, cinap_lenrek@gmx.de wrote: > > the /dev/realmode intraface was not documented, but it is very simple. > Thank you for explaining this. > /dev/realmodemem is just an image of the first megabyte of > physical memory that is addressable from 16 bit realmode. > That being where the machine's BIOS resides, if memory serves. Plus whatever can fit in there if one chooses to use the space. I'll understand things better with the fesh background, thank you. > plan9 reserves a 4k page at 0x9000 (defined as RMBUF) that can be > refered to in the bios call as data buffer. previously, this was the > only offset range that could be written with /dev/realmodemem. > I think I get it, but I'll experiment with it to make sure. > in /dev/realmode, you write a struct Ureg (from /386/include/ureg.h) > (in x86 machine byte order?) containing the register contents and the > interrupt number of the bios call you want to make. > > the write returns when the BIOS call returns and the machine > state can be read back from /dev/realmode. > That is a neat idea. > realemu did a little extension to the interface: it allows reading and > writing the whole address space and in case the trap is zero in the > Ureg, it will copy ss, sp, cs, and pc in the virtual cpu state too and not > make a BIOS interrupt. this is used by loadcom.c to run dos .com > files in the emulator. > This bit is harder to get my mind around, but I'll explore the source code to make better sense of it. It all sounds very sensible. > 8i was never in a working or finished state... That suggests that you see no value in a working 8i implementation, it's tempting to take your word for it :-) All in all, there are only so many brain cycles available. ++L