Another round of merge/update.

(1) Add PC98 support to apm_bios.h and ns16550.h, remove pc98/pc98/ic
(2) Move PC98 specific code out of cpufunc.h (to pc98.h)
(3) Let the boot subtrees look more alike

Submitted by:	The FreeBSD(98) Development Team
		<freebsd98-hackers@jp.freebsd.org>
This commit is contained in:
Satoshi Asami 1996-09-12 11:12:18 +00:00
parent 3fa11fe3b5
commit 0e408c25a1
75 changed files with 1188 additions and 726 deletions

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: cpufunc.h,v 1.53 1996/07/23 07:45:19 asami Exp $
* $Id: cpufunc.h,v 1.54 1996/08/01 20:29:28 wollman Exp $
*/
/*
@ -262,54 +262,6 @@ outw(u_int port, u_short data)
__asm __volatile("outw %0,%%dx" : : "a" (data), "d" (port));
}
#ifdef PC98
#include <machine/spl.h>
static inline u_char
epson_inb(u_int port)
{
u_char data;
outb(0x43f, 0x42);
data = inb(port);
outb(0x43f, 0x40);
return (data);
}
static inline void
epson_outb(u_int port, u_char data)
{
outb(0x43f, 0x42);
outb(port,data);
outb(0x43f, 0x40);
}
static inline void
epson_insw(u_int port, void *addr, size_t cnt)
{
int s;
s = splbio();
outb(0x43f, 0x42);
disable_intr();
insw((u_int)port, (void *)addr, (size_t)cnt);
outb(0x43f, 0x40);
splx(s);
}
static inline void
epson_outsw(u_int port, void *addr, size_t cnt)
{
int s;
s = splbio();
outb(0x43f, 0x42);
disable_intr();
outsw((u_int)port, (void *)addr, (size_t)cnt);
outb(0x43f, 0x40);
splx(s);
}
#endif /* PC98 */
static __inline void
pmap_update(void)

View File

@ -1,8 +1,9 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
# modified for PC-9801 after:
# $Id: files.pc98,v 1.5 1996/09/04 09:52:08 asami Exp $
# modified for PC-9801
#
# $Id: files.i386,v 1.140 1996/09/11 19:53:30 phk Exp $
#
aic7xxx_asm optional ahc device-driver \
dependency "$S/dev/aic7xxx/aic7xxx_asm.c" \
@ -60,7 +61,7 @@ i386/i386/support.s standard
i386/i386/swtch.s standard
i386/i386/sys_machdep.c standard
pc98/i386/trap.c standard
pc98/i386/userconfig.c standard
pc98/i386/userconfig.c optional userconfig
pc98/i386/vm_machdep.c standard
i386/ibcs2/ibcs2_fcntl.c optional ibcs2
i386/ibcs2/ibcs2_stat.c optional ibcs2

View File

@ -1,4 +1,4 @@
# $Id: options.pc98,v 1.2 1996/07/23 07:45:51 asami Exp $
# $Id: options.pc98,v 1.3 1996/09/10 09:37:14 asami Exp $
BOUNCEPAGES opt_bounce.h
USER_LDT
MATH_EMULATE opt_math_emulate.h
@ -9,7 +9,6 @@ COMPAT_LINUX opt_dontuse.h
SHOW_BUSYBUFS opt_machdep.h
PANIC_REBOOT_WAIT_TIME opt_machdep.h
LARGEMEM opt_machdep.h
MAXMEM opt_machdep.h
PERFMON opt_perfmon.h
AUTO_EOI_1 opt_auto_eoi.h
@ -28,7 +27,13 @@ CLK_CALIBRATION_LOOP opt_clock.h
CLK_USE_I8254_CALIBRATION opt_clock.h
CLK_USE_I586_CALIBRATION opt_clock.h
SC_KEYBOARD_PROBE_WORKS opt_syscons.h
SC_KBD_PROBE_WORKS opt_syscons.h
MAXCONS opt_syscons.h
SLOW_VGA opt_syscons.h
XT_KEYBOARD opt_syscons.h
ATAPI opt_atapi.h
ATAPI_STATIC opt_atapi.h
USERCONFIG opt_userconfig.h
VISUAL_USERCONFIG opt_userconfig.h

View File

