~kameliya/qemu

9e74914489e46ec19e044ecd49f3e0c87659be9c — Asherah Connor 2 months ago 0397c83 riscv-fw_cfg
hw/riscv: allow ramfb on virt

Allow ramfb on virt.  This lets `-device ramfb' work.

Signed-off-by: Asherah Connor <ashe@kivikakk.ee>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Series-to: qemu-devel
Series-cc: bmeng
Series-version: 4
Series-links: 1:438243 2:438763 3:439477
Cover-letter:
hw/riscv: Add fw_cfg support, allow ramfb
This is version 4 of the series to bring fw_cfg and ramfb support to
riscv's virt machine, adapted for the latest master.  It is still tested
as working against a modified U-Boot with ramfb support.

END
Series-changes: 2
* Add ramfb as allowed on riscv virt machine class.
1 files changed, 3 insertions(+), 0 deletions(-)

M hw/riscv/virt.c
M hw/riscv/virt.c => hw/riscv/virt.c +3 -0
@@ 42,6 42,7 @@
#include "sysemu/sysemu.h"
#include "hw/pci/pci.h"
#include "hw/pci-host/gpex.h"
#include "hw/display/ramfb.h"

static const MemMapEntry virt_memmap[] = {
    [VIRT_DEBUG] =       {        0x0,         0x100 },


@@ 781,6 782,8 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
    mc->cpu_index_to_instance_props = riscv_numa_cpu_index_to_props;
    mc->get_default_cpu_node_id = riscv_numa_get_default_cpu_node_id;
    mc->numa_mem_supported = true;

    machine_class_allow_dynamic_sysbus_dev(mc, TYPE_RAMFB_DEVICE);
}

static const TypeInfo virt_machine_typeinfo = {