From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Given Subject: Re: Bugs (and some fixes) Date: Tue, 13 Apr 2004 10:28:56 +0100 Sender: linux-8086-owner@vger.kernel.org Message-ID: <200404131028.56757.dg@cowlark.com> References: <20040412213125.21798.qmail@web11704.mail.yahoo.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20040412213125.21798.qmail@web11704.mail.yahoo.com> Content-Disposition: inline List-Id: Content-Type: text/plain; charset="us-ascii" To: linux-8086@vger.kernel.org On Monday 12 April 2004 22:31, Tommy McCabe wrote: > --- Tommy McCabe wrote: [...] > > Compiler/memory model limit. > > If code is... and data is... Use this model... > > under 64KB under 64KB Small (-ms) or Tiny > > (-mt) > > over 64KB under 64KB Medium (-mm) > > under 64KB over 64KB Compact (-mc) > > over 64KB over 64KB Large (-ml) The way medium and large models manage to get more than 64kB of code is by using multiple code segments. Unfortunately, since you can only address 64kB with a 16-bit pointer, this means that you have to use wider pointers if you want more than 64kB of code. Most compilers use a 32 bit pointer for this; 16 bits for the segment, 16 bits for the offset. And just to make matters worse, medium mode uses *different* sized pointers for code and data! Probably an easier solution would be to move some kernel subsystems into user space. Sockets would be a classic example, since the code's pretty large. You'd have to implement a user-mode interface of some description but I doubt that would be particularly hard. We'd lose some performance, but seeing as we're planning on running this on an 8088, I don't think performance is a major design requirement... -- +- David Given --McQ-+ "I smell a rat; I see him forming in the air & | dg@cowlark.com | darkening the sky; but I'll nip him in the bud." | (dg@tao-group.com) | --- Sir Boyle Roche +- www.cowlark.com --+