summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-12-30 19:02:48 +0000
committerpeter <peter@FreeBSD.org>1995-12-30 19:02:48 +0000
commitc3f352d4ad515968c54d216a0e53252eff8ab3ef (patch)
tree48ddeda3c6c8d8572cc34bf52ccf9cb9bd97d488 /sys
parentab124e78b0271ddb904b761b31e5c9a0cf24e070 (diff)
downloadFreeBSD-src-c3f352d4ad515968c54d216a0e53252eff8ab3ef.zip
FreeBSD-src-c3f352d4ad515968c54d216a0e53252eff8ab3ef.tar.gz
This commit was generated by cvs2svn to compensate for changes in r13122,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/boot/asm.s270
-rw-r--r--sys/i386/boot/bios.s326
-rw-r--r--sys/i386/boot/boot.sed3
-rw-r--r--sys/i386/boot/boot2.s73
-rw-r--r--sys/i386/boot/start.s323
-rw-r--r--sys/i386/ibcs2/ibcs2_timeb.h45
-rw-r--r--sys/i386/isa/sound/configure.c830
7 files changed, 0 insertions, 1870 deletions
diff --git a/sys/i386/boot/asm.s b/sys/i386/boot/asm.s
deleted file mode 100644
index 8802b13..0000000
--- a/sys/i386/boot/asm.s
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * Ported to boot 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
- *
- * Mach Operating System
- * Copyright (c) 1992, 1991 Carnegie Mellon University
- * All Rights Reserved.
- *
- * 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
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-
-/*
- * HISTORY
- * $Log: asm.s,v $
- * Revision 2.2 92/04/04 11:34:13 rpd
- * Fix Intel Copyright as per B. Davies authorization.
- * [92/04/03 rvb]
- * From 2.5 boot: pruned inb(), outb(), and pzero().
- * [92/03/30 rvb]
- *
- * Revision 2.2 91/04/02 14:35:10 mbj
- * Added _sp() => where is the stack at. [kupfer]
- * Add Intel copyright
- * [90/02/09 rvb]
- *
- */
-
-/*
- Copyright 1988, 1989, 1990, 1991, 1992
- by Intel Corporation, Santa Clara, California.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appears in all
-copies and that both the copyright notice and this permission notice
-appear in supporting documentation, and that the name of Intel
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-
-INTEL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-IN NO EVENT SHALL INTEL BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
-NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
-
- .file "asm.s"
-
-#include "asm.h"
-
-
-CR0_PE_ON = 0x1
-CR0_PE_OFF = 0xfffffffe
-
-.globl _ouraddr
- .text
-
-/*
-#
-# real_to_prot()
-# transfer from real mode to protected mode.
-*/
-
-ENTRY(real_to_prot)
- # guarantee that interrupt is disabled when in prot mode
- cli
-
- # load the gdtr
- addr16
- data32
- lgdt EXT(Gdtr)
-
- # set the PE bit of CR0
- mov %cr0, %eax
-
- data32
- or $CR0_PE_ON, %eax
- mov %eax, %cr0
-
- # make intrasegment jump to flush the processor pipeline and
- # reload CS register
- data32
- ljmp $0x18, $xprot
-
-xprot:
- # we are in USE32 mode now
- # set up the protective mode segment registers : DS, SS, ES
- mov $0x20, %eax
- movw %ax, %ds
- movw %ax, %ss
- movw %ax, %es
-
- ret
-
-/*
-#
-# prot_to_real()
-# transfer from protected mode to real mode
-#
-*/
-
-ENTRY(prot_to_real)
-
- # set up a dummy stack frame for the second seg change.
- movl _ouraddr, %eax
- sarl $4, %eax
- pushw %ax
- pushw $xreal
-
- # Change to use16 mode.
- ljmp $0x28, $x16
-
-x16:
- # clear the PE bit of CR0
- mov %cr0, %eax
- data32
- and $CR0_PE_OFF, %eax
- mov %eax, %cr0
-
-
- # make intersegment jmp to flush the processor pipeline
- # using the fake stack frame set up earlier
- # and reload CS register
- lret
-
-
-xreal:
- # we are in real mode now
- # set up the real mode segment registers : DS, SS, ES
- movw %cs, %ax
- movw %ax, %ds
- movw %ax, %ss
- movw %ax, %es
-
- data32
- ret
-
-/*
-#
-# startprog(phyaddr)
-# start the program on protected mode where phyaddr is the entry point
-#
-*/
-
-ENTRY(startprog)
- push %ebp
- mov %esp, %ebp
-
-
-
- # get things we need into registers
- movl 0x8(%ebp), %ecx # entry offset
- movl 0x0c(%ebp), %eax # &argv
-
- # make a new stack at 0:0xa0000 (big segs)
- mov $0x10, %ebx
- movw %bx, %ss
- movl $0xa0000,%ebx
- movl %ebx,%esp
-
-
- # push some number of args onto the stack
- pushl $0 # nominally a cyl offset in the boot.
- pushl 0x8(%eax) # argv[2] = bootdev
- pushl 0x4(%eax) # argv[1] = howto
- pushl $0 # dummy 'return' address
-
- # push on our entry address
- mov $0x08, %ebx # segment
- pushl %ebx
- pushl %ecx
-
- # convert over the other data segs
- mov $0x10, %ebx
- movw %bx, %ds
- movw %bx, %es
-
- # convert the PC (and code seg)
- lret
-/*
-#
-# pbzero( dst, cnt)
-# where src is a virtual address and dst is a physical address
-*/
-
-ENTRY(pbzero)
- push %ebp
- mov %esp, %ebp
- push %es
- push %esi
- push %edi
- push %ecx
-
- cld
-
- # set %es to point at the flat segment
- mov $0x10, %eax
- movw %ax, %es
-
- mov 0x8(%ebp), %edi # destination
- mov 0xc(%ebp), %ecx # count
- mov $0x0,%eax # value
-
- rep
- stosb
-
- pop %ecx
- pop %edi
- pop %esi
- pop %es
- pop %ebp
-
- ret
-/*
-#
-# pcpy(src, dst, cnt)
-# where src is a virtual address and dst is a physical address
-#
-*/
-
-ENTRY(pcpy)
- push %ebp
- mov %esp, %ebp
- push %es
- push %esi
- push %edi
- push %ecx
-
- cld
-
- # set %es to point at the flat segment
- mov $0x10, %eax
- movw %ax, %es
-
- mov 0x8(%ebp), %esi # source
- mov 0xc(%ebp), %edi # destination
- mov 0x10(%ebp), %ecx # count
-
- rep
- movsb
-
- pop %ecx
- pop %edi
- pop %esi
- pop %es
- pop %ebp
-
- ret
-
diff --git a/sys/i386/boot/bios.s b/sys/i386/boot/bios.s
deleted file mode 100644
index d1673a5..0000000
--- a/sys/i386/boot/bios.s
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * Ported to boot 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
- *
- * Mach Operating System
- * Copyright (c) 1992, 1991 Carnegie Mellon University
- * All Rights Reserved.
- *
- * 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
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-
-/*
- * HISTORY
- * $Log: bios.s,v $
- * Revision 2.2 92/04/04 11:34:26 rpd
- * Fix Intel Copyright as per B. Davies authorization.
- * [92/04/03 rvb]
- * From 2.5 version
- * [92/03/30 mg32]
- *
- * Revision 2.2 91/04/02 14:35:21 mbj
- * Add Intel copyright
- * [90/02/09 rvb]
- *
- */
-
-
-/*
- Copyright 1988, 1989, 1990, 1991, 1992
- by Intel Corporation, Santa Clara, California.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appears in all
-copies and that both the copyright notice and this permission notice
-appear in supporting documentation, and that the name of Intel
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-
-INTEL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-IN NO EVENT SHALL INTEL BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
-NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
-
- .file "bios.s"
-
-#include "asm.h"
- .text
-
-/*
-# biosread(dev, cyl, head, sec)
-# Read one sector from disk into the internal buffer "intbuf" which
-# is the first 512 bytes of the boot loader.
-# BIOS call "INT 0x13 Function 0x2" to read sectors from disk into memory
-# Call with %ah = 0x2
-# %al = number of sectors
-# %ch = cylinder
-# %cl = sector
-# %dh = head
-# %dl = drive (0x80 for hard disk, 0x0 for floppy disk)
-# %es:%bx = segment:offset of buffer
-# Return:
-# %al = 0x0 on success; err code on failure
-*/
-
-ENTRY(biosread)
- push %ebp
- mov %esp, %ebp
-
- push %ebx
- push %ecx
- push %edx
- push %es
-
- movb 0x10(%ebp), %dh
- movw 0x0c(%ebp), %cx
- xchgb %ch, %cl # cylinder; the highest 2 bits of cyl is in %cl
- rorb $2, %cl
- movb 0x14(%ebp), %al
- orb %al, %cl
- incb %cl # sector; sec starts from 1, not 0
- movb 0x8(%ebp), %dl # device
- xor %ebx, %ebx # offset -- 0
- # prot_to_real will set %es to BOOTSEG
-
- call EXT(prot_to_real) # enter real mode
- movb $0x2, %ah # subfunction
- movb $0x1, %al # number of sectors -- one
-
- sti
- int $0x13
- cli
-
- mov %eax, %ebx # save return value
-
- data16
- call EXT(real_to_prot) # back to protected mode
-
- xor %eax, %eax
- movb %bh, %al # return value in %ax
-
- pop %es
- pop %edx
- pop %ecx
- pop %ebx
- pop %ebp
-
- ret
-
-
-/*
-# putc(ch)
-# BIOS call "INT 10H Function 0Eh" to write character to console
-# Call with %ah = 0x0e
-# %al = character
-# %bh = page
-# %bl = foreground color ( graphics modes)
-*/
-
-
-ENTRY(putc)
- push %ebp
- mov %esp, %ebp
- push %ebx
- push %ecx
-
- movb 0x8(%ebp), %cl
-
- call EXT(prot_to_real)
-
- data16
- mov $0x1, %ebx # %bh=0, %bl=1 (blue)
- movb $0xe, %ah
- movb %cl, %al
- sti
- int $0x10 # display a byte
- cli
-
- data16
- call EXT(real_to_prot)
-
- pop %ecx
- pop %ebx
- pop %ebp
- ret
-
-
-/*
-# getc()
-# BIOS call "INT 16H Function 00H" to read character from keyboard
-# Call with %ah = 0x0
-# Return: %ah = keyboard scan code
-# %al = ASCII character
-*/
-
-ENTRY(getc)
- push %ebp
- mov %esp, %ebp
- push %ebx # save %ebx
-
- call EXT(prot_to_real)
-
- movb $0x0, %ah
- sti
- int $0x16
- cli
-
- movb %al, %bl # real_to_prot uses %eax
-
- data16
- call EXT(real_to_prot)
-
- xor %eax, %eax
- movb %bl, %al
-
- pop %ebx
- pop %ebp
- ret
-/*
-# ischar()
-# if there is a character pending, return it; otherwise return 0
-# BIOS call "INT 16H Function 01H" to check whether a character is pending
-# Call with %ah = 0x1
-# Return:
-# If key waiting to be input:
-# %ah = keyboard scan code
-# %al = ASCII character
-# Zero flag = clear
-# else
-# Zero flag = set
-*/
-ENTRY(ischar)
- push %ebp
- mov %esp, %ebp
- push %ebx
-
- call EXT(prot_to_real) # enter real mode
-
- xor %ebx, %ebx
- movb $0x1, %ah
- sti
- int $0x16
- cli
- data16
- jz nochar
- movb %al, %bl
-
-nochar:
- data16
- call EXT(real_to_prot)
-
- xor %eax, %eax
- movb %bl, %al
-
- pop %ebx
- pop %ebp
- ret
-
-/*
-#
-# get_diskinfo(): return a word that represents the
-# max number of sectors and heads and drives for this device
-#
-*/
-
-ENTRY(get_diskinfo)
- push %ebp
- mov %esp, %ebp
- push %es
- push %ebx
- push %ecx
- push %edx
-
- movb 0x8(%ebp), %dl # diskinfo(drive #)
- call EXT(prot_to_real) # enter real mode
-
- movb $0x8, %ah # ask for disk info
-
- sti
- int $0x13
- cli
-
- data16
- call EXT(real_to_prot) # back to protected mode
-
- xor %eax, %eax
-
- /*form a longword representing all this gunk*/
- movb %dh, %ah # # heads
- andb $0x3f, %cl # mask of cylinder gunk
- movb %cl, %al # # sectors
-
- pop %edx
- pop %ecx
- pop %ebx
- pop %es
- pop %ebp
- ret
-
-/*
-#
-# memsize(i) : return the memory size in KB. i == 0 for conventional memory,
-# i == 1 for extended memory
-# BIOS call "INT 12H" to get conventional memory size
-# BIOS call "INT 15H, AH=88H" to get extended memory size
-# Both have the return value in AX.
-#
-*/
-
-ENTRY(memsize)
- push %ebp
- mov %esp, %ebp
- push %ebx
-
- mov 8(%ebp), %ebx
-
- call EXT(prot_to_real) # enter real mode
-
- cmpb $0x1, %bl
- data16
- je xext
-
- sti
- int $0x12
- cli
- data16
- jmp xdone
-
-xext: movb $0x88, %ah
- sti
- int $0x15
- cli
-
-xdone:
- mov %eax, %ebx
-
- data16
- call EXT(real_to_prot)
-
- mov %ebx, %eax
- pop %ebx
- pop %ebp
- ret
diff --git a/sys/i386/boot/boot.sed b/sys/i386/boot/boot.sed
deleted file mode 100644
index c6b38ea..0000000
--- a/sys/i386/boot/boot.sed
+++ /dev/null
@@ -1,3 +0,0 @@
-/^[ ]*.data/c\
- .text
-/^[ ]*.ident/d
diff --git a/sys/i386/boot/boot2.s b/sys/i386/boot/boot2.s
deleted file mode 100644
index d319edf..0000000
--- a/sys/i386/boot/boot2.s
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Ported to boot 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
- *
- * Mach Operating System
- * Copyright (c) 1992, 1991 Carnegie Mellon University
- * All Rights Reserved.
- *
- * 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
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-
-/*
- * HISTORY
- * $Log: boot2.s,v $
- * Revision 2.2 92/04/04 11:35:26 rpd
- * From 2.5
- * [92/03/30 rvb]
- *
- * Revision 2.2 91/04/02 14:39:21 mbj
- * Put into rcs tree
- * [90/02/09 rvb]
- *
- */
-
-#include "asm.h"
-#define LOADMSG 1
-/*
- * boot2() -- second stage boot
- */
-
-.globl _ouraddr
-
-ENTRY(boot2)
- movl %cs, %ax
- movl %ax, %ds
- movl %ax, %es
- data32
- sall $4, %eax
- data32
- movl %eax, _ouraddr
- /* save the drive type and ID */
- data32
- pushl %edx
- /* change to protected mode */
- data32
- call _real_to_prot
-
- call _boot
- ret
-
- .data
- .align 2
-_ouraddr:
- .long 0
-
-
diff --git a/sys/i386/boot/start.s b/sys/i386/boot/start.s
deleted file mode 100644
index f6f4bf0..0000000
--- a/sys/i386/boot/start.s
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Ported to boot 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
- *
- * Mach Operating System
- * Copyright (c) 1992, 1991 Carnegie Mellon University
- * All Rights Reserved.
- *
- * 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
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-
-/*
- * HISTORY
- * $Log: start.s,v $
- * Revision 2.2 92/04/04 11:36:29 rpd
- * Fix Intel Copyright as per B. Davies authorization.
- * [92/04/03 rvb]
- * Need to zero dh on hd path; at least for an adaptec card.
- * [92/01/14 rvb]
- *
- * From 2.5 boot:
- * Flush digit printing.
- * Fuse floppy and hd boot by using Int 21 to tell
- * boot type (slightly dubious since Int 21 is DOS
- * not BIOS)
- * [92/03/30 mg32]
- *
- * Revision 2.2 91/04/02 14:42:04 mbj
- * Fix the BIG boot bug. We had missed a necessary data
- * before a xor that was clearing a register used later
- * as an index register.
- * [91/03/01 rvb]
- * Remember floppy type for swapgeneric
- * Add Intel copyright
- * [90/02/09 rvb]
- *
- */
-
-
-/*
- Copyright 1988, 1989, 1990, 1991, 1992
- by Intel Corporation, Santa Clara, California.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appears in all
-copies and that both the copyright notice and this permission notice
-appear in supporting documentation, and that the name of Intel
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-
-INTEL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-IN NO EVENT SHALL INTEL BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
-NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
-#include "asm.h"
-
- .file "start.s"
-
-BOOTSEG = 0x9000 # boot will be loaded at 640k-64k
-BOOTSTACK = 0xe000 # boot stack
-SIGNATURE = 0xaa55
-LOADSZ = 14 # size of unix boot
-PARTSTART = 0x1be # starting address of partition table
-NUMPART = 4 # number of partitions in partition table
-PARTSZ = 16 # each partition table entry is 16 bytes
-BSDPART = 0xA5 # value of boot_ind, means bootable partition
-BOOTABLE = 0x80 # value of boot_ind, means bootable partition
-
- .text
-
-ENTRY(boot1)
-
- # boot1 is loaded at 0x0:0x7c00
- # ljmp to the next instruction to set up %cs
- data32
- ljmp $0x7c0, $start
-
-start:
- # set up %ds
- mov %cs, %ax
- mov %ax, %ds
-
-
- # set up %ss and %esp
- data32
- mov $BOOTSEG, %eax
- mov %ax, %ss
- data32
- mov $BOOTSTACK, %esp
-
- /*** set up %es, (where we will load boot2 to) ***/
- mov %ax, %es
-
-#ifdef DEBUG
- data32
- mov $one, %esi
- data32
- call message
-#endif
- # get the boot drive id
- movb $0x33, %ah
- movb $0x05, %al
- int $0x21
-
- cmpb $0x80, %dl
- data32
- jge hd
-
-fd:
-# reset the disk system
-#ifdef DEBUG
- data32
- mov $two, %esi
- data32
- call message
-#endif
- movb $0x0, %ah
- int $0x13
- data32
- mov $0x0001, %ecx # cyl 0, sector 1
- data32
-#ifdef DEBUG
- data32
- mov $three, %esi
- data32
- call message
-#endif
- jmp load
-
-hd: /**** load sector 0 into the BOOTSEG ****/
-#ifdef DEBUG
- data32
- mov $four, %esi
- data32
- call message
-#endif
- data32
- mov $0x0201, %eax
- xor %ebx, %ebx # %bx = 0
- data32
- mov $0x0001, %ecx
-#ifdef DEBUG
- data32
- mov $five, %esi
- data32
- call message
-#endif
- data32
- andl $0xff, %edx
- /*mov $0x0080, %edx*/
- int $0x13
- data32
- jb read_error
-
- /***# find the bootable partition *****/
- data32
- mov $PARTSTART, %ebx
- data32
- mov $NUMPART, %ecx
-again:
- addr16
- movb %es:4(%ebx), %al
- cmpb $BSDPART, %al
- data32
- je found
- data32
- add $PARTSZ, %ebx
- data32
- loop again
- data32
- mov $enoboot, %esi
- data32
- jmp err_stop
-
-
-/*
-# BIOS call "INT 0x13 Function 0x2" to read sectors from disk into memory
-# Call with %ah = 0x2
-# %al = number of sectors
-# %ch = cylinder
-# %cl = sector
-# %dh = head
-# %dl = drive (0x80 for hard disk, 0x0 for floppy disk)
-# %es:%bx = segment:offset of buffer
-# Return:
-# %al = 0x0 on success; err code on failure
-*/
-
-found:
- addr16
- movb %es:1(%ebx), %dh /* head */
- addr16
- xor %ecx, %ecx
- addr16
- movw %es:2(%ebx), %ecx /*sect,cyl (+ 2 bytes junk in top word )*/
-
-load:
- movb $0x2, %ah /* function 2 */
- movb $LOADSZ, %al /* number of blocks */
- xor %ebx, %ebx /* %bx = 0, put it at 0 in the BOOTSEG */
- int $0x13
- data32
- jb read_error
-
- # ljmp to the second stage boot loader (boot2).
- # After ljmp, %cs is BOOTSEG and boot1 (512 bytes) will be used
- # as an internal buffer "intbuf".
-
-#ifdef DEBUG
- data32
- mov $six, %esi
- data32
- call message
-#endif
- data32
- ljmp $BOOTSEG, $EXT(boot2)
-
-#
-# read_error
-#
-
-read_error:
-
- data32
- mov $eread, %esi
-err_stop:
- data32
- call message
- data32
- jmp stop
-
-#
-# message: write the error message in %ds:%esi to console
-#
-
-message:
- # Use BIOS "int 10H Function 0Eh" to write character in teletype mode
- # %ah = 0xe %al = character
- # %bh = page %bl = foreground color (graphics modes)
-
- data32
- push %eax
- data32
- push %ebx
- data32
- mov $0x0001, %ebx
- cld
-
-nextb:
- lodsb # load a byte into %al
- cmpb $0x0, %al
- data32
- je done
- movb $0xe, %ah
- int $0x10 # display a byte
- data32
- jmp nextb
-done:
- data32
- pop %ebx
- data32
- pop %eax
- data32
- ret
-
-stop: hlt
- data32
- jmp stop # halt doesnt actually halt forever
-
-/* error messages */
-
-#ifdef DEBUG
-one: String "1\r\n\0"
-two: String "2\r\n\0"
-three: String "3\r\n\0"
-four: String "4\r\n\0"
-five: String "5\r\n\0"
-six: String "6\r\n\0"
-seven: String "7\r\n\0"
-#endif DEBUG
-eread: String "Read error\r\n\0"
-enoboot: String "No bootable partition\r\n\0"
-endofcode:
-/* throw in a partition in case we are block0 as well */
-/* flag,head,sec,cyl,typ,ehead,esect,ecyl,start,len */
- . = EXT(boot1) + PARTSTART
- .byte 0x0,0,0,0,0,0,0,0
- .long 0,0
- .byte 0x0,0,0,0,0,0,0,0
- .long 0,0
- .byte 0x0,0,0,0,0,0,0,0
- .long 0,0
- .byte BOOTABLE,0,1,0,BSDPART,255,255,255
- .long 0,50000
-/* the last 2 bytes in the sector 0 contain the signature */
- . = EXT(boot1) + 0x1fe
- .value SIGNATURE
-ENTRY(disklabel)
- . = EXT(boot1) + 0x400
diff --git a/sys/i386/ibcs2/ibcs2_timeb.h b/sys/i386/ibcs2/ibcs2_timeb.h
deleted file mode 100644
index d85202d..0000000
--- a/sys/i386/ibcs2/ibcs2_timeb.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1995 Scott Bartram
- * 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 Scott Bartram.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#ifndef _IBCS2_TIMEB_H
-#define _IBCS2_TIMEB_H
-
-#pragma pack(2)
-struct xenix_timeb {
- ibcs2_time_t time;
- unsigned short millitm;
- short timezone;
- short dstflag;
-};
-#pragma pack()
-
-#define xenix_timeb_len 10 /* packed struct */
-
-#endif /* _IBCS2_TIMEB_H */
diff --git a/sys/i386/isa/sound/configure.c b/sys/i386/isa/sound/configure.c
deleted file mode 100644
index 5b7217b..0000000
--- a/sys/i386/isa/sound/configure.c
+++ /dev/null
@@ -1,830 +0,0 @@
-/*
- * sound/configure.c - Configuration program for the Linux Sound Driver
- *
- * Copyright by Hannu Savolainen 1993
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- *
- */
-
-#include <stdio.h>
-
-#define B(x) (1 << (x))
-
-/*
- * Option numbers
- */
-
-#define OPT_PAS 0
-#define OPT_SB 1
-#define OPT_ADLIB 2
-#define OPT_LAST_MUTUAL 2
-
-#define OPT_GUS 3
-#define OPT_MPU401 4
-#define OPT_UART6850 5
-#define OPT_PSS 6
-#define OPT_GUS16 7
-#define OPT_GUSMAX 8
-#define OPT_MSS 9
-
-#define OPT_HIGHLEVEL 10 /* This must be same than the next one */
-#define OPT_SBPRO 10
-#define OPT_SB16 11
-#define OPT_AUDIO 12
-#define OPT_MIDI_AUTO 13
-#define OPT_MIDI 14
-#define OPT_YM3812_AUTO 15
-#define OPT_YM3812 16
-#define OPT_SEQUENCER 17
-#define OPT_LAST 17 /* Must be the same than the defined OPT */
-
-#define ANY_DEVS (B(OPT_AUDIO)|B(OPT_MIDI)|B(OPT_SEQUENCER)|B(OPT_GUS)| \
- B(OPT_MPU401)|B(OPT_PSS)|B(OPT_GUS16)|B(OPT_GUSMAX)|B(OPT_MSS))
-/*
- * Options that have been disabled for some reason (incompletely implemented
- * and/or tested). Don't remove from this list before looking at file
- * experimental.txt for further info.
- */
-#define DISABLED_OPTIONS (B(OPT_PSS))
-
-typedef struct
- {
- unsigned long conditions;
- unsigned long exclusive_options;
- char macro[20];
- int verify;
- int alias;
- int default_answ;
- }
-
-hw_entry;
-
-
-/*
- * The rule table for the driver options. The first field defines a set of
- * options which must be selected before this entry can be selected. The
- * second field is a set of options which are not allowed with this one. If
- * the fourth field is zero, the option is selected without asking
- * confirmation from the user.
- *
- * With this version of the rule table it is possible to select just one type of
- * hardware.
- *
- * NOTE! Keep the following table and the questions array in sync with the
- * option numbering!
- */
-
-hw_entry hw_table[] =
-{
-/*
- * 0
- */
- {0, 0, "PAS", 1, 0, 0},
- {0, 0, "SB", 1, 0, 0},
- {0, B (OPT_PAS) | B (OPT_SB), "ADLIB", 1, 0, 0},
-
- {0, 0, "GUS", 1, 0, 0},
- {0, 0, "MPU401", 1, 0, 0},
- {0, 0, "UART6850", 1, 0, 0},
- {0, 0, "PSS", 1, 0, 0},
- {B (OPT_GUS), 0, "GUS16", 1, 0, 0},
- {B (OPT_GUS), B (OPT_GUS16), "GUSMAX", 1, 0, 0},
- {0, 0, "MSS", 1, 0, 0},
-
- {B (OPT_SB), B (OPT_PAS), "SBPRO", 1, 0, 1},
- {B (OPT_SB) | B (OPT_SBPRO), B (OPT_PAS), "SB16", 1, 0, 1},
-{B (OPT_PSS) | B (OPT_SB) | B (OPT_PAS) | B (OPT_GUS), 0, "AUDIO", 1, 0, 1},
- {B (OPT_MPU401), 0, "MIDI_AUTO", 0, OPT_MIDI, 0},
- {B (OPT_PSS) | B (OPT_SB) | B (OPT_PAS) | B (OPT_MPU401) | B (OPT_GUS), 0, "MIDI", 1, 0, 1},
- {B (OPT_ADLIB), 0, "YM3812_AUTO", 0, OPT_YM3812, 0},
- {B (OPT_PSS) | B (OPT_SB) | B (OPT_PAS) | B (OPT_ADLIB), B (OPT_YM3812_AUTO), "YM3812", 1, 0, 1},
- {B (OPT_MIDI) | B (OPT_YM3812) | B (OPT_YM3812_AUTO) | B (OPT_GUS), 0, "SEQUENCER", 0, 0, 1}
-};
-
-char *questions[] =
-{
- "ProAudioSpectrum 16 support",
- "SoundBlaster support",
- "AdLib support",
- "Gravis Ultrasound support",
- "MPU-401 support (NOT for SB16)",
- "6850 UART Midi support",
- "PSS (ECHO-ADI2111) support",
- "16 bit sampling option of GUS (_NOT_ GUS MAX)",
- "GUS MAX support",
- "Microsoft Sound System support",
-
- "SoundBlaster Pro support",
- "SoundBlaster 16 support",
- "digitized voice support",
- "This should not be asked",
- "MIDI interface support",
- "This should not be asked",
- "FM synthesizer (YM3812/OPL-3) support",
- "/dev/sequencer support",
- "Should I die"
-};
-
-unsigned long selected_options = 0;
-int sb_dma = 0;
-
-int
-can_select_option (int nr)
-{
- switch (nr)
- {
- case 0:
- fprintf (stderr, "The SoundBlaster, AdLib and ProAudioSpectrum\n"
- "CARDS cannot be installed at the same time.\n\n"
- "However the PAS16 has a SB emulator so you could select"
- "the SoundBlaster DRIVER with it.\n");
- fprintf (stderr, " - ProAudioSpectrum 16\n");
- fprintf (stderr, " - SoundBlaster / SB Pro\n");
- fprintf (stderr, " (Could be selected with a PAS16 also)\n");
- fprintf (stderr, " - AdLib\n");
- fprintf (stderr, "\nDon't enable SoundBlaster if you have GUS at 0x220!\n\n");
- break;
-
- case OPT_LAST_MUTUAL + 1:
- fprintf (stderr, "\nThe following cards should work with any other cards.\n"
- "CAUTION! Don't enable MPU-401 if you don't have it.\n");
- break;
-
- case OPT_HIGHLEVEL:
- fprintf (stderr, "\nSelect one or more of the following options\n");
- break;
-
-
- }
-
- if (hw_table[nr].conditions)
- if (!(hw_table[nr].conditions & selected_options))
- return 0;
-
- if (hw_table[nr].exclusive_options)
- if (hw_table[nr].exclusive_options & selected_options)
- return 0;
-
- if (DISABLED_OPTIONS & B (nr))
- return 0;
-
- return 1;
-}
-
-int
-think_positively (int def_answ)
-{
- char answ[512];
- int len;
-
- if ((len = read (0, &answ, sizeof (answ))) < 1)
- {
- fprintf (stderr, "\n\nERROR! Cannot read stdin\n");
-
- perror ("stdin");
- printf ("#undef CONFIGURE_SOUNDCARD\n");
- printf ("#undef KERNEL_SOUNDCARD\n");
- exit (-1);
- }
-
- if (len < 2) /*
- * There is an additional LF at the end
- */
- return def_answ;
-
- answ[len - 1] = 0;
-
- if (!strcmp (answ, "y") || !strcmp (answ, "Y"))
- return 1;
-
- return 0;
-}
-
-int
-ask_value (char *format, int default_answer)
-{
- char answ[512];
- int len, num;
-
-play_it_again_Sam:
-
- if ((len = read (0, &answ, sizeof (answ))) < 1)
- {
- fprintf (stderr, "\n\nERROR! Cannot read stdin\n");
-
- perror ("stdin");
- printf ("#undef CONFIGURE_SOUNDCARD\n");
- printf ("#undef KERNEL_SOUNDCARD\n");
- exit (-1);
- }
-
- if (len < 2) /*
- * There is an additional LF at the end
- */
- return default_answer;
-
- answ[len - 1] = 0;
-
- if (sscanf (answ, format, &num) != 1)
- {
- fprintf (stderr, "Illegal format. Try again: ");
- goto play_it_again_Sam;
- }
-
- return num;
-}
-
-int
-main (int argc, char *argv[])
-{
- int i, num, def_size, full_driver = 1;
- char answ[10];
-
- printf ("/*\tGenerated by configure. Don't edit!!!!\t*/\n\n");
-
- fprintf (stderr, "\nConfiguring the sound support\n\n");
-
- fprintf (stderr, "Do you want to include full version of the sound driver (n/y) ? ");
-
- if (think_positively (0))
- {
- /*
- * Select all but some most dangerous cards. These cards are difficult to
- * detect reliably or conflict with some other cards (SCSI, Mitsumi)
- */
- selected_options = 0xffffffff &
- ~(B (OPT_MPU401) | B (OPT_UART6850) | B (OPT_PSS)) &
- ~DISABLED_OPTIONS;
-
- fprintf (stderr, "Note! MPU-401, PSS and 6850 UART drivers not enabled\n");
- full_driver = 1;
- }
- else
- {
- fprintf (stderr, "Do you want to DISABLE the Sound Driver (n/y) ?");
- if (think_positively (0))
- {
- printf ("#undef CONFIGURE_SOUNDCARD\n");
- printf ("#undef KERNEL_SOUNDCARD\n");
- exit (0);
- }
- /*
- * Partial driver
- */
-
- full_driver = 0;
-
- for (i = 0; i <= OPT_LAST; i++)
- if (can_select_option (i))
- {
- if (!(selected_options & B (i))) /*
- * Not selected yet
- */
- if (!hw_table[i].verify)
- {
- if (hw_table[i].alias)
- selected_options |= B (hw_table[i].alias);
- else
- selected_options |= B (i);
- }
- else
- {
- int def_answ = hw_table[i].default_answ;
-
- fprintf (stderr,
- def_answ ? " %s (y/n) ? " : " %s (n/y) ? ",
- questions[i]);
- if (think_positively (def_answ))
- if (hw_table[i].alias)
- selected_options |= B (hw_table[i].alias);
- else
- selected_options |= B (i);
- }
- }
- }
-
- if (selected_options & B (OPT_SBPRO))
- {
- fprintf(stderr, "Do you want support for the mixer of SG NX Pro ? ");
- if (think_positively (0))
- printf("#define __SGNXPRO__\n");
- }
-
- if (selected_options & B (OPT_SB16))
- selected_options |= B (OPT_SBPRO);
-
- if (selected_options & B (OPT_PSS))
- {
- genld_again:
- fprintf
- (stderr,
- "if you wish to emulate the soundblaster and you have a DSPxxx.LD.\n"
- "then you must include the LD in the kernel.\n"
- "(do you wish to include a LD) ? ");
- if (think_positively (0))
- {
- char path[512];
-
- fprintf (stderr,
- "Enter the path to your LD file (pwd is sound): ");
- scanf ("%s", path);
- fprintf (stderr, "including LD file %s\n", path);
- selected_options |= B (OPT_SB) | B (OPT_MPU401) | B (OPT_ADLIB);
-
- /* Gen LD header */
- {
- int fd;
- int count;
- char c;
- int i = 0;
-
- if ((fd = open (path, 0)) > 0)
- {
- FILE *sf = fopen ("synth-ld.h", "w");
-
- fprintf (sf, "/* automaticaly generated by configure */\n");
- fprintf (sf, "unsigned char pss_synth[] = {\n");
- while (1)
- {
- count = read (fd, &c, 1);
- if (count == 0)
- break;
- if (i != 0 && (i % 10) == 0)
- fprintf (sf, "\n");
- fprintf (sf, "0x%02x,", c & 0xFFL);
- i++;
- }
- fprintf (sf, "};\n"
- "#define pss_synthLen %d\n", i);
- fclose (sf);
- close (fd);
- }
- else
- {
- fprintf (stderr, "couldn't open %s as the ld file\n",
- path);
- fprintf (stderr, "try again with correct path? ");
- if (think_positively (1))
- goto genld_again;
- }
- }
- }
- else
- {
- FILE *sf = fopen ("synth-ld.h", "w");
-
- fprintf (sf, "/* automaticaly generated by configure */\n");
- fprintf (sf, "unsigned char pss_synth[1];\n"
- "#define pss_synthLen 0\n");
- fclose (sf);
- }
- }
-
- if (!(selected_options & ANY_DEVS))
- {
- printf ("#undef CONFIGURE_SOUNDCARD\n");
- printf ("#undef KERNEL_SOUNDCARD\n");
- fprintf (stderr, "\n*** This combination is useless. Sound driver disabled!!! ***\n\n");
- exit (0);
- }
- else
- printf ("#define KERNEL_SOUNDCARD\n");
-
- for (i = 0; i <= OPT_LAST; i++)
- if (!hw_table[i].alias)
- if (selected_options & B (i))
- printf ("#undef EXCLUDE_%s\n", hw_table[i].macro);
- else
- printf ("#define EXCLUDE_%s\n", hw_table[i].macro);
-
-
- /*
- * IRQ and DMA settings
- */
- printf ("\n");
-
-#if defined(linux)
- if ((selected_options & B (OPT_SB)) && selected_options & (B (OPT_AUDIO) | B (OPT_MIDI)))
- {
- fprintf (stderr, "\nI/O base for SB?\n"
- "The factory default is 220\n"
- "Enter the SB I/O base: ");
-
- num = ask_value ("%x", 0x220);
- fprintf (stderr, "SB I/O base set to %03x\n", num);
- printf ("#define SBC_BASE 0x%03x\n", num);
-
- fprintf (stderr, "\nIRQ number for SoundBlaster?\n"
- "The IRQ address is defined by the jumpers on your card.\n"
- "The factory default is either 5 or 7 (depending on the model).\n"
- "Valid values are 9(=2), 5, 7 and 10.\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 7);
- if (num != 9 && num != 5 && num != 7 && num != 10)
- {
-
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 7;
- }
- fprintf (stderr, "SoundBlaster IRQ set to %d\n", num);
-
- printf ("#define SBC_IRQ %d\n", num);
-
- if (selected_options & (B (OPT_SBPRO) | B (OPT_PAS) | B (OPT_PSS)))
- {
- fprintf (stderr, "\nDMA channel for SoundBlaster?\n"
- "For SB 1.0, 1.5 and 2.0 this MUST be 1\n"
- "SB Pro supports DMA channels 0, 1 and 3 (jumper)\n"
- "For SB16 give the 8 bit DMA# here\n"
- "The default value is 1\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 1);
- if (num < 0 || num > 3)
- {
-
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 1;
- }
- fprintf (stderr, "SoundBlaster DMA set to %d\n", num);
- printf ("#define SBC_DMA %d\n", num);
- sb_dma = num;
- }
-
- if (selected_options & B (OPT_SB16))
- {
-
- fprintf (stderr, "\n16 bit DMA channel for SoundBlaster 16?\n"
- "Possible values are 5, 6 or 7\n"
- "The default value is 6\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 6);
- if ((num < 5 || num > 7) && (num != sb_dma))
- {
-
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 6;
- }
- fprintf (stderr, "SoundBlaster DMA set to %d\n", num);
- printf ("#define SB16_DMA %d\n", num);
-
- fprintf (stderr, "\nI/O base for SB16 Midi?\n"
- "Possible values are 300 and 330\n"
- "The factory default is 330\n"
- "Enter the SB16 Midi I/O base: ");
-
- num = ask_value ("%x", 0x330);
- fprintf (stderr, "SB16 Midi I/O base set to %03x\n", num);
- printf ("#define SB16MIDI_BASE 0x%03x\n", num);
- }
- }
-
- if (selected_options & B (OPT_PAS))
- {
- if (selected_options & (B (OPT_AUDIO) | B (OPT_MIDI)))
- {
- fprintf (stderr, "\nIRQ number for ProAudioSpectrum?\n"
- "The recommended value is the IRQ used under DOS.\n"
- "Please refer to the ProAudioSpectrum User's Guide.\n"
- "The default value is 10.\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 10);
- if (num == 6 || num < 3 || num > 15 || num == 2) /*
- * Illegal
- */
- {
-
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 10;
- }
- fprintf (stderr, "ProAudioSpectrum IRQ set to %d\n", num);
- printf ("#define PAS_IRQ %d\n", num);
- }
-
- if (selected_options & B (OPT_AUDIO))
- {
- fprintf (stderr, "\nDMA number for ProAudioSpectrum?\n"
- "The recommended value is the DMA channel under DOS.\n"
- "Please refer to the ProAudioSpectrum User's Guide.\n"
- "The default value is 3\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 3);
- if (num == 4 || num < 0 || num > 7)
- {
-
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 3;
- }
- fprintf (stderr, "\nProAudioSpectrum DMA set to %d\n", num);
- printf ("#define PAS_DMA %d\n", num);
- }
- }
-
- if (selected_options & B (OPT_GUS))
- {
- fprintf (stderr, "\nI/O base for Gravis Ultrasound?\n"
- "Valid choices are 210, 220, 230, 240, 250 or 260\n"
- "The factory default is 220\n"
- "Enter the GUS I/O base: ");
-
- num = ask_value ("%x", 0x220);
- if ((num > 0x260) || ((num & 0xf0f) != 0x200) || ((num & 0x0f0) > 0x060))
- {
-
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 0x220;
- }
-
- if ((selected_options & B (OPT_SB)) && (num == 0x220))
- {
- fprintf (stderr, "FATAL ERROR!!!!!!!!!!!!!!\n"
- "\t0x220 cannot be used if SoundBlaster is enabled.\n"
- "\tRun the config again.\n");
- printf ("#undef CONFIGURE_SOUNDCARD\n");
- printf ("#undef KERNEL_SOUNDCARD\n");
- exit (-1);
- }
- fprintf (stderr, "GUS I/O base set to %03x\n", num);
- printf ("#define GUS_BASE 0x%03x\n", num);
-
- fprintf (stderr, "\nIRQ number for Gravis UltraSound?\n"
- "The recommended value is the IRQ used under DOS.\n"
- "Please refer to the Gravis Ultrasound User's Guide.\n"
- "The default value is 15.\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 15);
- if (num == 6 || num < 3 || num > 15 || num == 2) /*
- * Invalid
- */
- {
-
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 15;
- }
- fprintf (stderr, "Gravis UltraSound IRQ set to %d\n", num);
- printf ("#define GUS_IRQ %d\n", num);
-
- fprintf (stderr, "\nDMA number for Gravis UltraSound?\n"
- "The recommended value is the DMA channel under DOS.\n"
- "Please refer to the Gravis Ultrasound User's Guide.\n"
- "The default value is 6\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 6);
- if (num == 4 || num < 0 || num > 7)
- {
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 6;
- }
- fprintf (stderr, "\nGravis UltraSound DMA set to %d\n", num);
- printf ("#define GUS_DMA %d\n", num);
- }
-
- if (selected_options & B (OPT_MPU401))
- {
- fprintf (stderr, "\nI/O base for MPU-401?\n"
- "The factory default is 330\n"
- "Enter the MPU-401 I/O base: ");
-
- num = ask_value ("%x", 0x330);
- fprintf (stderr, "MPU-401 I/O base set to %03x\n", num);
- printf ("#define MPU_BASE 0x%03x\n", num);
-
- fprintf (stderr, "\nIRQ number for MPU-401?\n"
- "Valid numbers are: 3, 4, 5, 7 and 9(=2).\n"
- "The default value is 9.\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 9);
- if (num == 6 || num < 3 || num > 15) /*
- * Used for floppy
- */
- {
-
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 5;
- }
- fprintf (stderr, "MPU-401 IRQ set to %d\n", num);
- printf ("#define MPU_IRQ %d\n", num);
- }
-
- if (selected_options & B (OPT_UART6850))
- {
- fprintf (stderr, "\nI/O base for 6850 UART Midi?\n"
- "Be carefull. No defaults.\n"
- "Enter the 6850 UART I/O base: ");
-
- num = ask_value ("%x", 0);
- if (num == 0)
- {
- /*
- * Invalid value entered
- */
- printf ("#define EXCLUDE_UART6850\n");
- }
- else
- {
- fprintf (stderr, "6850 UART I/O base set to %03x\n", num);
- printf ("#define U6850_BASE 0x%03x\n", num);
-
- fprintf (stderr, "\nIRQ number for 6850 UART?\n"
- "Valid numbers are: 3, 4, 5, 7 and 9(=2).\n"
- "The default value is 5.\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 5);
- if (num == 6 || num < 3 || num > 15) /*
- * Used for floppy
- */
- {
-
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 5;
- }
- fprintf (stderr, "6850 UART IRQ set to %d\n", num);
- printf ("#define U6850_IRQ %d\n", num);
- }
- }
-
- if (selected_options & B (OPT_PSS))
- {
- fprintf (stderr, "\nI/O base for PSS?\n"
- "The factory default is 220\n"
- "Enter the PSS I/O base: ");
-
- num = ask_value ("%x", 0x220);
- fprintf (stderr, "PSS I/O base set to %03x\n", num);
- printf ("#define PSS_BASE 0x%03x\n", num);
-
- fprintf (stderr, "\nIRQ number for PSS?\n"
- "Valid numbers are: 3, 4, 5, 7, 9(=2) or 10.\n"
- "The default value is 10.\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 10);
- if (num == 6 || num < 3 || num > 15) /* Used for floppy */
- {
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 7;
- }
- fprintf (stderr, "PSS IRQ set to %d\n", num);
- printf ("#define PSS_IRQ %d\n", num);
-
- fprintf (stderr, "\nDMA number for ECHO-PSS?\n"
- "The default value is 3\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 3);
- if (num == 4 || num < 0 || num > 7)
- {
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 3;
- }
- fprintf (stderr, "\nECHO-PSS DMA set to %d\n", num);
- printf ("#define PSS_DMA %d\n", num);
- }
-
- if (selected_options & B (OPT_MSS))
- {
- fprintf (stderr, "\nI/O base for MSS (MS Sound System)?\n"
- "The factory default is 530\n"
- "Other possible values are 604, E80 or F40\n"
- "Enter the MSS I/O base: ");
-
- num = ask_value ("%x", 0x530);
- fprintf (stderr, "MSS I/O base set to %03x\n", num);
- printf ("#define MSS_BASE 0x%03x\n", num);
-
- fprintf (stderr, "\nIRQ number for MSS?\n"
- "Valid numbers are: 7, 9(=2), 10 and 11.\n"
- "The default value is 10.\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 10);
- if (num == 6 || num < 3 || num > 15) /* Used for floppy */
- {
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 7;
- }
- fprintf (stderr, "MSS IRQ set to %d\n", num);
- printf ("#define MSS_IRQ %d\n", num);
-
- fprintf (stderr, "\nDMA number for MSS?\n"
- "Valid values are 1 and 3 (sometimes 0)"
- "The default value is 3\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 3);
- if (num == 4 || num < 0 || num > 7)
- {
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 3;
- }
- fprintf (stderr, "\nMSS DMA set to %d\n", num);
- printf ("#define MSS_DMA %d\n", num);
- }
-
- if (selected_options & B (OPT_GUS16))
- {
- fprintf (stderr, "\nI/O base for GUS16 (GUS 16 bit sampling option)?\n"
- "The factory default is 530\n"
- "Other possible values are 604, E80 or F40\n"
- "Enter the GUS16 I/O base: ");
-
- num = ask_value ("%x", 0x530);
- fprintf (stderr, "GUS16 I/O base set to %03x\n", num);
- printf ("#define GUS16_BASE 0x%03x\n", num);
-
- fprintf (stderr, "\nIRQ number for GUS16?\n"
- "Valid numbers are: 3, 4, 5, 7, or 9(=2).\n"
- "The default value is 7.\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 7);
- if (num == 6 || num < 3 || num > 15) /* Used for floppy */
- {
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 7;
- }
- fprintf (stderr, "GUS16 IRQ set to %d\n", num);
- printf ("#define GUS16_IRQ %d\n", num);
-
- fprintf (stderr, "\nDMA number for GUS16?\n"
- "The default value is 3\n"
- "Enter the value: ");
-
- num = ask_value ("%d", 3);
- if (num < 0 || num > 3)
- {
- fprintf (stderr, "*** Illegal input! ***\n");
- num = 3;
- }
- fprintf (stderr, "\nGUS16 DMA set to %d\n", num);
- printf ("#define GUS16_DMA %d\n", num);
- }
-#endif
-
- if (selected_options & B (OPT_AUDIO))
- {
- def_size = 16384;
-
- if (selected_options & (B (OPT_SBPRO) | B (OPT_PAS) | B (OPT_SB16)))
- def_size = 32768;
-
-#ifndef __386BSD__
- if ((selected_options & (B (OPT_PAS) | B (OPT_PAS) | B (OPT_GUS16) | B (OPT_GUSMAX) |
- B (OPT_MSS) | B (OPT_PSS))) &&
- !full_driver)
- def_size = 65536; /*
- * PAS16 or SB16
- */
-#endif
-
- fprintf (stderr, "\nSelect the DMA buffer size (4096, 16384, 32768 or 65536 bytes)\n"
- "%d is recommended value for this configuration.\n"
- "Enter the value: ", def_size);
-
- num = ask_value ("%d", def_size);
- if (num != 4096 && num != 16384 && num != 32768 && num != 65536)
- {
-
- fprintf (stderr, "*** Illegal input! ***\n");
- num = def_size;
- }
- fprintf (stderr, "The DMA buffer size set to %d\n", num);
- printf ("#define DSP_BUFFSIZE %d\n", num);
- }
-
- printf ("#define SELECTED_SOUND_OPTIONS\t0x%08x\n", selected_options);
- fprintf (stderr, "The sound driver is now configured.\n");
-
-#if defined(SCO) || defined(ISC) || defined(SYSV)
- fprintf (stderr, "Remember to update the System file\n");
-#endif
-
- exit (0);
-}
OpenPOWER on IntegriCloud