linux-mips-fnet
[Top] [All Lists]

DECstation-Linux: 1st user process running!

To: linux-mips@fnet.fr
Subject: DECstation-Linux: 1st user process running!
From: Harald Koerfgen <harald.koerfgen@netcologne.de>
Date: Tue, 14 Jul 1998 22:33:11 +0200 (MEST)
Organization: none
Reply-to: "Harald Koerfgen" <harald.koerfgen@netcologne.de>
Sender: harry@franz.no.dom
>>boot 3/tftp
898336+12688+115584
Linux/MIPS DECstation Boot
Copyright (C) Paul M. Antoine 1995, 1996, 1997
and others, 1994, 1995, 1996, 1997, 1998

Found a REX compatible boot PROM
This DECStation is a DS5000/1xx with 49152kB RAM
CPU is a R3000A with 64kB I-Cache and 128kB D-Cache
Got the following for the console env. variable: s
Should set to serial console...
Will be using PROM console!
Moving Kernel Image from 80200000 to 80030000
Launching Kernel ...

Loading R[23]00 MMU routines.
Linux version 2.1.100 (harry@franz) (gcc version 2.7.2) #265 Tue Jul 14 21:04:28
Calibrating delay loop... 32.90 BogoMIPS
Memory: 47376k/49148k available (776k kernel code, 788k data)
Swansea University Computer Society NET3.039 for Linux 2.1  
NET3: Unix domain sockets 0.16 for Linux NET3.038.
Swansea University Computer Society TCP/IP for NET3.037
IP Protocols: ICMP, UDP, TCP
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
TURBOchannel rev. 1 at 12.5 MHz (no parity)
    slot 0: DEC      PMAZ-AA  V5.3d
    slot 2: DEC      PMAG-DA  V5.3g
Starting kswapd v 1.5
DECstation Z8530 serial driver version 0.01
tty00 at 0xbc100001 (irq = 3) is a Z8530 ESCC
tty01 at 0xbc100009 (irq = 3) is a Z8530 ESCC
tty02 at 0xbc180001 (irq = 3) is a Z8530 ESCC
tty03 at 0xbc180009 (irq = 3) is a Z8530 ESCC
Ramdisk driver initialized : 16 ramdisks of 4096K size
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 32k freed
sys_open: /dev/console
do_page_fault() #2: sending SIGSEGV to sh for illegal readaccess from
00000000 (epc == 00000000, ra == 80038320)
do_page_fault() #2: sending SIGSEGV to sh for illegal readaccess from
00000000 (epc == 00000000, ra == 80038320)      

Fellow DECstation hackers,

I have started to hack on a serial device driver and put a simple program on
the ramdisk to help me debuggin my driver. Unfortunately I had to find out,
that this program was never executed.

        .text
        .globl  __start
        .set    noreorder

__start:
        lui     $4, %hi(device) # /dev/ttyS0
        ori     $4, %lo(device)
        li      $5, 2
        li      $6, 0
        li      $2, 4005        # open
        syscall
        nop

        bltz    $2, 1f          # error?
        
        move    $16, $2         # save fd
        move    $4, $16
        la      $5, string
        li      $6, 13          # count
        li      $2, 4004        # write
        syscall
        nop

        move    $4, $16         # fd
        li      $2, 4006        # close
        syscall
        nop

1:      li      $4, 0   
        li      $2, 4001        # exit
        syscall
        nop

        j       1b              # never reached
        nop
                
device: .asciiz "/dev/ttyS0"

string: .ascii  "Hello World!"
        .byte   0x0a

So I had to go back to the roots. After having a lot of fun last weekend
debugging memory and exception managment code <grrrrrr...>, I finally managed
to get the following boot messages (with an additional printk in sys_open):

[some boring boot messages snipped]

POSIX conformance testing by UNIFIX
TURBOchannel rev. 1 at 12.5 MHz (no parity)
    slot 0: DEC      PMAZ-AA  V5.3d
    slot 2: DEC      PMAG-DA  V5.3g
Starting kswapd v 1.5
DECstation Z8530 serial driver version 0.01
tty00 at 0xbc100001 (irq = 3) is a Z8530 ESCC
tty01 at 0xbc100009 (irq = 3) is a Z8530 ESCC
tty02 at 0xbc180001 (irq = 3) is a Z8530 ESCC
tty03 at 0xbc180009 (irq = 3) is a Z8530 ESCC
Ramdisk driver initialized : 16 ramdisks of 4096K size
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 32k freed
sys_open: /dev/console
sys_open: /dev/ttyS0         
^^^^^^^^^^^^^^^^^^^^

Whoopee!
<imagine Harald singing and dancing in front of his PC>

I'll do my very best to clean up the code and upload it to Michael before going
into vacation next week :-).

Keep hacking.
---
Regards,
Harald

P.S.: the serial driver is *not* working, the machine still hangs somewhere
trying to to open /dev/ttyS0.

P.P.S.: the violate.S program gives now endless

do_page_fault() #2: sending SIGSEGV to sh for illegal readaccess from
00000000 (epc == 00000000, ra == 80038320)

messages.

<Prev in Thread] Current Thread [Next in Thread>