bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

plex86 and GNU Mach


From: Marcus Brinkmann
Subject: plex86 and GNU Mach
Date: Mon, 25 Jun 2001 22:25:25 +0200
User-agent: Mutt/1.3.18i

Hi,

I tried GNU Mach with plex86 today, and the first problem I found was in the
com probe code.  GNU Mach has in i386/i386at/com.c (comprobe_general):

int
comprobe_general(struct bus_device *dev, int noisy)
{
        u_short addr = dev->address;
        int     unit = dev->unit;
        int     oldctl, oldmsb;
        char    *type = "8250";
        int     i;

        if ((unit < 0) || (unit > NCOM)) {
                printf("com %d out of range\n", unit);
                return(0);
        }
        oldctl = inb(LINE_CTL(addr));    /* Save old value of LINE_CTL */
        oldmsb = inb(BAUD_MSB(addr));    /* Save old value of BAUD_MSB */
        outb(LINE_CTL(addr), 0);         /* Select INTR_ENAB */
        outb(BAUD_MSB(addr), 0);
        if (inb(BAUD_MSB(addr)) != 0)
          {
            outb(LINE_CTL(addr), oldctl);
            outb(BAUD_MSB(addr), oldmsb);
            return 0;
          }
        outb(LINE_CTL(addr), iDLAB);     /* Select BAUD_MSB */
        outb(BAUD_MSB(addr), 255);
        if (inb(BAUD_MSB(addr)) != 255)
          {
            outb(LINE_CTL(addr), oldctl);
            outb(BAUD_MSB(addr), oldmsb);
            return 0;
          }
        outb(LINE_CTL(addr), 0);         /* Select INTR_ENAB */

XXX:  The above command is the one!

        if (inb(BAUD_MSB(addr)) != 0)    /* Check that it has kept its value*/
          {
            outb(LINE_CTL(addr), oldctl);
            outb(BAUD_MSB(addr), oldmsb);
            return 0;
          }

        /* Com port found, now check what chip it has */

....
}

The command indicated by the XXX above makes plex86 hang.  No further
program code in the kernel is processed.  A gdb backtrace doesn't show much:

(gdb) bt
#0  0x401555f4 in ioctl () from /lib/libc.so.6
#1  0x403a8400 in ?? ()
#2  0x804a20a in main (argc=4, argv=0xbffffb44) at plex86.c:284
#3  0x400ac38b in __libc_start_main () from /lib/libc.so.6

I can post more info, like disk images, configuration files etc.  Please
tell me what you think is relevant, as I can't make a good guess.

Wenn I commented out the com probing code, it made more progress, and then I
get a segmentation fault from plex86 in the Load_context() code of GNU Mach
(machine/cswitch.S). 

ENTRY(Load_context)
        movl    S_ARG0,%ecx                     /* get thread */
        movl    TH_KERNEL_STACK(%ecx),%ecx      /* get kernel stack */
        lea     KERNEL_STACK_SIZE-IKS_SIZE-IEL_SIZE(%ecx),%edx
                                                /* point to stack top */
        CPU_NUMBER(%eax)
        movl    %ecx,CX(EXT(active_stacks),%eax)        /* store stack
address */
        movl    %edx,CX(EXT(kernel_stack),%eax) /* store stack top */

        movl    KSS_ESP(%ecx),%esp              /* switch stacks */
        movl    KSS_ESI(%ecx),%esi              /* restore registers */
        movl    KSS_EDI(%ecx),%edi
        movl    KSS_EBP(%ecx),%ebp
        movl    KSS_EBX(%ecx),%ebx
        xorl    %eax,%eax                       /* return zero (no old
thread) */
        jmp     *KSS_EIP(%ecx)                  /* resume thread */

Where exactly there I cannot tell.

The message from plex is:

Processing command-line options
Opening VM (/dev/plex86)
Processing config file ../../boot-20010605.conf...
Allocating 8MB of physical memory in VM
Mapping virtualized physical memory into monitor
Zeroing virtualized physical memory
Mapping monitor print buffer into user mem.
bochs: ips = 1000000
unmapped_c::init: IGNORING unmapped ports
bochs: [cmos] Setting initial clock to: Mon Jun 25 22:23:49 2001
bochs: Opening image for device 0
bochs: bx_options.floppy_command_delay = 500
vga construct static
bochs: font_width = 8
bochs: font_height = 16
bochs: default_depth = 16
bochs: waiting for MapNotify
bochs: MapNotify found.
bochs: vga: interval=200000
vga init called
bochs: TTY not used, serial port is not connected
ROM: loading image '../bios/BIOS-plex86-2000_0817a' @ 0xf0000 (65536 bytes)
ROM: loading image '../bios/VGABIOS-elpin-2.40' @ 0xc0000 (32768 bytes)
Setting prescan depth to 3
prescan on
Processed 62 lines of config file '../../boot-20010605.conf'
Initializing plugins
Memory:         8
Text address:   0x0
Stack address:  0x0
Running VM
::init_monitor OK -----------------
nexus_size = 0x24E

bochs: CMOS: write reg 14h: value = 05h
::sysIOOut: No handler defined for port 0x46E8!.

::sysIOOut: No handler defined for port 0x102!.

::sysIOOut: No handler defined for port 0x4AE8!.

