Message ID | 20250325123927.74939-4-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | target/sparc: Spring cleanups around CPU features & LEON3 | expand |
On Tue, Mar 25, 2025 at 1:39 PM Philippe Mathieu-Daudé <philmd@linaro.org> wrote: > > When the cache-controller feature is not implemented, > log potential ASI access as unimplemented. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > target/sparc/ldst_helper.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c > index b559afc9a94..d4de32d3c48 100644 > --- a/target/sparc/ldst_helper.c > +++ b/target/sparc/ldst_helper.c > @@ -600,6 +600,10 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr, > case 0x0C: /* Leon3 Date Cache config */ > if (env->def.features & CPU_FEATURE_CACHE_CTRL) { > ret = leon3_cache_control_ld(env, addr, size); > + } else { > + qemu_log_mask(LOG_UNIMP, > + "%08x: unimplemented access size: %d\n", addr, This should rather mimic the line in "default", as the issue is not just the size value. Same below. Otherwise, Reviewed-by: Clément Chigot <chigot@adacore.com> > + size); > } > break; > case 0x01c00a00: /* MXCC control register */ > @@ -816,6 +820,10 @@ void helper_st_asi(CPUSPARCState *env, target_ulong addr, uint64_t val, > case 0x0C: /* Leon3 Date Cache config */ > if (env->def.features & CPU_FEATURE_CACHE_CTRL) { > leon3_cache_control_st(env, addr, val, size); > + } else { > + qemu_log_mask(LOG_UNIMP, > + "%08x: unimplemented access size: %d\n", addr, > + size); > } > break; > > -- > 2.47.1 >
diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index b559afc9a94..d4de32d3c48 100644 --- a/target/sparc/ldst_helper.c +++ b/target/sparc/ldst_helper.c @@ -600,6 +600,10 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr, case 0x0C: /* Leon3 Date Cache config */ if (env->def.features & CPU_FEATURE_CACHE_CTRL) { ret = leon3_cache_control_ld(env, addr, size); + } else { + qemu_log_mask(LOG_UNIMP, + "%08x: unimplemented access size: %d\n", addr, + size); } break; case 0x01c00a00: /* MXCC control register */ @@ -816,6 +820,10 @@ void helper_st_asi(CPUSPARCState *env, target_ulong addr, uint64_t val, case 0x0C: /* Leon3 Date Cache config */ if (env->def.features & CPU_FEATURE_CACHE_CTRL) { leon3_cache_control_st(env, addr, val, size); + } else { + qemu_log_mask(LOG_UNIMP, + "%08x: unimplemented access size: %d\n", addr, + size); } break;
When the cache-controller feature is not implemented, log potential ASI access as unimplemented. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- target/sparc/ldst_helper.c | 8 ++++++++ 1 file changed, 8 insertions(+)