From owner-freebsd-current@FreeBSD.ORG Tue Jun 2 13:41:26 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85D99106564A for ; Tue, 2 Jun 2009 13:41:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 5993F8FC12 for ; Tue, 2 Jun 2009 13:41:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 11D2146B39; Tue, 2 Jun 2009 09:41:26 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id F0A428A02C; Tue, 2 Jun 2009 09:41:21 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Tue, 2 Jun 2009 09:25:26 -0400 User-Agent: KMail/1.9.7 References: <45d874490906012218y16834cc4va32f6e25b0ab8374@mail.gmail.com> In-Reply-To: <45d874490906012218y16834cc4va32f6e25b0ab8374@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906020925.26738.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 02 Jun 2009 09:41:22 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: "Sean P. Dew" Subject: Re: BTX/AMD64/E820 FreeBSD 7.2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2009 13:41:26 -0000 On Tuesday 02 June 2009 1:18:04 am Sean P. Dew wrote: > I am trying to run FreeBSD on a hypervisor (custom written). The hypervisor > steals some memory for itself and wants to hide it from FreeBSD so that the > OS does not read or write to that memory. The hypervisor hooks the real mode > IDT for INT15 and checks for E820 and SMAP in the correct registers, and > returns the modified SMAP to the OS. The problem I am facing is when the > kernel invokes getmemsize (sys_amd64:01104), it looks for the SMAP loaded by > the BTX loader. In GetBiosMEM where it is actually loaded, the BTX loader is > invoked which invokes the INT15 handler using a RET instead of an INT15. Is > there someway to totally bypass the BTX loade or change that behavior using > some #define in the kernel to make it use int15? No. Assuming you have hooked the real mode entry point in the IDT table, that is the address that BTX is going to jump to. -- John Baldwin