Revision b6f6e3d3 hw/pc.c

b/hw/pc.c
37 37
#include "virtio-balloon.h"
38 38
#include "virtio-console.h"
39 39
#include "hpet_emul.h"
40
#include "smbios.h"
40 41

  
41 42
/* output Bochs bios info messages */
42 43
//#define DEBUG_BIOS
......
51 52
#define ACPI_DATA_SIZE       0x10000
52 53
#define BIOS_CFG_IOPORT 0x510
53 54
#define FW_CFG_ACPI_TABLES (FW_CFG_ARCH_LOCAL + 0)
55
#define FW_CFG_SMBIOS_ENTRIES (FW_CFG_ARCH_LOCAL + 1)
54 56

  
55 57
#define MAX_IDE_BUS 2
56 58

  
......
425 427
static void bochs_bios_init(void)
426 428
{
427 429
    void *fw_cfg;
430
    uint8_t *smbios_table;
431
    size_t smbios_len;
428 432

  
429 433
    register_ioport_write(0x400, 1, 2, bochs_bios_write, NULL);
430 434
    register_ioport_write(0x401, 1, 2, bochs_bios_write, NULL);
......
442 446
    fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size);
443 447
    fw_cfg_add_bytes(fw_cfg, FW_CFG_ACPI_TABLES, (uint8_t *)acpi_tables,
444 448
                     acpi_tables_len);
449

  
450
    smbios_table = smbios_get_table(&smbios_len);
451
    if (smbios_table)
452
        fw_cfg_add_bytes(fw_cfg, FW_CFG_SMBIOS_ENTRIES,
453
                         smbios_table, smbios_len);
445 454
}
446 455

  
447 456
/* Generate an initial boot sector which sets state and jump to

Also available in: Unified diff