Skip to content

Commit

Permalink
smbios: move smbios code into a common folder
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
huangwei authored and mstsirkin committed Aug 13, 2015
1 parent 89cc4a2 commit 60d8f32
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion arch_init.c
Expand Up @@ -26,7 +26,7 @@
#include "sysemu/arch_init.h"
#include "hw/pci/pci.h"
#include "hw/audio/audio.h"
#include "hw/i386/smbios.h"
#include "hw/smbios/smbios.h"
#include "qemu/config-file.h"
#include "qemu/error-report.h"
#include "qmp-commands.h"
Expand Down
1 change: 1 addition & 0 deletions default-configs/i386-softmmu.mak
Expand Up @@ -49,3 +49,4 @@ CONFIG_MEM_HOTPLUG=y
CONFIG_XIO3130=y
CONFIG_IOH3420=y
CONFIG_I82801B11=y
CONFIG_SMBIOS=y
1 change: 1 addition & 0 deletions default-configs/x86_64-softmmu.mak
Expand Up @@ -50,3 +50,4 @@ CONFIG_MEM_HOTPLUG=y
CONFIG_XIO3130=y
CONFIG_IOH3420=y
CONFIG_I82801B11=y
CONFIG_SMBIOS=y
1 change: 1 addition & 0 deletions hw/Makefile.objs
Expand Up @@ -31,6 +31,7 @@ devices-dirs-$(CONFIG_VIRTIO) += virtio/
devices-dirs-$(CONFIG_SOFTMMU) += watchdog/
devices-dirs-$(CONFIG_SOFTMMU) += xen/
devices-dirs-$(CONFIG_MEM_HOTPLUG) += mem/
devices-dirs-$(CONFIG_SMBIOS) += smbios/
devices-dirs-y += core/
common-obj-y += $(devices-dirs-y)
obj-y += $(devices-dirs-y)
2 changes: 1 addition & 1 deletion hw/i386/Makefile.objs
@@ -1,5 +1,5 @@
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_sysfw.o
obj-y += intel_iommu.o
Expand Down
2 changes: 1 addition & 1 deletion hw/i386/pc.c
Expand Up @@ -33,7 +33,7 @@
#include "hw/pci/pci_bus.h"
#include "hw/nvram/fw_cfg.h"
#include "hw/timer/hpet.h"
#include "hw/i386/smbios.h"
#include "hw/smbios/smbios.h"
#include "hw/loader.h"
#include "elf.h"
#include "multiboot.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/i386/pc_piix.c
Expand Up @@ -28,7 +28,7 @@
#include "hw/loader.h"
#include "hw/i386/pc.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_ids.h"
#include "hw/usb.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/i386/pc_q35.c
Expand Up @@ -39,7 +39,7 @@
#include "hw/pci-host/q35.h"
#include "exec/address-spaces.h"
#include "hw/i386/ich9.h"
#include "hw/i386/smbios.h"
#include "hw/smbios/smbios.h"
#include "hw/ide/pci.h"
#include "hw/ide/ahci.h"
#include "hw/usb.h"
Expand Down
1 change: 1 addition & 0 deletions hw/smbios/Makefile.objs
@@ -0,0 +1 @@
common-obj-$(CONFIG_SMBIOS) += smbios.o
5 changes: 2 additions & 3 deletions hw/i386/smbios.c → hw/smbios/smbios.c
Expand Up @@ -19,10 +19,9 @@
#include "qemu/error-report.h"
#include "sysemu/sysemu.h"
#include "sysemu/cpus.h"
#include "hw/i386/pc.h"
#include "hw/i386/smbios.h"
#include "hw/smbios/smbios.h"
#include "hw/loader.h"

#include "exec/cpu-common.h"

/* legacy structures and constants for <= 2.0 machines */
struct smbios_header {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/bios-tables-test.c
Expand Up @@ -18,7 +18,7 @@
#include "libqtest.h"
#include "qemu/compiler.h"
#include "hw/acpi/acpi-defs.h"
#include "hw/i386/smbios.h"
#include "hw/smbios/smbios.h"
#include "qemu/bitmap.h"

#define MACHINE_PC "pc"
Expand Down
2 changes: 1 addition & 1 deletion vl.c
Expand Up @@ -68,7 +68,7 @@ int main(int argc, char **argv)
#include "hw/isa/isa.h"
#include "hw/bt.h"
#include "sysemu/watchdog.h"
#include "hw/i386/smbios.h"
#include "hw/smbios/smbios.h"
#include "hw/xen/xen.h"
#include "hw/qdev.h"
#include "hw/loader.h"
Expand Down

0 comments on commit 60d8f32

Please sign in to comment.