Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 1998 17:47:36 -0700
From:      Mike Smith <mike@smith.net.au>
To:        Jonathan Lemon <jlemon@americantv.com>
Cc:        Mike Smith <mike@smith.net.au>, Chuck Robey <chuckr@Glue.umd.edu>, Luigi Rizzo <luigi@labinfo.iet.unipi.it>, Nicolas.Souchu@prism.uvsq.fr, freebsd-hackers@FreeBSD.ORG
Subject:   Re: ISA PnP / snd PnP developments? 
Message-ID:  <199805150047.RAA00975@antipodes.cdrom.com>
In-Reply-To: Your message of "Wed, 06 May 1998 11:32:22 CDT." <19980506113222.38033@right.PCS> 

next in thread | previous in thread | raw e-mail | index | archive | help
> No, the showstopper I ran into at this point has to do with stack
> handling for the 16-bit BIOS.  Consider:
> 
> 	- the stack must be located in the first 64K following %ss, 
> 	  (the stack base address) since the BIOS often throws away
> 	  the upper 16-bits.  eg: push %esp, pop %sp
> 
> 	- %ss is also used to handle kernel interrupts.
> 
> 	- trap.c takes a stack-relative address and tries to use this
> 	  as an absolute address, which normally works, since the stack
> 	  base is normally at 0.  This breaks if we change the stack base
> 	  location in order to make the BIOS happy.

Eek.  Trap.c should be able to adjust to be stack-relative though, 
right?  I'm not sure what else depends on the stack location though - 
you might want to run any proposal past Peter Wemm, who seems to be 
familiar with the BSD/OS and NetBSD compatibility issues.

> So, I either play some tricks to move the stack into page 0, so that 
> absolute addressing works as well as base:offset addressing, or I need
> to come up with some form of switching stacks when the kernel is entered.
>
> The latter would probably impact fastintr handlers as well, and (IMHO) 
> generate an unacceptable performance impact.  The former is probably 
> feasable, but finals here have prevented me from looking at it in more
> detail.

I'm inclined to think that moving the stack is easier, if possible.  
Failing that, perhaps it'd be simpler to stick to the real-mode 
interfaces where possible.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805150047.RAA00975>