kayws426 / embox

Automatically exported from code.google.com/p/embox
0 stars 1 forks source link

emulation failure at time kernel start #532

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.r8271, x86/debug
2.configure and build embox
3.run it with
sudo $QEMU -kernel $IMAGE \
    -net nic,model=ne2k_pci,macaddr=AA:BB:CC:DD:EE:02 \
    -net tap,name=tap0,script=$SCRIPTS/start_script,downscript=$SCRIPTS/stop_script \
    -vga std \
    $ARGS

What is the expected output? What do you see instead?
Qemu wait any key pressed and when i press anything have this:

KVM internal error. Suberror: 1
emulation failure
EAX=fffffffc EBX=00009500 ECX=f000ff53 EDX=0000000d
ESI=00000000 EDI=012f7000 EBP=002f5f58 ESP=002f5f2c
EIP=f000ff53 EFL=00010286 [--S--P-] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0010 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
CS =0008 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA]
SS =0010 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
DS =0010 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
FS =0010 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
GS =0010 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT
TR =002b 00198860 000988c8 0000eb00 DPL=3 TSS32-busy
GDT=     00198820 0000002f
IDT=     00198000 000007ff
CR0=00000011 CR2=00000000 CR3=00000000 CR4=00000000
DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000 
DR6=ffff0ff0 DR7=00000400
EFER=0000000000000000
Code=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^Cqemu: terminating on signal 2

But if i attaching with gdb, i have infinite loop in diag_init. There is my 
backtrace:
170         if (outp) {
(gdb) 
181         status = inb(CMD_PORT);
(gdb) 

182         if ((status & 0x01) == 0) {
(gdb) 
183             continue;
(gdb) 
217     }
(gdb) 
170         if (outp) {
(gdb) 
181         status = inb(CMD_PORT);
(gdb) 
182         if ((status & 0x01) == 0) {
(gdb) 
183             continue;
(gdb) 
217     }
(gdb) 
170         if (outp) {
(gdb) 
181         status = inb(CMD_PORT);
(gdb) 
182         if ((status & 0x01) == 0) {
(gdb) 
183             continue;
(gdb) 
217     }
(gdb) bt
#0  keyboard_getc () at src/drivers/keyboard/keyboard.c:217
#1  0x001068f9 in keyboard_init () at src/drivers/keyboard/keyboard.c:244
#2  0x00106970 in diag_init () at src/drivers/diag/vga.c:15
#3  0x001000bd in kernel_init () at src/kernel/init.c:43
#4  0x0010009c in kernel_start () at src/kernel/init.c:25
#5  0x001003c0 in multiboot_entry () at src/arch/x86/kernel/boot.S:88

Please use labels and text to provide additional information.

Original issue reported on code.google.com by ki.stfu on 24 Jan 2013 at 12:21

GoogleCodeExporter commented 9 years ago
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 
4.7.2-2ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs 
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-4.7 --enable-shared --enable-linker-build-id 
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext 
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object 
--enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu 
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) 

Original comment by ki.stfu on 24 Jan 2013 at 12:24

GoogleCodeExporter commented 9 years ago
QEMU emulator version 1.2.0 (qemu-kvm-1.2.0+noroms-0ubuntu2.12.10.2, Debian), 
Copyright (c) 2003-2008 Fabrice Bellard

Original comment by ki.stfu on 24 Jan 2013 at 12:34

GoogleCodeExporter commented 9 years ago

Original comment by alexkalmuk@gmail.com on 24 Jan 2013 at 1:04

GoogleCodeExporter commented 9 years ago
fixed by r8276

Original comment by ki.stfu on 24 Jan 2013 at 10:55