From owner-freebsd-current@FreeBSD.ORG Tue Jun 2 05:49:20 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 733341065672 for ; Tue, 2 Jun 2009 05:49:20 +0000 (UTC) (envelope-from freebsd.work@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by mx1.freebsd.org (Postfix) with ESMTP id 2FB588FC20 for ; Tue, 2 Jun 2009 05:49:20 +0000 (UTC) (envelope-from freebsd.work@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so4249717ywe.13 for ; Mon, 01 Jun 2009 22:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=Ei+33f5SdXz8y1xT+tWQDFOgulVTimweXCW/2fHBtTg=; b=qqwI56Yttalf1bHFjl+NUXJJEZX0iSF9JS+W33WzK6LYVTopLHLQAnhqNmRnBVSRUQ zWMJULdClyICMhDZcVhduKnkV41Au0SJnpiN4KOKYDKDDcr1WY9hrqK1mzl4TB0wlPF+ /BGPhBChCGB/UEUTndZm77dV1XPiVJHSNwhKQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ws70is2P0KMmxpXruyfRnQcJlg8pH2sgv5nqVZ7CGtm7yTmS+BNIee2OQryXnjdj02 K0P0I/E4eDoFfaNzUPeWRRW9MVy80UxtTQDVNgAW+sM2WScYa4vcZJ8ajxQ1KBGLvIcA aEFUB0RG9G0UVp4LOKIWxwDfhhC2PEFV0NlUE= MIME-Version: 1.0 Received: by 10.231.35.66 with SMTP id o2mr1838040ibd.42.1243919884172; Mon, 01 Jun 2009 22:18:04 -0700 (PDT) Date: Mon, 1 Jun 2009 22:18:04 -0700 Message-ID: <45d874490906012218y16834cc4va32f6e25b0ab8374@mail.gmail.com> From: "Sean P. Dew" To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 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 05:49:20 -0000 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? Thanks