@ -31,13 +31,25 @@
* SUCH DAMAGE.
*
* from: @(#)ns16550.h 7.1 (Berkeley) 5/9/91
* $Id$
* $Id: ns16550.h,v 1.2 1993/10/16 13:48:52 rgrimes Exp $
*/
/*
* NS16550 UART registers
*/
#ifdef PC98
#define com_data 0x000 /* data register (R/W) */
#define com_dlbl 0x000 /* divisor latch low (W) */
#define com_dlbh 0x100 /* divisor latch high (W) */
#define com_ier 0x100 /* interrupt enable (W) */
#define com_iir 0x200 /* interrupt identification (R) */
#define com_fifo 0x200 /* FIFO control (W) */
#define com_lctl 0x300 /* line control register (R/W) */
#define com_cfcr 0x300 /* line control register (R/W) */
#define com_mcr 0x400 /* modem control register (R/W) */
#define com_lsr 0x500 /* line status register (R/W) */
#define com_msr 0x600 /* modem status register (R/W) */
#else /* IBM-PC */
#define com_data 0 /* data register (R/W) */
#define com_dlbl 0 /* divisor latch low (W) */
#define com_dlbh 1 /* divisor latch high (W) */
@ -49,3 +61,4 @@
#define com_mcr 4 /* modem control register (R/W) */
#define com_lsr 5 /* line status register (R/W) */
#define com_msr 6 /* modem status register (R/W) */
#endif /* PC98 */

View File

@ -12,7 +12,7 @@
*
* Aug, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
* $Id: apm_bios.h,v 1.9 1996/03/13 00:41:45 nate Exp $
* $Id: apm_bios.h,v 1.10 1996/04/23 16:02:53 nate Exp $
*/
#ifndef _MACHINE_APM_BIOS_H_
@ -21,8 +21,13 @@
#ifdef KERNEL
/* BIOS id */
#ifdef PC98
#define APM_BIOS 0x9a
#define SYSTEM_BIOS 0x1f
#else
#define APM_BIOS 0x53
#define SYSTEM_BIOS 0x15
#endif
/* APM flags */
#define APM_16BIT_SUPPORT 0x01

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: cpufunc.h,v 1.53 1996/07/23 07:45:19 asami Exp $
* $Id: cpufunc.h,v 1.54 1996/08/01 20:29:28 wollman Exp $
*/
/*
@ -262,54 +262,6 @@ outw(u_int port, u_short data)
__asm __volatile("outw %0,%%dx" : : "a" (data), "d" (port));
}
#ifdef PC98
#include <machine/spl.h>
static inline u_char
epson_inb(u_int port)
{
u_char data;
outb(0x43f, 0x42);
data = inb(port);
outb(0x43f, 0x40);
return (data);
}
static inline void
epson_outb(u_int port, u_char data)
{
outb(0x43f, 0x42);
outb(port,data);
outb(0x43f, 0x40);
}
static inline void
epson_insw(u_int port, void *addr, size_t cnt)
{
int s;
s = splbio();
outb(0x43f, 0x42);
disable_intr();
insw((u_int)port, (void *)addr, (size_t)cnt);
outb(0x43f, 0x40);
splx(s);
}
static inline void
epson_outsw(u_int port, void *addr, size_t cnt)
{
int s;
s = splbio();
outb(0x43f, 0x42);
disable_intr();
outsw((u_int)port, (void *)addr, (size_t)cnt);
outb(0x43f, 0x40);
splx(s);
}
#endif /* PC98 */
static __inline void
pmap_update(void)

View File

@ -31,13 +31,25 @@
* SUCH DAMAGE.
*
* from: @(#)ns16550.h 7.1 (Berkeley) 5/9/91
* $Id$
* $Id: ns16550.h,v 1.2 1993/10/16 13:48:52 rgrimes Exp $
*/
/*
* NS16550 UART registers
*/
#ifdef PC98
#define com_data 0x000 /* data register (R/W) */
#define com_dlbl 0x000 /* divisor latch low (W) */
#define com_dlbh 0x100 /* divisor latch high (W) */
#define com_ier 0x100 /* interrupt enable (W) */
#define com_iir 0x200 /* interrupt identification (R) */
#define com_fifo 0x200 /* FIFO control (W) */
#define com_lctl 0x300 /* line control register (R/W) */
#define com_cfcr 0x300 /* line control register (R/W) */
#define com_mcr 0x400 /* modem control register (R/W) */
#define com_lsr 0x500 /* line status register (R/W) */
#define com_msr 0x600 /* modem status register (R/W) */
#else /* IBM-PC */
#define com_data 0 /* data register (R/W) */
#define com_dlbl 0 /* divisor latch low (W) */
#define com_dlbh 1 /* divisor latch high (W) */
@ -49,3 +61,4 @@
#define com_mcr 4 /* modem control register (R/W) */
#define com_lsr 5 /* line status register (R/W) */
#define com_msr 6 /* modem status register (R/W) */
#endif /* PC98 */

View File

@ -31,13 +31,25 @@
* SUCH DAMAGE.
*
* from: @(#)ns16550.h 7.1 (Berkeley) 5/9/91
* $Id$
* $Id: ns16550.h,v 1.2 1993/10/16 13:48:52 rgrimes Exp $
*/
/*
* NS16550 UART registers
*/
#ifdef PC98
#define com_data 0x000 /* data register (R/W) */
#define com_dlbl 0x000 /* divisor latch low (W) */
#define com_dlbh 0x100 /* divisor latch high (W) */
#define com_ier 0x100 /* interrupt enable (W) */
#define com_iir 0x200 /* interrupt identification (R) */
#define com_fifo 0x200 /* FIFO control (W) */
#define com_lctl 0x300 /* line control register (R/W) */
#define com_cfcr 0x300 /* line control register (R/W) */
#define com_mcr 0x400 /* modem control register (R/W) */
#define com_lsr 0x500 /* line status register (R/W) */
#define com_msr 0x600 /* modem status register (R/W) */
#else /* IBM-PC */
#define com_data 0 /* data register (R/W) */
#define com_dlbl 0 /* divisor latch low (W) */
#define com_dlbh 1 /* divisor latch high (W) */
@ -49,3 +61,4 @@
#define com_mcr 4 /* modem control register (R/W) */
#define com_lsr 5 /* line status register (R/W) */
#define com_msr 6 /* modem status register (R/W) */
#endif /* PC98 */

View File

@ -1,5 +1,5 @@
# $Id: Makefile,v 1.25 1995/04/15 08:24:33 phk Exp $
SUBDIR= biosboot netboot
# $Id: Makefile,v 1.26 1996/09/11 19:22:21 phk Exp $
SUBDIR= biosboot kzipboot netboot rawboot
.include <bsd.subdir.mk>

View File

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.1.1.1 1996/06/14 10:04:37 asami Exp $
# $Id: Makefile,v 1.2 1996/07/23 07:45:33 asami Exp $
#
PROG= boot
@ -77,7 +77,9 @@ boot2: boot.nohdr
dd if=boot.nohdr of=boot2 bs=512 skip=1
@dd if=boot2 skip=14 of=sizetest 2> /dev/null
@if [ -s sizetest ] ; then \
echo "*** Boot2 is too BIG ***" ; exit 2 ; \
echo "boot2 is too big" >&2 ; \
rm boot2 ; \
exit 2 ; \
fi
all: boot1 boot2

View File

@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, [92/04/03 16:51:14 rvb]
* $Id: boot.c,v 1.2 1996/07/23 07:45:35 asami Exp $
* $Id: boot.c,v 1.3 1996/08/31 15:06:21 asami Exp $
*/
@ -65,7 +65,6 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
char *dflt_name;
#endif
char namebuf[NAMEBUF_LEN];
struct exec head;
struct bootinfo bootinfo;
int loadflags;
@ -191,6 +190,7 @@ loadstart:
static void
loadprog(void)
{
struct exec head;
long int startaddr;
long int addr; /* physical address.. not directly useable */
long int bootdev;
@ -357,6 +357,7 @@ nextarg:
*howto ^= RB_SERIAL;
if (*howto & RB_SERIAL)
init_serial();
continue;
}
if (c == 'g')
*howto |= RB_GDB;

View File

@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:35:03 rpd
* $Id: boot.h,v 1.11 1995/06/25 14:02:52 joerg Exp $
* $Id: boot.h,v 1.1.1.1 1996/06/14 10:04:37 asami Exp $
*/
#include <sys/types.h>
@ -69,8 +69,8 @@ void boot2(void);
/* disk.c */
int devopen(void);
void devread(void);
void Bread(int dosdev, int sector);
void devread(char *iodest, int sector, int cnt);
char * Bread(int dosdev, int sector);
int badsect(int dosdev, int sector);
/* io.c */

View File

@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:35:49 rpd
* $Id: disk.c,v 1.1.1.1 1996/06/14 10:04:37 asami Exp $
* $Id: disk.c,v 1.2 1996/07/23 07:45:36 asami Exp $
*/
/*
@ -63,15 +63,12 @@ int bsize;
int spt, spc;
char *iodest;
struct fs *fs;
struct inode inode;
int dosdev, unit, slice, part, maj, boff, poff, bnum, cnt;
int dosdev, unit, slice, part, maj, boff, poff;
/*#define EMBEDDED_DISKLABEL 1*/
#define I_ADDR ((void *) 0) /* XXX where all reads go */
/* Read ahead buffer large enough for one track on a 1440K floppy. For
* reading from floppies, the bootstrap has to be loaded on a 64K boundary
* to ensure that this buffer doesn't cross a 64K DMA boundary.
@ -88,14 +85,13 @@ devopen(void)
{
struct dos_partition *dptr;
struct disklabel *dl;
int dosdev = inode.i_dev;
char *p;
int i, sector = 0, di;
#if 0 /* Save space, already have hard error for cyl > 1023 in Bread */
u_long bend;
#endif
di = get_diskinfo(dosdev);
spc = (spt = SPT(di)) * HEADS(di);
#ifndef RAWBOOT
if ((dosdev & 0xf0) == 0x90)
{
boff = 0;
@ -107,7 +103,7 @@ devopen(void)
dl = &disklabel;
#else EMBEDDED_DISKLABEL
#ifdef PC98
Bread(dosdev, 1);
p = Bread(dosdev, 1);
dptr = (struct dos_partition *)0;
slice = WHOLE_DISK_SLICE;
for (i = 0; i < NDOSPART; i++, dptr++)
@ -120,8 +116,8 @@ devopen(void)
dl=((struct disklabel *)0);
disklabel = *dl; /* structure copy (maybe useful later)*/
#else
Bread(dosdev, 0);
dptr = (struct dos_partition *)(((char *)0)+DOSPARTOFF);
p = Bread(dosdev, 0);
dptr = (struct dos_partition *)(p+DOSPARTOFF);
slice = WHOLE_DISK_SLICE;
for (i = 0; i < NDOSPART; i++, dptr++)
if (dptr->dp_typ == DOSPTYP_386BSD) {
@ -129,8 +125,8 @@ devopen(void)
sector = dptr->dp_start;
break;
}
Bread(dosdev, sector + LABELSECTOR);
dl=((struct disklabel *)0);
p = Bread(dosdev, sector + LABELSECTOR);
dl=((struct disklabel *)p);
disklabel = *dl; /* structure copy (maybe useful later)*/
#endif /* PC98 */
#endif EMBEDDED_DISKLABEL
@ -156,11 +152,6 @@ devopen(void)
#ifndef PC98
/* This is a good idea for all disks */
bsize = dl->d_partitions[part].p_size;
#if 0 /* Save space, already have hard error for cyl > 1023 in Bread */
bend = boff + bsize - 1 ;
if (bend / spc >= 1024) {
printf("boot partition end >= cyl 1024, BIOS can't load kernel stored beyond this limit\n");
#endif
#endif
#ifdef DO_BAD144
@ -193,8 +184,8 @@ devopen(void)
do_bad144 = 0;
do {
/* XXX: what if the "DOS sector" < 512 bytes ??? */
Bread(dosdev, dkbbnum + i);
dkbptr = (struct dkbad *) 0;
p = Bread(dosdev, dkbbnum + i);
dkbptr = (struct dkbad *) p;
/* XXX why is this not in <sys/dkbad.h> ??? */
#define DKBAD_MAGIC 0x4321
if (dkbptr->bt_mbz == 0 &&
@ -210,24 +201,31 @@ devopen(void)
else
printf("Using bad sector table at %d\n", dkbbnum+i);
}
#endif DO_BAD144
#endif /* DO_BAD144 */
}
#endif /* RAWBOOT */
return 0;
}
/*
* Be aware that cnt is rounded up to N*BPS
*/
void
devread(void)
devread(char *iodest, int sector, int cnt)
{
int offset, sector = bnum;
int dosdev = inode.i_dev;
int offset;
char *p;
for (offset = 0; offset < cnt; offset += BPS)
{
Bread(dosdev, badsect(dosdev, sector++));
bcopy(0, iodest+offset, BPS);
p = Bread(dosdev, badsect(dosdev, sector++));
bcopy(p, iodest+offset, BPS);
}
}
void
char *
Bread(int dosdev, int sector)
{
if (dosdev != ra_dev || sector < ra_first || sector >= ra_end)
@ -260,14 +258,14 @@ Bread(int dosdev, int sector)
ra_first = sector;
ra_end = sector + nsec;
}
bcopy(ra_buf + (sector - ra_first) * BPS, I_ADDR, BPS);
return (ra_buf + (sector - ra_first) * BPS);
}
int
badsect(int dosdev, int sector)
{
#if defined(DO_BAD144) && !defined(RAWBOOT)
int i;
#ifdef DO_BAD144
if (do_bad144) {
u_short cyl;
u_short head;
@ -316,7 +314,7 @@ badsect(int dosdev, int sector)
newsec -= dl->d_nsectors + i + 1;
return newsec;
}
#endif DO_BAD144
no_remap:
#endif
return sector;
}

View File

@ -31,7 +31,7 @@
#include <machine/cpufunc.h>
#include <sys/reboot.h>
#ifdef PC98
#include "../../pc98/pc98_bios.h"
#include "../../pc98/pc98.h"
#endif

View File

@ -5,7 +5,7 @@
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
e* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:36:34 rpd
* $Id: sys.c,v 1.1.1.1 1996/06/14 10:04:37 asami Exp $
* $Id: sys.c,v 1.2 1996/08/31 15:06:24 asami Exp $
*/
/*
@ -51,6 +51,10 @@ char buf[BUFSIZE], fsbuf[BUFSIZE], iobuf[BUFSIZE];
char mapbuf[MAPBUFSIZE];
int mapblock;
#ifdef RAWBOOT
#define STARTBYTE 8192 /* Where on the media the kernel starts */
#endif
void
xread(char *addr, int size)
{
@ -65,6 +69,7 @@ xread(char *addr, int size)
}
}
#ifndef RAWBOOT
void
read(char *buffer, int count)
{
@ -76,43 +81,67 @@ read(char *buffer, int count)
logno = lblkno(fs, poff);
cnt2 = size = blksize(fs, &inode, logno);
bnum2 = fsbtodb(fs, block_map(logno)) + boff;
cnt = cnt2;
bnum = bnum2;
if ( (!off) && (size <= count))
{
iodest = buffer;
devread();
}
else
{
iodest = iobuf;
if ( (!off) && (size <= count)) {
devread(buffer, bnum2, cnt2);
} else {
size -= off;
if (size > count)
size = count;
devread();
bcopy(iodest+off,buffer,size);
devread(iobuf, bnum2, cnt2);
bcopy(iobuf+off, buffer, size);
}
buffer += size;
count -= size;
poff += size;
}
}
#else
void
read(char *buffer, int count)
{
int cnt, bnum, off, size;
off = STARTBYTE + poff;
poff += count;
/* Read any unaligned bit at the front */
cnt = off & 511;
if (cnt) {
size = 512-cnt;
if (count < size)
size = count;
devread(iobuf, off >> 9, 512);
bcopy(iobuf+cnt, buffer, size);
count -= size;
off += size;
buffer += size;
}
size = count & (~511);
if (size && (off & (~511))) {
devread(buffer, off >> 9, size);
off += size;
count -= size;
buffer += size;
}
if (count) {
devread(iobuf, off >> 9, 512);
bcopy(iobuf, buffer, count);
}
}
#endif
int
find(char *path)
{
char *rest, ch;
int block, off, loc, ino = ROOTINO;
struct direct *dp;
int list_only = 0;
char list_only;
if (strcmp("?", path) == 0)
list_only = 1;
loop: iodest = iobuf;
cnt = fs->fs_bsize;
bnum = fsbtodb(fs,ino_to_fsba(fs,ino)) + boff;
devread();
bcopy((void *)&((struct dinode *)iodest)[ino % fs->fs_inopb],
list_only = (path[0] == '?' && path[1] == '\0');
loop:
devread(iobuf, fsbtodb(fs, ino_to_fsba(fs, ino)) + boff, fs->fs_bsize);
bcopy((void *)&((struct dinode *)iobuf)[ino % fs->fs_inopb],
(void *)&inode.i_din,
sizeof (struct dinode));
if (!*path)
@ -127,7 +156,7 @@ loop: iodest = iobuf;
do {
if (loc >= inode.i_size) {
if (list_only) {
printf("\n");
putchar('\n');
return -1;
} else {
return 0;
@ -135,12 +164,10 @@ loop: iodest = iobuf;
}
if (!(off = blkoff(fs, loc))) {
block = lblkno(fs, loc);
cnt = blksize(fs, &inode, block);
bnum = fsbtodb(fs, block_map(block)) + boff;
iodest = iobuf;
devread();
devread(iobuf, fsbtodb(fs, block_map(block)) + boff,
blksize(fs, &inode, block));
}
dp = (struct direct *)(iodest + off);
dp = (struct direct *)(iobuf + off);
loc += dp->d_reclen;
if (dp->d_ino && list_only)
printf("%s ", dp->d_name);
@ -154,12 +181,11 @@ loop: iodest = iobuf;
int
block_map(int file_block)
{
int bnum;
if (file_block < NDADDR)
return(inode.i_db[file_block]);
if ((bnum=fsbtodb(fs, inode.i_ib[0])+boff) != mapblock) {
iodest = mapbuf;
cnt = fs->fs_bsize;
devread();
devread(mapbuf, bnum, fs->fs_bsize);
mapblock = bnum;
}
return (((int *)mapbuf)[(file_block - NDADDR) % NINDIR(fs)]);
@ -192,11 +218,11 @@ openrd(void)
* Look for a BIOS drive number (a leading digit followed
* by a colon).
*/
biosdrivedigit = '\0';
if (*(name + 1) == ':' && *name >= '0' && *name <= '9') {
biosdrivedigit = *name;
name += 2;
} else
biosdrivedigit = '\0';
}
if (cp++ != name)
{
@ -232,9 +258,8 @@ openrd(void)
if (!*cp)
return 1;
}
if (biosdrivedigit != '\0')
biosdrive = biosdrivedigit - '0';
else {
biosdrive = biosdrivedigit - '0';
if (biosdrivedigit == '\0') {
biosdrive = unit;
#if BOOT_HD_BIAS > 0
/* XXX */
@ -269,7 +294,6 @@ openrd(void)
}
printf("dosdev = %x, biosdrive = %d, unit = %d, maj = %d\n",
dosdev, biosdrive, unit, maj);
inode.i_dev = dosdev;
/***********************************************\
* Now we know the disk unit and part, *
@ -278,20 +302,21 @@ openrd(void)
if (devopen())
return 1;
#ifndef RAWBOOT
/***********************************************\
* Load Filesystem info (mount the device) *
\***********************************************/
iodest = (char *)(fs = (struct fs *)fsbuf);
cnt = SBSIZE;
bnum = SBLOCK + boff;
devread();
devread((char *)(fs = (struct fs *)fsbuf), SBLOCK + boff, SBSIZE);
/***********************************************\
* Find the actual FILE on the mounted device *
\***********************************************/
ret = find(cp);
if (ret <= 0)
return (ret == 0) ? 1 : -1;
if (ret == 0)
return 1;
if (ret < 0)
return -1;
poff = 0;
name = cp;
#endif /* RAWBOOT */
return 0;
}

View File

@ -0,0 +1,84 @@
# $Id: Makefile,v 1.1 1996/09/11 19:25:11 phk Exp $
#
PROG= boot
# Order is very important on the SRCS line for this prog
SRCS= start.S table.c boot2.S boot.c asm.S bios.S serial.S
SRCS+= probe_keyboard.c io.c disk.c sys.c
.PATH: ${.CURDIR}/../biosboot
BINDIR= /usr/mdec
BINMODE= 444
CFLAGS= -O2 \
-DPC98 \
-DRAWBOOT \
-I${.CURDIR}/../biosboot \
-DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT}
CFLAGS+= -DCOMCONSOLE=0x30 -DCOMCONSOLE_CLK=16 -DCOMCONSOLE_MODE=0x0c
CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK}
# Probe the keyboard and use the serial console if the keyboard isn't found.
#CFLAGS+= -DPROBE_KEYBOARD
# Force use of the serial console (after probing the keyboard if
# PROBE_KEYBOARD is defined).
#CFLAGS+= -DFORCE_COMCONSOLE
# Enable code to take the default boot string from a fixed location on the
# disk. See nextboot(8) and README.386BSD for more info.
#CFLAGS+= -DNAMEBLOCK
#CFLAGS+= -DNAMEBLOCK_WRITEBACK
# Bias the conversion from the BIOS drive number to the FreeBSD unit number
# for hard disks. This may be useful for people booting in a mixed IDE/SCSI
# environment (set BOOT_HD_BIAS to the number of IDE drives).
#CFLAGS+= -DBOOT_HD_BIAS=1
#
# Details: this only applies if BOOT_HD_BIAS > 0. If the BIOS drive number
# for the boot drive is >= BOOT_HD_BIAS, then the boot drive is assumed to
# be SCSI and have unit number (BIOS_drive_number - BOOT_HD_BIAS). E.g.,
# BOOT_HD_BIAS=1 makes BIOS drive 1 correspond to 1:sd(0,a) instead of
# 1:wd(1,a). If `sd' is given explicitly, then the drive is assumed to be
# SCSI and have BIOS drive number (sd_unit_number + BOOT_HD_BIAS). E.g.,
# BOOT_HD_BIAS=1 makes sd(0,a) correspond to 1:sd(0,a) instead of 0:sd(0,a).
CLEANFILES+= boot.nohdr boot.strip rawboot sizetest
DPADD= ${LIBC}
LDFLAGS+= -N -T 0 -nostdlib
LDADD= -lc
NOSHARED= YES
NOMAN=
STRIP=
# tunable timeout parameter, waiting for keypress, calibrated in ms
BOOTWAIT?= 5000
# tunable timeout during string input, calibrated in ms
#TIMEOUT?= 30000
# Location that boot2 is loaded at
BOOTSEG= 0x9000
# Offset in BOOTSEG for the top of the stack, keep this 16 byte aligned
BOOTSTACK= 0xFFF0
boot.strip: boot
cp -p boot boot.strip
strip boot.strip
size boot.strip
boot.nohdr: boot.strip
dd if=boot.strip of=boot.nohdr ibs=32 skip=1 obs=1024b
ls -l boot.nohdr
rawboot: boot.nohdr
dd if=boot.nohdr of=rawboot bs=8k count=1 conv=sync
all: rawboot
install:
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}\
rawboot ${DESTDIR}${BINDIR}/rawboot
.include <bsd.prog.mk>

View File

@ -0,0 +1,17 @@
RAWboot readme.
This is a dumber version of the code in biosboot.
The intended usage is:
cat /usr/mdec/rawboot /sys/compile/FOO/kernel | fdwrite
This makes it a lot easier to make a bootable floppy, and saves space
on the floppy to boot.
Of course the name you enter for the kernel isn't used... Then again
if you know how to make two kernels fit a floppy and have a use for
it, you don't need this bootblock.
Poul-Henning Kamp
phk@FreeBSD.org

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.h 5.7 (Berkeley) 5/9/91
* $Id: pc98.h,v 1.2 1996/09/03 10:23:48 asami Exp $
* $Id: pc98.h,v 1.3 1996/09/10 09:38:21 asami Exp $
*/
#ifndef _PC98_PC98_PC98_H_
@ -213,6 +213,53 @@ extern unsigned char pc98_system_parameter[]; /* in locore.c */
#define epson_system_type (pc98_system_parameter[OFS_epson_system_type])
# define PC98_TYPE_CHECK(x) ((pc98_machine_type & (x)) == (x))
#include <machine/spl.h>
static inline u_char
epson_inb(u_int port)
{
u_char data;
outb(0x43f, 0x42);
data = inb(port);
outb(0x43f, 0x40);
return (data);
}
static inline void
epson_outb(u_int port, u_char data)
{
outb(0x43f, 0x42);
outb(port,data);
outb(0x43f, 0x40);
}
static inline void
epson_insw(u_int port, void *addr, size_t cnt)
{
int s;
s = splbio();
outb(0x43f, 0x42);
disable_intr();
insw((u_int)port, (void *)addr, (size_t)cnt);
outb(0x43f, 0x40);
splx(s);
}
static inline void
epson_outsw(u_int port, void *addr, size_t cnt)
{
int s;
s = splbio();
outb(0x43f, 0x42);
disable_intr();
outsw((u_int)port, (void *)addr, (size_t)cnt);
outb(0x43f, 0x40);
splx(s);
}
#endif /* KERNEL */
/*

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.5 1996/09/07 02:14:23 asami Exp $
* $Id: sio.c,v 1.6 1996/09/10 09:38:34 asami Exp $
*/
#include "opt_comconsole.h"
@ -141,18 +141,17 @@
#include <i386/isa/icu.h>
#include <i386/isa/isa_device.h>
#include <pc98/pc98/sioreg.h>
#include <pc98/pc98/ic/i8251.h>
#include <pc98/pc98/ic/ns16550.h>
#include <i386/isa/ic/i8251.h>
#else
#include <i386/isa/isa.h>
#include <i386/isa/isa_device.h>
#include <i386/isa/sioreg.h>
#endif
#ifdef COM_ESP
#include <i386/isa/ic/esp.h>
#endif
#include <i386/isa/ic/ns16550.h>
#endif
#include "crd.h"
#if NCRD > 0

View File

@ -11,7 +11,7 @@
# device lines is present in the ./LINT configuration file. If you are
# in doubt as to the purpose or necessity of a line, check first in LINT.
#
# $Id: GENERIC98,v 1.3 1996/08/31 15:06:28 asami Exp $
# $Id: GENERIC98,v 1.4 1996/09/07 02:13:23 asami Exp $
# GENERIC98 -- Generic PC98 machine with WD/SBIC55 disks
@ -38,6 +38,8 @@ options SYSVSEM
options SYSVMSG
options UCONSOLE #Allow users to grab the console
options FAILSAFE #Be conservative
options USERCONFIG #boot -c editor
options VISUAL_USERCONFIG #visual boot -c editor
options "MAXCONS=4" #4 virtual consoles
options BOUNCE_BUFFERS #include support for DMA bounce buffers
options EPSON_BOUNCEDMA #use bounce buufer for 15-16M

View File

@ -11,7 +11,7 @@
# device lines is present in the ./LINT configuration file. If you are
# in doubt as to the purpose or necessity of a line, check first in LINT.
#
# $Id: GENERIC98,v 1.3 1996/08/31 15:06:28 asami Exp $
# $Id: GENERIC98,v 1.4 1996/09/07 02:13:23 asami Exp $
# GENERIC98 -- Generic PC98 machine with WD/SBIC55 disks
@ -38,6 +38,8 @@ options SYSVSEM
options SYSVMSG
options UCONSOLE #Allow users to grab the console
options FAILSAFE #Be conservative
options USERCONFIG #boot -c editor
options VISUAL_USERCONFIG #visual boot -c editor
options "MAXCONS=4" #4 virtual consoles
options BOUNCE_BUFFERS #include support for DMA bounce buffers
options EPSON_BOUNCEDMA #use bounce buufer for 15-16M

View File

@ -1,8 +1,9 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
# modified for PC-9801 after:
# $Id: files.pc98,v 1.5 1996/09/04 09:52:08 asami Exp $
# modified for PC-9801
#
# $Id: files.i386,v 1.140 1996/09/11 19:53:30 phk Exp $
#
aic7xxx_asm optional ahc device-driver \
dependency "$S/dev/aic7xxx/aic7xxx_asm.c" \
@ -60,7 +61,7 @@ i386/i386/support.s standard
i386/i386/swtch.s standard
i386/i386/sys_machdep.c standard
pc98/i386/trap.c standard
pc98/i386/userconfig.c standard
pc98/i386/userconfig.c optional userconfig
pc98/i386/vm_machdep.c standard
i386/ibcs2/ibcs2_fcntl.c optional ibcs2
i386/ibcs2/ibcs2_stat.c optional ibcs2

View File

@ -1,4 +1,4 @@
# $Id: options.pc98,v 1.2 1996/07/23 07:45:51 asami Exp $
# $Id: options.pc98,v 1.3 1996/09/10 09:37:14 asami Exp $
BOUNCEPAGES opt_bounce.h
USER_LDT
MATH_EMULATE opt_math_emulate.h
@ -9,7 +9,6 @@ COMPAT_LINUX opt_dontuse.h
SHOW_BUSYBUFS opt_machdep.h
PANIC_REBOOT_WAIT_TIME opt_machdep.h
LARGEMEM opt_machdep.h
MAXMEM opt_machdep.h
PERFMON opt_perfmon.h
AUTO_EOI_1 opt_auto_eoi.h
@ -28,7 +27,13 @@ CLK_CALIBRATION_LOOP opt_clock.h
CLK_USE_I8254_CALIBRATION opt_clock.h
CLK_USE_I586_CALIBRATION opt_clock.h
SC_KEYBOARD_PROBE_WORKS opt_syscons.h
SC_KBD_PROBE_WORKS opt_syscons.h
MAXCONS opt_syscons.h
SLOW_VGA opt_syscons.h
XT_KEYBOARD opt_syscons.h
ATAPI opt_atapi.h
ATAPI_STATIC opt_atapi.h
USERCONFIG opt_userconfig.h
VISUAL_USERCONFIG opt_userconfig.h

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.6 1996/09/07 02:13:32 asami Exp $
* $Id: machdep.c,v 1.7 1996/09/10 09:37:35 asami Exp $
*/
#include "npx.h"
@ -44,6 +44,7 @@
#include "opt_bounce.h"
#include "opt_machdep.h"
#include "opt_perfmon.h"
#include "opt_userconfig.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -387,8 +388,12 @@ again:
callout[i-1].c_next = &callout[i];
if (boothowto & RB_CONFIG) {
#ifdef USERCONFIG
userconfig();
cninit(); /* the preferred console may have changed */
#else
printf("Sorry! no userconfig in this kernel\n");
#endif
}
#ifdef BOUNCE_BUFFERS
@ -1169,19 +1174,6 @@ init386(first)
}
#endif
/*
* Some 386 machines might give us a bogus number for extended
* mem. If this happens, stop now.
*/
#ifndef PC98
#ifndef LARGEMEM
if (biosextmem > 65536) {
panic("extended memory beyond limit of 64MB");
/* NOTREACHED */
}
#endif
#endif
pagesinbase = biosbasemem * 1024 / PAGE_SIZE;
pagesinext = biosextmem * 1024 / PAGE_SIZE;

File diff suppressed because it is too large Load Diff

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.5 1996/09/04 09:52:19 asami Exp $
* $Id: trap.c,v 1.6 1996/09/07 02:13:36 asami Exp $
*/
/*
@ -80,8 +80,8 @@
#include "isa.h"
#ifdef POWERFAIL_NMI
# include <syslog.h>
# include <machine/clock.h>
#include <sys/syslog.h>
#include <machine/clock.h>
#endif
#include "npx.h"

View File

@ -46,7 +46,7 @@
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
** $Id: userconfig.c,v 1.4 1996/09/03 10:23:18 asami Exp $
** $Id: userconfig.c,v 1.5 1996/09/10 09:37:38 asami Exp $
**/
/**
@ -122,10 +122,14 @@
#include <pci/pcivar.h>
#include <opt_userconfig.h>
static struct isa_device *isa_devlist; /* list read by dset to extract changes */
#ifdef VISUAL_USERCONFIG
static struct isa_device *devtabs[] = { isa_devtab_bio, isa_devtab_tty, isa_devtab_net,
isa_devtab_null, NULL };
static struct isa_device *isa_devlist; /* list read by dset to extract changes */
#define putchar(x) cnputc(x)
#define getchar() cngetc()
@ -2160,6 +2164,7 @@ visuserconfig(void)
}
}
#endif /* VISUAL_USERCONFIG */
/*
* Copyright (c) 1991 Regents of the University of California.
* All rights reserved.
@ -2202,7 +2207,7 @@ visuserconfig(void)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: userconfig.c,v 1.4 1996/09/03 10:23:18 asami Exp $
* $Id: userconfig.c,v 1.5 1996/09/10 09:37:38 asami Exp $
*/
#include "scbus.h"
@ -2294,7 +2299,9 @@ static Cmd CmdList[] = {
#if NSCBUS > 0
{ "s", list_scsi, NULL }, /* scsi */
#endif
#ifdef VISUAL_USERCONFIG
{ "v", (CmdFunc)visuserconfig, NULL }, /* visual mode */
#endif
{ NULL, NULL, NULL },
};

