summaryrefslogtreecommitdiff
path: root/src/mainboard/emulation
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/emulation')
-rw-r--r--src/mainboard/emulation/Kconfig25
-rw-r--r--src/mainboard/emulation/qemu-x86/Makefile.inc21
-rw-r--r--src/mainboard/emulation/qemu-x86/devicetree.cb15
3 files changed, 61 insertions, 0 deletions
diff --git a/src/mainboard/emulation/Kconfig b/src/mainboard/emulation/Kconfig
new file mode 100644
index 0000000000..023adffee6
--- /dev/null
+++ b/src/mainboard/emulation/Kconfig
@@ -0,0 +1,25 @@
+choice
+ prompt "Mainboard model"
+ depends on VENDOR_EMULATION
+
+config BOARD_EMULATION_QEMU_X86
+ bool "QEMU x86"
+ select ARCH_X86
+ select CPU_I586
+ select SOUTHBRIDGE_INTEL_I82371EB
+ select CPU_EMULATION_QEMU_X86
+ select CONSOLE_SERIAL8250
+ help
+ x86 QEMU variant.
+
+endchoice
+
+config MAINBOARD_DIR
+ string
+ default emulation/qemu-x86
+ depends on BOARD_EMULATION_QEMU_X86
+
+config MAINBOARD_PART_NUMBER
+ string
+ default "QEMU-86"
+ depends on BOARD_EMULATION_QEMU_X86
diff --git a/src/mainboard/emulation/qemu-x86/Makefile.inc b/src/mainboard/emulation/qemu-x86/Makefile.inc
new file mode 100644
index 0000000000..1985b2e8b3
--- /dev/null
+++ b/src/mainboard/emulation/qemu-x86/Makefile.inc
@@ -0,0 +1,21 @@
+initobj-y += crt0.o
+crt0-y += ../../../../src/cpu/x86/16bit/entry16.inc
+crt0-y += ../../../../src/cpu/x86/32bit/entry32.inc
+crt0-y += ../../../../src/cpu/x86/16bit/reset16.inc
+crt0-y += ../../../../src/arch/i386/lib/id.inc
+crt0-y += auto.inc
+
+obj-y += mainboard.o
+
+ldscript-y += ../../../../src/arch/i386/init/ldscript_fallback_cbfs.lb
+ldscript-y += ../../../../src/cpu/x86/16bit/entry16.lds
+ldscript-y += ../../../../src/cpu/x86/32bit/entry32.lds
+ldscript-y += ../../../../src/cpu/x86/16bit/reset16.lds
+ldscript-y += ../../../../src/arch/i386/lib/id.lds
+
+ifdef POST_EVALUATION
+
+$(obj)/mainboard/$(MAINBOARDDIR)/auto.inc: $(obj)/romcc $(src)/mainboard/$(MAINBOARDDIR)/auto.c $(obj)/option_table.h
+ $(obj)/romcc -mcpu=i386 -O $(INCLUDES) $(src)/mainboard/$(MAINBOARDDIR)/auto.c -o $@
+
+endif
diff --git a/src/mainboard/emulation/qemu-x86/devicetree.cb b/src/mainboard/emulation/qemu-x86/devicetree.cb
new file mode 100644
index 0000000000..745ff189d1
--- /dev/null
+++ b/src/mainboard/emulation/qemu-x86/devicetree.cb
@@ -0,0 +1,15 @@
+chip cpu/emulation/qemu-x86
+ device pci_domain 0 on
+ device pci 0.0 on end
+
+ chip southbridge/intel/i82371eb # southbridge
+ device pci 01.0 on end
+ device pci 01.1 on end
+ register "ide0_enable" = "1"
+ register "ide1_enable" = "1"
+ end
+
+# register "com1" = "{1}"
+# register "com1" = "{1, 0, 0x3f8, 4}"
+ end
+end