[SeaBIOS] [Qemu-devel] [PATCH V1 5/8] Support for BIOS interrupt handler
Kevin O'Connor
kevin at koconnor.net
Mon Apr 4 06:30:39 CEST 2011
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
More information about the SeaBIOS
mailing list