[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

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.

>  -- Keir
Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.