diff options
author | Xiaojuan Yang <yangxiaojuan@loongson.cn> | 2022-08-10 16:53:36 +0800 |
---|---|---|
committer | Song Gao <gaosong@loongson.cn> | 2022-09-19 20:01:40 +0800 |
commit | feae45dc427ed8e0cf01e4730f2f798374536137 (patch) | |
tree | 5b0189f27ae413c1c024edae96556e4ef9edc97a /hw/loongarch/fw_cfg.c | |
parent | 3ff17902c48bfb4e7ce20acf6f00c33fb6e0ed60 (diff) |
hw/loongarch: Support fw_cfg dma function
Support fw_cfg dma function for LoongArch virt machine.
Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>
Acked-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20220908094623.73051-3-yangxiaojuan@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Diffstat (limited to 'hw/loongarch/fw_cfg.c')
-rw-r--r-- | hw/loongarch/fw_cfg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/loongarch/fw_cfg.c b/hw/loongarch/fw_cfg.c index f6503d5607..f15a17416c 100644 --- a/hw/loongarch/fw_cfg.c +++ b/hw/loongarch/fw_cfg.c @@ -23,7 +23,8 @@ FWCfgState *loongarch_fw_cfg_init(ram_addr_t ram_size, MachineState *ms) int max_cpus = ms->smp.max_cpus; int smp_cpus = ms->smp.cpus; - fw_cfg = fw_cfg_init_mem_wide(VIRT_FWCFG_BASE + 8, VIRT_FWCFG_BASE, 8, 0, NULL); + fw_cfg = fw_cfg_init_mem_wide(VIRT_FWCFG_BASE + 8, VIRT_FWCFG_BASE, 8, + VIRT_FWCFG_BASE + 16, &address_space_memory); fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, (uint16_t)max_cpus); fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size); fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, (uint16_t)smp_cpus); |