qemu-devel
[Top][All Lists]
Advanced

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

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


From: Kevin O'Connor
Subject: Re: [Qemu-devel] [PATCH V1 5/8] Support for BIOS interrupt handler
Date: Mon, 4 Apr 2011 00:30:39 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

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)?

[...]
> +static inline u32 rol(u32 val, u16 rol)

Should move to util.h.

> +static inline u64 bswap_64(u64 val)

Same.

[...]
> +++ 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().

Also, as before, just do "if (!CONFIG_TCGBIOS) return;" instead of the
#ifdef.

-Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]