Miscellaneous cleanups.
This commit is contained in:
parent
5c9d34b62a
commit
375f6f8754
32 changed files with 147 additions and 171 deletions
|
@ -19,7 +19,6 @@
|
|||
#include <sys/ioc_disk.h>
|
||||
|
||||
|
||||
#if ENABLE_AT_WINI
|
||||
|
||||
#define ATAPI_DEBUG 0 /* To debug ATAPI code. */
|
||||
|
||||
|
@ -466,12 +465,14 @@ PRIVATE int w_identify()
|
|||
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;
|
||||
|
@ -1250,4 +1251,3 @@ PRIVATE int atapi_intr_wait()
|
|||
return(r);
|
||||
}
|
||||
#endif /* ENABLE_ATAPI */
|
||||
#endif /* ENABLE_AT_WINI */
|
||||
|
|
|
@ -4,3 +4,5 @@
|
|||
|
||||
_PROTOTYPE(void main, (void));
|
||||
|
||||
#define VERBOSE 0 /* display identify messages during boot */
|
||||
#define ENABLE_ATAPI 1 /* add ATAPI cd-rom support to driver */
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include <ibm/int86.h>
|
||||
#include <assert.h>
|
||||
|
||||
#if ENABLE_BIOS_WINI
|
||||
|
||||
#define ME "BIOS_WINI"
|
||||
|
||||
|
@ -473,4 +472,3 @@ message *m_ptr;
|
|||
return OK;
|
||||
}
|
||||
|
||||
#endif /* ENABLE_BIOS_WINI */
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
** 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>.
|
||||
|
@ -26,7 +29,7 @@
|
|||
#include <net/gen/eth_io.h>
|
||||
#include "dp.h"
|
||||
|
||||
#if (ENABLE_NETWORKING == 1 && ENABLE_3C501 == 1)
|
||||
#if (ENABLE_3C501 == 1)
|
||||
|
||||
#include "3c501.h"
|
||||
|
||||
|
@ -423,6 +426,6 @@ PUBLIC int el1_probe(dpeth_t * dep)
|
|||
return TRUE; /* Etherlink board found */
|
||||
}
|
||||
|
||||
#endif /* ENABLE_NETWORKING */
|
||||
#endif /* ENABLE_3C501 */
|
||||
|
||||
/** 3c501.c **/
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
** 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>.
|
||||
|
@ -24,7 +27,7 @@
|
|||
#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"
|
||||
|
@ -170,6 +173,6 @@ int el2_probe(dpeth_t * dep)
|
|||
dep->de_stopf = el2_stop;
|
||||
return TRUE;
|
||||
}
|
||||
#endif /* ENABLE_NETWORKING && ENABLE_3C503 */
|
||||
#endif /* ENABLE_3C503 */
|
||||
|
||||
/** 3c503.c **/
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
** 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>.
|
||||
|
@ -27,7 +30,7 @@
|
|||
|
||||
#include "dp.h"
|
||||
|
||||
#if ENABLE_NETWORKING == 1 && ENABLE_3C509 == 1
|
||||
#if (ENABLE_3C509 == 1)
|
||||
|
||||
#include "3c509.h"
|
||||
|
||||
|
@ -598,6 +601,6 @@ PUBLIC int el3_probe(dpeth_t * dep)
|
|||
return(el3_checksum(id_port) == 0); /* Etherlink board found/not found */
|
||||
}
|
||||
|
||||
#endif /* ENABLE_NETWORKING */
|
||||
#endif /* ENABLE_3C509 */
|
||||
|
||||
/** 3c509.c **/
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
** 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>.
|
||||
|
@ -27,7 +30,7 @@
|
|||
#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 */
|
||||
|
||||
|
@ -734,6 +737,6 @@ static void dp_pio16_nic2user(dpeth_t * dep, int nic_addr, int count)
|
|||
|
||||
#endif /* PIO16 == 1 */
|
||||
|
||||
#endif /* ENABLE_NETWORKING && ENABLE_DP8390 */
|
||||
#endif /* ENABLE_DP8390 */
|
||||
|
||||
/** end 8390.c **/
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
** 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>.
|
||||
|
@ -22,8 +25,7 @@
|
|||
#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)
|
||||
{
|
||||
|
@ -137,5 +139,4 @@ PUBLIC void outsw(unsigned short port, int proc_nr, void *buffer, int count)
|
|||
#else
|
||||
#error To be implemented
|
||||
#endif /* USE_IOPL */
|
||||
#endif /* ENABLE_NETWORKING */
|
||||
/** devio.c **/
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
** 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.
|
||||
|
@ -29,8 +32,6 @@
|
|||
#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 */
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
** 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>.
|
||||
|
@ -27,7 +30,7 @@
|
|||
#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"
|
||||
|
@ -196,6 +199,6 @@ PUBLIC int ne_probe(dpeth_t * dep)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#endif /* ENABLE_NETWORKING && ENABLE_NE2000 */
|
||||
#endif /* ENABLE_NE2000 */
|
||||
|
||||
/** ne.c **/
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
** 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>.
|
||||
|
@ -22,7 +25,7 @@
|
|||
#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];
|
||||
|
@ -171,6 +174,6 @@ PUBLIC void user2mem(dpeth_t *dep, buff_t *txbuff)
|
|||
return;
|
||||
}
|
||||
|
||||
#endif /* ENABLE_NETWORKING */
|
||||
#endif /* HAVE_BUFFERS */
|
||||
|
||||
/** netbuff.c **/
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
** 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>.
|
||||
|
@ -27,7 +30,7 @@
|
|||
#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"
|
||||
|
@ -318,6 +321,6 @@ dpeth_t *dep;
|
|||
return tlb == E_TLB_SMC8216C;
|
||||
}
|
||||
|
||||
#endif /* ENABLE_NETWORKING && ENABLE_WDETH */
|
||||
#endif /* ENABLE_WDETH */
|
||||
|
||||
/** wd.c **/
|
||||
|
|
|
@ -57,10 +57,6 @@
|
|||
#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"
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
|
||||
#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
|
||||
|
|
|
@ -79,6 +79,7 @@ _PROTOTYPE( int do_diocntl, (struct driver *dp, message *m_ptr) );
|
|||
#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)
|
||||
|
|
|
@ -22,7 +22,6 @@ Created: Jan 2000 by Philip Homburg <philip@cs.vu.nl>
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if ENABLE_PCI
|
||||
|
||||
#if !__minix_vmd
|
||||
#define debug 0
|
||||
|
@ -1317,7 +1316,6 @@ u16_t value;
|
|||
outl(PCII_CONFADD, PCII_UNSEL);
|
||||
#endif
|
||||
}
|
||||
#endif /* ENABLE_PCI */
|
||||
|
||||
/*
|
||||
* $PchId: pci.c,v 1.7 2003/08/07 09:06:51 philip Exp $
|
||||
|
|
|
@ -4,7 +4,6 @@ pci.h
|
|||
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) );
|
||||
|
@ -31,7 +30,6 @@ _PROTOTYPE( u32_t pci_attr_r32, (int devind, int 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 */
|
||||
|
|
|
@ -19,7 +19,6 @@ See the Linux PCI ID Repository <http://pciids.sourceforge.net/>.
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if ENABLE_PCI
|
||||
|
||||
struct pci_vendor pci_vendor_table[]=
|
||||
{
|
||||
|
@ -257,7 +256,6 @@ struct pci_pcibridge pci_pcibridge[]=
|
|||
{ 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 $
|
||||
|
|
|
@ -307,9 +307,6 @@ PRIVATE void m_init()
|
|||
#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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -81,10 +81,6 @@
|
|||
|
||||
#define VERBOSE 0 /* display message during init */
|
||||
|
||||
#if !ENABLE_PCI
|
||||
#error PCI support not enabled
|
||||
#endif
|
||||
|
||||
#include "../libpci/pci.h"
|
||||
#include "rtl8139.h"
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ ibm/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
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#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 */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
#ifndef _MINIX_COM_H
|
||||
#define _MINIX_COM_H 1
|
||||
#define _MINIX_COM_H
|
||||
|
||||
/*===========================================================================*
|
||||
* Magic process numbers *
|
||||
|
@ -32,7 +31,7 @@
|
|||
/* 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. */
|
||||
|
@ -50,6 +49,34 @@
|
|||
#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 *
|
||||
*===========================================================================*/
|
||||
|
@ -68,10 +95,6 @@
|
|||
# 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
|
||||
|
@ -80,42 +103,24 @@
|
|||
#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 */
|
||||
|
||||
|
@ -125,8 +130,6 @@
|
|||
#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? */
|
||||
|
@ -143,6 +146,7 @@
|
|||
/* 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 */
|
||||
|
@ -155,29 +159,6 @@
|
|||
#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 *
|
||||
|
@ -417,7 +398,7 @@
|
|||
#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
|
||||
|
@ -426,8 +407,28 @@
|
|||
#define SEL_ERRORFDS m8_p3
|
||||
#define SEL_TIMEOUT m8_p4
|
||||
|
||||
|
||||
/*===========================================================================*
|
||||
* Miscellaneous messages, mainly used by IS *
|
||||
* 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 used by TTY *
|
||||
*===========================================================================*/
|
||||
|
||||
/* Miscellaneous request types and field names, e.g. used by IS server. */
|
||||
|
@ -445,4 +446,4 @@
|
|||
# define DIAG_PROC_NR m1_i2
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* _MINIX_COM_H */
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#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
|
||||
|
@ -53,10 +52,6 @@
|
|||
#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
|
||||
|
||||
|
@ -66,24 +61,10 @@
|
|||
/* 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) */
|
||||
|
|
|
@ -78,12 +78,8 @@ PUBLIC struct boot_image image[] = {
|
|||
{ 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" },
|
||||
};
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#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
|
||||
|
@ -30,21 +31,21 @@
|
|||
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(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(ENABLE_PRINTER, gen_opcl, gen_io, NONE, DMAP_MUTABLE) /* 6 = /dev/lp */
|
||||
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(NC(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(NC(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(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 */
|
||||
};
|
||||
|
@ -146,7 +147,7 @@ PUBLIC void map_controllers()
|
|||
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;
|
||||
|
@ -155,10 +156,13 @@ PUBLIC void map_controllers()
|
|||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#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 */
|
||||
|
|
|
@ -72,8 +72,6 @@ PUBLIC void main()
|
|||
* 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);
|
||||
|
|
|
@ -149,22 +149,12 @@ PUBLIC void main()
|
|||
}
|
||||
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)
|
||||
|
|
|
@ -100,9 +100,6 @@ PRIVATE void init_server(void)
|
|||
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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ PROGRAMS= ../kernel/kernel \
|
|||
../drivers/at_wini/at_wini \
|
||||
../drivers/bios_wini/bios_wini \
|
||||
../servers/init/init \
|
||||
# bootdev.img
|
||||
bootdev.img
|
||||
|
||||
usage:
|
||||
@echo " " >&2
|
||||
|
|
Loading…
Reference in a new issue