[SeaBIOS] [PATCH v8 3/8] Implementation of the TCG BIOS extensions

Stefan Berger stefanb at linux.vnet.ibm.com
Wed Aug 27 15:05:45 CEST 2014


On 08/26/2014 10:41 AM, Kevin O'Connor wrote:
> On Wed, Jul 02, 2014 at 11:38:47AM -0400, Stefan Berger wrote:
>> diff --git a/src/boot.c b/src/boot.c
>> index 133e206..f36f3d6 100644
>> --- a/src/boot.c
>> +++ b/src/boot.c
>> @@ -19,6 +19,7 @@
>>   #include "std/disk.h" // struct mbr_s
>>   #include "string.h" // memset
>>   #include "util.h" // irqtimer_calc
>> +#include "tcgbios.h" // tcpa_*
>>   
>>   
>>   /****************************************************************
>> @@ -475,6 +476,7 @@ interactive_bootmenu(void)
>>   
>>       printf("Select boot device:\n\n");
>>       wait_threads();
>> +    tcpa_leave_bios();
> This is an odd place for a tcpa call.  Shouldn't it go with the normal
> _setup() and _prepboot() calls?

A few lines further up is the function call into the TPM's menu where 
commands are issued to the TPM under physical presence. There's a loop 
to allow the user to invoke that menu multiple times. In 
tcpa_leave_bios() we give up physical presence before we leave the BIOS 
for the boot loader.


>> --- a/src/hw/tpm_drivers.c
>> +++ b/src/hw/tpm_drivers.c
>> @@ -7,6 +7,8 @@
>>   //
>>   // This file may be distributed under the terms of the GNU LGPLv3 license.
>>   
>> +#if CONFIG_TCGBIOS == 1
> We try to avoid ifdefs in seabios.  This should go in the start of
> exported functions as "if (!CONFIG_TCGBIOS) return;".

I did this so that the size of the created code consumes 0 bytes in case 
CONFIG_TCGBIOS is not set. I can certainly change this to how it is 
usually done in SeaBIOS.

     Stefan




More information about the SeaBIOS mailing list