Commit Graph

3887 Commits

Author SHA1 Message Date
Steve Passe
c21701d99b Nuke the printing of the unredirect message unless bootverbose. 1997-05-27 19:28:10 +00:00
Stefan Eßer
9a8979b997 Fix problem introduced in the CMD640 workaround which could lead
to a NULL pointer dereference.

PR:		kern/3696
Submitted by:	Joel.Faedi@esial.u-nancy.fr
1997-05-27 18:28:08 +00:00
Bruce Evans
f79e6ee387 Staticize. 1997-05-27 16:26:39 +00:00
Kazutaka YOKOTA
ea9a5f9bf5 scprobe() referred to the psm_softc structure even after it was
freed ;-<

PR:		kern/3694
1997-05-27 11:55:41 +00:00
Stefan Eßer
b3daa02e72 Yet another fix for configuration mechanism 1 register accesses:
Adjust the data port address by adding the two low order bits of
the register number. The address port takes only a word address
(i.e. ignores the two low order bits written to it).
1997-05-26 21:52:41 +00:00
Stefan Eßer
64039d403f Fix previous fix: The enable bit is bit 31 (0x8000000) and not bit 15. 1997-05-26 21:25:24 +00:00
Stefan Eßer
e0c57a9615 Set enable bit when writing the configuration address in configuration
mode 1. Omission of this bit makes all config register accesses fail in
on recent chip sets ...

(The problem was reported and debug output provided by: Steve Passe)
1997-05-26 21:11:05 +00:00
Steve Passe
c4ed75ce19 Fix breakage from my last commit where mp_start() was missing from UP builds. 1997-05-26 18:40:45 +00:00
Steve Passe
694f6724f1 Changed inclusion of isa/icu.s to isa/ipl.s.
This is part of the breakup of UP/SMP specific INTerrupt code.
1997-05-26 18:00:34 +00:00
Steve Passe
81c1993f87 Split vector.s into UP and SMP specific files:
- vector.s		<- stub called by i386/exception.s
 - icu_vector.s		<- UP
 - apic_vector.s	<- SMP

Split icu.s into UP and SMP specific files:
 - ipl.s		<- stub called by i386/exception.s (formerly icu.s)
 - icu_ipl.s		<- UP
 - apic_ipl.s		<- SMP

This was done in preparation for massive changes to the SMP INTerrupt
mechanisms.  More fine tuning, such as merging ipl.s into exception.s,
may be appropriate.
1997-05-26 17:58:27 +00:00
Stefan Eßer
5bec615793 Completely replace the PCI bus driver code to make it better reflect
reality. There will be a new call interface, but for now the file
pci_compat.c (which is to be deleted, after all drivers are converted)
provides an emulation of the old PCI bus driver functions. The only
change that might be visible to drivers is, that the type pcici_t
(which had been meant to be just a handle, whose exact definition
should not be relied on), has been converted into a pcicfgregs* .

The Tekram AMD SCSI driver bogusly relied on the definition of pcici_t
and has been converted to just call the PCI drivers functions to access
configuration space register, instead of inventing its own ...

This code is by no means complete, but assumed to be fully operational,
and brings the official code base more in line with my development code.

A new generic device descriptor data type has to be agreed on. The PCI
code will then use that data type to provide new functionality:

1) userconfig support
2) "wired" PCI devices
3) conflicts checking against ISA/EISA
4) maps will depend on the command register enable bits
5) PCI to Anything bridges can be defined as devices,
   and are probed like any "standard" PCI device.

The following features are currently missing, but will be added back,
soon:

1) unknown device probe message
2) suppression of "mirrored" devices caused by ancient, broken chip-sets

This code relies on generic shared interrupt support just commited to
kern_intr.c (plus the modifications of isa.c and isa_device.h).
1997-05-26 15:08:43 +00:00
Stefan Eßer
4c9340d45c Add support for shared interrupts to the kernel. This code is meant
be (eventually) architecture independent. It provides an emulation
of the ISA interrupt registration function register_intr(), but that
function does no longer manipulated the interrupt controller and
interrupt descriptor table, but calls the architecture dependent
function setup_icu() for that purpose.