View File

@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
* $Id: vm_machdep.c,v 1.2 1996/07/23 07:46:03 asami Exp $
* $Id: vm_machdep.c,v 1.3 1996/09/03 10:23:21 asami Exp $
*/
#include "npx.h"
@ -845,14 +845,18 @@ grow(p, sp)
int
vm_page_zero_idle() {
vm_page_t m;
static int free_rover = 0;
if ((cnt.v_free_count > cnt.v_interrupt_free_min) &&
(m = TAILQ_FIRST(&vm_page_queue_free))) {
TAILQ_REMOVE(&vm_page_queue_free, m, pageq);
(m = vm_page_list_find(PQ_FREE, free_rover))) {
--(*vm_page_queues[m->queue].lcnt);
TAILQ_REMOVE(vm_page_queues[m->queue].pl, m, pageq);
enable_intr();
pmap_zero_page(VM_PAGE_TO_PHYS(m));
disable_intr();
TAILQ_INSERT_HEAD(&vm_page_queue_zero, m, pageq);
m->queue = PQ_ZERO;
m->queue = PQ_ZERO + m->pc;
++(*vm_page_queues[m->queue].lcnt);
TAILQ_INSERT_HEAD(vm_page_queues[m->queue].pl, m, pageq);
free_rover = (free_rover + PQ_PRIME3) & PQ_L2_MASK;
++vm_page_zero_count;
return 1;
}

View File

@ -138,12 +138,11 @@ struct atapidrv atapi_drvtab[4];
int atapi_ndrv;
struct atapi *atapi_tab;
int atapi_attach (int ctlr, int unit, int port, struct kern_devconf *parent)
int atapi_attach (int ctlr, int unit, int port)
{
atapi_drvtab[atapi_ndrv].ctlr = ctlr;
atapi_drvtab[atapi_ndrv].unit = unit;
atapi_drvtab[atapi_ndrv].port = port;
atapi_drvtab[atapi_ndrv].parent = parent;
atapi_drvtab[atapi_ndrv].attached = 0;
++atapi_ndrv;
return (1);
@ -1011,7 +1010,7 @@ static int atapi_load (struct lkm_table *lkmtp, int cmd)
tsleep (&atapi_locked, PRIBIO, "atach", 0);
/* Probe the drive. */
if (atapi_attach (d->ctlr, d->unit, d->port, d->parent)) {
if (atapi_attach (d->ctlr, d->unit, d->port)) {
d->attached = 1;
++n;
}

View File

@ -1,11 +0,0 @@
/*
* Intel 8237 DMA Controller
*
* i8237.h,v 1.3 1994/11/01 17:26:47 ache Exp
*/
#define DMA37MD_SINGLE 0x40 /* single pass mode */
#define DMA37MD_CASCADE 0xc0 /* cascade mode */
#define DMA37MD_AUTO 0x50 /* autoinitialise single pass mode */
#define DMA37MD_WRITE 0x04 /* read the device, write memory operation */
#define DMA37MD_READ 0x08 /* write the device, read memory operation */

View File

@ -1,68 +0,0 @@
/*-
* Copyright (c) 1991 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* from: @(#)ns16550.h 7.1 (Berkeley) 5/9/91
* ns16550.h,v 1.2 1993/10/16 13:48:52 rgrimes Exp
*/
/*
* NS16550 UART registers
*/
/*
* modified for MC16550II
*/
#ifdef PC98
#define com_data 0x000 /* data register (R/W) */
#define com_dlbl 0x000 /* divisor latch low (W) */
#define com_dlbh 0x100 /* divisor latch high (W) */
#define com_ier 0x100 /* interrupt enable (W) */
#define com_iir 0x200 /* interrupt identification (R) */
#define com_fifo 0x200 /* FIFO control (W) */
#define com_lctl 0x300 /* line control register (R/W) */
#define com_cfcr 0x300 /* line control register (R/W) */
#define com_mcr 0x400 /* modem control register (R/W) */
#define com_lsr 0x500 /* line status register (R/W) */
#define com_msr 0x600 /* modem status register (R/W) */
#else
#define com_data 0 /* data register (R/W) */
#define com_dlbl 0 /* divisor latch low (W) */
#define com_dlbh 1 /* divisor latch high (W) */
#define com_ier 1 /* interrupt enable (W) */
#define com_iir 2 /* interrupt identification (R) */
#define com_fifo 2 /* FIFO control (W) */
#define com_lctl 3 /* line control register (R/W) */
#define com_cfcr 3 /* line control register (R/W) */
#define com_mcr 4 /* modem control register (R/W) */
#define com_lsr 5 /* line status register (R/W) */
#define com_msr 6 /* modem status register (R/W) */
#endif

View File

@ -21,7 +21,7 @@
*/
/*
* $Id: if_fe.c,v 1.6 1996/09/07 02:13:52 asami Exp $
* $Id: if_fe.c,v 1.7 1996/09/10 09:38:08 asami Exp $
*
* Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards.
* To be used with FreeBSD 2.x
@ -238,7 +238,6 @@ static struct fe_softc {
} fe_softc[NFE];
/* Frequently accessed members in arpcom and kdc. */
#define sc_if arpcom.ac_if
#define sc_unit arpcom.ac_if.if_unit
#define sc_enaddr arpcom.ac_enaddr

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.6 1996/09/07 02:13:32 asami Exp $
* $Id: machdep.c,v 1.7 1996/09/10 09:37:35 asami Exp $
*/
#include "npx.h"
@ -44,6 +44,7 @@
#include "opt_bounce.h"
#include "opt_machdep.h"
#include "opt_perfmon.h"
#include "opt_userconfig.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -387,8 +388,12 @@ again:
callout[i-1].c_next = &callout[i];
if (boothowto & RB_CONFIG) {
#ifdef USERCONFIG
userconfig();
cninit(); /* the preferred console may have changed */
#else
printf("Sorry! no userconfig in this kernel\n");
#endif
}
#ifdef BOUNCE_BUFFERS
@ -1169,19 +1174,6 @@ init386(first)
}
#endif
/*
* Some 386 machines might give us a bogus number for extended
* mem. If this happens, stop now.
*/
#ifndef PC98
#ifndef LARGEMEM
if (biosextmem > 65536) {
panic("extended memory beyond limit of 64MB");
/* NOTREACHED */
}
#endif
#endif
pagesinbase = biosbasemem * 1024 / PAGE_SIZE;
pagesinext = biosextmem * 1024 / PAGE_SIZE;

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
* $Id: pc98.c,v 1.5 1996/09/07 02:14:09 asami Exp $
* $Id: pc98.c,v 1.6 1996/09/10 09:38:19 asami Exp $
*/
/*
@ -57,7 +57,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysctl.h>
#include <sys/buf.h>
#include <sys/syslog.h>
#include <sys/malloc.h>

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.h 5.7 (Berkeley) 5/9/91
* $Id: pc98.h,v 1.2 1996/09/03 10:23:48 asami Exp $
* $Id: pc98.h,v 1.3 1996/09/10 09:38:21 asami Exp $
*/
#ifndef _PC98_PC98_PC98_H_
@ -213,6 +213,53 @@ extern unsigned char pc98_system_parameter[]; /* in locore.c */
#define epson_system_type (pc98_system_parameter[OFS_epson_system_type])
# define PC98_TYPE_CHECK(x) ((pc98_machine_type & (x)) == (x))
#include <machine/spl.h>
static inline u_char
epson_inb(u_int port)
{
u_char data;
outb(0x43f, 0x42);
data = inb(port);
outb(0x43f, 0x40);
return (data);
}
static inline void
epson_outb(u_int port, u_char data)
{
outb(0x43f, 0x42);
outb(port,data);
outb(0x43f, 0x40);
}
static inline void
epson_insw(u_int port, void *addr, size_t cnt)
{
int s;
s = splbio();
outb(0x43f, 0x42);
disable_intr();
insw((u_int)port, (void *)addr, (size_t)cnt);
outb(0x43f, 0x40);
splx(s);
}
static inline void
epson_outsw(u_int port, void *addr, size_t cnt)
{
int s;
s = splbio();
outb(0x43f, 0x42);
disable_intr();
outsw((u_int)port, (void *)addr, (size_t)cnt);
outb(0x43f, 0x40);
splx(s);
}
#endif /* KERNEL */
/*

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.5 1996/09/07 02:14:23 asami Exp $
* $Id: sio.c,v 1.6 1996/09/10 09:38:34 asami Exp $
*/
#include "opt_comconsole.h"
@ -141,18 +141,17 @@
#include <i386/isa/icu.h>
#include <i386/isa/isa_device.h>
#include <pc98/pc98/sioreg.h>
#include <pc98/pc98/ic/i8251.h>
#include <pc98/pc98/ic/ns16550.h>
#include <i386/isa/ic/i8251.h>
#else
#include <i386/isa/isa.h>
#include <i386/isa/isa_device.h>
#include <i386/isa/sioreg.h>
#endif
#ifdef COM_ESP
#include <i386/isa/ic/esp.h>
#endif
#include <i386/isa/ic/ns16550.h>
#endif
#include "crd.h"
#if NCRD > 0

View File

@ -36,11 +36,11 @@
#define DEB(x)
#define DEB1(x)
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_AD1848)
#include "ad1848_mixer.h"
#include <i386/isa/sound/ad1848_mixer.h>
#define IMODE_NONE 0
#define IMODE_OUTPUT 1
@ -1397,7 +1397,7 @@ mozart_init (int io_base)
#endif /* MOZART_PORT */
#ifdef OPTI_MAD16_PORT
#include "mad16.h"
#include <i386/isa/sound/mad16.h>
#endif
/*

View File

@ -27,7 +27,7 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_YM3812)

View File

@ -225,7 +225,7 @@
* Include the main voxware header file. It include all the os/voxware/etc
* headers needed by this source.
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
/*
* all but ioport.h :)
*/

View File

@ -27,13 +27,13 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#ifdef CONFIGURE_SOUNDCARD
#ifndef EXCLUDE_AUDIO
#include "ulaw.h"
#include "coproc.h"
#include <i386/isa/sound/ulaw.h>
#include <i386/isa/sound/coproc.h>
#define ON 1
#define OFF 0

View File

@ -28,7 +28,7 @@
*/
#define _DEV_TABLE_C_
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#ifdef CONFIGURE_SOUNDCARD

View File

@ -27,7 +27,7 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#ifdef CONFIGURE_SOUNDCARD

View File

@ -27,11 +27,11 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_GUS)
#include "gus_hw.h"
#include <i386/isa/sound/gus_hw.h>
int gus_base, gus_irq, gus_dma;
extern int gus_wave_volume;