bochs: vga: io write: 3cf: reg 05: value = 10h
bochs: vga: io write: 3da: ignoring: feature ctrl & vert sync
bochs: *** io read 3c5 case 1: sequencer clocking mode
bochs: vga: io write 3c0: address mode reg=16
bochs: vga: io write 3c0: address mode reg=17
bochs: vga: io write 3c0: address mode reg=18
bochs: vga: io write 3c0: address mode reg=19
bochs: vga: io write 3c0: address mode reg=20
bochs: *** io read 3c5 case 1: sequencer clocking mode
bochs: vga: io write: 3cf: reg 05: value = 10h
bochs: *** io read 3c5 case 1: sequencer clocking mode
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
bochs: vga: io write: 3cf: reg 05: value = 10h
bochs: vga: io write: 3da: ignoring: feature ctrl & vert sync
bochs: *** io read 3c5 case 1: sequencer clocking mode
bochs: vga: io write 3c0: address mode reg=16
bochs: vga: io write 3c0: address mode reg=17
bochs: vga: io write 3c0: address mode reg=18
bochs: vga: io write 3c0: address mode reg=19
bochs: vga: io write 3c0: address mode reg=20
bochs: *** io read 3c5 case 1: sequencer clocking mode
bochs: vga: io write: 3cf: reg 05: value = 10h
bochs: *** io read 3c5 case 1: sequencer clocking mode
bochs: vga: io write: 3cf: reg 05: value = 10h
bochs: vga: io write: 3da: ignoring: feature ctrl & vert sync
bochs: *** io read 3c5 case 1: sequencer clocking mode
bochs: vga: io write 3c0: address mode reg=16
bochs: vga: io write 3c0: address mode reg=17
bochs: vga: io write 3c0: address mode reg=18
bochs: vga: io write 3c0: address mode reg=19
bochs: vga: io write 3c0: address mode reg=20
bochs: *** io read 3c5 case 1: sequencer clocking mode
bochs: vga: io write: 3cf: reg 05: value = 10h
bochs: *** io read 3c5 case 1: sequencer clocking mode
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
floppy io: cylinder request != current cylinder
bochs: floppy: DMA and interrupt capabilities disabled
bochs: KBD: LED status set to 00
::ESC3:

::ESC7:

::ESC1:

::sysIOOut: No handler defined for port 0xCF8!.

::sysIOIn: No handler defined for port 0xCFC.

::sysIOIn: No handler defined for port 0xC000.

::sysIOIn: No handler defined for port 0xC100.

::sysIOIn: No handler defined for port 0xC200.

::sysIOIn: No handler defined for port 0xC300.

::sysIOIn: No handler defined for port 0xC400.

::sysIOIn: No handler defined for port 0xC500.

::sysIOIn: No handler defined for port 0xC600.

::sysIOIn: No handler defined for port 0xC700.

::sysIOIn: No handler defined for port 0xC800.

::sysIOIn: No handler defined for port 0xC900.

::sysIOIn: No handler defined for port 0xCA00.

::sysIOIn: No handler defined for port 0xCB00.

::sysIOIn: No handler defined for port 0xCC00.

::sysIOIn: No handler defined for port 0xCD00.

::sysIOIn: No handler defined for port 0xCE00.

::sysIOIn: No handler defined for port 0xCF00.

::sysIOOut: No handler defined for port 0x176!.

::sysIOIn: No handler defined for port 0x176.

::sysIOOut: No handler defined for port 0x1EE!.

::sysIOIn: No handler defined for port 0x1EE.

::sysIOOut: No handler defined for port 0x16E!.

::sysIOIn: No handler defined for port 0x16E.

bochs: floppy: DMA and interrupt capabilities disabled
bochs: initialize drive params
bochs:   sector count = 63
bochs:   drive select = 0
bochs:   head number = 15
::CV=CDFF

::CV=CDFF

::CV=CB43

::CV=CB43

::call_pro: type = 12

::plex86 panic: 
::call_pro: type = 12

Fatal monitor error caused Panic
eax:0xffffffe4
ebx:0x0
ecx:0x80ad0e0
edx:0xe0ff0000
ebp:0xbfffff5c
esi:0xbfffff80
edi:0xbfffff98
esp:0xbfffff24
eflags:0x286
eip:0x80813e5
cs:s=0x17, dl=0x0, dh=0xccfa00, valid=1
ss:s=0x1f, dl=0x0, dh=0xccf300, valid=1
ds:s=0x1f, dl=0x0, dh=0xccf300, valid=1
es:s=0x1f, dl=0x0, dh=0xccf300, valid=1
fs:s=0x1f, dl=0x0, dh=0xccf300, valid=1
gs:s=0x1f, dl=0x0, dh=0xccf300, valid=1
ldtr:s=0x18, dl=0x8960001f, dh=0xc0008217, valid=1
tr:s=0x20, dl=0x4df02068, dh=0xc0008917, valid=1
gdtr:base=0xc0177900, limit=0x57
idtr:base=0xc01789a0, limit=0x27f
dr0:0x0
dr1:0x0
dr2:0x0
dr3:0x0
dr6:0xffff0ff0
dr7:0x400
tr3:0x0
tr4:0x0
tr5:0x0
tr6:0x0
tr7:0x0
cr0:0xe001003f
cr1:0x0
cr2:0xbfffff98
cr3:0x277000
cr4:0x0
inhibit_mask:0


Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]