qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Porting QEMU to Minix - op_goto_tb1 segfaults because tb_next[1] is NULL
@ 2007-08-22 18:34 Erik van der Kouwe
  2007-08-23  9:37 ` Ulrich Hecht
  0 siblings, 1 reply; 3+ messages in thread
From: Erik van der Kouwe @ 2007-08-22 18:34 UTC (permalink / raw)
  To: qemu-devel

Dear all,

I have been attempting to get QEMU to run on the Minix operation system 
(running on x86, see http://www.minix3.org/ for more info on the OS) for 
some time now. I have gotten the program to compile and have added the 
Minix-specific a.out-like format to dyngen. I am quite certain this bit 
works, as I have been looking at the generated relocated code in the 
disassebler at length.

My problem is the following: quickly after starting I get a segmentation 
fault while the generated code is running.

This happens in the code generated from op_goto_tb1 and is caused by jumping 
to a NULL pointer. This NULL pointer originates from the tb_next[1] field of 
the translation block data structure passed as a parameter. I have verified 
in the disassembler that the parameter in the generated code is processed 
correctly and the field is indeed tb_next[1].

I would like to know what would be the normal place for tb_next[1] to be 
initialized, and perhaps if anyone has a suggesting why that might not be 
happening in this case.

I found that (but please correct me if I am wrong) the assignment can only 
take place in tb_set_jmp_target, which in turn is called only by tb_add_jump 
and tb_reset_jump. When stepping through the code I found that neither of 
these functions is ever called either.

Versions i'm using:
- Qemu 0.8.2 (newest when i started, but from changelog ISTM upgrading to 
0.9.0 would not help)
- Minix 3.1.2 (current release version)
- GCC 3.4.3 (version that comes with Minix)

Compilation settings:
- Target: i386-softmmu (must use soft MMU, Minix does not support paging)
- target_user_only enabled
- CONFIG_SOFTFLOAT enabled (Minix does not support FPU, everything is 
emulated anyways)
- USE_DIRECT_JUMP disabled (but had similar problem before disabling, and 
this seems easier to debug)

Virtual machine:
- The Linux image at http://fabrice.bellard.free.fr/qemu/linux-0.2.img.bz2

If you need any more information to answer my question (or at least guide me 
in the right direction) do not hesitate to ask.

Thanks in advance for any answers, suggestions or other advice you may have.

With kind regards,
Erik van der Kouwe 

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

end of thread, other threads:[~2007-08-23 19:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-22 18:34 [Qemu-devel] Porting QEMU to Minix - op_goto_tb1 segfaults because tb_next[1] is NULL Erik van der Kouwe
2007-08-23  9:37 ` Ulrich Hecht
2007-08-23 19:38   ` [Qemu-devel] Porting QEMU to Minix - op_goto_tb1 segfaultsbecause " Erik van der Kouwe

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