Date: Mon, 25 Aug 1997 15:05:53 -0400 (EDT) From: Gary Kendall <gdk@ccomp.inode.COM> To: Mike Smith <mike@smith.net.AU> Cc: freebsd-hackers@freebsd.ORG Subject: Re: Sizing mem > 64MB at boot-time Message-ID: <199708251905.PAA00599@ccomp.inode.com> In-Reply-To: <199708250232.MAA01084@word.smith.net.au> from Mike Smith at "Aug 25, 97 12:02:01 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
> > Any help anyone can give me in sorting out segments and/or operand sizes > > in real-mode would be greatly appreciated. > > Jonathan Lemon (jlemon@freebsd.org) recently announced some code for > calling real-mode BIOS functions from the FreeBSD kernel, which should > cover everything you want to do here. > > I haven't had time to follow it through yet, regrettably, but you should > definitely coordinate with him. > > mike > Mike, I saw Jonathan's post re real-mode access from the kernel, and I got a copy of the code (which should prove to be quite usefull for DOS emulation), but it won't solve the problem I'm trying to solve. I want the boot program to size the memory so that the kernel, during initialization, can use the memory size to allocate buffers, etc. Jonathan's code doesn't come into play until the machine has already booted the kernel, and is executing it. His real-mode code is through a system call interface, and as such, happens "too late" for my purposes. However, it would be nice if someone familiar with the biosboot code and/or Intel processors could look at what I have written and point me in the right direction with respect to accessing a buffer while in real-mode. As near as I can tell, prot_to_real() (in /sys/i386/apm/apm_init/real_prot.S) sets all of the segment registers (cs, ds, es, and ss) to APM_INIT_CS16_SEL. This means that the code, data, extra, and ??stack?? segments are all the same. What I can't seem to figure out is how to get gas to assign a buffer pointer in this configuration. Does this mean that I can't use .lcomm to allocate the buffer, and that I have to use .space, with the buffer in the code segment? Huh? ;-) Regards, Gary Kendall <gdk@inode.com> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % The difficult is done immediately, the impossible takes a little longer. % %----------------------------------------------------------------------------% % gdk@ccomp.inode.com or gkendall@eddie.mit.edu % %----------------------------------------------------------------------------% % Creative Computing * 96 Forest Street * Danvers, MA 01923 * 508-777-3784 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708251905.PAA00599>