summaryrefslogtreecommitdiff
path: root/src/mainboard/emulation
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2014-06-14 00:13:28 +0100
committerPatrick Georgi <pgeorgi@google.com>2015-03-23 15:34:32 +0100
commitcac5022e2fbd8f39ef24df1549786a4ab25db364 (patch)
treebd041fbbf7f7f25febaeb830014d7c1bed5e82b7 /src/mainboard/emulation
parentf16b0826a0e88ed72ad0f481fe03c2e148a50d36 (diff)
downloadcoreboot-cac5022e2fbd8f39ef24df1549786a4ab25db364.tar.xz
imgvp-danube: Support for the ImgTec Danube Virtual Platform
Add basic board support for the ImgTec Danube Virtual Platform, which emulates a system built around the Danube SoC. Run this by loading coreboot.bimg into a flash device connected to SPFI1 chip select 0 & then executing the Danube boot ROM. BUG=chrome-os-partner:31438 TEST=none yet Change-Id: Ia62af62804bab261f3cabf7c2e62f5bb08a4a1a4 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 6cb1017f5e2fec85f7f5c60cd2cfec63cc886b49 Original-Change-Id: I7a2b52f304bcb4b614440ec38975e05f38b0e590 Original-Signed-off-by: Paul Burton <paul.burton@imgtec.com> Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/207976 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/8766 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard/emulation')
-rw-r--r--src/mainboard/emulation/Kconfig4
-rw-r--r--src/mainboard/emulation/imgvp-danube/Kconfig53
-rw-r--r--src/mainboard/emulation/imgvp-danube/Makefile.inc22
-rw-r--r--src/mainboard/emulation/imgvp-danube/bootblock.c24
-rw-r--r--src/mainboard/emulation/imgvp-danube/devicetree.cb26
-rw-r--r--src/mainboard/emulation/imgvp-danube/mainboard.c33
-rw-r--r--src/mainboard/emulation/imgvp-danube/romstage.c38
7 files changed, 200 insertions, 0 deletions
diff --git a/src/mainboard/emulation/Kconfig b/src/mainboard/emulation/Kconfig
index a1ee02d54e..2ddb846a8a 100644
--- a/src/mainboard/emulation/Kconfig
+++ b/src/mainboard/emulation/Kconfig
@@ -15,6 +15,9 @@ config BOARD_EMULATION_QEMU_ARMV7
config BOARD_EMULATION_QEMU_UCB_RISCV
bool "QEMU ucb riscv"
+config BOARD_EMULATION_IMGVP_DANUBE
+ bool "ImgTec Danube Virtual Platform"
+
endchoice
config BOARD_EMULATION_QEMU_X86
@@ -26,6 +29,7 @@ source "src/mainboard/emulation/qemu-i440fx/Kconfig"
source "src/mainboard/emulation/qemu-q35/Kconfig"
source "src/mainboard/emulation/qemu-armv7/Kconfig"
source "src/mainboard/emulation/qemu-riscv/Kconfig"
+source "src/mainboard/emulation/imgvp-danube/Kconfig"
config MAINBOARD_VENDOR
string
diff --git a/src/mainboard/emulation/imgvp-danube/Kconfig b/src/mainboard/emulation/imgvp-danube/Kconfig
new file mode 100644
index 0000000000..07897f756a
--- /dev/null
+++ b/src/mainboard/emulation/imgvp-danube/Kconfig
@@ -0,0 +1,53 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2014 Imagination Technologies
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; version 2 of
+# the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+if BOARD_EMULATION_IMGVP_DANUBE
+
+config BOARD_SPECIFIC_OPTIONS
+ def_bool y
+ select BOOTBLOCK_CONSOLE
+ select CPU_IMGTEC_DANUBE
+
+config MAINBOARD_DIR
+ string
+ default emulation/imgvp-danube
+
+config MAINBOARD_PART_NUMBER
+ string
+ default "ImgTec Danube Virtual Platform"
+
+config BOOTBLOCK_MAINBOARD_INIT
+ string
+ default "mainboard/emulation/imgvp-danube/bootblock.c"
+
+config SYS_SDRAM_BASE
+ hex "SDRAM base address"
+ default 0x80000000
+
+config DRAM_SIZE_MB
+ int
+ default 256
+
+config HEAP_SIZE
+ hex
+ default 0x08000000
+
+endif
diff --git a/src/mainboard/emulation/imgvp-danube/Makefile.inc b/src/mainboard/emulation/imgvp-danube/Makefile.inc
new file mode 100644
index 0000000000..8be1b22946
--- /dev/null
+++ b/src/mainboard/emulation/imgvp-danube/Makefile.inc
@@ -0,0 +1,22 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright 2014 Imagination Technologies Ltd.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; version 2 of
+# the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+romstage-y += romstage.c
diff --git a/src/mainboard/emulation/imgvp-danube/bootblock.c b/src/mainboard/emulation/imgvp-danube/bootblock.c
new file mode 100644
index 0000000000..1784a02f44
--- /dev/null
+++ b/src/mainboard/emulation/imgvp-danube/bootblock.c
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Imagination Technologies
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; version 2 of
+ * the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+void bootblock_mainboard_init(void)
+{
+}
diff --git a/src/mainboard/emulation/imgvp-danube/devicetree.cb b/src/mainboard/emulation/imgvp-danube/devicetree.cb
new file mode 100644
index 0000000000..6e9849ea85
--- /dev/null
+++ b/src/mainboard/emulation/imgvp-danube/devicetree.cb
@@ -0,0 +1,26 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2014 Imagination Technologies
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; version 2 of
+# the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+chip soc/imgtec/danube
+ chip drivers/generic/generic # I2C0 controller
+ device i2c 6 on end # Fake component for testing
+ end
+end
diff --git a/src/mainboard/emulation/imgvp-danube/mainboard.c b/src/mainboard/emulation/imgvp-danube/mainboard.c
new file mode 100644
index 0000000000..a3e27039a0
--- /dev/null
+++ b/src/mainboard/emulation/imgvp-danube/mainboard.c
@@ -0,0 +1,33 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Imagination Technologies
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; version 2 of
+ * the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <device/device.h>
+
+static void mainboard_enable(device_t dev)
+{
+ printk(BIOS_INFO, "Enable imgvp-danube device...\n");
+}
+
+struct chip_operations mainboard_ops = {
+ .enable_dev = mainboard_enable,
+};
+
diff --git a/src/mainboard/emulation/imgvp-danube/romstage.c b/src/mainboard/emulation/imgvp-danube/romstage.c
new file mode 100644
index 0000000000..ac0ea5f903
--- /dev/null
+++ b/src/mainboard/emulation/imgvp-danube/romstage.c
@@ -0,0 +1,38 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Imagination Technologies
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; version 2 of
+ * the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include <arch/hlt.h>
+#include <arch/stages.h>
+#include <cbfs.h>
+#include <console/console.h>
+
+void main(void)
+{
+ void *entry;
+
+ console_init();
+
+ entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, "fallback/ramstage");
+ if (entry != (void *)-1)
+ stage_exit(entry);
+
+ hlt();
+}