Skip to contentSkip to conversation

PPC: Bump qemu-system-ppc to 64-bit physical address space

PATCH In review Alexander Graf 3 participants 7 messages Oct 17, 2011 – Jan 5, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PPC: Bump qemu-system-ppc to 64-bit physical address space

Some 32-bit PPC CPUs can use up to 36 bit of physicall address space. Treat them accordingly in the qemu-system-ppc binary type.

---
 configure        |    2 +-
 target-ppc/cpu.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
configure +1 -1
index 9b4fe34..3bdb556 100755
@@ -3276,7 +3276,7 @@ case "$target_arch2" in
   ;;
   ppc)
     gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
-    target_phys_bits=32
+    target_phys_bits=64
     target_nptl="yes"
     target_libs_softmmu="$fdt_libs"
   ;;
target-ppc/cpu.h +1 -1
index 8e5c85c..f36f375 100644
@@ -66,7 +66,7 @@
 #define TARGET_PAGE_BITS 12
 #endif /* defined(TARGET_PPCEMB) */
 
-#define TARGET_PHYS_ADDR_SPACE_BITS 32
+#define TARGET_PHYS_ADDR_SPACE_BITS 36
 #define TARGET_VIRT_ADDR_SPACE_BITS 32
 
 #endif /* defined (TARGET_PPC64) */
Signature · 1 line
1.6.0.2
#1 lore raw

Am 18.10.2011 01:52, schrieb Alexander Graf:

Quoted 2 lines

Some 32-bit PPC CPUs can use up to 36 bit of physicall address space. Treat them accordingly in the qemu-system-ppc binary type.

physical

Quoted 11 lines
---
 configure        |    2 +-
 target-ppc/cpu.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
configure +0 -0
index 9b4fe34..3bdb556 100755

configure case "$target_arch2" in · line 3282

Quoted 8 lines
configure +1 -1
@@ -3276,7 +3276,7 @@ case "$target_arch2" in
   ;;
   ppc)
     gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
-    target_phys_bits=32
+    target_phys_bits=64
     target_nptl="yes"
     target_libs_softmmu="$fdt_libs"
   ;;

I've found this very unintuitive for the new targets I'm preparing. Could we use the real target_phys_bits=36 here and later on ceil this to 32/64 before using it for libhw${target_phys_bits}?

Andreas

Quoted 13 lines
target-ppc/cpu.h +1 -1
index 8e5c85c..f36f375 100644
@@ -66,7 +66,7 @@
 #define TARGET_PAGE_BITS 12
 #endif /* defined(TARGET_PPCEMB) */
 
-#define TARGET_PHYS_ADDR_SPACE_BITS 32
+#define TARGET_PHYS_ADDR_SPACE_BITS 36
 #define TARGET_VIRT_ADDR_SPACE_BITS 32
 
 #endif /* defined (TARGET_PPC64) */
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746, AG Nürnberg
#2 lore raw
Quoted 21 lines · Andreas Färber

Am 18.10.2011 01:52, schrieb Alexander Graf:

Quoted 2 lines

Some 32-bit PPC CPUs can use up to 36 bit of physicall address space. Treat them accordingly in the qemu-system-ppc binary type.

physical

Quoted 15 lines

---

configure        |    2 +-
target-ppc/cpu.h |    2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
configure +0 -1
index 9b4fe34..3bdb556 100755
@@ -3276,7 +3276,7 @@ case "$target_arch2" in
  ;;
  ppc)
    gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
-    target_phys_bits=32
Quoted 8 lines

configure case "$target_arch2" in · line 3282

Quoted 4 lines
configure +1 -0
+    target_phys_bits=64
    target_nptl="yes"
    target_libs_softmmu="$fdt_libs"
  ;;

I've found this very unintuitive for the new targets I'm preparing. Could we use the real target_phys_bits=36 here and later on ceil this to 32/64 before using it for libhw${target_phys_bits}?

I'd rather just always make target_phys_bits = 64 and be done with it.

Alex

#3 lore raw
In reply to Alexander Graf

Dear Mr. ppc,

