Message ID | 20250502185652.67370-4-philmd@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | hw/i386/pc: Remove deprecated 2.6 and 2.7 PC machines | expand |
On Fri, May 02, 2025 at 08:56:35PM +0200, Philippe Mathieu-Daudé wrote: > Date: Fri, 2 May 2025 20:56:35 +0200 > From: Philippe Mathieu-Daudé <philmd@linaro.org> > Subject: [PATCH v3 03/19] hw/mips/loongson3_virt: Prefer using > fw_cfg_init_mem() > X-Mailer: git-send-email 2.47.1 > > fw_cfg_init_mem_wide() is prefered to initialize fw_cfg > with DMA support. Without DMA, use fw_cfg_init_mem(). > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > hw/mips/loongson3_virt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c > index de6fbcc0cb4..41733988729 100644 > --- a/hw/mips/loongson3_virt.c > +++ b/hw/mips/loongson3_virt.c > @@ -286,7 +286,7 @@ static void fw_conf_init(void) > FWCfgState *fw_cfg; > hwaddr cfg_addr = virt_memmap[VIRT_FW_CFG].base; > > - fw_cfg = fw_cfg_init_mem_wide(cfg_addr, cfg_addr + 8, 8, 0, NULL); > + fw_cfg = fw_cfg_init_mem(cfg_addr, cfg_addr + 8, 8); EMM, I'm not sure if I'm basing on the wrong code base... in which patch does fw_cfg_init_mem() accept the third argument? > fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, (uint16_t)current_machine->smp.cpus); > fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, (uint16_t)current_machine->smp.max_cpus); > fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, loaderparams.ram_size); > -- > 2.47.1 >
On 7/5/25 08:31, Zhao Liu wrote: > On Fri, May 02, 2025 at 08:56:35PM +0200, Philippe Mathieu-Daudé wrote: >> Date: Fri, 2 May 2025 20:56:35 +0200 >> From: Philippe Mathieu-Daudé <philmd@linaro.org> >> Subject: [PATCH v3 03/19] hw/mips/loongson3_virt: Prefer using >> fw_cfg_init_mem() >> X-Mailer: git-send-email 2.47.1 >> >> fw_cfg_init_mem_wide() is prefered to initialize fw_cfg >> with DMA support. Without DMA, use fw_cfg_init_mem(). >> >> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> >> --- >> hw/mips/loongson3_virt.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c >> index de6fbcc0cb4..41733988729 100644 >> --- a/hw/mips/loongson3_virt.c >> +++ b/hw/mips/loongson3_virt.c >> @@ -286,7 +286,7 @@ static void fw_conf_init(void) >> FWCfgState *fw_cfg; >> hwaddr cfg_addr = virt_memmap[VIRT_FW_CFG].base; >> >> - fw_cfg = fw_cfg_init_mem_wide(cfg_addr, cfg_addr + 8, 8, 0, NULL); >> + fw_cfg = fw_cfg_init_mem(cfg_addr, cfg_addr + 8, 8); > > EMM, I'm not sure if I'm basing on the wrong code base... in which patch > does fw_cfg_init_mem() accept the third argument? Doh, I missed that, thanks :)
diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c index de6fbcc0cb4..41733988729 100644 --- a/hw/mips/loongson3_virt.c +++ b/hw/mips/loongson3_virt.c @@ -286,7 +286,7 @@ static void fw_conf_init(void) FWCfgState *fw_cfg; hwaddr cfg_addr = virt_memmap[VIRT_FW_CFG].base; - fw_cfg = fw_cfg_init_mem_wide(cfg_addr, cfg_addr + 8, 8, 0, NULL); + fw_cfg = fw_cfg_init_mem(cfg_addr, cfg_addr + 8, 8); fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, (uint16_t)current_machine->smp.cpus); fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, (uint16_t)current_machine->smp.max_cpus); fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, loaderparams.ram_size);
fw_cfg_init_mem_wide() is prefered to initialize fw_cfg with DMA support. Without DMA, use fw_cfg_init_mem(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/mips/loongson3_virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)