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

2.1.99 on DS3100

To: linux-mips@fnet.fr
Subject: 2.1.99 on DS3100
From: Frieder Streffer <frist@lehr.chem.tu-berlin.de>
Date: Wed, 17 Jun 1998 21:38:45 +0200 (CEST)
Hi,
I just has time to test the kernel on my DS3100. Harald, good work!!
I had only to modify whichprom.c a little bit.
Now it boot until the
POSIX conformance testing
messages the it dies.

reagards
Frieder

/*  
 * Routine to determine the identity of the boot PROMs on various models of
 * DECSTATION's.
 */

#include "prom.h"

typedef struct {
        int pagesize;
        unsigned char bitmap[0];
} memmap;

int (*rex_bootinit)(void);
int (*rex_bootread)(void);
int (*rex_getbitmap)(memmap *);
int (*prom_getchar)(void);
char *(*prom_getenv)(char *);
int (*rex_getsysid)(void);
void *(*rex_gettcinfo)(void);
int (*prom_printf)(char *, ...);
unsigned long *(*rex_slot_address)(int);

int (*pmax_open)(char*, int);
int (*pmax_lseek)(int, long, int);
int (*pmax_read)(int, void *, int);
int (*pmax_close)(int);

/*
 * Detect which PROM's the DECSTATION has, and set the callback vectors
 * appropriately.
 */
void which_prom(unsigned long magic, int *prom_vec)
{
        /*
         * No sign of the REX PROM's magic number means we assume a non-REX
         * machine (i.e. we're on a DS2100/3100, DS5100 or DS5000/2xx)
         */
        if (magic == REX_PROM_MAGIC)
        {
                /*
                 * Set up prom abstraction structure with REX entry points.
                 */
                rex_bootinit = (int (*)(void)) *(prom_vec + REX_PROM_BOOTINIT);
                rex_bootread = (int (*)(void)) *(prom_vec + REX_PROM_BOOTREAD);
                rex_getbitmap = (int (*)(memmap *)) *(prom_vec + 
REX_PROM_GETBITMAP);
                prom_getchar = (int (*)(void)) *(prom_vec + REX_PROM_GETCHAR);
                prom_getenv = (char *(*)(char *)) *(prom_vec + REX_PROM_GETENV);
                rex_getsysid = (int (*)(void)) *(prom_vec + REX_PROM_GETSYSID);
                rex_gettcinfo = (void *(*)(void)) *(prom_vec + 
REX_PROM_GETTCINFO);
                prom_printf = (int (*)(char *, ...)) *(prom_vec + 
REX_PROM_PRINTF);
                rex_slot_address = (unsigned long *(*)(int)) *(prom_vec + 
REX_PROM_SLOTADDR);
        }
        else
        {
                /*
                 * Set up prom abstraction structure with non-REX entry points.
                 */
                prom_getchar = (int (*)(void))PMAX_PROM_GETCHAR;
                prom_getenv = (char *(*)(char *))PMAX_PROM_GETENV;
                prom_printf = (int (*)(char *, ...))PMAX_PROM_PRINTF; 
                pmax_open = (int (*)(char *, int))PMAX_PROM_OPEN;
                pmax_lseek = (int (*)(int, long, int))PMAX_PROM_LSEEK;
                pmax_read = (int (*)(int, void *, int))PMAX_PROM_READ;
                pmax_close = (int (*)(int))PMAX_PROM_CLOSE; 
        }
} /* which_prom() */


<Prev in Thread] Current Thread [Next in Thread>
  • 2.1.99 on DS3100, Frieder Streffer <=