[PATCH] hw/xtensa/xtfpga: Have xtfpga_init() only initialize MMU

Philippe Mathieu-Daudé posted 1 patch 4 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250925013513.67780-1-philmd@linaro.org
Maintainers: Max Filippov <jcmvbkbc@gmail.com>
hw/xtensa/xtfpga.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] hw/xtensa/xtfpga: Have xtfpga_init() only initialize MMU
Posted by Philippe Mathieu-Daudé 4 months, 2 weeks ago
cpu_reset() should not be used with an unrealized CPU.
Here we simply want to initialize the MMU, not the CPU,
so just call reset_mmu().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/xtensa/xtfpga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index 6efffae466b..55de1a7a073 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -268,7 +268,7 @@ static void xtfpga_init(const XtfpgaBoardDesc *board, MachineState *machine)
         /* Need MMU initialized prior to ELF loading,
          * so that ELF gets loaded into virtual addresses
          */
-        cpu_reset(CPU(cpu));
+        reset_mmu(cenv);
     }
     if (smp_cpus > 1) {
         extints = xtensa_mx_pic_get_extints(mx_pic);
-- 
2.51.0


Re: [PATCH] hw/xtensa/xtfpga: Have xtfpga_init() only initialize MMU
Posted by Philippe Mathieu-Daudé 4 months ago
On 25/9/25 03:35, Philippe Mathieu-Daudé wrote:
> cpu_reset() should not be used with an unrealized CPU.
> Here we simply want to initialize the MMU, not the CPU,
> so just call reset_mmu().
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/xtensa/xtfpga.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Patch queued, thanks.

Re: [PATCH] hw/xtensa/xtfpga: Have xtfpga_init() only initialize MMU
Posted by Max Filippov 4 months, 1 week ago
On Wed, Sep 24, 2025 at 6:35 PM Philippe Mathieu-Daudé
<philmd@linaro.org> wrote:
>
> cpu_reset() should not be used with an unrealized CPU.
> Here we simply want to initialize the MMU, not the CPU,
> so just call reset_mmu().
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  hw/xtensa/xtfpga.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>

-- 
Thanks.
-- Max