qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] sparc32 remote debugger mem access problems with 0.9.1
@ 2008-02-14  8:22 M.Stein
  2008-02-14 17:43 ` Blue Swirl
  0 siblings, 1 reply; 2+ messages in thread
From: M.Stein @ 2008-02-14  8:22 UTC (permalink / raw)
  To: qemu-devel

Hello,

recently I have updated my qemu from 0.9.0 to 0.9.1 and had problems
with the remote debugger memory access. Especially the command

x /10i 0x4000

doesn't work, even if the PC is 0x4000.

I have tracked down the problem till target-sparc/translate.c, where the
following calls are done:

    if (get_physical_address(env, &phys_addr, &prot, &access_index, addr,
2, 0) != 0)
        if (get_physical_address(env, &phys_addr, &prot, &access_index,
addr, 0, 0) != 0)
            return -1;

In 0.9.0 the last arg to get_physical_address was 'is_user', now it is
'mmu_idx'. is_user
is now evaluated in target-sparc/helper.c:get_physical_adress by

   is_user = mmu_idx == MMU_USER_IDX;

So if 'mmu_idx' ist still 0 (and MMU_USER_IDX is also 0) the resulting
'is_user' is TRUE
and the later

   error_code = access_table[*access_index][access_perms];
    if (error_code && !((env->mmuregs[0] & MMU_NF) && is_user))
        return error_code;

always fails with access_index 0/2 and access_perms 7.

I have changed the last arg of get_physical_address to 1 and all works as
expected.

Thanks for your attention!

                                                matthias




_________________________________________________
Matthias Stein,
GOM Gesellschaft fuer Optische Messtechnik mbH,
Mittelweg 7-8, 38106 Braunschweig, Germany
E-mail: M.Stein@gom.com, Internet: http://www.gom.com
Tel.: +49 (0)531 39029-0, Fax: +49 (0)531 39029-15
Amtsgericht Handelsregister Braunschweig, HRB-Nr.: 3131
Geschaeftsfuehrer: Dr.-Ing. K. Galanulis, Dr.-Ing. D. Winter


This e-mail is confidential. If you have received it in error, you are on
notice of its status.
Please notify us immediately by reply e-mail and delete this message from
your system.
Please do not copy it or use it for any purposes, or disclose its contents
to any other person;
to do so could be a breach of confidence.
Thank you for your co-operation.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] sparc32 remote debugger mem access problems with 0.9.1
  2008-02-14  8:22 [Qemu-devel] sparc32 remote debugger mem access problems with 0.9.1 M.Stein
@ 2008-02-14 17:43 ` Blue Swirl
  0 siblings, 0 replies; 2+ messages in thread
From: Blue Swirl @ 2008-02-14 17:43 UTC (permalink / raw)
  To: qemu-devel

On 2/14/08, M.Stein@gom.com <M.Stein@gom.com> wrote:
> Hello,
>
>  recently I have updated my qemu from 0.9.0 to 0.9.1 and had problems
>  with the remote debugger memory access. Especially the command
>
>  x /10i 0x4000
>
>  doesn't work, even if the PC is 0x4000.
>
>  I have tracked down the problem till target-sparc/translate.c, where the
>  following calls are done:
>
>     if (get_physical_address(env, &phys_addr, &prot, &access_index, addr,
>  2, 0) != 0)
>         if (get_physical_address(env, &phys_addr, &prot, &access_index,
>  addr, 0, 0) != 0)
>             return -1;
>
>  In 0.9.0 the last arg to get_physical_address was 'is_user', now it is
>  'mmu_idx'. is_user
>  is now evaluated in target-sparc/helper.c:get_physical_adress by
>
>    is_user = mmu_idx == MMU_USER_IDX;
>
>  So if 'mmu_idx' ist still 0 (and MMU_USER_IDX is also 0) the resulting
>  'is_user' is TRUE
>  and the later
>
>    error_code = access_table[*access_index][access_perms];
>     if (error_code && !((env->mmuregs[0] & MMU_NF) && is_user))
>         return error_code;
>
>  always fails with access_index 0/2 and access_perms 7.
>
>  I have changed the last arg of get_physical_address to 1 and all works as
>  expected.

Thank you for the analysis! I'll commit the change.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-14 17:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-14  8:22 [Qemu-devel] sparc32 remote debugger mem access problems with 0.9.1 M.Stein
2008-02-14 17:43 ` Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).