After the ISA/EISA bus code has been modified to directly call the new
interrupt registartion functions (intr_create() and intr_connect()),
the emulation of register_intr() should be dropped.

The C level interrupt handler function should take a (void*) argument,
and the function pointer type (inthand2_t) should defined in some  other
place than isa_device.h.

This commit is a pre-requisite for the removal of the PCI specific shared
interrupt code.

Reviewed by:    dfr,bde
1997-05-26 14:42:24 +00:00
Steve Passe
1ffa54ef38 Added a test called 'LATE_START'.
This is now the default, it delays most of the MP startup to the function
machdep.c:cpu_startup().  It should be possible to move the 2 functions
found there (mp_start() & mp_announce()) even further down the path once
we know exactly where that should be...

Help from: Peter Wemm <peter@spinner.dialix.com.au>
1997-05-26 09:23:30 +00:00
Steve Passe
f7ef1c65a1 Removed global hwisrs, replacing it with vec (formerly static to icu.s). 1997-05-25 16:58:03 +00:00
Steve Passe
383243e687 Made the array vec[] a global.
This allows the APIC code to reorder the vectors at runtime.
1997-05-25 16:55:26 +00:00
Peter Wemm
2321ce34c1 uncomment wl again now that it compiles... 1997-05-25 07:18:22 +00:00
Peter Wemm
4c728676b7 Make the multicast code compile under -current. This has not been reviewed
or tested yet.  Mike may want to make some adjustments.
1997-05-25 07:17:02 +00:00
Peter Wemm
cee77949ec Fix(?) two volatile cast warnings. The buffer is volatile within the
function so as to avoid compiler side effects, but functions calling it
shouldn't be affected (gcc shouldn't cache memory scope past a function
call)
1997-05-25 04:13:27 +00:00
Peter Wemm
70117bbefd match the #include opt_ file with options.i386 (it has opt_wavelan.h) 1997-05-25 04:04:20 +00:00
Steve Passe
45fedb144d Broke up parse_mp_table() into 2 passes:
- The 1st (preparse_mp_table()) counts the number of cpus, busses, etc. and
   records the LOCAL and IO APIC addresses.
 - The 2nd pass (parse_mp_table()) does the actual parsing of info and recording
   into the incore MP table.

This will allow us to defer the 2nd pass untill malloc() & private pages
are available (but thats for another day!).
1997-05-25 02:49:03 +00:00
Steve Passe
a2e4067731 Minor cleanup.
Comment about expanded use of NAPICIDS.
Change default NINTR from 64 to 48.
1997-05-25 02:43:42 +00:00
Steve Passe
2515353993 Delay mp_start() till after the msgbuf is mapped. We really want to delay
it till even later but tss setup prevents that right now...
1997-05-24 18:59:02 +00:00
Steve Passe
7f6c65fa06 Now that panic() is properly printing messages for early SMP panics all
the 'printf("..."); panic("\n")' sections are returned to 'panic("...")'.
1997-05-24 18:48:53 +00:00
Peter Wemm
e83d2f266d The wavelan driver doesn't even compile! 1997-05-24 12:23:44 +00:00
Søren Schmidt
4aab40db6c Fix support for the Hitachi CDR7730 IDE cdrom drive.
Patch from pr1730.
Tested on our IDE cdrom drive farm...
1997-05-23 16:22:04 +00:00
Philippe Charnier
f29fffef82 typo (Cyirx -> Cyrix). 1997-05-23 06:22:47 +00:00
Steve Passe
89921bb594 Convert all:
panic( "xxxxx\n" );

to:
 printf( "xxxxx\n" );
 panic( "\n" );

For some as yet undetermined reason the argument to panic() is often NOT
printed, and the system sometimes hangs before reaching the panic printout.
So we hopefully at least print some useful info before the hang, as oppossed to
leaving the user clueless as to what has happened.
1997-05-22 22:35:42 +00:00
Steve Passe
27584cebe0 Make the default for NINTR really large (ie 64).
We just ran across one with 38+ entries.
1997-05-22 22:04:45 +00:00
Mike Smith
4eb256367e Add 'wl' Wavelan driver.
Obtained from:	Jim Binkley <jrb@cs.pdx.edu>
1997-05-22 08:50:14 +00:00
Mike Smith
98d46ad0c9 Add the 'wl' ISA Wavelan driver.
Obtained from:	Jim Binkley <jrb@cs.pdx.edu>
1997-05-22 08:47:40 +00:00
John Polstra
61b005296f This commit affects ELF kernels only.
Remove "setdefs.h" and arrange to generate it automatically at
ELF kernel build time.

