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 <[email protected]>
Tested-by: Gabriel Somlo <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Tested-by: Leif Lindholm <[email protected]>
Signed-off-by: Wei Huang <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
  • 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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
common-obj-$(CONFIG_SMBIOS) += smbios.o
5 changes: 2 additions & 3 deletions hw/i386/smbios.c → hw/smbios/smbios.c
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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.