On Mon, Oct 10, 2016 at 10:13 PM, Richard Henderson <r...@twiddle.net> wrote:
> On 10/01/2016 05:05 AM, Artyom Tarasenko wrote:
>>
>> -    //typedef struct SparcMMU
>> -    union {
>> -        uint64_t immuregs[16];
>> -        struct {
>> -            uint64_t tsb_tag_target;
>> -            uint64_t unused_mmu_primary_context;   // use DMMU
>> -            uint64_t unused_mmu_secondary_context; // use DMMU
>> -            uint64_t sfsr;
>> -            uint64_t sfar;
>> -            uint64_t tsb;
>> -            uint64_t tag_access;
>> -            uint64_t virtual_watchpoint;
>> -            uint64_t physical_watchpoint;
>> -        } immu;
>> -    };
>> -    union {
>> -        uint64_t dmmuregs[16];
>> -        struct {
>> -            uint64_t tsb_tag_target;
>> -            uint64_t mmu_primary_context;
>> -            uint64_t mmu_secondary_context;
>> -            uint64_t sfsr;
>> -            uint64_t sfar;
>> -            uint64_t tsb;
>> -            uint64_t tag_access;
>> -            uint64_t virtual_watchpoint;
>> -            uint64_t physical_watchpoint;
>> -        } dmmu;
>> -    };
>> +    SparcV9MMU immu;
>> +    SparcV9MMU dmmu;
>
>
> You'll find this broke sparc64-linux-user.  You'll need
>
> diff --git a/linux-user/main.c b/linux-user/main.c
> index bb48260..b1f1347 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -1163,7 +1163,7 @@ void cpu_loop (CPUSPARCState *env)
>                  /* XXX: check env->error_code */
>                  info.si_code = TARGET_SEGV_MAPERR;
>                  if (trapnr == TT_DFAULT)
> -                    info._sifields._sigfault._addr = env->dmmuregs[4];
> +                    info._sifields._sigfault._addr = env->dmmu.mmuregs[4];
>                  else
>                      info._sifields._sigfault._addr = cpu_tsptr(env)->tpc;
>                  queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
>

Will add this. Thanks!


-- 
Regards,
Artyom Tarasenko

SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu

Reply via email to