[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/26] hw/arm: add initial mori-bmc board
From: |
Peter Maydell |
Subject: |
[PULL 23/26] hw/arm: add initial mori-bmc board |
Date: |
Mon, 21 Feb 2022 09:27:57 +0000 |
From: Patrick Venture <venture@google.com>
This is the BMC attached to the OpenBMC Mori board.
Signed-off-by: Patrick Venture <venture@google.com>
Reviewed-by: Chris Rauer <crauer@google.com>
Reviewed-by: Ilkyun Choi <ikchoi@google.com>
Message-id: 20220208233104.284425-1-venture@google.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
docs/system/arm/nuvoton.rst | 1 +
hw/arm/npcm7xx_boards.c | 32 ++++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/docs/system/arm/nuvoton.rst b/docs/system/arm/nuvoton.rst
index adf497e6791..ef2792076aa 100644
--- a/docs/system/arm/nuvoton.rst
+++ b/docs/system/arm/nuvoton.rst
@@ -21,6 +21,7 @@ Hyperscale applications. The following machines are based on
this chip :
- ``quanta-gbs-bmc`` Quanta GBS server BMC
- ``quanta-gsj`` Quanta GSJ server BMC
- ``kudo-bmc`` Fii USA Kudo server BMC
+- ``mori-bmc`` Fii USA Mori server BMC
There are also two more SoCs, NPCM710 and NPCM705, which are single-core
variants of NPCM750 and NPCM730, respectively. These are currently not
diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c
index d701e5cc55a..0678a56156f 100644
--- a/hw/arm/npcm7xx_boards.c
+++ b/hw/arm/npcm7xx_boards.c
@@ -34,6 +34,7 @@
#define QUANTA_GSJ_POWER_ON_STRAPS 0x00001fff
#define QUANTA_GBS_POWER_ON_STRAPS 0x000017ff
#define KUDO_BMC_POWER_ON_STRAPS 0x00001fff
+#define MORI_BMC_POWER_ON_STRAPS 0x00001fff
static const char npcm7xx_default_bootrom[] = "npcm7xx_bootrom.bin";
@@ -429,6 +430,21 @@ static void kudo_bmc_init(MachineState *machine)
npcm7xx_load_kernel(machine, soc);
}
+static void mori_bmc_init(MachineState *machine)
+{
+ NPCM7xxState *soc;
+
+ soc = npcm7xx_create_soc(machine, MORI_BMC_POWER_ON_STRAPS);
+ npcm7xx_connect_dram(soc, machine->ram);
+ qdev_realize(DEVICE(soc), NULL, &error_fatal);
+
+ npcm7xx_load_bootrom(machine, soc);
+ npcm7xx_connect_flash(&soc->fiu[1], 0, "mx66u51235f",
+ drive_get(IF_MTD, 3, 0));
+
+ npcm7xx_load_kernel(machine, soc);
+}
+
static void npcm7xx_set_soc_type(NPCM7xxMachineClass *nmc, const char *type)
{
NPCM7xxClass *sc = NPCM7XX_CLASS(object_class_by_name(type));
@@ -501,6 +517,18 @@ static void kudo_bmc_machine_class_init(ObjectClass *oc,
void *data)
mc->default_ram_size = 1 * GiB;
};
+static void mori_bmc_machine_class_init(ObjectClass *oc, void *data)
+{
+ NPCM7xxMachineClass *nmc = NPCM7XX_MACHINE_CLASS(oc);
+ MachineClass *mc = MACHINE_CLASS(oc);
+
+ npcm7xx_set_soc_type(nmc, TYPE_NPCM730);
+
+ mc->desc = "Mori BMC (Cortex-A9)";
+ mc->init = mori_bmc_init;
+ mc->default_ram_size = 1 * GiB;
+}
+
static const TypeInfo npcm7xx_machine_types[] = {
{
.name = TYPE_NPCM7XX_MACHINE,
@@ -525,6 +553,10 @@ static const TypeInfo npcm7xx_machine_types[] = {
.name = MACHINE_TYPE_NAME("kudo-bmc"),
.parent = TYPE_NPCM7XX_MACHINE,
.class_init = kudo_bmc_machine_class_init,
+ }, {
+ .name = MACHINE_TYPE_NAME("mori-bmc"),
+ .parent = TYPE_NPCM7XX_MACHINE,
+ .class_init = mori_bmc_machine_class_init,
},
};
--
2.25.1
- [PULL 09/26] target/arm: Make KVM -cpu max exactly like -cpu host, (continued)
- [PULL 09/26] target/arm: Make KVM -cpu max exactly like -cpu host, Peter Maydell, 2022/02/21
- [PULL 11/26] target/arm: Fix '-cpu max' for HVF, Peter Maydell, 2022/02/21
- [PULL 14/26] Kconfig: Add 'imply I2C_DEVICES' on boards with available i2c bus, Peter Maydell, 2022/02/21
- [PULL 13/26] Kconfig: Add I2C_DEVICES device group, Peter Maydell, 2022/02/21
- [PULL 10/26] target/arm: Unindent unnecessary else-clause, Peter Maydell, 2022/02/21
- [PULL 15/26] hw/arm/armv7m: Handle disconnected clock inputs, Peter Maydell, 2022/02/21
- [PULL 16/26] include: Move qemu_madvise() and related #defines to new qemu/madvise.h, Peter Maydell, 2022/02/21
- [PULL 17/26] include: Move qemu_mprotect_*() to new qemu/mprotect.h, Peter Maydell, 2022/02/21
- [PULL 19/26] include: Move qemu_[id]cache_* declarations to new qemu/cacheinfo.h, Peter Maydell, 2022/02/21
- [PULL 20/26] include: Move hardware version declarations to new qemu/hw-version.h, Peter Maydell, 2022/02/21
- [PULL 23/26] hw/arm: add initial mori-bmc board,
Peter Maydell <=
- [PULL 18/26] include: Move QEMU_MAP_* constants to mmap-alloc.h, Peter Maydell, 2022/02/21
- [PULL 26/26] ui/cocoa: Fix the leak of qemu_console_get_label, Peter Maydell, 2022/02/21
- [PULL 21/26] MAINTAINERS: Add Akihiko Odaki to macOS-relateds, Peter Maydell, 2022/02/21
- [PULL 25/26] ui/cocoa: Do not alert even without block devices, Peter Maydell, 2022/02/21
- [PULL 24/26] ui/cocoa: Remove allowedFileTypes restriction in SavePanel, Peter Maydell, 2022/02/21
- [PULL 22/26] hw/timer: fix a9gtimer vmstate, Peter Maydell, 2022/02/21