smbios: move smbios code into a common folder

To share smbios among different architectures, this patch moves SMBIOS
code (smbios.c and smbios.h) from x86 specific folders into new
hw/smbios directories. As a result, CONFIG_SMBIOS=y is defined in
x86 default config files.

Acked-by: Gabriel Somlo <somlo@cmu.edu>
Tested-by: Gabriel Somlo <somlo@cmu.edu>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Wei Huang <wei@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Wei Huang 2015-08-11 22:08:20 -04:00 committed by Michael S. Tsirkin
parent 89cc4a2760
commit 60d8f328b8
13 changed files with 13 additions and 10 deletions

View file

@ -26,7 +26,7 @@
#include "sysemu/arch_init.h" #include "sysemu/arch_init.h"
#include "hw/pci/pci.h" #include "hw/pci/pci.h"
#include "hw/audio/audio.h" #include "hw/audio/audio.h"
#include "hw/i386/smbios.h" #include "hw/smbios/smbios.h"
#include "qemu/config-file.h" #include "qemu/config-file.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qmp-commands.h" #include "qmp-commands.h"

View file

@ -49,3 +49,4 @@ CONFIG_MEM_HOTPLUG=y
CONFIG_XIO3130=y CONFIG_XIO3130=y
CONFIG_IOH3420=y CONFIG_IOH3420=y
CONFIG_I82801B11=y CONFIG_I82801B11=y
CONFIG_SMBIOS=y

View file

@ -50,3 +50,4 @@ CONFIG_MEM_HOTPLUG=y
CONFIG_XIO3130=y CONFIG_XIO3130=y
CONFIG_IOH3420=y CONFIG_IOH3420=y
CONFIG_I82801B11=y CONFIG_I82801B11=y
CONFIG_SMBIOS=y

View file

@ -31,6 +31,7 @@ devices-dirs-$(CONFIG_VIRTIO) += virtio/
devices-dirs-$(CONFIG_SOFTMMU) += watchdog/ devices-dirs-$(CONFIG_SOFTMMU) += watchdog/
devices-dirs-$(CONFIG_SOFTMMU) += xen/ devices-dirs-$(CONFIG_SOFTMMU) += xen/
devices-dirs-$(CONFIG_MEM_HOTPLUG) += mem/ devices-dirs-$(CONFIG_MEM_HOTPLUG) += mem/
devices-dirs-$(CONFIG_SMBIOS) += smbios/
devices-dirs-y += core/ devices-dirs-y += core/
common-obj-y += $(devices-dirs-y) common-obj-y += $(devices-dirs-y)
obj-y += $(devices-dirs-y) obj-y += $(devices-dirs-y)

View file

@ -1,5 +1,5 @@
obj-$(CONFIG_KVM) += kvm/ obj-$(CONFIG_KVM) += kvm/
obj-y += multiboot.o smbios.o obj-y += multiboot.o
obj-y += pc.o pc_piix.o pc_q35.o obj-y += pc.o pc_piix.o pc_q35.o
obj-y += pc_sysfw.o obj-y += pc_sysfw.o
obj-y += intel_iommu.o obj-y += intel_iommu.o

View file

@ -33,7 +33,7 @@
#include "hw/pci/pci_bus.h" #include "hw/pci/pci_bus.h"
#include "hw/nvram/fw_cfg.h" #include "hw/nvram/fw_cfg.h"
#include "hw/timer/hpet.h" #include "hw/timer/hpet.h"
#include "hw/i386/smbios.h" #include "hw/smbios/smbios.h"
#include "hw/loader.h" #include "hw/loader.h"
#include "elf.h" #include "elf.h"
#include "multiboot.h" #include "multiboot.h"

View file

@ -28,7 +28,7 @@
#include "hw/loader.h" #include "hw/loader.h"
#include "hw/i386/pc.h" #include "hw/i386/pc.h"
#include "hw/i386/apic.h" #include "hw/i386/apic.h"
#include "hw/i386/smbios.h" #include "hw/smbios/smbios.h"
#include "hw/pci/pci.h" #include "hw/pci/pci.h"
#include "hw/pci/pci_ids.h" #include "hw/pci/pci_ids.h"
#include "hw/usb.h" #include "hw/usb.h"

View file

@ -39,7 +39,7 @@
#include "hw/pci-host/q35.h" #include "hw/pci-host/q35.h"
#include "exec/address-spaces.h" #include "exec/address-spaces.h"
#include "hw/i386/ich9.h" #include "hw/i386/ich9.h"
#include "hw/i386/smbios.h" #include "hw/smbios/smbios.h"
#include "hw/ide/pci.h" #include "hw/ide/pci.h"
#include "hw/ide/ahci.h" #include "hw/ide/ahci.h"
#include "hw/usb.h" #include "hw/usb.h"

1
hw/smbios/Makefile.objs Normal file
View file

@ -0,0 +1 @@
common-obj-$(CONFIG_SMBIOS) += smbios.o

View file

@ -19,10 +19,9 @@
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"
#include "sysemu/cpus.h" #include "sysemu/cpus.h"
#include "hw/i386/pc.h" #include "hw/smbios/smbios.h"
#include "hw/i386/smbios.h"
#include "hw/loader.h" #include "hw/loader.h"
#include "exec/cpu-common.h"
/* legacy structures and constants for <= 2.0 machines */ /* legacy structures and constants for <= 2.0 machines */
struct smbios_header { struct smbios_header {

View file

@ -18,7 +18,7 @@
#include "libqtest.h" #include "libqtest.h"
#include "qemu/compiler.h" #include "qemu/compiler.h"
#include "hw/acpi/acpi-defs.h" #include "hw/acpi/acpi-defs.h"
#include "hw/i386/smbios.h" #include "hw/smbios/smbios.h"
#include "qemu/bitmap.h" #include "qemu/bitmap.h"
#define MACHINE_PC "pc" #define MACHINE_PC "pc"

2
vl.c
View file

@ -68,7 +68,7 @@ int main(int argc, char **argv)
#include "hw/isa/isa.h" #include "hw/isa/isa.h"
#include "hw/bt.h" #include "hw/bt.h"
#include "sysemu/watchdog.h" #include "sysemu/watchdog.h"
#include "hw/i386/smbios.h" #include "hw/smbios/smbios.h"
#include "hw/xen/xen.h" #include "hw/xen/xen.h"
#include "hw/qdev.h" #include "hw/qdev.h"
#include "hw/loader.h" #include "hw/loader.h"