qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix powerpc 604 reset vector
@ 2009-04-27  9:37 Tristan Gingold
  2009-04-27 17:10 ` Blue Swirl
  2009-04-28 18:11 ` Blue Swirl
  0 siblings, 2 replies; 5+ messages in thread
From: Tristan Gingold @ 2009-04-27  9:37 UTC (permalink / raw)
  To: qemu-devel

According to 604eUM_book (see 8.3.3 Reset inputs p8-54), the IP bit is set
for hreset and the vector is at offset 0x100 from the exception prefix.

No difference in this area between 604 and 604e.

Signed-off-by: Tristan Gingold <gingold@adacore.com>
---
 target-ppc/translate_init.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 56d8d93..791c73c 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -2875,9 +2875,9 @@ static void init_excp_604 (CPUPPCState *env)
     env->excp_vectors[POWERPC_EXCP_PERFM]    = 0x00000F00;
     env->excp_vectors[POWERPC_EXCP_IABR]     = 0x00001300;
     env->excp_vectors[POWERPC_EXCP_SMI]      = 0x00001400;
-    env->excp_prefix = 0x00000000UL;
+    env->excp_prefix = 0xFFF00000UL;
     /* Hardware reset vector */
-    env->hreset_vector = 0xFFFFFFFCUL;
+    env->hreset_vector = 0x00000100UL;
 #endif
 }
 
-- 
1.6.2

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

* Re: [Qemu-devel] [PATCH] Fix powerpc 604 reset vector
  2009-04-27  9:37 [Qemu-devel] [PATCH] Fix powerpc 604 reset vector Tristan Gingold
@ 2009-04-27 17:10 ` Blue Swirl
  2009-04-28  7:35   ` Tristan Gingold
  2009-04-28 18:11 ` Blue Swirl
  1 sibling, 1 reply; 5+ messages in thread
From: Blue Swirl @ 2009-04-27 17:10 UTC (permalink / raw)
  To: Tristan Gingold; +Cc: qemu-devel

On 4/27/09, Tristan Gingold <gingold@adacore.com> wrote:
> According to 604eUM_book (see 8.3.3 Reset inputs p8-54), the IP bit is set
>  for hreset and the vector is at offset 0x100 from the exception prefix.
>
>  No difference in this area between 604 and 604e.

This breaks system_reset. Maybe the excp_prefix should be reset to
original value on reset?

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

* Re: [Qemu-devel] [PATCH] Fix powerpc 604 reset vector
  2009-04-27 17:10 ` Blue Swirl
@ 2009-04-28  7:35   ` Tristan Gingold
  2009-04-28  8:58     ` Tristan Gingold
  0 siblings, 1 reply; 5+ messages in thread
From: Tristan Gingold @ 2009-04-28  7:35 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel


On Apr 27, 2009, at 7:10 PM, Blue Swirl wrote:

> On 4/27/09, Tristan Gingold <gingold@adacore.com> wrote:
>> According to 604eUM_book (see 8.3.3 Reset inputs p8-54), the IP bit  
>> is set
>> for hreset and the vector is at offset 0x100 from the exception  
>> prefix.
>>
>> No difference in this area between 604 and 604e.
>
> This breaks system_reset. Maybe the excp_prefix should be reset to
> original value on reset?

Is system_reset supposed to be a soft reset or an hard reset ?

Maybe the firmware you used doesn't handle soft reset.

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

* Re: [Qemu-devel] [PATCH] Fix powerpc 604 reset vector
  2009-04-28  7:35   ` Tristan Gingold
@ 2009-04-28  8:58     ` Tristan Gingold
  0 siblings, 0 replies; 5+ messages in thread
From: Tristan Gingold @ 2009-04-28  8:58 UTC (permalink / raw)
  To: Tristan Gingold; +Cc: Blue Swirl, qemu-devel


On Apr 28, 2009, at 9:35 AM, Tristan Gingold wrote:

>
> On Apr 27, 2009, at 7:10 PM, Blue Swirl wrote:
>
>> On 4/27/09, Tristan Gingold <gingold@adacore.com> wrote:
>>> According to 604eUM_book (see 8.3.3 Reset inputs p8-54), the IP  
>>> bit is set
>>> for hreset and the vector is at offset 0x100 from the exception  
>>> prefix.
>>>
>>> No difference in this area between 604 and 604e.
>>
>> This breaks system_reset. Maybe the excp_prefix should be reset to
>> original value on reset?
>
> Is system_reset supposed to be a soft reset or an hard reset ?

To be more precise:
helper.c:cpu_ppc_reset set msr EP (=IP) bit without setting excp_prefix.

This is not coherent:  if exceptions are enabled without resetting EP  
bit, a wrong prefix will be used.

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

* Re: [Qemu-devel] [PATCH] Fix powerpc 604 reset vector
  2009-04-27  9:37 [Qemu-devel] [PATCH] Fix powerpc 604 reset vector Tristan Gingold
  2009-04-27 17:10 ` Blue Swirl
@ 2009-04-28 18:11 ` Blue Swirl
  1 sibling, 0 replies; 5+ messages in thread
From: Blue Swirl @ 2009-04-28 18:11 UTC (permalink / raw)
  To: Tristan Gingold; +Cc: qemu-devel

On 4/27/09, Tristan Gingold <gingold@adacore.com> wrote:
> According to 604eUM_book (see 8.3.3 Reset inputs p8-54), the IP bit is set
>  for hreset and the vector is at offset 0x100 from the exception prefix.
>
>  No difference in this area between 604 and 604e.

Thanks, applied.

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

end of thread, other threads:[~2009-04-28 18:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-27  9:37 [Qemu-devel] [PATCH] Fix powerpc 604 reset vector Tristan Gingold
2009-04-27 17:10 ` Blue Swirl
2009-04-28  7:35   ` Tristan Gingold
2009-04-28  8:58     ` Tristan Gingold
2009-04-28 18:11 ` 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).