hw/loongarch: Add fw_cfg table support
[qemu/ar7.git] / include / hw / loongarch / virt.h
blob9fec1f8a5ced436d8f46448b645881fb4d6c3000
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * Definitions for loongarch board emulation.
5 * Copyright (C) 2021 Loongson Technology Corporation Limited
6 */
8 #ifndef HW_LOONGARCH_H
9 #define HW_LOONGARCH_H
11 #include "target/loongarch/cpu.h"
12 #include "hw/boards.h"
13 #include "qemu/queue.h"
14 #include "hw/intc/loongarch_ipi.h"
16 #define LOONGARCH_MAX_VCPUS 4
18 #define LOONGARCH_ISA_IO_BASE 0x18000000UL
19 #define LOONGARCH_ISA_IO_SIZE 0x0004000
20 #define VIRT_FWCFG_BASE 0x1e020000UL
22 struct LoongArchMachineState {
23 /*< private >*/
24 MachineState parent_obj;
26 IPICore ipi_core[MAX_IPI_CORE_NUM];
27 MemoryRegion lowmem;
28 MemoryRegion highmem;
29 MemoryRegion isa_io;
30 /* State for other subsystems/APIs: */
31 FWCfgState *fw_cfg;
34 #define TYPE_LOONGARCH_MACHINE MACHINE_TYPE_NAME("virt")
35 OBJECT_DECLARE_SIMPLE_TYPE(LoongArchMachineState, LOONGARCH_MACHINE)
36 #endif