[SeaBIOS] [Qemu-devel] [PATCH V1 5/8] Support for BIOS interrupt handler

Stefan Berger stefanb at linux.vnet.ibm.com
Mon Apr 4 16:54:19 CEST 2011


On 04/04/2011 12:30 AM, Kevin O'Connor wrote:
> On Wed, Mar 30, 2011 at 01:55:39PM -0400, Stefan Berger wrote:
>> This patch implements the TCG BIOS interrupt handler 1ah. It is for
>> example used by trusted grub.
> [...]
>> +/*******************************************************************
>> +  Calculation of SHA1 in SW
>> +
>> +  See: http://www.itl.nist.gov/fipspubs/fip180-1.htm
>> +       RFC3174, Wikipedia's SHA1 alogrithm description
>> + ******************************************************************/
> Looks like tcgbios.c is awfully big - can we move the sha1 code to
> it's own file (eg, sha1.c)?
Done.
> [...]
>> +static inline u32 rol(u32 val, u16 rol)
> Should move to util.h.
Done.
>> +static inline u64 bswap_64(u64 val)
> Same.
Done.
> [...]
>> +++ seabios/src/stacks.c
> [...]
>> +#ifdef CONFIG_TCGBIOS
>> +void tcpa_interrupt_handler16(struct bregs *regs)
>> +{
>> +    if (MODESEGMENT) {
> I'm a bit confused here - MODESEGMENT will always be true.  Also, this
> code doesn't need to be in stacks.c - just invoke call32() directly
> from handle_1abb().
>
Will adapt it to that.
Other code was checking the MODESEGMENT and so I thought I better do 
that, too.
> Also, as before, just do "if (!CONFIG_TCGBIOS) return;" instead of the
> #ifdef.
>
Did that.

    Stefan

> -Kevin




More information about the SeaBIOS mailing list