On Mi, 2014-04-16 at 17:02 -0400, Gabriel L. Somlo wrote: > OK, so I have the "legacy" (field-by-field, types 0 and 1 only) code > back in, right next to the new aggregate-smbios-table-plus-entrypoint > code, tested and apparently working fine. > > Before I get carried away with "git rebase", do we still want to go > through the whole patch sequence of generating aggregate tables > identical to what SeaBIOS would have (including e.g. type 20), then > drop type 20 and upgrade to smbios spec v2.8, etc ? > > Since we're keeping the legacy code, I can add in the new code (only > for machine types >= 2.1) directly as smbios spec v2.8 compliant > (mainly without adding in generation for type 20, then ripping it > right back out again). > > This would result in a smaller, cleaner patch set. Any objections ?
IMHO that is fine. > On Wed, Apr 16, 2014 at 08:41:51AM +0200, Gerd Hoffmann wrote: > > 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). > > OK, so right now I'm parsing the "version" argument to what is > currently smbios_set_type1_defaults() (and will become > smbios_set_defaults() after patching). No, don't parse stuff please. Have a look at pc_piix.c, how smbios_type1_defaults is handled there. It's true by default, and pc_compat_1_7 (called for 1.7+older machine types) flips it to false. We'll add a new variable here, say smbios_generate_table_blob, default it to true, then flip to false in the (to be added with the 2.1 machine type) pc_compat_2_0 function. Same in pc_q35.c. Then you can simply use the new global variable. cheers, Gerd