View File

@ -27,11 +27,11 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#ifdef CONFIGURE_SOUNDCARD
#include "gus_hw.h"
#include <i386/isa/sound/gus_hw.h>
#if !defined(EXCLUDE_GUS) && !defined(EXCLUDE_MIDI)
@ -225,7 +225,7 @@ gus_midi_buffer_status (int dev)
#define MIDI_SYNTH_NAME "Gravis Ultrasound Midi"
#define MIDI_SYNTH_CAPS SYNTH_CAP_INPUT
#include "midi_synth.h"
#include <i386/isa/sound/midi_synth.h>
static struct midi_operations gus_midi_operations =
{

View File

@ -3,9 +3,9 @@
*
* Greg Lee 1993.
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#ifndef EXCLUDE_GUS
#include "gus_linearvol.h"
#include <i386/isa/sound/gus_linearvol.h>
extern unsigned short gus_adagio_vol (int vel, int mainv, int xpn, int voicev);
extern unsigned short gus_linear_vol (int vol, int mainvol);

View File

@ -27,9 +27,9 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#include <machine/ultrasound.h>
#include "gus_hw.h"
#include <i386/isa/sound/gus_hw.h>
static unsigned char gus_look8 __P((int reg));
static unsigned short gus_read16 __P((int reg));

View File

@ -27,11 +27,11 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_GUS)
#include <machine/ultrasound.h>
#include "gus_hw.h"
#include <i386/isa/sound/gus_hw.h>
#define MIX_DEVS (SOUND_MASK_MIC|SOUND_MASK_LINE| \
SOUND_MASK_SYNTH| \

