Received: from [140.186.70.92] (port=57751 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6bR6-0007NO-Mi for qemu-devel@nongnu.org; Mon, 04 Apr 2011 00:30:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q6bR5-0001en-3o for qemu-devel@nongnu.org; Mon, 04 Apr 2011 00:30:44 -0400 Received: from mail-qy0-f180.google.com ([209.85.216.180]:57325) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q6bR5-0001eV-0Q for qemu-devel@nongnu.org; Mon, 04 Apr 2011 00:30:43 -0400 Received: by qyk10 with SMTP id 10so4361629qyk.4 for ; Sun, 03 Apr 2011 21:30:42 -0700 (PDT) Date: Mon, 4 Apr 2011 00:30:39 -0400 From: Kevin O'Connor Subject: Re: [Qemu-devel] [PATCH V1 5/8] Support for BIOS interrupt handler Message-ID: <20110404043039.GC13528@morn.localdomain> References: <20110330175534.302129463@linux.vnet.ibm.com> <20110330175559.600480223@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110330175559.600480223@linux.vnet.ibm.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Berger Cc: seabios@seabios.org, qemu-devel@nongnu.org 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