Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2008 21:43:31 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/boot/i386/btx/btx btx.S
Message-ID:  <200803102143.m2ALhVbF052196@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
jhb         2008-03-10 21:43:31 UTC

  FreeBSD src repository

  Modified files:
    sys/boot/i386/btx/btx btx.S 
  Log:
  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)
  
  Revision  Changes    Path
  1.46      +317 -402  src/sys/boot/i386/btx/btx/btx.S



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