View File

@ -30,7 +30,7 @@
#define USE_SEQ_MACROS
#define USE_SIMPLE_MACROS
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_MIDI)
@ -38,7 +38,7 @@
DEFINE_WAIT_QUEUE (sysex_sleeper, sysex_sleep_flag);
#include "midi_synth.h"
#include <i386/isa/sound/midi_synth.h>
static int midi2synth[MAX_MIDI_DEV];
static unsigned char prev_out_status[MAX_MIDI_DEV];

View File

@ -27,7 +27,7 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
static void drain_midi_queue __P((int dev));

View File

@ -33,12 +33,12 @@
#define USE_SEQ_MACROS
#define USE_SIMPLE_MACROS
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#ifdef CONFIGURE_SOUNDCARD
#if (!defined(EXCLUDE_MPU401) || !defined(EXCLUDE_MPU_EMU)) && !defined(EXCLUDE_MIDI)
#include "coproc.h"
#include <i386/isa/sound/coproc.h>
static int init_sequence[20]; /* NOTE! pos 0 = len, start pos 1. */
static int timer_mode = TMR_INTERNAL, timer_caps = TMR_INTERNAL;
@ -937,7 +937,7 @@ mpu_synth_close (int dev)
#define MIDI_SYNTH_NAME "MPU-401 UART Midi"
#define MIDI_SYNTH_CAPS SYNTH_CAP_INPUT
#include "midi_synth.h"
#include <i386/isa/sound/midi_synth.h>
static struct synth_operations mpu401_synth_proto =
{

View File

@ -34,11 +34,11 @@
* hooft@chem.ruu.nl
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_YM3812)
#include "opl3.h"
#include <i386/isa/sound/opl3.h>
#define MAX_VOICE 18
#define OFFS_4OP 11 /*

