qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH, MIPS64] Fix Status_rw_bitmask values
@ 2007-06-04 21:37 Aurelien Jarno
  2007-06-05 13:50 ` Thiemo Seufer
  0 siblings, 1 reply; 4+ messages in thread
From: Aurelien Jarno @ 2007-06-04 21:37 UTC (permalink / raw)
  To: qemu-devel

Hi all,

The patch below fixes the Status_rw_bitmask values for 64-bit CPUs:
- Reverse endianess is currently not implemented, the RE bit should
  not be writable. 
- 64-bit is implemented, the PX bit should be writable.

Bye,
Aurelien

Index: target-mips/translate_init.c
===================================================================
RCS file: /sources/qemu/qemu/target-mips/translate_init.c,v
retrieving revision 1.13
diff -u -d -p -r1.13 translate_init.c
--- target-mips/translate_init.c	1 Jun 2007 21:57:32 -0000	1.13
+++ target-mips/translate_init.c	4 Jun 2007 13:00:30 -0000
@@ -145,7 +145,7 @@ static mips_def_t mips_defs[] =
         .CP0_Config3 = MIPS_CONFIG3,
         .SYNCI_Step = 16,
         .CCRes = 2,
-        .Status_rw_bitmask = 0x3678FFFF,
+        .Status_rw_bitmask = 0x34F8FFFF,
 	/* The R4000 has a full 64bit FPU doesn't use the fcr0 bits. */
         .CP1_fcr0 = (0x5 << FCR0_PRID) | (0x0 << FCR0_REV),
     },
@@ -161,7 +161,7 @@ static mips_def_t mips_defs[] =
         .CP0_Config3 = MIPS_CONFIG3,
         .SYNCI_Step = 32,
         .CCRes = 2,
-        .Status_rw_bitmask = 0x3278FFFF,
+        .Status_rw_bitmask = 0x30F8FFFF,
     },
     {
         .name = "5Kf",
@@ -175,7 +175,7 @@ static mips_def_t mips_defs[] =
         .CP0_Config3 = MIPS_CONFIG3,
         .SYNCI_Step = 32,
         .CCRes = 2,
-        .Status_rw_bitmask = 0x3678FFFF,
+        .Status_rw_bitmask = 0x34F8FFFF,
 	/* The 5Kf has F64 / L / W but doesn't use the fcr0 bits. */
         .CP1_fcr0 = (1 << FCR0_D) | (1 << FCR0_S) |
                     (0x81 << FCR0_PRID) | (0x0 << FCR0_REV),
@@ -192,7 +192,7 @@ static mips_def_t mips_defs[] =
         .CP0_Config3 = MIPS_CONFIG3,
         .SYNCI_Step = 32,
         .CCRes = 2,
-        .Status_rw_bitmask = 0x36FBFFFF,
+        .Status_rw_bitmask = 0x34FBFFFF,
 	/* The 20Kc has F64 / L / W but doesn't use the fcr0 bits. */
         .CP1_fcr0 = (1 << FCR0_3D) | (1 << FCR0_PS) |
                     (1 << FCR0_D) | (1 << FCR0_S) |

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

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

* Re: [Qemu-devel] [PATCH, MIPS64] Fix Status_rw_bitmask values
  2007-06-04 21:37 [Qemu-devel] [PATCH, MIPS64] Fix Status_rw_bitmask values Aurelien Jarno
@ 2007-06-05 13:50 ` Thiemo Seufer
  2007-06-08 10:02   ` Aurelien Jarno
  0 siblings, 1 reply; 4+ messages in thread
From: Thiemo Seufer @ 2007-06-05 13:50 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: qemu-devel

Aurelien Jarno wrote:
> Hi all,
> 
> The patch below fixes the Status_rw_bitmask values for 64-bit CPUs:
> - Reverse endianess is currently not implemented, the RE bit should
>   not be writable. 

OTOH, those CPUs support RE, that's why I left the bit writable.
I think you'll have to boot RiscOS to check the difference, I don't
know of any other user. :-)

> - 64-bit is implemented, the PX bit should be writable.

The current version is correct, R4000 and 5K don't implement PX, the
20Kc and later CPUs do.


Thiemo

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

* Re: [Qemu-devel] [PATCH, MIPS64] Fix Status_rw_bitmask values
  2007-06-05 13:50 ` Thiemo Seufer
@ 2007-06-08 10:02   ` Aurelien Jarno
  2007-06-08 14:00     ` Thiemo Seufer
  0 siblings, 1 reply; 4+ messages in thread
From: Aurelien Jarno @ 2007-06-08 10:02 UTC (permalink / raw)
  To: Thiemo Seufer; +Cc: qemu-devel

Thiemo Seufer a écrit :
> Aurelien Jarno wrote:
>> Hi all,
>>
>> The patch below fixes the Status_rw_bitmask values for 64-bit CPUs:
>> - Reverse endianess is currently not implemented, the RE bit should
>>   not be writable. 
> 
> OTOH, those CPUs support RE, that's why I left the bit writable.
> I think you'll have to boot RiscOS to check the difference, I don't
> know of any other user. :-)

Ok, I see. The best would clearly to implement that.

>> - 64-bit is implemented, the PX bit should be writable.
> 
> The current version is correct, R4000 and 5K don't implement PX, the
> 20Kc and later CPUs do.

I don't know about R4000, but the 5K manual (from www.mips.com) clearly
says that this bit is implemented. Also this bit is marked as "required"
in the MIPS64 PRA manual (for both R1 and R2), and the 5K CPU is
presented as a MIPS64R1 CPU.


-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

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

* Re: [Qemu-devel] [PATCH, MIPS64] Fix Status_rw_bitmask values
  2007-06-08 10:02   ` Aurelien Jarno
@ 2007-06-08 14:00     ` Thiemo Seufer
  0 siblings, 0 replies; 4+ messages in thread
From: Thiemo Seufer @ 2007-06-08 14:00 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: qemu-devel

Aurelien Jarno wrote:
[snip]
> >> - 64-bit is implemented, the PX bit should be writable.
> > 
> > The current version is correct, R4000 and 5K don't implement PX, the
> > 20Kc and later CPUs do.
> 
> I don't know about R4000, but the 5K manual (from www.mips.com) clearly
> says that this bit is implemented. Also this bit is marked as "required"
> in the MIPS64 PRA manual (for both R1 and R2), and the 5K CPU is
> presented as a MIPS64R1 CPU.

Agreed for the 5K, I used too old Documentation to check this.


Thiemo

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

end of thread, other threads:[~2007-06-08 14:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-04 21:37 [Qemu-devel] [PATCH, MIPS64] Fix Status_rw_bitmask values Aurelien Jarno
2007-06-05 13:50 ` Thiemo Seufer
2007-06-08 10:02   ` Aurelien Jarno
2007-06-08 14:00     ` Thiemo Seufer

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).