On Mon, Apr 07, 2014 at 11:23:44AM -0400, Kevin O'Connor wrote:
So, I'm suggesting QEMU produce two new fw_cfg files: an anchor file with the valid anchor table (the address pointer can be just set to zero), and an smbios table file with the complete set of smbios tables formatted according to the smbios spec. SeaBIOS can then use the existence of one of these new files to determine if it should deploy (and optionally modify) them or if it should use the old smbios generation code.
Oh, OK. Right now we have (in qemu):
#define SMBIOS_FIELD_ENTRY 0 #define SMBIOS_TABLE_ENTRY 1
I will be adding (actually, migrating to):
#define SMBIOS_ANCHOR_ENTRY 2 /* for the smbios entry point table */ #define SMBIOS_FULLTABLE_ENTRY 3 /* for the blob containing all types */
The cool thing here is that, along with the payload for each type, I can create a wrapper structure, like there already exists for fields and individual table types:
struct smbios_field { struct smbios_header header; uint8_t type; uint16_t offset; uint8_t data[]; } QEMU_PACKED;
struct smbios_table { struct smbios_header header; uint8_t data[]; } QEMU_PACKED;
I can add such a structure for the anchor/entrypoint table and for the full blob-of-tables payload, in which I can tell you how big type 0 is, so the BIOS (SeaBIOS/TianoCore) side surgery can be made that much easier...
Thanks, --Gabriel