View File

@ -28,12 +28,12 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_PAS)
#define DEFINE_TRANSLATIONS
#include "pas.h"
#include <i386/isa/sound/pas.h>
static int config_pas_hw __P((struct address_info *hw_config));
static int detect_pas_hw __P((struct address_info *hw_config));

View File

@ -27,11 +27,11 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#ifdef CONFIGURE_SOUNDCARD
#include "pas.h"
#include <i386/isa/sound/pas.h>
#if !defined(EXCLUDE_PAS) && !defined(EXCLUDE_MIDI) && defined(EXCLUDE_PRO_MIDI)
@ -233,7 +233,7 @@ pas_buffer_status (int dev)
#define MIDI_SYNTH_NAME "Pro Audio Spectrum Midi"
#define MIDI_SYNTH_CAPS SYNTH_CAP_INPUT
#include "midi_synth.h"
#include <i386/isa/sound/midi_synth.h>
static struct midi_operations pas_midi_operations =
{

View File

@ -29,11 +29,11 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_PAS)
#include "pas.h"
#include <i386/isa/sound/pas.h>
extern void mix_write __P((unsigned char data, int ioaddr));
static int pas_mixer_ioctl __P((int dev, unsigned int cmd, unsigned int arg));

View File

@ -28,11 +28,11 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#ifdef CONFIGURE_SOUNDCARD
#include "pas.h"
#include <i386/isa/sound/pas.h>
static int pcm_set_bits __P((int arg));
static int pcm_set_channels __P((int arg));

