WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] [Firmware] TCG BIOS extensions for the Bochs BIO

To: Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] [Firmware] TCG BIOS extensions for the Bochs BIOS
From: Stefan Berger <stefanb@xxxxxxxxxx>
Date: Mon, 11 Dec 2006 10:26:32 -0500
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir@xxxxxxxxxxxxx>
Delivery-date: Mon, 11 Dec 2006 07:26:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C19F1AC5.5BBC%keir@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

Keir Fraser <keir@xxxxxxxxxxxxx> wrote on 12/08/2006 08:36:05 AM:

> On 8/12/06 13:30, "Stefan Berger" <stefanb@xxxxxxxxxx> wrote:

> > Is there a good reason for it being implemented almost entirely in assembly
> > language?
>
> The compiled TCG extension code adds approximately 0x2500 bytes to
> the BIOS and would add more to it if it was written in 'C'.

>
> Presumably only those who want TPM functionality will run with the
> TPM-enabled BIOS, and they are unlikely to care whether the
> implementation is e.g., 10kB or 15kB. Even people not using the TPM
> capabilities are not really going to care about a few kilobytes. It’
> s not like you’re constrained to 64kB (0xF0000-0xFFFFF) — you can
> stick the 32-bit code below 4GB.


Someone who wants to add new functionality to the Bochs BIOS might care about the amount of free space in that 64kb segment. Currently there's enough room left even with the TPM extensions.
Even if we move these extensions to some 32bit area, the hook into the 1Ah interrupt and all those other function calls surrounded by #if BX_TCGBIOS in rombios.c are needed as well as later on some code that switches into protected mode and jumps up into the 32 bit area. The BIOS code should at some point be compiled with those TPM extensions independent of whether a TPM is available in the VM or not. The extensions don't influence the BIOS if a TPM is not available.

How would you connect the two code areas and the functions? Would hvmloader write the 32 bit address somewhere into the Bochs BIOS and the to reach the 32 bit area one uses a jump table to call all those functions up there? I'd really rather leave the TPM extensions in the BIOS segment for now. The bulk of the code is located in its own file anyway. I will convert parts of the code to 'C', though.

  Stefan
>
>  -- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel