Skip to contentSkip to conversation

Segmentation fault when run with -nographic

PATCH In review Aurelien Jarno 4 participants 6 messages Jun 18, 2007 – Jun 19, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Segmentation fault when run with -nographic

Hi all,

The patch below fixes a segmentation fault when using the arm emulation with -nographic.

Bye
Aurelien

Index: hw/versatilepb.c
===================================================================
RCS file: /sources/qemu/qemu/hw/versatilepb.c,v
retrieving revision 1.15

versatilepb.c +4 -1
diff -u -d -p -r1.15 versatilepb.c
@@ -10,6 +10,8 @@
 #include "vl.h"
 #include "arm_pic.h"
 
+extern int nographic;
+
 /* Primary interrupt controller.  */
 
 typedef struct vpb_sic_state
@@ -215,7 +217,8 @@ static void versatile_init(int ram_size,
 
     /* The versatile/PB actually has a modified Color LCD controller
        that includes hardware cursor support from the PL111.  */
-    pl110_init(ds, 0x10120000, pic[16], 1);
+    if (!nographic)
+        pl110_init(ds, 0x10120000, pic[16], 1);
 
     pl181_init(0x10005000, sd_bdrv, sic[22], sic[1]);
 #if 0
Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
#1 lore raw
Quoted 5 lines · Aurelien Jarno

Hi all,

The patch below fixes a segmentation fault when using the arm emulation with -nographic.

The sparc emulation in CVS also currently segaults with -nographic. Will this patch fix that as well?

Quoted 5 lines

Bye
Aurelien

-Nigel

#2 lore raw
Quoted 8 lines · Nigel Horne
Quoted 5 lines · Aurelien Jarno

Hi all,

The patch below fixes a segmentation fault when using the arm emulation with -nographic.

The sparc emulation in CVS also currently segaults with -nographic. Will this patch fix that as well?

Nope, this only fix arm versatile. All systems should be fixed, as it as already be done for mips.

Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
#5 lore raw
In reply to Aurelien Jarno
Quoted 4 lines · Aurelien Jarno

Hi all,

The patch below fixes a segmentation fault when using the arm emulation with -nographic.

No. This is the wrong way to fix this.
Fix the segfault, don't disable the device emulation.

Paul