[SeaBIOS] [QEMU v6 PATCH 00/17] SMBIOS: build full tables in QEMU

Gerd Hoffmann kraxel at redhat.com
Wed Apr 16 08:41:51 CEST 2014


  Hi,

> Add "void smbios_get_tables()" as a separate function to generate the
> entry point and aggregate smbios table, and then:
> 
>    if "machine_type < 2.1" then
> 
>       insert smbios_get_table() into fw_cfg (compat mode)
> 
>    else
> 
>       insert smbios_get_tables() blob + entry point (new hotness)
> 
>    fi

I mean this:

      insert smbios_get_table() into fw_cfg (compat mode)
      if (machine_type >= 2.1)
          insert smbios_get_tables() blob + entry point (new hotness)

But maybe your variant is better as it encourages the move to the new
interfaces on the firmware side.  And if we merge it early in the 2.1
cycle there is quite some time for the firmware to sort things.

> I guess both compat and new smbios_get_table[s] can use the same
> default fields set via the command line.

Yes.

> The remaining issue is how to handle "-smbios file=<foo>" blobs; maybe
> smbios_set_defaults() can be used to set the version, and then the
> command line parser (smbios_entry_add()) would know which kind of table
> to insert the blob into, compat or aggregate ?
> 
> That being said, how do I even tell the difference between pre- and
> post- 2.1 machine types ? Would that be in pc.c, or pc_[q35|piix].c ?

Global variable, simliar to smbios_type1_defaults.  machine type init
code will set it accordingly.  smbios code just does "if
(smbios_generate_tables) { ... }" (or however we name this).

cheers,
  Gerd





More information about the SeaBIOS mailing list