"gensetdefs.c" is a utility which scans a set of ELF object files
and outputs a line ``DEFINE_SET(name, length);'' for each linker
set that it finds.  When generating an ELF kernel, this is run just
before the final link to generate "setdefs.h".

Remove the init_sets() function from "setdef0.c", and its call from
"machdep.c".  Since "gensetdefs.c" calculates the length of each
set, it is no longer necessary in an ELF kernel to count the set
elements at kernel initialization time.  Also remove "set_of_sets"
which was used for this purpose.

Link "setdef0" and "setdef1" into the kernel only if building for
ELF.  Since init_sets() is no longer used, there is no need to link
them into an a.out kernel.
1997-05-21 23:21:30 +00:00
John Polstra
5851a3655a Fill out the ELF header files to make them more or less complete.
Fix a macro name that was misspelled both in brandelf.c and
imgact_elf.h.
1997-05-21 23:07:31 +00:00
John Polstra
9e86cdb740 Add new C global names also referenced from assembly language.
These mostly came from the addition of SMP support.
1997-05-21 22:56:59 +00:00
John Polstra
713da3ed8b Make setbits() SMP-safe. Eliminate the SETBITS() macro, and replace
all uses of it with the equivalent calls to setbits().

This change incidentally eliminates a problem building ELF kernels
that was caused by SETBITS.

Reviewed by:	fsmp, peter
Submitted by:	bde
1997-05-21 22:56:05 +00:00
Justin T. Gibbs
cc80aa3972 Several bug fixes for the ee16 support from Richard Straka:
1) Adjust NFRAMES from 16 to 8 per 16k of memory.
2) Acknowledge interrupts to the card early in the interrupt
   handler before processing the event that caused the interrupt.
   This frees the card to process addtional events instead of
   waiting for the driver to finish handling events.
3) Changed the initialization of the transmit buffers to be a
   loop so that the number of buffers can be more easily changed.
4) Moved the code to take the adapter out of loop back mode to just
   before we enable the receiver.

I also made the driver dynamically size its resource arrays at attach
time so that we can take full advantage of adapters with more than 16k
of memory.

Richard has some other changes he's working on to improve performance,
but this should get ee16 support working reliably again.

Thanks to Wes Santee <wes@bogon.net> for testing these patches.

Submitted by: Richard Straka <straka@user1.inficad.com>
1997-05-21 18:26:09 +00:00
Joerg Wunsch
00081cc989 Major overhaul of the SyncPPP layer. Basically, this comprises now a
full implementation of the sate machine as described in RFC1661, and
provides support for plugging in various control protocols.  I needed
this to provide PPP support for the BISDN project (right now).

Unfortunatley, while the existing API was almost up to the point, i
needed one minor API change in order to decouple the this-layer-
started and this-layer-finished actions from the respective Up and
Down events of the lower layer.  This requires two additional lines in
the attach routines of all existing lower layer interface drivers that
are using syncPPP (shortcutting these actions and events).  Apart from
this, i believe i didn't change the API of all this, so everything
should plug in without too many hassles.  Please report if i broke
something in the existing drivers.

For a list of features (including new ones like dial-on-demand), and
things still to be done, please refer to the man page i'll commit asap.

Encouraged by:	Serge Vakulenko <vak@cronyx.ru>
1997-05-19 22:03:09 +00:00
KATO Takenori
0f5ccb66e4 Recognize AMD 486 CPUs. 1997-05-19 12:41:35 +00:00
Poul-Henning Kamp
468d825d86 Whoops, missed a zero there. Flags 0x10000 it is. 1997-05-18 21:22:11 +00:00
Poul-Henning Kamp
e12ca851a6 Flags 0x1000 on sio now disables the dreaded test#3.
PR:		3395
1997-05-18 21:19:04 +00:00
Poul-Henning Kamp
8463cf03a9 Detect various supersets of 16550A based on fifo depth.
PR:		i386/3523
Reviewed by:	phk
Submitted by:	vak@cronyx.ru
1997-05-18 20:53:52 +00:00
Bruce Evans
906265bada Removed some useless code:
- gcc assumes that %ecx and %edx are clobbered (due to calling
  conventions), thus there is no need for saving/restoring those two
  registers.
