freebsd-skq/sys/boot/i386
John Baldwin 4937cb2d30 Change the BTX kernel to drop all the way out to real mode to invoke BIOS
routines (V86 requests from the client and hardware interrupt handlers):
- Install trampoline real mode interrupt handlers at IDT vectors 0x20-0x2f
  to handle hardware interrupts by invoking the appropriate vector (0x8-0xf
  or 0x70-0x78).  This allows the 8259As to use vectors 0x20-0x2f in real
  mode as well as protected mode will ensuring that the master 8259A
  doesn't share IDT space with CPU exceptions in protected mode.
- Since we don't need to reserve space for page tables and a page directory
  anymore since dropping paging support, move the TSS and protected mode
  IDT up by 16k.  Grow the ring 1 link stack by 16k as a result.
- Repurpose the ring 1 link stack to be used as a real mode stack when
  invoking real mode routines either via a V86 request or a hardware
  interrupts.  This simplifies a few things as we avoid disturbing the
  original user stack.
- Add some more block comments to explain how the code interacts with the
  V86 structure as this wasn't immediately obvious from the prior comments
  (e.g. that we explicitly copy the seg regs for real mode out of the V86
  struct onto the stack to be popped off when going into real mode, etc.).
  Also, document some of the stack frames we create going to real mode and
  back.
- Remove all of the virtual 86 related code including having to simulate
  various instructions and BIOS calls on a trap from virtual 86 mode.
- Explicitly panic if a user client attempts to perform a V86 CALL
  request that isn't a far call.
- Bump version to 1.2.

Assuming this works ok this should fix some of the long standing issues
with USB booting as well as etherboot.

MFC after:	2 weeks
Submitted by:	kib (some parts from his original real mode patch)
2008-03-10 21:43:31 +00:00
..
boot0 Fix setting of serial port speed. A junk value was passed in AX when 2007-03-26 21:56:13 +00:00
boot0ext
boot0sio
boot2 Rev 1.72 fixed a bug where if /boot.config changed the console its contents 2008-02-28 17:08:05 +00:00
btx Change the BTX kernel to drop all the way out to real mode to invoke BIOS 2008-03-10 21:43:31 +00:00
cdboot Add a trailing \0 to the read error string so that read errors don't print 2007-11-17 17:32:40 +00:00
gptboot Rev 1.72 fixed a bug where if /boot.config changed the console its contents 2008-02-28 17:08:05 +00:00
kgzldr NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +00:00
libfirewire MFp4: add FireWire/dcons support in loader for i386/amd64. 2007-05-29 14:35:57 +00:00
libi386 Tweak the verbose disk printing a bit: 2008-02-28 17:49:23 +00:00
loader Slightly cleanup the 'bootdev' concept on x86 by changing the various 2007-10-24 04:03:25 +00:00
mbr Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
pmbr Add a note to indicate that these files do borrow in part from mbr.s and 2007-11-26 21:29:59 +00:00
pxeldr In the PROBE_KEYBOARD case, always enable multiple consoles and set the 2008-03-06 21:43:56 +00:00
Makefile First cut at support for booting a GPT labeled disk via the BIOS bootstrap 2007-10-24 21:33:00 +00:00
Makefile.inc Add -march=i386 to fix amd64 build by generating the same code 2006-09-28 10:02:04 +00:00