View File

@ -28,7 +28,7 @@
*/
#define PATMGR_C
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SEQUENCER)

View File

@ -34,9 +34,9 @@
/*
* #define DEB_DMARES
*/
#include "sound_config.h"
#include "sb.h"
#include "sb_mixer.h"
#include <i386/isa/sound/sound_config.h>
#include <i386/isa/sound/sb.h>
#include <i386/isa/sound/sb_mixer.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB16) && !defined(EXCLUDE_SB) && !defined(EXCLUDE_AUDIO) && !defined(EXCLUDE_SBPRO)

View File

@ -27,13 +27,13 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#ifdef CONFIGURE_SOUNDCARD
#if !defined(EXCLUDE_SB) && !defined(EXCLUDE_SB16) && !defined(EXCLUDE_MIDI)
#include "sb.h"
#include <i386/isa/sound/sb.h>
#ifdef PC98
#define DATAPORT (sb16midi_base)
@ -182,7 +182,7 @@ sb16midi_buffer_status (int dev)
#define MIDI_SYNTH_NAME "SoundBlaster 16 Midi"
#define MIDI_SYNTH_CAPS SYNTH_CAP_INPUT
#include "midi_synth.h"
#include <i386/isa/sound/midi_synth.h>
static struct midi_operations sb16midi_operations =
{

View File

@ -30,7 +30,7 @@
* - Added the Audio Excel DSP 16 initialization routine.
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB)

View File

@ -33,12 +33,12 @@
* Code added for MV ProSonic/Jazz 16 in 16 bit mode
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB)
#include "sb.h"
#include "sb_mixer.h"
#include <i386/isa/sound/sb.h>
#include <i386/isa/sound/sb_mixer.h>
#undef SB_TEST_IRQ
int sbc_base = 0;
@ -901,7 +901,7 @@ static int
initialize_smw (void)
{
#ifdef SMW_MIDI0001_INCLUDED
#include "smw-midi0001.h"
#include <i386/isa/sound/smw-midi0001.h>
#else
unsigned char smw_ucode[1];
int smw_ucodeLen = 0;

View File

@ -27,11 +27,11 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB) && !defined(EXCLUDE_MIDI)
#include "sb.h"
#include <i386/isa/sound/sb.h>
#undef SB_TEST_IRQ
/*
@ -211,7 +211,7 @@ sb_midi_interrupt (int dummy)
#define MIDI_SYNTH_NAME "SoundBlaster Midi"
#define MIDI_SYNTH_CAPS 0
#include "midi_synth.h"
#include <i386/isa/sound/midi_synth.h>
static struct midi_operations sb_midi_operations =
{

View File

@ -32,13 +32,13 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB) && !defined(EXCLUDE_SBPRO)
#define __SB_MIXER_C__
#include "sb.h"
#include "sb_mixer.h"
#include <i386/isa/sound/sb.h>
#include <i386/isa/sound/sb_mixer.h>
#undef SB_TEST_IRQ
extern int sbc_base;

View File

@ -28,8 +28,8 @@
*/
#define SEQUENCER_C
#include "sound_config.h"
#include "midi_ctrl.h"
#include <i386/isa/sound/sound_config.h>
#include <i386/isa/sound/midi_ctrl.h>
extern void seq_drain_midi_queues __P((void));
@ -71,7 +71,7 @@ static unsigned long prev_input_time = 0;
static int prev_event_time;
static unsigned long seq_time = 0;
#include "tuning.h"
#include <i386/isa/sound/tuning.h>
#define EV_SZ 8
#define IEV_SZ 8

View File

@ -28,9 +28,9 @@
*
*/
#include "local.h"
#include "os.h"
#include "soundvers.h"
#include <i386/isa/sound/local.h>
#include <i386/isa/sound/os.h>
#include <i386/isa/sound/soundvers.h>
#if !defined(PSS_MPU_BASE) && defined(EXCLUDE_SSCAPE) && defined(EXCLUDE_TRIX)
#define EXCLUDE_MPU_EMU
@ -358,8 +358,8 @@ struct channel_info {
#define OPEN_WRITE 2
#define OPEN_READWRITE 3
#include "sound_calls.h"
#include "dev_table.h"
#include <i386/isa/sound/sound_calls.h>
#include <i386/isa/sound/dev_table.h>
#ifndef DEB
#define DEB(x)

View File

@ -27,7 +27,7 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#ifdef CONFIGURE_SOUNDCARD

View File

@ -29,7 +29,7 @@
*/
#define SEQUENCER_C
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#ifdef CONFIGURE_SOUNDCARD

View File

@ -26,16 +26,16 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: soundcard.c,v 1.3 1996/09/03 10:24:21 asami Exp $
* $Id: soundcard.c,v 1.43 1996/09/10 08:26:06 bde Exp $
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#include <vm/vm.h>
#include <vm/vm_extern.h>
#ifdef CONFIGURE_SOUNDCARD
#include "dev_table.h"
#include <i386/isa/sound/dev_table.h>
#include <i386/isa/isa_device.h>
#include <sys/conf.h>
#include <sys/kernel.h>

View File

@ -27,11 +27,11 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SSCAPE)
#include "coproc.h"
#include <i386/isa/sound/coproc.h>
/*
* I/O ports

View File

@ -29,7 +29,7 @@
*/
#define SEQUENCER_C
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#ifdef CONFIGURE_SOUNDCARD

