From: Tom Musta <tommusta@gmail.com>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: Programmingkid <programmingkidx@gmail.com>,
qemu-ppc <qemu-ppc@nongnu.org>, "Alexander Graf" <agraf@suse.de>,
"Andreas Färber" <afaerber@suse.de>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] Help needed testing on ppc
Date: Wed, 18 Jun 2014 07:40:02 -0500 [thread overview]
Message-ID: <53A188A2.4070509@gmail.com> (raw)
In-Reply-To: <alpine.LMD.2.02.1406171711400.3304@jedlik.phy.bme.hu>
On 6/17/2014 10:17 AM, BALATON Zoltan wrote:
> On Tue, 17 Jun 2014, Tom Musta wrote:
>> I am looking at the test case source code and do not see how you are setting the reserved bit. Maybe I am missing some cleverness in how the test is built?
>
> Probably I should have written it more straight-forward but I wanted it to be possible to change it for other tests easily so it's a bit tricky. Basically I get the code location by a bl then fetching the link register:
>
>> asm volatile("mfcr %0 \n\t"
>> "bl 1f \n\t"
>> "mfcr %1 \n\t"
>> "mflr 10 \n\t"
>
> and then set the bit with the next three lines after testing the normal case:
>
>> "lwz %0, 36(10) \n\t"
>> "ori %0, %0, 1 \n\t"
>> "stw %0, 36(10) \n\t"
>
> Then test again with the bit set:
>
>> "mfcr %0 \n\t"
>> "bl 1f \n\t"
>> "mfcr %2 \n\t"
>
> and exit:
>
>> "b 2f \n\t"
>> "1: stwx %0, %4, %6 \n\t" <<<<<<<<<<<<< just a normal stwx, right?
>> "blr \n\t"
>> "2: \n\t"
>> : "=&r"(cr), "=&r"(cr1), "=&r"(cr2), "=m"(val)
>> : "r"(&val), "m"(val), "r"(8)
>> : "r8", "r9", "r10", "cc", "memory");
>>
>> prom_printf("old cr (mem):\t%#x\n", val);
>> prom_printf("old cr (reg):\t%#x\n", cr);
>> prom_printf("new cr1 (reg):\t%#x\n", cr1);
>> prom_printf("new cr2 (reg):\t%#x\n", cr2);
>> }
>>
>>
>> But the objdump of your test binary does not show that it is set either:
>
> It should show in a debugger the second time the stwx is called (it did for me).
>
> Regards,
> BALATON Zoltan
There should be an icbi after the ori/stw sequence to ensure that the modified code gets into the instruction cache.
next prev parent reply other threads:[~2014-06-18 12:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-06 10:03 [Qemu-devel] Help needed testing on ppc BALATON Zoltan
2014-05-06 12:20 ` Tom Musta
2014-05-06 23:17 ` BALATON Zoltan
2014-05-07 15:31 ` Tom Musta
2014-05-07 16:59 ` Alexander Graf
2014-06-12 0:49 ` BALATON Zoltan
2014-06-16 23:42 ` BALATON Zoltan
2014-06-17 8:42 ` Alexander Graf
2014-06-17 9:34 ` [Qemu-devel] [Qemu-ppc] " BALATON Zoltan
2014-06-17 9:37 ` Alexander Graf
2014-06-17 11:05 ` BALATON Zoltan
2014-06-17 11:54 ` Tom Musta
2014-06-17 15:17 ` BALATON Zoltan
2014-06-18 12:40 ` Tom Musta [this message]
2014-06-19 13:21 ` BALATON Zoltan
2014-06-23 17:07 ` Alexander Graf
2014-05-20 23:55 ` [Qemu-devel] " BALATON Zoltan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53A188A2.4070509@gmail.com \
--to=tommusta@gmail.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=balaton@eik.bme.hu \
--cc=programmingkidx@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.