- %es is reset to default value by real_to_prot, thus there is no need
  for saving/restorig that register.
Submitted by:	tegge
1997-05-16 10:40:00 +00:00
Tor Egge
7783c29bb1 Ignore the supplied nfs_diskless structure from the bootstrap loader
if we want to use NFS v3 to mount root and swap.
1997-05-15 19:12:56 +00:00
Tor Egge
b262c3b12b Update netboot manual page.
Submitted by:	Luigi Rizzo <luigi@iet.unipi.it>
1997-05-15 19:04:33 +00:00
Kazutaka YOKOTA
3ef626ecd5 1) font loading (two fixes)
When an ioctl command SW_XXXX is issued, scioctl() checks if the font
appropriate for the specified mode is already loaded.  The check was
correctly done for 8 line and 16 line fonts, but not for 14 line font.

The symbols FONT_8, FONT_14 and FONT_16 were defined as numbers but
were sometimes treated as bit flags. They are now defined as bit
flags.

2) screen blinking (two fixes)

Removed a redundant call to timeout() in do_bell().

Don't let blink_screen() write to the video buffer if the screen is in
the graphics (UNKNOWN) mode.

3) screen saver timeout

The ioctl command CONS_BLANKTIME sets the screen saver's timeout.  The
value of zero will disable the screen saver. If the screen saver is
currently running it should be stopped.

4) border color and destructive cursor (two fixes)

The border color and the cursor type can be changed via escape
sequences.  But only VGA can change the border color and set the
cursor type to destructive (CHAR_CURSOR) in the current syscons.
scan_esc() failed to check this.

Reviewed by:	sos
1997-05-15 05:43:59 +00:00
Tor Egge
f811abf08c Bring in some improved bootp support for netboot submitted by Luigi:
- TFTP is not needed any longer.
Add some other improvements:
      - swapsize is now detected if no value was specified.
      - resvport is used by default
      - merged code for setting/showing mount options for root/swap.
Submitted by:   Luigi Rizzo <luigi@labinfo.iet.unipi.it>
1997-05-14 02:44:27 +00:00
Satoshi Asami
b1671e460a Add ${CFLAGS} to makerom command line. Note: don't add ${LDFLAGS} here,
it has a bunch of extra stuff defined above.

While I'm here, change "$(CFLAGS)" to "${CFLAGS}" to make all the rules
uniform.
1997-05-13 06:23:21 +00:00
Tor Egge
472ac7f0bd save/restore %ebx, %esi and %edi when calling bios routines.
Don't save/restore %ecx and %edx.
Reset segment limits when going to real mode.
Reviewed by:	phk (briefly)
1997-05-12 23:00:32 +00:00
Andreas Klemm
99f962423c - fixed typo
- merged SMP option SMP_AUTOSTART from LINT
- enabled SMP_AUTOSTART, since it's the desired working mode and it's
  reported to work now.
PR:
Reviewed by:
Submitted by:
Obtained from:
1997-05-11 19:01:24 +00:00
Tor Egge
432aad0e98 Bring in some kernel bootp support. This removes the need for netboot
to fill in the nfs_diskless structure, at the cost of some kernel
bloat. The advantage is that this code works on a wider range of
network adapters than netboot. Several new kernel options are
documented in LINT.
Obtained from: parts of the code comes from NetBSD.
1997-05-11 18:05:39 +00:00
Bruce Evans
b8dbeb6b4d Fixed initialization of ldt[]. Unused entries were garbage. A comment
was stale.

Fixed initialization of gdt[] for the BDE_DEBUGGER case.  APM entries
clobbered debugger entries if the debugger was loaded (APM is incompatible
with BDE_DEBUGGER) and unused entries were garbage if the debugger wasn't
loaded.
1997-05-11 12:39:43 +00:00