View File

@ -28,12 +28,12 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_TRIX)
#ifdef INCLUDE_TRIX_BOOT
#include "trix_boot.h"
#include <i386/isa/sound/trix_boot.h>
#endif
static int kilroy_was_here = 0; /* Don't detect twice */

View File

@ -28,7 +28,7 @@
*
*/
#include "sound_config.h"
#include <i386/isa/sound/sound_config.h>
#ifdef CONFIGURE_SOUNDCARD
@ -236,7 +236,7 @@ uart6850_buffer_status (int dev)
#define MIDI_SYNTH_NAME "6850 UART Midi"
#define MIDI_SYNTH_CAPS SYNTH_CAP_INPUT
#include "midi_synth.h"
#include <i386/isa/sound/midi_synth.h>
static struct midi_operations uart6850_operations =
{

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: syscons.c,v 1.166 1996/09/06 23:35:54 pst Exp $
* $Id: syscons.c,v 1.8 1996/09/10 09:38:39 asami Exp $
*/
#include "sc.h"
@ -166,14 +166,17 @@ void (*current_saver) __P((int blank)) = none_saver;
#ifdef not_yet_done
#define VIRTUAL_TTY(x) (sccons[x] = ttymalloc(sccons[x]))
struct CONSOLE_TTY (sccons[MAXCONS] = ttymalloc(sccons[MAXCONS]))
static const int nsccons = MAXCONS+1;
struct tty *sccons[MAXCONS+1];
struct MOUSE_TTY (sccons[MAXCONS+1] = ttymalloc(sccons[MAXCONS+1]))
struct tty *sccons[MAXCONS+2];
#else
#define VIRTUAL_TTY(x) &sccons[x]
#define CONSOLE_TTY &sccons[MAXCONS]
static struct tty sccons[MAXCONS+1];
#define MOUSE_TTY &sccons[MAXCONS+1]
static struct tty sccons[MAXCONS+2];
#endif
#define SC_MOUSE 128
#define SC_CONSOLE 255
#ifdef PC98
static u_char default_kanji = UJIS;
u_short *Crtat;
@ -183,6 +186,7 @@ u_short *Atrat;
#define CGA_BUF pa_to_va(0xB8000)
u_short *Crtat;
#endif
static const int nsccons = MAXCONS+2;
#define WRAPHIST(scp, pointer, offset)\
((scp->history) + ((((pointer) - (scp->history)) + (scp->history_size)\
@ -198,6 +202,7 @@ static int scattach(struct isa_device *dev);
static int scparam(struct tty *tp, struct termios *t);
static int scprobe(struct isa_device *dev);
static void scstart(struct tty *tp);
static void scmousestart(struct tty *tp);
static void scinit(void);
static u_int scgetc(int noblock);
static scr_stat *get_scr_stat(dev_t dev);
@ -589,10 +594,12 @@ struct tty
if (init_done == COLD)
return(NULL);
if (unit > MAXCONS || unit < 0)
return(NULL);
if (unit == MAXCONS)
if (unit == SC_CONSOLE)
return CONSOLE_TTY;
if (unit == SC_MOUSE)
return MOUSE_TTY;
if (unit >= MAXCONS || unit < 0)
return(NULL);
return VIRTUAL_TTY(unit);
}
@ -601,10 +608,10 @@ static scr_stat
{
int unit = minor(dev);
if (unit > MAXCONS || unit < 0)
return(NULL);
if (unit == MAXCONS)
if (unit == SC_CONSOLE)
return console[0];
if (unit >= MAXCONS || unit < 0)
return(NULL);
return console[unit];
}
@ -626,7 +633,7 @@ scopen(dev_t dev, int flag, int mode, struct proc *p)
if (!tp)
return(ENXIO);
tp->t_oproc = scstart;
tp->t_oproc = (minor(dev) == SC_MOUSE) ? scmousestart : scstart;
tp->t_param = scparam;
tp->t_dev = dev;
if (!(tp->t_state & TS_ISOPEN)) {
@ -643,7 +650,7 @@ scopen(dev_t dev, int flag, int mode, struct proc *p)
else
if (tp->t_state & TS_XCLUDE && p->p_ucred->cr_uid != 0)
return(EBUSY);
if (!console[minor(dev)])
if (minor(dev) < MAXCONS && !console[minor(dev)])
console[minor(dev)] = alloc_scp();
return((*linesw[tp->t_line].l_open)(dev, tp));
}
@ -887,7 +894,7 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
scp->mouse_proc = NULL;
scp->mouse_pid = 0;
}
return 0;
break;
case MOUSE_SHOW:
if (!(scp->status & MOUSE_ENABLED)) {
@ -924,10 +931,23 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
mouse->u.data.x = scp->mouse_xpos;
mouse->u.data.y = scp->mouse_ypos;
mouse->u.data.buttons = scp->mouse_buttons;
return 0;
break;
case MOUSE_ACTION:
/* this should maybe only be settable from /dev/console SOS */
/* this should maybe only be settable from /dev/mouse SOS */
/* send out mouse event on /dev/mouse */
if ((MOUSE_TTY)->t_state & TS_ISOPEN) {
u_char buf[5];
int i;
buf[0] = 0x80 | ((~mouse->u.data.buttons) & 0x07);
buf[1] = (mouse->u.data.x & 0x1fe >> 1);
buf[3] = (mouse->u.data.x & 0x1ff) - buf[1];
buf[2] = -(mouse->u.data.y & 0x1fe >> 1);
buf[4] = -(mouse->u.data.y & 0x1ff) - buf[2];
for (i=0; i<5; i++)
(*linesw[(MOUSE_TTY)->t_line].l_rint)(buf[i],MOUSE_TTY);
}
cur_console->mouse_xpos += mouse->u.data.x;
cur_console->mouse_ypos += mouse->u.data.y;
if (cur_console->mouse_signal) {
@ -1514,9 +1534,8 @@ scstart(struct tty *tp)
u_char buf[PCBURST];
scr_stat *scp = get_scr_stat(tp->t_dev);
/* XXX who repeats the call when the above flags are cleared? */
if (scp->status & SLKED || blink_in_progress)
return;
return; /* XXX who repeats the call when the above flags are cleared? */
s = spltty();
if (!(tp->t_state & (TS_TIMEOUT | TS_BUSY | TS_TTSTOP))) {
tp->t_state |= TS_BUSY;
@ -1533,6 +1552,26 @@ scstart(struct tty *tp)
splx(s);
}
static void
scmousestart(struct tty *tp)
{
struct clist *rbp;
int s;
u_char buf[PCBURST];
s = spltty();
if (!(tp->t_state & (TS_TIMEOUT | TS_BUSY | TS_TTSTOP))) {
tp->t_state |= TS_BUSY;
rbp = &tp->t_outq;
while (rbp->c_cc) {
q_to_b(rbp, buf, PCBURST);
}
tp->t_state &= ~TS_BUSY;
ttwwakeup(tp);
}
splx(s);
}
void
sccnprobe(struct consdev *cp)
{
@ -1548,7 +1587,7 @@ sccnprobe(struct consdev *cp)
}
/* initialize required fields */
cp->cn_dev = makedev(CDEV_MAJOR, MAXCONS);
cp->cn_dev = makedev(CDEV_MAJOR, SC_CONSOLE);
cp->cn_pri = CN_INTERNAL;
}
@ -2945,7 +2984,7 @@ scinit(void)
was = *cp;
*cp = (u_short) 0xA55A;
if (*cp == 0xA55A) {
Crtat = (u_short *)cp;
Crtat = (u_short *)CGA_BUF;
crtc_addr = COLOR_BASE;
}
*cp = was;

View File

@ -1135,7 +1135,7 @@ int wcd_load (struct lkm_table *lkmtp, int cmd)
/* Probing controller ata->ctrlr, unit u. */
if (ata->params[u] && ! ata->attached[u] &&
wcdattach (ata, u, ata->params[u],
ata->debug, ata->parent) >= 0)
ata->debug) >= 0)
{
/* Drive found. */
ata->attached[u] = 1;