#include <sys/ioc_disk.h>
-#if ENABLE_AT_WINI
#define ATAPI_DEBUG 0 /* To debug ATAPI code. */
return(ERR);
}
+#if VERBOSE
printf("%s: user-space AT Winchester driver detected ", w_name());
if (wn->state & (SMART|ATAPI)) {
printf("%.40s\n", id_string);
} else {
printf("%ux%ux%u\n", wn->pcylinders, wn->pheads, wn->psectors);
}
+#endif
/* Everything looks OK; register IRQ so we can stop polling. */
wn->irq = w_drive < 2 ? AT_WINI_0_IRQ : AT_WINI_1_IRQ;
return(r);
}
#endif /* ENABLE_ATAPI */
-#endif /* ENABLE_AT_WINI */
_PROTOTYPE(void main, (void));
+#define VERBOSE 0 /* display identify messages during boot */
+#define ENABLE_ATAPI 1 /* add ATAPI cd-rom support to driver */
#include <ibm/int86.h>
#include <assert.h>
-#if ENABLE_BIOS_WINI
#define ME "BIOS_WINI"
return OK;
}
-#endif /* ENABLE_BIOS_WINI */
** network environments.
**
** $Log$
+** Revision 1.2 2005/08/03 11:53:34 jnherder
+** Miscellaneous cleanups.
+**
** Revision 1.1 2005/06/29 10:16:46 beng
** Import of dpeth 3c501/3c509b/.. ethernet driver by
** Giovanni Falzoni <fgalzoni@inwind.it>.
#include <net/gen/eth_io.h>
#include "dp.h"
-#if (ENABLE_NETWORKING == 1 && ENABLE_3C501 == 1)
+#if (ENABLE_3C501 == 1)
#include "3c501.h"
return TRUE; /* Etherlink board found */
}
-#endif /* ENABLE_NETWORKING */
+#endif /* ENABLE_3C501 */
/** 3c501.c **/
** the rest is in 8390.c Code specific for ISA bus only
**
** $Log$
+** Revision 1.2 2005/08/03 11:53:34 jnherder
+** Miscellaneous cleanups.
+**
** Revision 1.1 2005/06/29 10:16:46 beng
** Import of dpeth 3c501/3c509b/.. ethernet driver by
** Giovanni Falzoni <fgalzoni@inwind.it>.
#include <net/gen/eth_io.h>
#include "dp.h"
-#if ENABLE_NETWORKING == 1 && ENABLE_3C503 == 1
+#if (ENABLE_3C503 == 1)
#include "8390.h"
#include "3c503.h"
dep->de_stopf = el2_stop;
return TRUE;
}
-#endif /* ENABLE_NETWORKING && ENABLE_3C503 */
+#endif /* ENABLE_3C503 */
/** 3c503.c **/
** I/O base and IRQ. The driver is for ISA bus only
**
** $Log$
+** Revision 1.2 2005/08/03 11:53:34 jnherder
+** Miscellaneous cleanups.
+**
** Revision 1.1 2005/06/29 10:16:46 beng
** Import of dpeth 3c501/3c509b/.. ethernet driver by
** Giovanni Falzoni <fgalzoni@inwind.it>.
#include "dp.h"
-#if ENABLE_NETWORKING == 1 && ENABLE_3C509 == 1
+#if (ENABLE_3C509 == 1)
#include "3c509.h"
return(el3_checksum(id_port) == 0); /* Etherlink board found/not found */
}
-#endif /* ENABLE_NETWORKING */
+#endif /* ENABLE_3C509 */
/** 3c509.c **/
** to extract the NS 8390 common functions.
**
** $Log$
+** Revision 1.2 2005/08/03 11:53:34 jnherder
+** Miscellaneous cleanups.
+**
** Revision 1.1 2005/06/29 10:16:46 beng
** Import of dpeth 3c501/3c509b/.. ethernet driver by
** Giovanni Falzoni <fgalzoni@inwind.it>.
#include <net/gen/eth_io.h>
#include "dp.h"
-#if (ENABLE_NETWORKING == 1 && ENABLE_DP8390 == 1)
+#if (ENABLE_DP8390 == 1)
#define PIO16 0 /* NOTE: pio 16 functions missing */
#endif /* PIO16 == 1 */
-#endif /* ENABLE_NETWORKING && ENABLE_DP8390 */
+#endif /* ENABLE_DP8390 */
/** end 8390.c **/
** from/to the device registers.
**
** $Log$
+** Revision 1.2 2005/08/03 11:53:34 jnherder
+** Miscellaneous cleanups.
+**
** Revision 1.1 2005/06/29 10:16:46 beng
** Import of dpeth 3c501/3c509b/.. ethernet driver by
** Giovanni Falzoni <fgalzoni@inwind.it>.
#include <net/gen/eth_io.h>
#include "dp.h"
-#if ENABLE_NETWORKING == 1
-#if USE_IOPL == 0
+#if (USE_IOPL == 0)
static void warning(const char *type, int err)
{
#else
#error To be implemented
#endif /* USE_IOPL */
-#endif /* ENABLE_NETWORKING */
/** devio.c **/
** Interface description for ethernet device driver
**
** $Log$
+** Revision 1.3 2005/08/03 11:53:34 jnherder
+** Miscellaneous cleanups.
+**
** Revision 1.2 2005/08/02 15:30:35 jnherder
** Various updates to support dynamically starting drivers.
** Output during initialization should be suppressed. Unless an error occurs.
#undef ENABLE_WDETH
#undef ENABLE_DP8390
-#define ENABLE_NETWORKING 1
-
#define ENABLE_3C501 1 /* enable 3Com Etherlink I board */
#define ENABLE_3C503 1 /* enable 3Com Etherlink II board */
#define ENABLE_3C509 1 /* enable 3Com Etherlink III board */
** Adapted to interface new main network task.
**
** $Log$
+** Revision 1.2 2005/08/03 11:53:34 jnherder
+** Miscellaneous cleanups.
+**
** Revision 1.1 2005/06/29 10:16:46 beng
** Import of dpeth 3c501/3c509b/.. ethernet driver by
** Giovanni Falzoni <fgalzoni@inwind.it>.
#include <net/gen/eth_io.h>
#include "dp.h"
-#if (ENABLE_NETWORKING == 1 && ENABLE_NE2000 == 1)
+#if (ENABLE_NE2000 == 1)
#include "8390.h"
#include "ne.h"
return TRUE;
}
-#endif /* ENABLE_NETWORKING && ENABLE_NE2000 */
+#endif /* ENABLE_NE2000 */
/** ne.c **/
** for network packets.
**
** $Log$
+** Revision 1.2 2005/08/03 11:53:34 jnherder
+** Miscellaneous cleanups.
+**
** Revision 1.1 2005/06/29 10:16:46 beng
** Import of dpeth 3c501/3c509b/.. ethernet driver by
** Giovanni Falzoni <fgalzoni@inwind.it>.
#include <net/gen/eth_io.h>
#include "dp.h"
-#if ENABLE_NETWORKING == 1 && HAVE_BUFFERS == 1
+#if (HAVE_BUFFERS == 1)
static m_hdr_t *allocptr = NULL;
static char tx_rx_buff[8192];
return;
}
-#endif /* ENABLE_NETWORKING */
+#endif /* HAVE_BUFFERS */
/** netbuff.c **/
** Adaptation to interfacing new main network task.
**
** $Log$
+** Revision 1.2 2005/08/03 11:53:34 jnherder
+** Miscellaneous cleanups.
+**
** Revision 1.1 2005/06/29 10:16:46 beng
** Import of dpeth 3c501/3c509b/.. ethernet driver by
** Giovanni Falzoni <fgalzoni@inwind.it>.
#include <net/gen/eth_io.h>
#include "dp.h"
-#if (ENABLE_NETWORKING == 1 && ENABLE_WDETH == 1)
+#if (ENABLE_WDETH == 1)
#include "8390.h"
#include "wd.h"
return tlb == E_TLB_SMC8216C;
}
-#endif /* ENABLE_NETWORKING && ENABLE_WDETH */
+#endif /* ENABLE_WDETH */
/** wd.c **/
#define printW() ((void)0)
#define vm_1phys2bus(p) (p)
-#if !ENABLE_PCI
-#error PCI support not enabled
-#endif
-
#include "assert.h"
#include "../libpci/pci.h"
#include "fxp.h"
#if (CHIP == INTEL)
-#if ENABLE_AHA1540_SCSI && DMA_BUF_SIZE < 2048
+#if USE_EXTRA_DMA_BUF && DMA_BUF_SIZE < 2048
/* A bit extra scratch for the Adaptec driver. */
#define BUF_EXTRA (2048 - DMA_BUF_SIZE)
#else
#define SECTOR_MASK 511 /* and remainder */
/* Size of the DMA buffer buffer in bytes. */
+#define USE_EXTRA_DMA_BUF 0 /* usually not needed */
#define DMA_BUF_SIZE (DMA_SECTORS * SECTOR_SIZE)
#if (CHIP == INTEL)
#include "config.h"
#endif
-#if ENABLE_PCI
#if !__minix_vmd
#define debug 0
outl(PCII_CONFADD, PCII_UNSEL);
#endif
}
-#endif /* ENABLE_PCI */
/*
* $PchId: pci.c,v 1.7 2003/08/07 09:06:51 philip Exp $
Created: Jan 2000 by Philip Homburg <philip@cs.vu.nl>
*/
-#if ENABLE_PCI
/* tempory functions: to be replaced later (see pci_intel.h) */
_PROTOTYPE( unsigned pci_inb, (U16_t port) );
_PROTOTYPE( void pci_attr_w16, (int devind, int port, U16_t value) );
_PROTOTYPE( void pci_attr_w32, (int devind, int port, u32_t value) );
-#endif /* ENABLE_PCI */
#define PCI_VID 0x00 /* Vendor ID, 16-bit */
#define PCI_DID 0x02 /* Device ID, 16-bit */
#include "config.h"
#endif
-#if ENABLE_PCI
struct pci_vendor pci_vendor_table[]=
{
{ 0x1106, 0x8305, PCI_AGPB_VIA, }, /* VIA VT8365 [KM133 AGP] */
{ 0x0000, 0x0000, 0, },
};
-#endif /* ENABLE_PCI */
/*
* $PchId: pci_table.c,v 1.7 2003/09/05 10:53:22 philip Exp $
#error /* memory limit not set up */
#endif /* !(CHIP == M68000) */
#endif /* !(CHIP == INTEL) */
-
- /* Initialization succeeded. Print welcome message. */
- report("MEM","user-space memory driver has been initialized.", NO_NUM);
}
#define printW() ((void)0)
#define vm_1phys2bus(p) (p)
-#define VERBOSE 0 /* display message during init */
-
-#if !ENABLE_PCI
-#error PCI support not enabled
-#endif
+#define VERBOSE 0 /* display message during init */
#include "../libpci/pci.h"
#include "rtl8139.h"
Created: Aug 2003 by Philip Homburg <philip@cs.vu.nl>
*/
-#define ENABLE_RTL8139 1
#define RL_IDR 0x00 /* Ethernet address
* Note: RL_9346CR_EEM_CONFIG mode is
#include <timers.h>
+#define LINEWRAP 1 /* console.c - wrap lines at column 80 */
#define TTY_IN_BYTES 256 /* tty input queue size */
#define TAB_SIZE 8 /* distance between tab stops */
-
#ifndef _MINIX_COM_H
-#define _MINIX_COM_H 1
+#define _MINIX_COM_H
/*===========================================================================*
* Magic process numbers *
/* Number of tasks. Note that NR_PROCS is defined in <minix/config.h>. */
#define NR_TASKS 4
-/* Magic numbers for controllers. Device driver mapping is dynamic. */
+/* Magic numbers for controllers. Device to driver mapping is dynamic. */
#define CTRLR(n) (NONE + (n))
/* User-space processes, that is, device drivers, servers, and INIT. */
#define NR_BOOT_PROCS (NR_TASKS + INIT_PROC_NR + 1)
+/*===========================================================================*
+ * Major and minor device numbers *
+ *===========================================================================*/
+
+/* Major and minor device numbers for MEMORY driver. */
+#define MEMORY_MAJOR 1 /* major device for memory devices */
+# define RAM_DEV 0 /* minor device for /dev/ram */
+# define MEM_DEV 1 /* minor device for /dev/mem */
+# define KMEM_DEV 2 /* minor device for /dev/kmem */
+# define NULL_DEV 3 /* minor device for /dev/null */
+# define BOOT_DEV 4 /* minor device for /dev/boot */
+# define RANDOM_DEV 5 /* minor device for /dev/(u)random */
+# define URANDOM_DEV RANDOM_DEV
+# define ZERO_DEV 6 /* minor device for /dev/zero */
+
+/* Full device numbers that are special to the boot monitor and FS. */
+# define DEV_RAM 0x0100 /* device number of /dev/ram */
+# define DEV_BOOT 0x0104 /* device number of /dev/boot */
+
+#define TTY_MAJOR 4 /* major device for ttys */
+#define CTTY_MAJOR 5 /* major device for /dev/tty */
+
+#define INET_MAJOR 7 /* major device for inet */
+
+#define LOG_MAJOR 15 /* major device for log driver */
+# define IS_KLOG_DEV 0 /* minor device for /dev/klog */
+
+
/*===========================================================================*
* Kernel notification types *
*===========================================================================*/
# define NEW_KSIG NOTIFY_FROM(HARDWARE) /* new kernel signal */
# define FKEY_PRESSED NOTIFY_FROM(TTY_PROC_NR)/* function key press */
-#define NOTIFICATION 0x800 /* flag for notifications */
-# define DEV_SELECTED (NOTIFICATION | 5) /* select() notification */
-#define NR_NOTIFY_TYPES 6 /* nr of bits in mask */
-
/* Shorthands for message parameters passed with notifications. */
#define NOTIFY_SOURCE m_source
#define NOTIFY_TYPE m_type
#define NOTIFY_FLAGS m2_i1
-/*===========================================================================*
- * Messages for system management server *
- *===========================================================================*/
-
-#define SRV_RQ_BASE 0x700
-
-#define SRV_UP (SRV_RQ_BASE + 0) /* start system service */
-#define SRV_DOWN (SRV_RQ_BASE + 1) /* stop system service */
-#define SRV_STATUS (SRV_RQ_BASE + 2) /* get service status */
-
-# define SRV_PATH_ADDR m1_p1 /* path of binary */
-# define SRV_PATH_LEN m1_i1 /* length of binary */
-# define SRV_ARGS_ADDR m1_p2 /* arguments to be passed */
-# define SRV_ARGS_LEN m1_i2 /* length of arguments */
-# define SRV_DEV_MAJOR m1_i3 /* major device number */
-# define SRV_PRIV_ADDR m1_p3 /* privileges string */
-# define SRV_PRIV_LEN m1_i3 /* length of privileges */
-
-
/*===========================================================================*
* Messages for BLOCK and CHARACTER device drivers *
*===========================================================================*/
+/* Message types for device drivers. */
#define DEV_RQ_BASE 0x400 /* base for device request types */
#define DEV_RS_BASE 0x500 /* base for device response types */
-#define CANCEL 0 /* general req to force a task to cancel */
-#define DEV_READ 3 /* fcn code for reading from tty */
-#define DEV_WRITE 4 /* fcn code for writing to tty */
-#define DEV_IOCTL 5 /* fcn code for ioctl */
-#define DEV_OPEN 6 /* fcn code for opening tty */
-#define DEV_CLOSE 7 /* fcn code for closing tty */
-#define DEV_SCATTER 8 /* fcn code for writing from a vector */
-#define DEV_GATHER 9 /* fcn code for reading into a vector */
-#define TTY_SETPGRP 10 /* fcn code for setpgroup */
-#define TTY_EXIT 11 /* a process group leader has exited */
+#define CANCEL (DEV_RQ_BASE + 0) /* general req to force a task to cancel */
+#define DEV_READ (DEV_RQ_BASE + 3) /* read from minor device */
+#define DEV_WRITE (DEV_RQ_BASE + 4) /* write to minor device */
+#define DEV_IOCTL (DEV_RQ_BASE + 5) /* I/O control code */
+#define DEV_OPEN (DEV_RQ_BASE + 6) /* open a minor device */
+#define DEV_CLOSE (DEV_RQ_BASE + 7) /* close a minor device */
+#define DEV_SCATTER (DEV_RQ_BASE + 8) /* write from a vector */
+#define DEV_GATHER (DEV_RQ_BASE + 9) /* read into a vector */
+#define TTY_SETPGRP (DEV_RQ_BASE + 10) /* set process group */
+#define TTY_EXIT (DEV_RQ_BASE + 11) /* process group leader exited */
#define DEV_SELECT (DEV_RQ_BASE + 12) /* request select() attention */
#define DEV_STATUS (DEV_RQ_BASE + 13) /* request driver status */
#define DEV_IO_READY (DEV_RS_BASE + 3) /* selected device ready */
#define DEV_NO_STATUS (DEV_RS_BASE + 4) /* empty status reply */
-#define SUSPEND -998 /* used in interrupts when tty has no data */
-
/* Field names for messages to block and character device drivers. */
#define DEVICE m2_i1 /* major-minor device */
#define PROC_NR m2_i2 /* which (proc) wants I/O? */
/* Field names used in reply messages from tasks. */
#define REP_PROC_NR m2_i1 /* # of proc on whose behalf I/O was done */
#define REP_STATUS m2_i2 /* bytes transferred or error number */
+# define SUSPEND -998 /* status to suspend caller, reply later */
/* Field names for messages to TTY driver. */
#define TTY_LINE DEVICE /* message parameter: terminal line */
#define TAPE_STAT0 m2_l1
#define TAPE_STAT1 m2_l2
-/* Major and minor device numbers for MEMORY driver. */
-# define MEMORY_MAJOR 1 /* major device for memory devices */
-# define RAM_DEV 0 /* minor device for /dev/ram */
-# define MEM_DEV 1 /* minor device for /dev/mem */
-# define KMEM_DEV 2 /* minor device for /dev/kmem */
-# define NULL_DEV 3 /* minor device for /dev/null */
-# define BOOT_DEV 4 /* minor device for /dev/boot */
-# define RANDOM_DEV 5 /* minor device for /dev/(u)random */
-# define URANDOM_DEV RANDOM_DEV
-# define ZERO_DEV 6 /* minor device for /dev/zero */
-
-#define TTY_MAJOR 4 /* major device no. for ttys */
-#define CTTY_MAJOR 5 /* major device no. for /dev/tty */
-
-#define INET_MAJOR 7 /* major device no. for inet */
-
-#define LOG_MAJOR 15 /* major device no. for LOG */
-#define IS_KLOG_DEV 0 /* minor device for /dev/klog */
-
-/* Full device numbers that are special to the boot monitor and FS. */
-# define DEV_RAM 0x0100 /* device number of /dev/ram */
-# define DEV_BOOT 0x0104 /* device number of /dev/boot */
-
/*===========================================================================*
* Messages for networking layer *
#define PR_MEM_PTR m1_p1 /* tells where memory map is for sys_newmap */
/* Field names for SYS_INT86 */
-#define INT86_REG86 m1_p1 /* Point to registers */
+#define INT86_REG86 m1_p1 /* pointer to registers */
/* Field names for SELECT (FS). */
#define SEL_NFDS m8_i1
#define SEL_ERRORFDS m8_p3
#define SEL_TIMEOUT m8_p4
+
+/*===========================================================================*
+ * Messages for system management server *
+ *===========================================================================*/
+
+#define SRV_RQ_BASE 0x700
+
+#define SRV_UP (SRV_RQ_BASE + 0) /* start system service */
+#define SRV_DOWN (SRV_RQ_BASE + 1) /* stop system service */
+#define SRV_STATUS (SRV_RQ_BASE + 2) /* get service status */
+
+# define SRV_PATH_ADDR m1_p1 /* path of binary */
+# define SRV_PATH_LEN m1_i1 /* length of binary */
+# define SRV_ARGS_ADDR m1_p2 /* arguments to be passed */
+# define SRV_ARGS_LEN m1_i2 /* length of arguments */
+# define SRV_DEV_MAJOR m1_i3 /* major device number */
+# define SRV_PRIV_ADDR m1_p3 /* privileges string */
+# define SRV_PRIV_LEN m1_i3 /* length of privileges */
+
+
/*===========================================================================*
- * Miscellaneous messages, mainly used by IS *
+ * Miscellaneous messages used by TTY *
*===========================================================================*/
/* Miscellaneous request types and field names, e.g. used by IS server. */
# define DIAG_PROC_NR m1_i2
-#endif
+#endif /* _MINIX_COM_H */
#define OS_RELEASE "3"
#define OS_VERSION "0.6"
-#define _MINIX_VERSION 3
/* This file sets configuration parameters for the MINIX kernel, FS, and PM.
* It is divided up into two main sections. The first section contains
#define NR_BUF_HASH 512 /* size of buf hash table; MUST BE POWER OF 2*/
#endif
-/* Defines for driver and kernel configuration. */
-#define AUTO_BIOS 0 /* xt_wini.c - use Western's autoconfig BIOS */
-#define LINEWRAP 1 /* console.c - wrap lines at column 80 */
-
/* Number of controller tasks (/dev/cN device classes). */
#define NR_CTRLRS 2
/* Enable or disable swapping processes to disk. */
#define ENABLE_SWAP 1
-/* Include or exclude an image of /dev/boot in the boot image. */
-#define ENABLE_BOOTDEV 0
-
-/* Include or exclude device drivers. Set to 1 to include, 0 to exclude. */
-#define ENABLE_BIOS_WINI 1 /* enable BIOS winchester driver */
-#define ENABLE_ESDI_WINI 0 /* enable ESDI winchester driver */
-#define ENABLE_XT_WINI 0 /* enable XT winchester driver */
-#define ENABLE_AHA1540 0 /* enable Adaptec 1540 SCSI driver */
-#define ENABLE_FATFILE 0 /* enable FAT file virtual disk driver */
-#define ENABLE_DOSFILE 0 /* enable DOS file virtual disk driver */
-#define ENABLE_SB16 0 /* enable Soundblaster audio driver */
-#define ENABLE_PCI 1 /* enable PCI device recognition */
-
-/* Include or exclude user-level device drivers (and supporting servers). */
-#define ENABLE_PRINTER 0 /* user-level Centronics printer driver */
-#define ENABLE_FLOPPY 0 /* enable floppy disk driver */
-#define ENABLE_AT_WINI 1 /* enable AT winchester driver */
-#define ENABLE_ATAPI 1 /* add ATAPI support to AT driver */
+/* Include or exclude an image of /dev/boot in the boot image.
+ * Please update the makefile in /usr/src/tools/ as well.
+ */
+#define ENABLE_BOOTDEV 1
/* DMA_SECTORS may be increased to speed up DMA based drivers. */
#define DMA_SECTORS 1 /* DMA buffer size (must be >= 1) */
alloc_segments(rp);
}
-#if ENABLE_BOOTDEV
+#if ENABLE_BOOTDEV
/* Expect an image of the boot device to be loaded into memory as well.
* The boot device is the last module that is loaded into memory, and,
* for example, can contain the root FS (useful for embedded systems).
{ TTY_PROC_NR, 0, SERV_F, 16, 1, 0, SERV_T, SYST_M, "TTY" },
{ MEM_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, DRIV_M, "MEMORY" },
{ LOG_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, SYST_M, "LOG" },
-#if ENABLE_AT_WINI
{ AT_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, DRIV_M, "AT_WINI" },
-#endif
-#if ENABLE_BIOS_WINI
{ BIOS_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, SYST_M, "BIOS" },
-#endif
{ INIT_PROC_NR, 0, USER_F, 8, USER_Q, 0, USER_T, USER_M, "INIT" },
};
#define DT(enable, opcl, io, driver, flags) \
{ (enable?(opcl):no_dev), (enable?(io):0), \
(enable?(driver):0), (flags) },
+#define NC(x) (NR_CTRLRS >= (x))
/* The order of the entries here determines the mapping between major device
* numbers and tasks. The first entry (major device 0) is not used. The
-------------- -------- ------ ----------- ----- ------ ----
*/
struct dmap dmap[NR_DEVICES] = {
- DT(1, no_dev, 0, 0, 0) /* 0 = not used */
- DT(1, gen_opcl, gen_io, MEM_PROC_NR, 0) /* 1 = /dev/mem */
- DT(ENABLE_FLOPPY, gen_opcl, gen_io, NONE, DMAP_MUTABLE) /* 2 = /dev/fd0 */
- DT(NR_CTRLRS >= 1, gen_opcl, gen_io, CTRLR(0),DMAP_MUTABLE) /* 3 = /dev/c0 */
- DT(1, tty_opcl, gen_io, TTY_PROC_NR, 0) /* 4 = /dev/tty00 */
- DT(1, ctty_opcl,ctty_io,TTY_PROC_NR, 0) /* 5 = /dev/tty */
- DT(ENABLE_PRINTER, gen_opcl, gen_io, NONE, DMAP_MUTABLE) /* 6 = /dev/lp */
+ DT(1, no_dev, 0, 0, 0) /* 0 = not used */
+ DT(1, gen_opcl, gen_io, MEM_PROC_NR, 0) /* 1 = /dev/mem */
+ DT(0, gen_opcl, gen_io, NONE, DMAP_MUTABLE) /* 2 = /dev/fd0 */
+ DT(NC(1), gen_opcl, gen_io, CTRLR(0), DMAP_MUTABLE) /* 3 = /dev/c0 */
+ DT(1, tty_opcl, gen_io, TTY_PROC_NR, 0) /* 4 = /dev/tty00 */
+ DT(1, ctty_opcl,ctty_io,TTY_PROC_NR, 0) /* 5 = /dev/tty */
+ DT(0, gen_opcl, gen_io, NONE, DMAP_MUTABLE) /* 6 = /dev/lp */
#if (MACHINE == IBM_PC)
- DT(1, no_dev, 0, 0, DMAP_MUTABLE) /* 7 = /dev/ip */
- DT(NR_CTRLRS >= 2, gen_opcl, gen_io, CTRLR(1),DMAP_MUTABLE) /* 8 = /dev/c1 */
- DT(0, 0, 0, 0, DMAP_MUTABLE) /* 9 = not used */
- DT(NR_CTRLRS >= 3, gen_opcl, gen_io, CTRLR(2),DMAP_MUTABLE) /*10 = /dev/c2 */
- DT(0, 0, 0, 0, DMAP_MUTABLE) /*11 = not used */
- DT(NR_CTRLRS >= 4, gen_opcl, gen_io, CTRLR(3),DMAP_MUTABLE) /*12 = /dev/c3 */
- DT(ENABLE_SB16, gen_opcl, gen_io, NONE, DMAP_MUTABLE) /*13 = /dev/audio */
- DT(ENABLE_SB16, gen_opcl, gen_io, NONE, DMAP_MUTABLE) /*14 = /dev/mixer */
- DT(1, gen_opcl, gen_io, LOG_PROC_NR, 0) /*15 = /dev/klog */
+ DT(1, no_dev, 0, 0, DMAP_MUTABLE) /* 7 = /dev/ip */
+ DT(NC(2), gen_opcl, gen_io, CTRLR(1), DMAP_MUTABLE) /* 8 = /dev/c1 */
+ DT(0, 0, 0, 0, DMAP_MUTABLE) /* 9 = not used */
+ DT(NC(3), gen_opcl, gen_io, CTRLR(2), DMAP_MUTABLE) /*10 = /dev/c2 */
+ DT(0, 0, 0, 0, DMAP_MUTABLE) /*11 = not used */
+ DT(NC(4), gen_opcl, gen_io, CTRLR(3), DMAP_MUTABLE) /*12 = /dev/c3 */
+ DT(0, gen_opcl, gen_io, NONE, DMAP_MUTABLE) /*13 = /dev/audio */
+ DT(0, gen_opcl, gen_io, NONE, DMAP_MUTABLE) /*14 = /dev/mixer */
+ DT(1, gen_opcl, gen_io, LOG_PROC_NR, 0) /*15 = /dev/klog */
#endif /* IBM_PC */
};
ctrlr_nr[1] = '0' + c;
if ((s = get_mon_param(ctrlr_nr, ctrlr_type, 8)) != OK) {
if (s != ESRCH)
- printf("FS: warning, couldn't get monitor param: %d\n", s);
+ panic(__FILE__,"couldn't get monitor param", s);
continue;
}
for (dp = drivertab;
if ((s=findproc(dp->proc_name, &proc_nr)) == OK) {
for (i=0; i< NR_DEVICES; i++) { /* find mapping */
if (dmap[i].dmap_driver == CTRLR(c)) {
- if (map_driver(i, proc_nr, STYLE_DEV) == OK) {
- printf("FS: controller %s (%s) mapped to %s driver (proc. nr %d)\n",
- ctrlr_nr, dp->wini_type, dp->proc_name, dmap[i].dmap_driver);
+ if ((s=map_driver(i, proc_nr, STYLE_DEV)) != OK) {
+ panic(__FILE__,"map_driver failed",s);
}
+#if VERBOSE
+ printf("FS: controller %s (%s) mapped to %s driver (nr %d)\n",
+ ctrlr_nr, dp->wini_type, dp->proc_name, dmap[i].dmap_driver);
+#endif
}
}
}
#define _MINIX 1 /* tell headers to include MINIX stuff */
#define _SYSTEM 1 /* tell headers that this is the kernel */
+#define VERBOSE 0 /* show messages during initialization? */
+
/* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */
#include <ansi.h> /* MUST be second */
* currently only in use for select(). Check it.
*/
fs_expire_timers(m_in.NOTIFY_TIMESTAMP);
- } else if (call_nr == DEV_SELECTED) {
- printf("Old select device callback received - ignored\n");
} else if ((call_nr & NOTIFY_MESSAGE)) {
/* Device notifies us of an event. */
dev_status(&m_in);
}
init_rand256(randbits);
-#if DEAD_CODE
- /* Sign on as a server at all offices in the proper order. */
- if (svrctl(MMSIGNON, (void *) NULL) == -1) {
- printf("inet: server signon failed\n");
- exit(1);
- }
-#endif
#ifdef __minix_vmd
if (svrctl(SYSSIGNON, (void *) &info) == -1) pause();
/* Our new identity as a server. */
this_proc = info.proc_nr;
#else /* Minix 3 */
-#if DEAD_CODE
- if (svrctl(SYSSIGNON, (void *) NULL) == -1) pause();
-#endif
/* Our new identity as a server. */
if ((this_proc = getprocnr()) < 0)
if (sigaction(SIGTERM, &sa, NULL)<0) panic("SM","sigaction failed", errno);
if (sigaction(SIGABRT, &sa, NULL)<0) panic("SM","sigaction failed", errno);
if (sigaction(SIGHUP, &sa, NULL)<0) panic("SM","sigaction failed", errno);
-
- /* Report successfull start. */
- report("SM","system service manager successfully initialized", NO_NUM);
}
../drivers/at_wini/at_wini \
../drivers/bios_wini/bios_wini \
../servers/init/init \
-# bootdev.img
+ bootdev.img
usage:
@echo " " >&2