[SeaBIOS] [PATCH 3/3] tpm: Add a menu for TPM configuration

Kevin O'Connor kevin at koconnor.net
Mon Nov 30 16:34:18 CET 2015

On Mon, Nov 30, 2015 at 10:23:28AM -0500, Stefan Berger wrote:
> "Kevin O'Connor" <kevin at koconnor.net> wrote on 11/30/2015 10:05:22 AM:
> > Are the above definitions part of the standard, or internal to the
> > implementation?  If the latter, they should go into tcgbios.[ch]
> These are actually the 'message codes' from the physical presence 
> interface spec that can be sent from the OS
> to the BIOS and on which the BIOS is supposed to act upon reboot. You may 
> remember the ACPI patches I had for QEMU
> where ACPI would write one of the above number into an allocated memory 
> area for the BIOS to find. I also built
> the menu using those 'message codes'.

Okay, thanks.

> > > +typedef struct {
> > > +    u8  op;
> > > +} tpm_bios_cfg;
> > 
> > What is the purpose of this struct?
> >
> This datatype is used to send messages from menu item selections to the 
> part that processes above 'message codes'.

Right, but why does it pass a pointer to the struct instead of just
passing the u8 directly?

> > > +extern void reset_vector(void) __noreturn;
> > 
> > The code should use reset() (defined in stacks.h).  Directly calling
> > reset_vector() in 32bit mode isn't strictly correct.
> Ok, will change it. (Worked so far...)

It works because it likely causes a machine exception which also ends
up in a reboot.  So, not as nice.


More information about the SeaBIOS mailing list