Am 18.10.2011 01:52, schrieb Alexander Graf:

Quoted 2 lines

Some 32-bit PPC CPUs can use up to 36 bit of physicall address space. Treat them accordingly in the qemu-system-ppc binary type.

This change broke the prep machine. :(

With -nographic I see:

ERROR: BUG caught...
BIOS execution exception
nip=0x05800000 msr=0x00002000 dar=0x00000000 dsisr=0x00000000 Stopping execution

Quoted 25 lines
---
 configure        |    2 +-
 target-ppc/cpu.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
configure +1 -1
index 9b4fe34..3bdb556 100755
@@ -3276,7 +3276,7 @@ case "$target_arch2" in
   ;;
   ppc)
     gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
-    target_phys_bits=32
+    target_phys_bits=64
     target_nptl="yes"
     target_libs_softmmu="$fdt_libs"
   ;;
target-ppc/cpu.h +0 -0
index 8e5c85c..f36f375 100644

target-ppc/cpu.h line 69

Quoted 5 lines
target-ppc/cpu.h +1 -1
@@ -66,7 +66,7 @@
 #define TARGET_PAGE_BITS 12
 #endif /* defined(TARGET_PPCEMB) */
 
-#define TARGET_PHYS_ADDR_SPACE_BITS 32
+#define TARGET_PHYS_ADDR_SPACE_BITS 36

If I revert this part, previous behavior is restored.

So it's not about libhw64 or target_phys_addr_t.

Any idea? Is 6xx TLB maybe unable to cope with the larger address space? Or is this an OHW limitation?

Still bisecting another regression...

Andreas

Quoted 3 lines
target-ppc/cpu.h +0 -0
 #define TARGET_VIRT_ADDR_SPACE_BITS 32
 
 #endif /* defined (TARGET_PPC64) */
#4 lore raw
Quoted 48 lines · Andreas Färber

Dear Mr. ppc,

Am 18.10.2011 01:52, schrieb Alexander Graf:

Quoted 2 lines

Some 32-bit PPC CPUs can use up to 36 bit of physicall address space. Treat them accordingly in the qemu-system-ppc binary type.

This change broke the prep machine. :(

With -nographic I see:

ERROR: BUG caught...
BIOS execution exception
nip=0x05800000 msr=0x00002000 dar=0x00000000 dsisr=0x00000000 Stopping execution

Quoted 25 lines

---

configure        |    2 +-
target-ppc/cpu.h |    2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
configure +1 -1
index 9b4fe34..3bdb556 100755
@@ -3276,7 +3276,7 @@ case "$target_arch2" in
  ;;
  ppc)
    gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
-    target_phys_bits=32
+    target_phys_bits=64
    target_nptl="yes"
    target_libs_softmmu="$fdt_libs"
  ;;
target-ppc/cpu.h +0 -0
index 8e5c85c..f36f375 100644

target-ppc/cpu.h line 69

Quoted 5 lines
target-ppc/cpu.h +1 -1
@@ -66,7 +66,7 @@
 #define TARGET_PAGE_BITS 12
 #endif /* defined(TARGET_PPCEMB) */
 
-#define TARGET_PHYS_ADDR_SPACE_BITS 32
+#define TARGET_PHYS_ADDR_SPACE_BITS 36

If I revert this part, previous behavior is restored.

Quoted 4 lines

So it's not about libhw64 or target_phys_addr_t.

Any idea? Is 6xx TLB maybe unable to cope with the larger address space? Or is this an OHW limitation?

That is very confusing tbh. Does qemu-system-ppc64 work with -M prep and -cpu <something old>? The constant is only used for QEMU's internal TLB.

Alex

#5 lore raw

Am 05.01.2012 16:52, schrieb Alexander Graf:

Quoted 49 lines · Andreas Färber
Quoted 47 lines

Am 18.10.2011 01:52, schrieb Alexander Graf:

Quoted 2 lines

Some 32-bit PPC CPUs can use up to 36 bit of physicall address space. Treat them accordingly in the qemu-system-ppc binary type.

