Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Mar 2008 22:10:59 +0100
From:      Jeremie Le Hen <jeremie@le-hen.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, freebsd-current@tataz.chchile.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit [HEAD] src/sys/boot/i386/btx/btx btx.S
Message-ID:  <20080311211059.GJ39998@obiwan.tataz.chchile.org>
In-Reply-To: <200803102143.m2ALhVbF052196@repoman.freebsd.org>
References:  <200803102143.m2ALhVbF052196@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Mon, Mar 10, 2008 at 09:43:31PM +0000, John Baldwin wrote:
> 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.

I am not able to test this right now, but I wonder if with this change
FreeBSD will be able to be booted in a fully virtualized Xen DomU.
At the time I tested it, about 2 month ago, ISTR FreeBSD stopped with
"BTX halted".

If someone is being able to test this (I suppose the easiest way is to
wait from the next monthly -CURRENT snapshot), I'd be glad to here about
the result.

Thanks.
Regards,
-- 
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >



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