This change broke the prep machine. :(

With -nographic I see:

ERROR: BUG caught...
BIOS execution exception
nip=0x05800000 msr=0x00002000 dar=0x00000000 dsisr=0x00000000 Stopping execution

Quoted 25 lines

---

configure        |    2 +-
target-ppc/cpu.h |    2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
configure +1 -1
index 9b4fe34..3bdb556 100755
@@ -3276,7 +3276,7 @@ case "$target_arch2" in
  ;;
  ppc)
    gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
-    target_phys_bits=32
+    target_phys_bits=64
    target_nptl="yes"
    target_libs_softmmu="$fdt_libs"
  ;;
target-ppc/cpu.h +0 -0
index 8e5c85c..f36f375 100644

target-ppc/cpu.h line 69

Quoted 5 lines
target-ppc/cpu.h +1 -1
@@ -66,7 +66,7 @@
 #define TARGET_PAGE_BITS 12
 #endif /* defined(TARGET_PPCEMB) */
 
-#define TARGET_PHYS_ADDR_SPACE_BITS 32
+#define TARGET_PHYS_ADDR_SPACE_BITS 36

If I revert this part, previous behavior is restored.

Quoted 6 lines
Quoted 4 lines

So it's not about libhw64 or target_phys_addr_t.

Any idea? Is 6xx TLB maybe unable to cope with the larger address space? Or is this an OHW limitation?

That is very confusing tbh.

It is... Having fixed Avi's Memory API conversion, despite reverting the phys addr space bits as above I get the same breakage again. Bisecting had clearly pointed out this change. I'll try if bisecting with the Memory API patch on top gives any new conclusions.

Andreas

#6 lore raw

Am 05.01.2012 17:00, schrieb Andreas Färber:

Quoted 35 lines

Am 05.01.2012 16:52, schrieb Alexander Graf:

Quoted 34 lines · Andreas Färber
Quoted 31 lines

Am 18.10.2011 01:52, schrieb Alexander Graf:

Quoted 2 lines

Some 32-bit PPC CPUs can use up to 36 bit of physicall address space. Treat them accordingly in the qemu-system-ppc binary type.

This change broke the prep machine. :(

With -nographic I see:

ERROR: BUG caught...
BIOS execution exception
nip=0x05800000 msr=0x00002000 dar=0x00000000 dsisr=0x00000000 Stopping execution

target-ppc/cpu.h line 69

Quoted 10 lines
target-ppc/cpu.h +1 -1
index 8e5c85c..f36f375 100644
@@ -66,7 +66,7 @@
 #define TARGET_PAGE_BITS 12
 #endif /* defined(TARGET_PPCEMB) */
 
-#define TARGET_PHYS_ADDR_SPACE_BITS 32
+#define TARGET_PHYS_ADDR_SPACE_BITS 36

If I revert this part, previous behavior is restored.

So it's not about libhw64 or target_phys_addr_t.

Any idea? Is 6xx TLB maybe unable to cope with the larger address space? Or is this an OHW limitation?

Quoted 6 lines
Quoted 1 line

That is very confusing tbh.

It is... Having fixed Avi's Memory API conversion, despite reverting the phys addr space bits as above I get the same breakage again. Bisecting had clearly pointed out this change. I'll try if bisecting with the Memory API patch on top gives any new conclusions.

Yep, new suspect:

0fb56ffc5edd66f12ccfc0d71af5f9c79c0a2612 is the first bad commit commit 0fb56ffc5edd66f12ccfc0d71af5f9c79c0a2612

Author: Blue Swirl <[email protected]>
Date:   Sat Oct 15 07:57:49 2011 +0000

m48t59: drop obsolete address base arithmetic

Remove now incorrect address base arithmetic, missed by 9936d6e42392f1440505dfa9df065eabd251cadf. Fixes Sparc64 boot.

:040000 040000 5a38b3f01bb5afd29660755df2622fcf6d5397ce
5a54e03e2d8af7e4a2e9254ae83b0191730e5ee1 M hw

with MemoryRegion fix on top.

Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg