Commit Graph

4333 Commits

Author SHA1 Message Date
Steve Passe 4e914a7eb7 Tighten up asm code for EOI access. 1997-07-15 02:49:21 +00:00
Steve Passe 4d29853614 New defines to eliminate "magic numbers" in various places. 1997-07-15 02:47:54 +00:00
Kazutaka YOKOTA 99ec86e438 scgetc() referred to `spcl' in different ways when a key is pressed
and released.  It should use `spcl' consistently in both cases,
otherwise shift/control/alt state may not be correctly set/reset.

(Even with this fix, you can still make syscons confused and fail to
change internal state if you really want to, by installing a really
arcane and artificial keymap.)

PR: i386/4030
Reviewed by: sos
1997-07-14 03:36:50 +00:00
Bruce Evans c3ed6aa9cd Added CPU_DIRECT_MAPPED_CACHE. 1997-07-13 15:26:54 +00:00
Bruce Evans 5f0539ec6c Saved a few bytes by omitting frame pointers, using byte-sized
instructions more (many cases were already intended to be byte-sized
but were missing prefixes so gas assembled them bogusly), and
rearranging a loop to test at the end.
1997-07-13 15:24:15 +00:00
Steve Passe 7503ccc1c8 new code to control other CPUs: stop_cpus()/restart_cpus()/_Xstopcpu
this code is controlled by smptests.h: TEST_CPUSTOP, OFF by default

new code for handling mixed-mode 8259/APIC programming without 'ExtInt'
this code is controlled by smptests.h: TEST_ALTTIMER, ON by default
1997-07-13 01:22:48 +00:00
Steve Passe c064ef9175 Cleanup old stop_cpus/restart_cpus() cruft.
new code for handling mixed-mode 8259/APIC programming without 'ExtInt'
new code to control other CPUs: stop_cpus()/restart_cpus()/_Xstopcpu
1997-07-13 01:18:51 +00:00
Steve Passe c5f838abdb Many new test defines, including:
- TEST_CPUSTOP		adds stop_cpus()/restart_cpus(), OFF by default
 - TEST_ALTTIMER	new method for attaching 8259 PIC to APIC
			this method avoids 'ExtInt' programming, ON by default
 - TIMER_ALL		sends 8259/8254 timer INTs to all CPUs, ON by default
 - ASMPOSTCODExxx	code to display bytes to POST hardware, OFF by default
1997-07-13 01:15:30 +00:00
Joerg Wunsch f88ef34060 Make this compile again under -current. The modifications to io.c
and bios.S were small enough and have been merged back into their
respective files in biosboot/, conditionalized on CDBOOT.  Other
files might be merged at a later stage.

Caveat emptor: i cannot test this right now.
1997-07-12 10:23:31 +00:00
Joerg Wunsch c38b4f3b91 (Part #2, after the Internet link broke totally yesterday.)
This is the long-threatened ISO 9660 CD-ROM bootstrap code.

This work has been sponsored by Plutotech International, Inc (who paid
the initial work), and interface business GmbH (where i did most of
the work).  A big thanks also goes to Bruce Evans, for his continuing
help and answering my stupid questions.

The code is basically functioning, with the following caveats:

. Rock Ridge attributes are not yet supported.
. Only SCSI CD-ROMs are supported, since i fail to see any possibility
  to determine the drive type using BIOS functions.  (Even for hard disks,
  this determination is done by a big hack only.)
. El Torito specifies a lot of crap and useless misfeatures, but crucial
  things like the ability to figure out the CD TOC have been ``forgotten''.
  Thus, if you wanna boot a multisession CD, you need to know at which CD
  block your session starts, and need to speciffy it using the @ clause.

. None of the CD-ROM controllers i've seen so far implements the full
  El Torito specification at all.  Adaptec is probably the closest, but
  they miss on non-emulation booting (which would be the most logical
  choice for us).  Thus, the current code bloats the 7.5 KB boot code
  up to 1.44 MB, in order to fake a `floppy' image.

  If you wanna use it, specify this file as the boot image on the
  command-line of the mksiosfs command (option -b).

  Caveat emptor: some versions of the Adaptec BIOS might even fail to
  access the CD-ROM at all, using the BIOS functions.  I think i've
  notice this for ver 1.26, the code has been tested with ver 1.23.

The boot string is as follows:

        [@sess-start] [filename] [-flags]

sess-start      Extend # where the last session starts, measured in
                CD-ROM blocks.

filename        As usual, but the input is case-insensitive by now
                (since we  don't grok RR anyway).

flags           As usual, but -C (use CDROM root f/s) is default, so
                specifying -C will decactivate this option (which is
                probably not what you want :).

A lot of cleanup work is probably required, and some of the files
could/should be merged back to biosboot, perhaps made conditional on
some #ifdef.  The malloc implementation that comes with cdboot might
also be useful for kzipboot.  (I needed a malloc() since the root dir
ain't fixed in size on a CD.)

I've been testing all this with a 2.2-STABLE as the base for biosboot.
I don't expect too many surprises, although i know the biosboot stuff
has been changed a lot in -current lately.  I'm sure Bruce will
comment on all this here anyway. :-)
1997-07-11 05:52:41 +00:00
Joerg Wunsch 5ee8126ec8 This is the long-threatened ISO 9660 CD-ROM bootstrap code.
This work has been sponsored by Plutotech International, Inc (who paid
the initial work), and interface business GmbH (where i did most of
the work).  A big thanks also goes to Bruce Evans, for his continuing
help and answering my stupid questions.

The code is basically functioning, with the following caveats:

. Rock Ridge attributes are not yet supported.
. Only SCSI CD-ROMs are supported, since i fail to see any possibility
  to determine the drive type using BIOS functions.  (Even for hard disks,
  this determination is done by a big hack only.)
. El Torito specifies a lot of crap and useless misfeatures, but crucial
  things like the ability to figure out the CD TOC have been ``forgotten''.
  Thus, if you wanna boot a multisession CD, you need to know at which CD
  block your session starts, and need to speciffy it using the @ clause.

. None of the CD-ROM controllers i've seen so far implements the full
  El Torito specification at all.  Adaptec is probably the closest, but
  they miss on non-emulation booting (which would be the most logical
  choice for us).  Thus, the current code bloats the 7.5 KB boot code
  up to 1.44 MB, in order to fake a `floppy' image.

  If you wanna use it, specify this file as the boot image on the
  command-line of the mksiosfs command (option -b).

  Caveat emptor: some versions of the Adaptec BIOS might even fail to
  access the CD-ROM at all, using the BIOS functions.  I think i've
  notice this for ver 1.26, the code has been tested with ver 1.23.

The boot string is as follows:

	[@sess-start] [filename] [-flags]

sess-start	Extend # where the last session starts, measured in
		CD-ROM blocks.

filename	As usual, but the input is case-insensitive by now
		(since we  don't grok RR anyway).

flags		As usual, but -C (use CDROM root f/s) is default, so
		specifying -C will decactivate this option (which is
		probably not what you want :).

A lot of cleanup work is probably required, and some of the files
could/should be merged back to biosboot, perhaps made conditional on
some #ifdef.  The malloc implementation that comes with cdboot might
also be useful for kzipboot.  (I needed a malloc() since the root dir
ain't fixed in size on a CD.)

I've been testing all this with a 2.2-STABLE as the base for biosboot.
I don't expect too many surprises, although i know the biosboot stuff
has been changed a lot in -current lately.  I'm sure Bruce will
comment on all this here anyway. :-)
1997-07-10 21:58:43 +00:00
Andrey A. Chernov d80e841377 Back out my changes with 'conflicts' keyword for IRQs,
sounddriver fixed now.
1997-07-09 17:58:16 +00:00
Brian Somers b73937137c Don't allow CONS_HISTORY ioctl to alter history pointers
while in "scroll mode" (return EBUSY).
Suggested by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1997-07-09 14:10:19 +00:00
Steve Passe 9e3d5ec0b6 Screwed up again, gotta remember to turn off those debugs! 1997-07-09 05:00:47 +00:00
Steve Passe 17ebd4d085 General cleanup of APIC code.
stop_cpus()/restart_cpus() STILL not working!
1997-07-08 23:46:00 +00:00
Steve Passe afade3007a Minor cleanup of APIC code. 1997-07-08 23:42:02 +00:00
Steve Passe e94543eef4 added #define IPI_LEVEL 1997-07-08 23:39:02 +00:00
Steve Passe ad2e8ff493 General cleanup of APIC code.
stop_cpus/restart_cpus STILL not working!
1997-07-08 23:32:58 +00:00
Andrey A. Chernov 29a4cf6d4d Remove 'conflicts' keyword from SB family devices, it is not
needed now. Uncomment awe0 device
1997-07-08 15:39:29 +00:00
Andrey A. Chernov 5fe7f59b19 Don't pass configured information back to ISA for this subdevices,
it cause conflicts
1997-07-08 15:35:28 +00:00
Brian Somers 5d20d6843c Remove useless comparison.
Suggested by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1997-07-08 13:38:58 +00:00
Steve Passe 791d2c2871 ifdef a TEST_CPUSTOP debug properly.
Submitted by:	 Kenneth Merry <ken@plutotech.com>
1997-07-07 16:34:22 +00:00
Brian Somers b43f9ca153 YAMF2.2: Handle indirect results of "kbdcontrol -h X"
where X < 25.
1997-07-07 13:42:42 +00:00
Steve Passe f055ec14b3 Opps, forgot to turn off the debugs... 1997-07-07 00:38:58 +00:00
Steve Passe 9746742be0 stop_cpus(), currently BROKEN! (turned off in smptests.h by default).
restart_cpus(), currently BROKEN! (turned off in smptests.h by default).
1997-07-07 00:06:51 +00:00
Steve Passe a9f5bd327a Preliminary support for Xspuriousint.
Preliminary support for stopcpus()/restartcpus().
1997-07-06 23:59:31 +00:00
Steve Passe 586f21e1cc Added some (temporary) macros for debugging.
New strategy for handling the TPR (Task Priority Register).
Test code to sync CPUs.
1997-07-06 23:50:12 +00:00
Steve Passe 69f0a823b2 Additional debugging functions and macros.
"spurious INTerrupt" support.
1997-07-06 23:40:15 +00:00
Steve Passe b956b5370c First cut at code for handling "spurious INTerrupts".
First cut at code for handling CPU stop/restart.

Notes:
	not working properly yet.
1997-07-06 23:32:38 +00:00
Steve Passe e154505673 #ifdef out debug for now... 1997-07-06 23:25:46 +00:00
Steve Passe 01bd6212ca Added a hook for a "spurious INTerrupt handler". 1997-07-06 22:11:26 +00:00
Bruce Evans 080cec3cc4 Fixed description of -cv. 1997-07-05 02:08:09 +00:00
Bruce Evans 057b294dc0 Un-inline a call to spl0(). It is not time critical, and was only inline
because there was no non-inline spl0() to call.

Don't frob intr_nesting_level in idle() or cpu_switch().  Interrupts
are mostly disabled then, so the frobbing had little effect.
1997-07-01 01:34:30 +00:00
Bruce Evans b563e748a9 Added ifdefs so that this compiles when neither I586_CPU nor I586_CPU
is defined, or SMP is defined.  It is silly to configure PERFMON when
it can't work (it will be disabled at runtime), but I like to leave
the PERFMON configuration alone when I temporarily disable support for
modern CPUs to run regression tests.

Removed an unused #include.
1997-07-01 01:18:38 +00:00
Bruce Evans dc514523a7 Un-inline a call to spl0(). It is not time critical, and was only inline
because there was no non-inline spl0() to call.
1997-07-01 01:02:03 +00:00
Bruce Evans be69522eec Some staticized variables were still declared to be extern. 1997-07-01 00:54:37 +00:00
Bruce Evans 43a6378726 Removed extra definition of constty. It is defined in subr_prf.c. 1997-07-01 00:52:37 +00:00
Bruce Evans 48792cfc18 Don't cast function pointers to (void *). This will cause warnings.
They should be fixed when similar warnings for the general interrupt
attach routines are fixed.

Removed unused #include.
1997-07-01 00:45:45 +00:00
Bruce Evans 72ef571982 Don't depend <machine/cpufunc.h> including <sys/types.h>. 1997-07-01 00:29:33 +00:00
Bruce Evans a24a66635c Don't depend on gcc's feature of permitting labels that aren't followed
by a statement.
1997-07-01 00:22:51 +00:00
Bruce Evans 06daa05136 Enabled some SMP options. LINT is for testing that all code compiles
cleanly, so only negative options should be commented out.  Options
should have non-default values.
1997-07-01 00:14:39 +00:00
Kazutaka YOKOTA 5d3b146552 options.i386:
- Added the psm options PSM_HOOKAPM and PSM_RESETAFTERSUSPEND.

LINT:
- Added the psm options PSM_HOOKAPM and PSM_RESETAFTERSUSPEND.
- Added comments on the flag 0x20 for syscons.
- Clarified descriptions on the flags (0x02, 0x04) regarding the cursor
  shape in syscons.
1997-06-30 14:37:43 +00:00
Kazutaka YOKOTA ac4c944d67 Fixes annoying behavior and a bug regarding the destructive
cursor (CHAR_CURSOR)

1. Reduced the number of calls to set_destructive_cursor().  The
destructive cursor produced noticeable overhead on the system.  It was
caused by draw_cursor_image() calling set_destructive_cursor() every
so often.

set_destructive_cursor() absolutely needs to be called when

a) the character code under the cursor has changed either because
   the cursor moved or because the screen was updated or the mouse
   pointer overlapped the cursor.
b) Or a new font has been loaded,
c) or the video mode has been changed,
d) or the cursor shape has been changed,
e) or the user switched virtual consoles.

2. Turn off the configuration flag CHAR_CURSOR (destructive cursor) in
scattach() if we have a non-VGA card.  The destructive cursor works
only for VGA.

3. Removed redundant calls to set_destructive_cursor() in some places.

4. Fixed the "disappearing mouse pointer" problem. The mouse pointer
looked hidden under the destructive cursor when it overlaped the cursor.

A slightly different version of the patch was reviewd and OKed by
sos and ache.
1997-06-30 13:31:49 +00:00
Kazutaka YOKOTA bf3c452e20 Add experimental APM support for some laptops.
If the configuration option PSM_HOOKAPM is defined and the APM device
is available, the psm driver will issue the ENABLE command to the
pointing device at the resume APM event if the device was open when
the system went into suspended mode. If the option
PSM_RESETAFTERSUSPEND is specified in addition to PSM_HOOKAPM, the
driver will try to reset the pointing device before sending the
ENABLE command.

Built-in PS/2-type pointing devices in some laptops (all the reports I
heard were about Toshiba models) sometimes don't work immediately
after the system is resumed. The device MAY become available after a
while. The system may exhibit the same symptom in other OS's too
(no, FreeBSD is not the only OS that is suffering :-).

I don't know the correct way of solving this yet, but it's been
reported that issuing the ENABLE command after resumption wakes up the
pointing device.

Without PSM_HOOKAPM, the psm driver behaves in the same way as before.

Problem reported in the bsd-nomads mailing list in Japan.
1997-06-30 12:52:57 +00:00
Andrey A. Chernov 32721aad4f dev->id_flags --> flags
(not compiles otherwise)
1997-06-29 22:23:32 +00:00
Bruce Evans 1013a13daf Fixed the fix for not using -fomit-frame-pointer with -pg. The previous
fix stopped it being used in all cases, because substitution on unset
variables does not work.

When profiling, put -malign-functions=4 in CFLAGS instead of in PROF.
This fixes the histogram counts for profiling support functions.  It
gives bogus but harmless extra alignment for genassym etc.
1997-06-29 16:39:11 +00:00
Kazutaka YOKOTA a2fc20d086 A fix/work-around for ThinkPad 535.
Add a new configuration flag, KBD_NORESET (0x20) to tell scprobe() not
to reset the keyboard.

IBM ThinkPad 535 has the `Fn' key with which the user can perform
certain functions in conjunction with other keys. For example, `Fn' +
PageUP/PageDOWN adjust speaker volume, `Fn' + Home/End change
brightness of LCD screen. It can also be used to suspend the system.

It appears that these functions are implemented at the keyboard level
or the keyboard controller level and totally independent from BIOS or
OS.  But, if the keyboard is reset (as is done in scprobe()), they
become unavailable.  (There are other laptops which have similar
functions associated with the `Fn' key. But, they aren't affected by
keyboard reset.)

ThinkPad 535 doesn't have switches or buttons to adjust brightness and
volume, or to put the system into the suspend mode. Therefore, it is
essential to preserve these `Fn' key functions in FreeBSD. The new
flag make scprobe() skip keyboard reset.

If this flag is not set, scprobe() behaves in the same say as before.

(If we only knew a way to detect ThinkPad 535, we could skip keyboard
reset automatically, but...)
1997-06-29 15:11:40 +00:00
Steve Passe 58db75841d apic_vector.s:
- added Xcpustop IPI code to support stop_cpus()/restart_cpus().
   it is off by default, enable via smptests.h:TEST_CPUSTOP

intr_machdep.h:
 - moved +ICULEN to lower level.
 - added entry for Xcpustop.
1997-06-27 23:48:05 +00:00
Steve Passe b7f7f066f6 Added POST code output to various points of the startup code.
General cleanup.

New functions to stop/start CPUs via IPIs:

 - int stop_cpus( u_int map );
 - int restart_cpus( u_int map );

Turned off by default, enabled via smptests.h:TEST_CPUSTOP.
Current version has a BUG, perhaps a deadlock?
1997-06-27 23:33:17 +00:00
Steve Passe b1c3894d1b Experimental calls to stop_cpus()/restart_cpus() within breakpoint calls.
Turned off by default in smptests.h.
1997-06-27 23:24:38 +00:00
Steve Passe 3984ec7e1f Added other_cpus to CPU private page.
This variable is a bitmap showing all CPUs present EXCEPT the CPU
owning the variable.  In other words, it is equal to the global bitmap
'all_cpus' minus its own bit.
1997-06-27 23:19:43 +00:00
Steve Passe 734d28f8dd Preliminaries for stop_cpus()/restart_cpus().
Both are turned off by default.

Added macro for displaying POST codes from kernel.
1997-06-27 23:12:31 +00:00
Steve Passe 4ef5e4e12c Program lint1 to handle NMIs.
Till now NMIs would be ignored.  Now an NMI is caught by the BSP.
APs still ignore NMI, am working on code to allow a CPU to stop other CPUs
via an IPI.
1997-06-27 22:27:18 +00:00
Steve Passe 0eaccbadd9 Added fields to the LVT1/2 group. 1997-06-27 22:13:50 +00:00
Justin T. Gibbs d144ffea1f Modify my copyright notice to allow the sequencer to be used with GPLed
software (aka Linux).
1997-06-27 19:39:34 +00:00
Justin T. Gibbs 374114db56 KNF cleanup. 1997-06-27 19:36:27 +00:00
Steve Passe 0eb9918b17 Removed '#include <machine/smptests.h>' line, no longer needed. 1997-06-27 18:29:55 +00:00
KATO Takenori 4962d93866 Added CPU_DIRECT_MAPPED_CACHE option which sets L1 cache in direct
mapped mode on Cyrix 486DLC box.
1997-06-27 13:46:19 +00:00
Tor Egge b672570754 Back out a bad commit. 1997-06-26 02:04:34 +00:00
Steve Passe 8b16756603 Merged/renamed functions:
- get_isa_apic_mask() -> isa_apic_mask()
 - get_isa_apic_irq() && get_eisa_apic_irq() -> isa_apic_pin()
 - get_pci_apic_irq() -> pci_apic_pin()
1997-06-25 21:01:52 +00:00
Steve Passe 293f18dbbf Modified to use merged/renamed functions:
- get_isa_apic_mask() -> isa_apic_mask()
 - get_isa_apic_irq() && get_eisa_apic_irq() -> isa_apic_pin()
1997-06-25 21:00:00 +00:00
Steve Passe 89e4e0c098 Modified to declare merged/renamed functions:
- get_isa_apic_mask() -> isa_apic_mask()
 - get_isa_apic_irq() && get_eisa_apic_irq() -> isa_apic_pin()
 - get_pci_apic_irq() -> pci_apic_pin()
1997-06-25 20:59:15 +00:00
Tor Egge 7bcc0f3d66 Allow the kernel configuration file to override the amount of memory
available to the kernel (VM_KMEM_SIZE). The default (32 MB) is too low
when having 512 MB or more physical memory in a server environment. This is
relevant on systems where "panic: kmem_malloc: kmem_map too small" is a
problem.
1997-06-25 20:18:58 +00:00
Tor Egge a4ec81c7d0 Allow kernel configuration file to override PMAP_SHPGPERPROC. The default
value (200) is too low in some environments, causing a fatal
"panic: get_pv_entry: cannot get a pv_entry_t". The same panic might
still occur due to temporary shortage of free physical memory
(cf. PR i386/2431).
1997-06-25 20:07:50 +00:00
Tor Egge 9facf4a0d9 Block some interrupts during the call to pmap_zero_page in
vm_page_zero_idle. This fixes some occurences of the problem
reported in PR kern/3216: "panic: pmap_zero_page: CMAP busy"
1997-06-25 19:49:45 +00:00
Sean Eric Fagan 61ef57aaf2 Do The Right Thing when an iBCS2 program does getgroups(0, whatever) -- we
were returning EFAULT, when it is a completely acceptable thing to do.
Also, at the same time, be a *bit* optimizing and don't allocate any
"stackgrap" memory if we're not going to use it.

This is another Oracle-discovered problem.

Submitted by:	Steven Wallace
1997-06-25 01:01:21 +00:00
Tor Egge 3b5d3246bf Ensure that the boot CPU honours write protection in kernel mode.
This fixes one of the problems noted in PR kern/3688.
1997-06-24 17:26:07 +00:00
KATO Takenori 7367854ebc Recognize AMD K5 PR166 and PR200 CPUs. 1997-06-24 09:45:35 +00:00
Steve Passe ee889b3ba0 Fix calculation of initial mplock value.
We now use LOGICAL, not PHYSICAL, IDs to calculate the mplock.
1997-06-24 07:48:02 +00:00
Steve Passe afbe6f7b6e Fixed breakage for "default" configurations in mptable_pass1(). 1997-06-24 06:55:30 +00:00
Sean Eric Fagan c6d139318e For the xenix_ftime() routine, don't use the native version of the struct --
the XENIX version is packed, and two bytes smaller than ours.  So, define
the structure, and have it packed.  I used the __attribte__((packed))
modifier for this; I could also have surrounded the struct definition with
#pragma pack(2) -- but that would have meant making ibcs2_timeb's definition
outside the function.  This may need to be revisited if we ever want to
compile with a compiler other than gcc.  (I also used 'unsigned long'
instead of 'time_t' because I am writing to match an external specification
-- and the definition of time_t could change.)

Reviewed by:	Steven Wallace
1997-06-22 19:04:03 +00:00
Peter Wemm b3196e4b9f Preliminary support for per-cpu data pages.
This eliminates a lot of #ifdef SMP type code.  Things like _curproc reside
in a data page that is unique on each cpu, eliminating the expensive macros
like:    #define curproc (SMPcurproc[cpunumber()])

There are some unresolved bootstrap and address space sharing issues at
present, but Steve is waiting on this for other work.  There is still some
strictly temporary code present that isn't exactly pretty.

This is part of a larger change that has run into some bumps, this part is
standalone so it should be safe.  The temporary code goes away when the
full idle cpu support is finished.

Reviewed by: fsmp, dyson
1997-06-22 16:04:22 +00:00
Peter Wemm 3b18caba29 Kill some stale leftovers from the earlier attempts at SMP per-cpu pages 1997-06-22 15:47:16 +00:00
Mike Smith 0231d9ebb6 From the submitted patch :
The kernel with USERCONFIG_BOOT and VISUAL_USERCONFIG option presents
the user the kernel configuration menu upon boot.

The user can navigate the menu with cursor keys. I think it would be
nice if the user can navigate and select a menu item with regular keys
as well, so that the user who is using a serial console which is not
so capable of esc sequences still can choose a menu item.

With the following patch we can select an item by typing an item
number, 1, 2, or 3, or mnemonic `s' to skip UserConfig, 'v' to enter
the visual mode, and `c' to start the CLI mode. `p', `u', `n', and `d'
will move cursor up and down.

Submitted by:	yokota
1997-06-22 13:51:04 +00:00
Kazutaka YOKOTA 124ff4169d The syscons driver doesn't really check the presence of the display
adapter during the system boot. It always assumes there is at least a
monochrome adapter.

This is rather strange assumption. If there is no dispaly adapter, the
console driver cannot be any good...

In this patch, scinit() is split into two parts; the first part is
now called scvidprobe() which will detect the presence of video card
at the CGA or MONO buffer address and returns TRUE if found. It is
called during sccnprobe() and scprobe(). Both will fail if no video
card is found.

The second part, whose name stays the same as before, scinit(), is
called from sccninit() and scattach() to complete initialization of
the found video card.

The keyboard probe code is moved from scprobe() to sckbdprobe();
scprobe() now calls scvidprobe() and sckbdprobe() to carry out device
probe. (This is rather a cosmetic change, but it sure makes the code
look better organized.)

The problem pointed out by Joerg.
1997-06-22 12:04:36 +00:00
Bruce Evans c8f8a520f6 Fixed va_arg() to work for small args (as in stdarg.h). 1997-06-21 16:20:55 +00:00
Bruce Evans ce93f47a1e Don't attempt to generate errors for unpromoted types in va_arg(),
since it is impossible to distinguish unpromoted types from small
(struct) types.  Renamed __va_promote() to __va_size() since it is
related to sizes of args on the stack and not to promotion.

PR:		3884
Submitted by:	mostly by arnej@math.ntnu.no (Arne Henrik Juul)
Obtained from:	name of__va_size and some parentheses fixes from NetBSD
1997-06-21 15:45:13 +00:00
Garrett Wollman a8da31fc3e Fix crash when halting where APM was configured but not enabled
by checking whether APM is active in apm_power_off() and returning
if not.  (The code was already written with the expectation that
this function would return if it fails.)
1997-06-19 00:25:03 +00:00
Kenjiro Cho 3cbceb8234 correct the wrong ATM option name for native atm access
NETNATM --> NATM

reported by Bruce Evans.

Bruce also pointed out that NATM is confusing since config(8) defines
NATM as the number of atm pseudo device in "BUILD_DIR/atm.h".
We might change the name in the future but leave it as it is for now.
1997-06-17 05:58:15 +00:00
Philippe Charnier 91463ae299 Fix 2 typos. 1997-06-16 06:32:51 +00:00
Garrett Wollman b551bf4430 Fix another power down braino. 1997-06-15 02:24:06 +00:00
Garrett Wollman dd57c0981c Fix definition of apm_power off (was suffering from cut&paste syndrome). 1997-06-15 02:19:40 +00:00
Garrett Wollman 3f7773458e When APM is configured, turn off the power when halting for good. 1997-06-15 02:03:03 +00:00
Bruce Evans 9edc7ccf77 Fixed the type of a timeout function and removed casts that hid the
problem.  There was no problem in practice (at least on 386's).
1997-06-14 14:54:55 +00:00
Bruce Evans fec712543d Load the kernel config file where userconfig (with option USERCONFIG_BOOT)
will see it.  The name of the file is obtained by appending ".config"
to the name of the kernel file.  If the file doesn't exist, then an
annoying message is printed.

Reduced the command line buffer size yet again from 4096 to 1024.  It is
oversized to defend against overrun in gets(), but data space is starting
to run out so the buffer size can't be as grossly oversized as before.
1997-06-14 10:00:42 +00:00
Tor Egge 43f83f0b47 Use ETHER_ADDR_LEN instead of ETHER_ADDR_SIZE. 1997-06-12 19:20:53 +00:00
Justin T. Gibbs 9996b3a56a Fix two typos in this driver that prevented it from working properly.
PR: kern/3776
Submitted by: flash@hway.ru
1997-06-10 16:07:22 +00:00
Bruce Evans e49dd0c779 This should have been committed with the changes to boot.c yesterday.
- Added support for "dual" internal/serial consoles (-D flag).  If -D is set,
  then all i/o from the boot blocks is to and from both the internal console
  and the serial console.  -D has no effect on the kernel (-h decides the
  kernel serial console as usual).  -D should normally be set in /boot.config.
- Get help messages from /boot.help.  You should copy boot.help from the
  biosboot directory to the root directory on the boot drive when you
  install new boot blocks.
- New, less invasive keyboard probe.  Enable keyboard probe dynamically (-P
  flag).  Should probably never be used (use -h instead).
- Fixed/improved initialization from boot.config.  It didn't interact correctly
  with the NAMEBLOCK option, and the initialization of the drive/unit/partition
  didn't stick when a non-default kernel name was entered.
- Don't reset or forget the default drive/unit/... or kernel name so often.
- Set the default kernel name to something unbootable after `?'.
- Display the defaults better.
- Removed PROBE_KEYBOARD_LOCK option (use -h instead).,
- Removed BOOT_FORCE_COMCONSOLE option (use device flag 0x20 instead).
- Removed -a (RB_HALT) flag.  This flag is only used for reboots.
Submitted by:	about 2/3 by yokota
1997-06-10 01:40:32 +00:00
Bruce Evans de2cf96615 - Added support for "dual" internal/serial consoles (-D flag). If -D is set,
then all i/o from the boot blocks is to and from both the internal console
  and the serial console.  -D has no effect on the kernel (-h decides the
  kernel serial console as usual).  -D should normally be set in /boot.config.
- Get help messages from /boot.help.  You should copy boot.help from the
  biosboot directory to the root directory on the boot drive when you
  install new boot blocks.
- New, less invasive keyboard probe.  Enable keyboard probe dynamically (-P
  flag).  Should probably never be used (use -h instead).
- Fixed/improved initialization from boot.config.  It didn't interact correctly
  with the NAMEBLOCK option, and the initialization of the drive/unit/partition
  didn't stick when a non-default kernel name was entered.
- Don't reset or forget the default drive/unit/... or kernel name so often.
- Set the default kernel name to something unbootable after `?'.
- Display the defaults better.
- Removed PROBE_KEYBOARD_LOCK option (use -h instead).,
- Removed BOOT_FORCE_COMCONSOLE option (use device flag 0x20 instead).
- Removed -a (RB_HALT) flag.  This flag is only used for reboots.
Submitted by:	about 2/3 by yokota
1997-06-09 05:10:56 +00:00
Andrey A. Chernov 833bdc932c While deciding to install irq with unneded "conflicts" keyword,
additionly check that intr vector is non-NULL
1997-06-09 00:53:48 +00:00
Andrey A. Chernov 7f533ff73f Add safety check in case "conflicts" keyword specified more times than
needed
1997-06-08 17:15:31 +00:00
Andrey A. Chernov 1886f4968c Make "conflicts" keyword work again 1997-06-08 16:43:37 +00:00
Andrey A. Chernov 0b3a25d648 Remove no irq -> irq 31 conversion 1997-06-08 12:55:26 +00:00
Bruce Evans 7b3c84247b Preserve %fs and %gs across context switches. This has a relatively low
cost since it is only done in cpu_switch(), not for every exception.
The extra state is kept in the pcb, and handled much like the npx state,
with similar deficiencies (the state is not preserved across signal
handlers, and error handling loses state).
1997-06-07 04:36:10 +00:00
Bruce Evans 4d775b7759 Removed #include of <i386/isa/isa_device.h>. inthand2_t is declared in a
better place now.
1997-06-07 00:57:26 +00:00
Bruce Evans f0a2dcf23d Updated comments. 1997-06-07 00:49:45 +00:00
Jordan K. Hubbard 818de095b4 YAMF22 - XSERVER comment changes. 1997-06-06 12:24:43 +00:00
Paul Traina 562d05dfae Document a non-standard gdbremote protocol extension (kludge, really)
that I snuck in to our GDB last year.  This allows you to debug headless
machines by sharing the console port between the debugger and the system
console.  It's not 100% reliabile, but it works well.  It's optional
and disabled by default.
Submitted by:	Juniper Networks
1997-06-04 16:44:29 +00:00
Paul Traina 5ea6cb03f3 Bring back CONSPEED as a last-ditch default if you can't change the speed
any other way.

Requested by: dfr
1997-06-04 16:25:15 +00:00
Paul Traina 69d2ceed21 CONSPEED is defunct. 1997-06-04 04:55:26 +00:00
Paul Traina 2334749d02 If the boot blocks were using the serial port, read the system console
speed using the boot blocks, instead of a hardcoded value stuck in the
kernel.  This way, you can have systems using the same kernel but different
console speeds.

Add a sysctl entry for changing the system console speed.
Lock the user tty speed to match the system console speed.

Nuke CONSPEED.
Reviewed by:	bde
1997-06-04 04:52:40 +00:00
KATO Takenori 6670f8f6e7 Fixed mu-law data. Originator's patch was applied.
PR:		1950
Submitted by:	NAGAO Tadaaki <nagao@cs.titech.ac.jp>
1997-06-03 10:34:40 +00:00
KATO Takenori b7b905e770 Fixed order of data transfer.
Reviewed by:	NAGAO Tadaaki <nagao@cs.titech.ac.jp>
Submitted by:	Takuya SHIOZAKI <tshiozak@makino.ise.chuo-u.ac.jp>
1997-06-03 10:25:41 +00:00
KATO Takenori eeef1264c6 Include <sys/conf.h> 1997-06-03 08:23:26 +00:00
Peter Wemm 2895de58f2 Fill in some gaps in the cpuid features list..
bit 10 is the old bit for MTRR (presumably this changed, an older P5 I
have has got it, the newer cpus have the new MTRR bit set)
bit 11 is SEP (fast syscalls),  bit 23 is MMX
Fill in the other reserved ones with a stub so that we can see them if
they turn up.

Obtained from: Intel AP-485 rev.06
1997-06-02 18:55:44 +00:00
KATO Takenori 40b2de1758 Added PC-98 code. 1997-06-02 15:28:10 +00:00
Doug Rabson 6d47a3a499 Change isa_device.h to intr_machdep.h 1997-06-02 10:44:08 +00:00
Doug Rabson 50ef24000a Make this thing actually compile. 1997-06-02 10:43:41 +00:00
Doug Rabson 683523378c Move interrupt handling code from isa.c to a new file. This should make
isa.c (slightly) more portable and will make my life developing the really
portable version much easier.

Reviewed by:	peter, fsmp
1997-06-02 08:19:06 +00:00
Mike Smith 10484b859e Grr. Remove not-ready LDT modification fluff that also crept in with
the last commit.
1997-06-02 06:45:17 +00:00
Mike Smith 88e2b22c9f Oops, remove some bogus debugging code that crept in with the last commit. 1997-06-02 06:33:22 +00:00
Mike Smith 3713cbff75 Add support for the SIOCGIFHWADDR ioctl, commonly used by
license managers to obtain the host's ethernet address as
a key.

Note that this implementation takes the first hardware address for
the first ethernet interface found, and disregards the interface name
that may be passed in, as linux ethernet devices are all "ethX".
1997-06-02 06:31:49 +00:00
Bruce Evans 92278e9a02 Was superseded by ns16550.h 4-5 years ago. 1997-06-02 03:10:10 +00:00
Poul-Henning Kamp 55d2795997 I've given up on the idea of sizing FIFO's. You can set it with a flag
value now, if you know that you have a fifo deeper than 16.
1997-06-01 20:42:01 +00:00
Bruce Evans 20c776a50b Don't use -fomit-frame-pointer for ipl_funcs.c if ${PROF} is nonempty,
is incompatible with -pg.  (We use a different version of mcount for
profiling frame-pointer-less assembler functions, but gcc doesn't know
about this.)

Added a missing dependency.

Cleaned up trailing backslashes.

Added comment about config's limitations/bugs handling dependencies and
backslashe/newlines.

Finished removing support for isdn drivers.
1997-06-01 20:25:55 +00:00
Peter Wemm 131cb049f4 on second thoughts, it doesn't even need <machine/ipl.h> either. 1997-06-01 16:03:13 +00:00
Peter Wemm 096a814086 <machine/spl.h> -> <machine/ipl.h> 1997-06-01 15:59:11 +00:00
Tor Egge b93b7486b9 Fix a typo.
Submitted by:	Wolfgang Helbig <helbig@MX.BA-Stuttgart.De>
1997-05-31 18:29:58 +00:00
Peter Wemm f5d66b9bb4 specify compile-with option to get -fomit-frame-pointer on ipl_funcs.c 1997-05-31 18:01:38 +00:00
Peter Wemm d8897edc0e Revert previous change, use "compile-with" in files.i386 instead. 1997-05-31 17:59:56 +00:00
KATO Takenori 0c8cda329f Include file update: <machine/spl.h> --> <machine/ipl.h>. 1997-05-31 12:45:37 +00:00
Peter Wemm 5400ed3b2f Include file updates.. <machine/spl.h> -> <machine/ipl.h>, add
<machine/ipl.h> to those files that were depending on getting SWI_*
implicitly via <machine/cpufunc.h>
1997-05-31 09:27:31 +00:00
Peter Wemm 49c6ff7dc2 add ipl_funcs.c (Hmm.. should probably use a "compile-with" arg rather
than a Makefile.i386 hook)
1997-05-31 09:23:44 +00:00
Peter Wemm 752bbf7aa8 compile ipl_funcs.c with -fomit-frame-pointer, as suggested by Bruce. This
cuts the cost of a function call instead of an inline.
1997-05-31 09:19:19 +00:00
Peter Wemm 813dc43715 move spl.h to ipl.h, minus the inline spl macros. The inline spl
implementation is now in isa/ipl_funcs.c (at least for the time being),
leaving the definitions of the SWI_* and cpl/idelayed/ipending.
1997-05-31 09:16:36 +00:00
Peter Wemm 5354c7c8d2 remove #include of <machine/spl.h> - they are externed now
Reviewed by: bde
1997-05-31 09:13:03 +00:00
Peter Wemm c9bfe68408 move intrhand2_t from isa_device.h to machine/types.h - it's used far more
than in the isa dependent code.
create intrmask_t in machine/types.h  (replaces "intrmask" typedef from
sys/interrupt.h)

Reviewed by: bde
1997-05-31 09:07:36 +00:00
Peter Wemm dfa67ec76e Store the macro values for SWI_TTY_MASK and SWI_NET_MASK in variables to
that lkm's can use them for fiddling the masks without being dependent on
which mode the kernel is compiled in (SMP or UP).  This is particularly
for ppp_tty.c which has some domain crossing between the net and tty
subsystems.  The values are not used in the spl code, they are for
reference only (ie: the compiled code uses immediate values rather than
an indirect 32 bit address and 32 bit data fetch).
1997-05-31 09:03:52 +00:00
Peter Wemm 0589fe3b6e The SWI_NET_MASK and SWI_TTY_MASK handlers are now back adjacent to the
top of the hardware interrupt handlers.  Apparently this is slightly
faster with the bit scanning instruction that looks these up - this set of
changes reverts the original change.

Reviewed by: bde
1997-05-31 08:59:51 +00:00
Peter Wemm a24514dfdf Bruce's original implementation of the splxxx() routines, but as C code
rather than inlines.  These are compiled with -fomit-frame-pointer and
work out pretty close to the original routines, but it might be a fraction
slower.  The reason for doing this is to prevent the SWI_* and HWI_* values
from being compiled into drivers and lkms etc which is one of the things
that prevents the same lkm from being used on both SMP and UP kernels.

This gives us a lot more scope for experimenting with the splxxx
implementaton for SMP parallelism etc.

Reviewed by: bde
1997-05-31 08:57:05 +00:00
Peter Wemm 0638a3a84b Bruce's original definitions for the spl/ipl code when running on the old
PIC's.

Reviewed by: bde
1997-05-31 08:50:34 +00:00
Peter Wemm f09434da26 Definitions for the spl/ipl code when running on an IO APIC.
Obtained from: fsmp  (part of what Steve added for IO APIC support)
Reviewed by:   bde
1997-05-31 08:49:08 +00:00
KATO Takenori 20916c1f24 - Use `6x86MX' instead of `M2'. Cyrix officially use `6x86MX' for the
CPU code-named `M2'.

- Use the result of cpuid instruction instead of DIR to identify
  6x86MX cpu.  DIR0 and DIR1 are not documented in the data sheet, and
  cpuid instruction is enabled at reset time.

- Add a function, init_6x86MX() to initialize 6x86MX cpu.  It supports
  CPU_SUSP_HLT and CPU_IORT options.  It always sets NC1 (640K - 1M is
  not cached.), and enables L1 cache in write-back mode.

- Fix typo in the comment in identblue().
1997-05-31 08:45:24 +00:00
Steve Passe 89da9c65d6 Modified code in direction of supporting MULTIPLE_IOAPICS.
- moved read_io_apic_maskc24() from isa/mpapic.h, disabled it, currently unused.
 - cleaned up various panic() calls.
1997-05-31 03:29:57 +00:00
Steve Passe f540db4852 Modified code in direction of supporting MULTIPLE_IOAPICS.
- removed set_io_apic_mask() & clr_io_apic(_mask)
 - moved read_io_apic_maskc24() to i386/mpapic.c, disabled it, currently unused.
1997-05-31 03:29:06 +00:00
Gene Stark bb7e0661df Submitted by: Rich Murphey (ages ago) and Gene Stark
Hopefully I've done the proper magic to merge changes between 1.17 and
1.17.2.1 into the main trunk.  Description of those changes follows:

Brought in changes sent to me in late 1995 by Rich Murphey.
I cleaned up a few things and am currently running these under
2.2-970205-GAMMA.

The changes deal with software debouncing apparently necessary on
todays faster hardware, and also some problems with the use of the -Select
line for the TW-523 sync.  This driver allows use of +PaperEnd as an
alternative.
1997-05-31 02:39:32 +00:00
Steve Passe a8baaafda0 Code such as apic_base[APIC_ID] converted to lapic__id
Changes to pmap.c for lapic_t lapic && ioapic_t ioapic pointers,
currently equal to apic_base && io_apic_base, will stand alone with the
private page mapping.
1997-05-29 05:58:41 +00:00
Steve Passe 08942d4605 apic.h now has structure definitions for both the local APIC and io APIC.
apic.h has defines like:
#define lapic__id       lapic->id

Once private pages and "known virtual addr" mapping of the APICs is
ready all 'lapic__XXX' will be changed to 'lapic.XXX', and the defines
will be removed.

Changes to smp.h for lapic_t lapic && ioapic_t ioapic pointers,
currently equal to apic_base && io_apic_base, will stand alone with the
private page mapping.
1997-05-29 05:57:43 +00:00
Steve Passe 4fd20a6b2a Added code to manage the local and io APICs as structures. 1997-05-29 05:56:12 +00:00
Peter Wemm 288e2230b5 remove no longer needed opt_smp.h includes 1997-05-29 05:11:11 +00:00
Peter Wemm 64b3672f39 minor style police (recent divergence from KNF code) 1997-05-29 05:07:10 +00:00
Peter Wemm ae9249615f remove opt_smp.h and fix the reason it was needed. 1997-05-29 05:04:30 +00:00
Peter Wemm 7a14de6260 No longer need opt_smp.h here 1997-05-29 05:00:35 +00:00
Peter Wemm ecf8148761 remove opt_smp.h from this well-included file, minor style police 1997-05-29 04:58:04 +00:00
Peter Wemm 6b19c20ba5 remove opt_smp.h, minor style police 1997-05-29 04:55:39 +00:00
Steve Passe b8d67ee052 Add declaration of mp_probe().
This is now called directly from machdep.c.
1997-05-28 18:44:11 +00:00
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
Steve Passe a56fb4ee60 Documented SMP_AUTOSTART to be working. 1997-05-10 17:40:53 +00:00
Joerg Wunsch 28d90c30ee Add the D_DISK flag to the cdevsw structs of various CD-ROM drivers. 1997-05-10 12:13:17 +00:00
John Hay 02c186c9bf Remove IPXPRINTFS, it is now a sysctl knob. 1997-05-10 11:16:22 +00:00
John-Mark Gurney 5719a93caf forgot to add the "longer" description of bktr and add an example device
line.
1997-05-10 09:23:55 +00:00
John-Mark Gurney 6baab37637 add a line for bktr (Bt848 base capture cards) to LINT. 1997-05-10 09:18:46 +00:00
Bruce Evans 1cbeae88a4 Cleaned up #includes. Lite2 cleaned up <sys/mount.h> so no kludges
are required for NFS now.

Ifdefed SMP #defines.
1997-05-10 08:01:13 +00:00
Kenjiro Cho 68713f97a1 merge ATM driver 1997-05-09 12:19:06 +00:00
Peter Wemm 4d37268944 Fatal trap 13: Brain fault, commit botched.
Current task:     transcribing patch
Time:             for a coffee
Faulting address: bde
1997-05-09 09:46:50 +00:00
Peter Wemm 230ebd9559 Bandaid old register offset code after md_regs changed type..
Submitted by: Eivind Eklund <perhaps@yes.no>
1997-05-09 04:02:58 +00:00
Peter Wemm 894c517fd6 Add _BSD_CLOCKID_T_ and _BSD_TIMER_T_ for posix clock/timer support
Obtained from: NetBSD
1997-05-08 13:45:43 +00:00
Steve Passe c2855f6e47 fix bug in get_isa_apic_mask() where EISA bus was ignored.
Submitted by:	 Peter Wemm <peter@spinner.DIALix.COM>
1997-05-07 22:25:27 +00:00
Peter Wemm d021fc112b Don't allow access to illegal addresses in /dev/kmem to panic kernel
(eg: above 0xffc00000).  Programs using /dev/kmem are implicitly racing
the kernel, and can get right up high in memory.  I've been running
these for some time now, but with printfs.  It's saved two panics at
least that I can remember.
1997-05-07 20:32:41 +00:00
Peter Wemm 1f8745a9c3 clean up forked child creation. This is simplified also by having
md_regs being struct trapframe *.  Do a npxsave() if needed and copy the
pcb rather than use the increasingly defunct savectx().  Copy %edi and
%ebp explicitly.

Submitted by: bde

XXX npxproc could be declared in npx.h so the externs with smp fruit
are not needed.
1997-05-07 20:19:18 +00:00
Peter Wemm 914970e6e9 md_regs is struct trapframe * now, rather than int []
Remove TF_REGP() macro and use.  The original reason (address space
problems due to having UPAGES in mapped into user space) is gone.  It
looks cleaner without it.
1997-05-07 20:12:47 +00:00
Peter Wemm 835834c085 md_regs is now a struct trapframe * 1997-05-07 20:08:53 +00:00
Peter Wemm 8359d00f20 forgotten comment 1997-05-07 20:07:25 +00:00
Peter Wemm 213fdd8050 md_regs is a struct trapframe * now, not int [] 1997-05-07 20:05:45 +00:00
Peter Wemm 36428e6100 simplify IOPL gain/remove privs code. It's easier with md_regs
being a trapframe.
1997-05-07 20:02:38 +00:00
Peter Wemm 06884fd04e remove now redundant (struct trapframe *) cast 1997-05-07 19:58:13 +00:00
Peter Wemm 6f486a5552 Convert md_regs from an int[] to a struct trapframe *. It simplifies
some code.
1997-05-07 19:55:13 +00:00
Peter Wemm 2263dd148e remove #include "opt_smp.h"
remove declarations for the SMPcurproc[NCPU] etc arrays. There was no
need to mention NCPU there, and they've been moved to their normal home.
1997-05-07 19:53:20 +00:00
Peter Wemm f40e607832 remove #include "opt_smp.h" and <machine/smp.h>. Slightly elaborate on
a comment.
1997-05-07 19:51:59 +00:00
Peter Wemm b34b547455 remove #include "opt_smp.h" 1997-05-07 19:50:31 +00:00
Peter Wemm 503c887bae remove #include opt_smp.h
declare SMPcurpcb[] next to #define and uniprocessor counterpart
1997-05-07 19:49:32 +00:00
Peter Wemm 53815e2fe6 Round 1 of a long series of commits..
Move SMP and APIC_IO from opt_smp.h to opt_global.h
1997-05-07 19:39:16 +00:00
Doug Rabson cea6c86c11 This is the kernel linker. To use it, you will first need to apply
the patches in freefall:/home/dfr/ld.diffs to your ld sources and set
BINFORMAT to aoutkld when linking the kernel.

Library changes and userland utilities will appear in a later commit.
1997-05-07 16:05:47 +00:00
Kazutaka YOKOTA df25dec0e5 Now that we have replaced video-related block copy calls with
sc_bcopy(), which is generic_bcopy() in reality, there is no point in
retaining bcopyw() calls in the source code.
OKed by : sos
1997-05-07 10:42:06 +00:00
Steve Passe f258030f39 Force user to config SMP kernel with "options APIC_IO".
Reviewed by:	Peter Wemm <peter@spinner.DIALix.COM>
1997-05-06 21:29:57 +00:00
Steve Passe 113656909f Make ident equal file name, ie SMP-GENERIC. 1997-05-06 20:40:52 +00:00
Steve Passe 53850c2fb0 A *little* more descriptive test for options. 1997-05-06 18:24:17 +00:00
Steve Passe 3cc17cf950 Added a generic config file for SMP kernels. 1997-05-06 18:18:51 +00:00
Steve Passe 2479ac60b9 Code to handle SMP/APIC_IO mapping of ISA INTs to APIC pins above IRQ15.
- doesn't break my system.
 - NOT yet verified on the affected motherboard.

Submitted by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-05-05 22:56:37 +00:00
Steve Passe 08896efb1a Code to handle SMP/APIC_IO mapping of ISA INTs to APIC pins above IRQ15.
- doesn't break my system.
 - NOT yet verified on the affected motherboard.

Stifle an annoying dma_start busy message for the sound cards.

Submitted by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-05-05 22:56:13 +00:00
KATO Takenori 7a13a66696 Use `MediaGX' instead of `Gx86'. 1997-05-05 14:30:00 +00:00
KATO Takenori a74ff881b7 Use `M2' instead of `6x86 with MMX'. Cyrix seems to use `M2' officially. 1997-05-05 14:11:09 +00:00
Peter Wemm f435322e07 correct the order of the variables
use #ifdef where possible instead of #if defined

Submitted by: the KNF police, ie: bde :-)
1997-05-05 09:34:33 +00:00
John Dyson b332d9a66e Make sure that *fork() always returns with %edx == 1 in the
child.  This was sometimes not happening correctly during my
threads code work.
1997-05-05 04:08:12 +00:00
Joerg Wunsch 5a9714de76 This mega-commit brings the following:
. It makes cd9660 root f/s working again.
. It makes CD9660 a new-style option.
. It adds support to mount an ISO9660 multi-session CD-ROM as the root
  filesystem (the last session actually, but that's what is expected
  behaviour).

Sigh.  The CDIOREADTOCENTRYS did a copyout() of its own, and thus has
been unusable for me for this work.  Too bad it didn't simply stuff
the max 100 entries into the struct ioc_read_toc_entry, but relied on
a user supplied data buffer instead. :-(  I now had to reinvent the
wheel, and created a CDIOREADTOCENTRY ioctl command that can be used
in a kernel context.

While doing this, i noticed the following bogosities in existing CD-ROM
drivers:

wcd:	This driver is likely to be totally bogus when someone tries
	two succeeding CDIOREADTOCENTRYS (or now CDIOREADTOCENTRY)
	commands with requesting MSF format, since it apparently
	operates on an internal table.

scd:	This driver apparently returns just a single TOC entry only for
	the CDIOREADTOCENTRYS command.

I have only been able to test the CDIOREADTOCENTRY command with the
cd(4) driver.  I hereby request the respective maintainers of the
other CD-ROM drivers to verify my code for their driver.  When it
comes to merging this CD-ROM multisession stuff into RELENG_2_2 i will
only consider drivers where i've got a confirmation that it actually
works.
1997-05-04 15:24:23 +00:00
Peter Wemm b455e1e981 don't #ifdef out reference to i586_ctr_freq. 1997-05-04 14:28:22 +00:00
Peter Wemm 26e5316524 Don't remove i586_ctr_freq from scope, leave it defined as zero. This
simplifies some assumptions and stops some code compile problems.

This should fix the compile hiccup in PR#3491, but smp kernel profiling
isn't likely to be fixed by this.
1997-05-04 14:25:00 +00:00
Steve Passe 356b97e402 disabled checks for smp_active == 0.
this was wasting precious cycles for no apparent (to me) reason.
it is currently bracketed by BOTHER_TO_CHECK, define to restore old behaviour.
1997-05-03 19:24:16 +00:00
Steve Passe 004cb62334 added declaration for get_isa_apic_mask().
Submitted by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-05-03 18:05:31 +00:00
Steve Passe 6e1ed0bec1 improved io_apic_setup().
deals with motherboards that map ISA IRQs to APIC IRQS above 15.

Submitted by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-05-03 18:01:56 +00:00
Steve Passe 462e62c9a0 new function to turn an APIC pin# into an INT mask.
added missing APIC_IO define.

Submitted by:	"John S. Dyson" <toor@dyson.iquest.net>
1997-05-03 17:42:01 +00:00
Steve Passe a1b7127157 cleaned up FAST_IPI code.
- one-liners all become inline.
 - multi-liners become functions.
 - FAST_IPI defines go away.

re-worked APICIPI_BANDAID code.
 - now refered to as DETECT_DEADLOCK.
 - on by default.
1997-05-01 19:33:12 +00:00
Steve Passe f3a946e800 fixed spelling error.
Submitted by:	Bruce Albrecht <bruce@zuhause.mn.org>
1997-05-01 19:27:58 +00:00
Steve Passe 4abfa50b62 1.15 4/18/97 John-Mark Gurney <gurney_j@resnet.uoregon.edu>
Added [SR]RGBMASKs ioctl for byte swapping.

 1.16          4/20/97    Randall Hopper <rhh@ct.picker.com>
                          Generalized RGBMASK ioctls for general pixel
                          format setting [SG]ACTPIXFMT, and added query API
                          to return driver-supported pix fmts GSUPPIXFMT.

 1.17          4/21/97    hasty@rah.star-gate.com
                          Clipping support added.

 1.18          4/23/97    Clean up after failed CAP_SINGLEs where bt
                          interrupt isn't delivered, and fixed fixing
                          CAP_SINGLEs that for ODD_ONLY fields.

Submitted by:	individuals in above log messages.
1997-05-01 00:15:30 +00:00
Steve Passe dff5c18abc changed expect_lock() to try_lock(), the real name used in mplock.s 1997-04-30 19:04:26 +00:00
Andrey A. Chernov 8a13426b30 Restore CRTC start address check back after looking into more sources 1997-04-30 15:31:22 +00:00
Andrey A. Chernov bfc43e99c4 In comp_vgaregs skip cursor shape and 4 unused bytes (6 total)
instead of 2 unused.
Previus code broke syscons on Diamond Stealth 3D 3000
(video mode ptr was NULL with no real reason)
1997-04-30 01:19:21 +00:00
Steve Passe 04964d153d Enabled 'FIX_MP_TABLE_WORKS' code.
This code re-numbers PCI busses in the MP table to match PCI semantics
when the MP BIOS fails to do it properly.

Reviewed by:	Peter Wemm <peter@spinner.DIALix.COM>
1997-04-29 22:12:32 +00:00
Peter Wemm 176c49e057 Use a common numbering of the tty and net software interrupt levels
between the SMP and non-SMP case.  It simplifies the #ifdef's, since
NHWI changes (at least for the moment) when APIC's are involved.
1997-04-29 20:05:48 +00:00
Peter Wemm f2b65e7983 Remove stale comment, as suggested by Bruce. 1997-04-29 20:00:41 +00:00
Stefan Eßer 862b403b04 Move CMD640 option from kernel Makefile into opt_wd.h
Submitted by:		Wolfgang Helbig <helbig@mx.ba-stuttgart.de>
1997-04-28 19:26:18 +00:00
Steve Passe 7b2a188c7a cleaned out an old FIXME. 1997-04-28 08:39:48 +00:00
Mike Smith 28f6972b6e Always include PROT_READ for Linux mmap operations.
Submitted by:	Hannu Savolainen <hannu@voxware.pp.fi> via jkh
1997-04-28 02:53:17 +00:00
Steve Passe f50a491f78 removed TEST_CPUHITS code.
replaced push/pop of %ds with use of 'ss' prefix in Xinvltlb.

Submitted by:	 Bruce Evans <bde@zeta.org.au>
1997-04-28 01:47:55 +00:00
Steve Passe e1c8d46561 removed TEST_CPUHITS code. 1997-04-28 01:46:31 +00:00
Steve Passe 34e63b4cd7 removed all the TEST_UPPERPRIO crud. 1997-04-28 01:08:47 +00:00
Steve Passe 2c5d02fff3 remove all the SMP_INVLTLB defines, making the code default for APIC_IO.
Reviewed by:	informal discussion with Peter Wemm <peter@spinner.DIALix.COM>
1997-04-28 00:25:00 +00:00
Steve Passe 2b45006334 remove the SMP_INVLTLB option, making the code default for APIC_IO.
Reviewed by:	informal discussion with Peter Wemm <peter@spinner.DIALix.COM>
1997-04-28 00:24:28 +00:00
Steve Passe 296bffc9c0 informal discussion between Bruce Evans <bde@zeta.org.au>,
Peter Wemm <peter@spinner.DIALix.COM>, Steve Passe <smp@csn.net>

removed all the IPI_INTS code.
made the XFAST_IPI32 code default, renaming Xfastipi32 to Xinvltlb.
cleanup of i386/isa/isa_device.h to eliminate SMP dependancies:
  made the id_irq member of struct isa_device an u_int.
  made the id_drq member of struct isa_device an int.
  removed all other '#ifdefs' concerning SMP & APIC_IO.
removed SMP/APIC_IO dependancies from if_ze.c.
1997-04-27 21:18:59 +00:00
Steve Passe 2897614119 informal discussion between Bruce Evans <bde@zeta.org.au>,
Peter Wemm <peter@spinner.DIALix.COM>, Steve Passe <smp@csn.net>

removed all the IPI_INTS code.
made the XFAST_IPI32 code default, renaming Xfastipi32 to Xinvltlb.
1997-04-27 21:17:56 +00:00
Peter Wemm d061973c76 Create a special option file "opt_global.h" which is included by all
source files via a 'cc -include opt_global.h ...' type arrangement.
This means we can untangle certain header files.

options.i386 has a placeholder until it has a real member so we can avoid
having to teach config about it just yet.

Reviewed by: bde
1997-04-27 20:01:47 +00:00
Peter Wemm a8a74574b2 Whoops.. We forgot to turn off the 4MB Virtual==Physical mapping at address
zero from bootstrap in the non-SMP case.

Noticed by: bde
1997-04-27 12:11:43 +00:00
Kazutaka YOKOTA d75a8fdbb1 Addresses the following two problems.
1) i586_bcopy() problem

There have been a number of reports that the syscons doesn't work
properly if i586_bcopy() is enabled.

The problem prevented users from installing 2.2(.1)-RELEASE.  The
symptom is that the system looks frozen during device probe or just
before the main installation menu.  The workaround was to specify the
flag 0x01 to the npx device so that i586_bcopy() is disabled.

The patch forces the syscons to call generic_bcopy() when copying
to/from the video memory, even if CPU is Pentium and i586_bcopy() is
enabled. i586_bcopy() is still called for copy operations between
non-video memory regions.

PR: kern/2277, kern/3066, kern/3107, kern/3134

2) video mode parameter table problem

The syscons reads and uses the video mode parameter table provided by
the VGA BIOS to set VGA registers when changing video mode and
modifying font data. It appears that in some VGA BIOSes the table is
not ordered as the syscons expects, and this leads to screen
corruption.

The problem prevented users from installing 2.2(.1)-RELEASE. The
symptom is the corrupt screen or strange vertical lines soon after the
kernel is loaded into memory (just after the kernel decompression).

The patch performs simplistic test and if it fails, set video_mode_ptr
to NULL so that the video mode switching won't happen.

This is an interim kludge. There should be a better way to deal with
the problem.

PR: kern/2498, conf/2775, conf/3354

Reviewed by: sos
Tested by: PR originators (not all of them, though)
1997-04-27 09:03:10 +00:00
Peter Wemm db7df99ff1 Try and make these usermode safe, Steve beat me in finding these.. 1997-04-26 20:04:21 +00:00
Peter Wemm e80a59970c fix & instead of && in #if statement
reorder #includes to alphabetical order

Noted by: bde
1997-04-26 19:47:59 +00:00
Peter Wemm fbf8a6b7cb change #if 0 to #ifdef KERNEL since this is pretty important for
smp compiling.  It still leaves dset non-functional on smp kernels, but
we've been doing that all along with the private smp tree anyway.
1997-04-26 19:26:37 +00:00
Peter Wemm 73f4384dc1 Remove the curproc printing on trap/interrupt/etc. It's outlived it's
usefulness, and there were problems with it anyway.

Found by: bde
1997-04-26 19:12:03 +00:00
Steve Passe bb625c15c9 #if'ed out the '#include "opt_smp.h"' line.
The SMP source was merged into 3.0-current last nite and this broke
the make of sbin/dset.

Should make things work for non-SMP case.

People making SMP kernels will need to edit i386/isa/isa_device.h, re-enabling
'#include "opt_smp.h"'.  People making SMP worlds will have to punt for now...
I'm thinking about the real solution, but for now the goal is to NOT break
the world!
1997-04-26 19:07:36 +00:00
Peter Wemm c9c20622ad Back out bogus code that slipped past my read of the pre-merge diff
(Problems noted by Bruce)
1997-04-26 18:59:42 +00:00
Peter Wemm acc7657309 Fix some SMP merge bugs (from Bruce) -
#include out of order
pccard_configure() called twice
munged tab (existing problem made worse)
1997-04-26 18:57:34 +00:00
Peter Wemm 477a642cee Man the liferafts! Here comes the long awaited SMP -> -current merge!
There are various options documented in i386/conf/LINT, there is more to
come over the next few days.

The kernel should run pretty much "as before" without the options to
activate SMP mode.

There are a handful of known "loose ends" that need to be fixed, but
have been put off since the SMP kernel is in a moderately good condition
at the moment.

This commit is the result of the tinkering and testing over the last 14
months by many people.  A special thanks to Steve Passe for implementing
the APIC code!
1997-04-26 11:46:25 +00:00
Justin T. Gibbs 539fc95753 Print out some more diagnostic information when we reject a message.
When we request sense, don't allow disconnection.  This closes a window
where we might allow an overlapped tagged and non-tagged transaction.
The correct fix is to freeze the queue for the target that requests sense
which is what will happen in the new CAM framework.
1997-04-26 05:03:18 +00:00
KATO Takenori 9ca8226735 Add new cpu type, CPU_CY486DX, which shows Cyrix 486S/DX series CPUs,
and initialization routine for those CPUs.

Tested by:	Bob Bishop <rb@gid.co.uk>
1997-04-26 04:08:54 +00:00
Bruce Evans 72fa3798b4 Removed LDADD=-lc and associated DPADD. libc would probably break
things if it were actually used.
1997-04-25 19:38:01 +00:00
Bruce Evans a862685541 Fixed longstanding profiling bug. The frame pointer wasn't set up
for syscalls, so one frame was lost in backtraces from syscalls.
This is handled better in the kernel by using a different mcount
entry point for profiling before the frame pointer is set up.

Expand RCSID().

Use .p2align instead of the ambiguous .align.

Added idempotency ifdef.

Removed unused macros ALTENTRY(), ALTASENTRY(), ASENTRY(), _MID_ENTRY.

Cleaned up formatting.

Reviewed by:	jdp reviewed an old version
Obtained from:	parts from NetBSD
1997-04-23 19:26:04 +00:00
John Polstra 9081eec1fb Make the necessary changes so that an ELF kernel can be built. I
have successfully built, booted, and run a number of different ELF
kernel configurations, including GENERIC.  LINT also builds and
links cleanly, though I have not tried to boot it.

The impact on developers is virtually nil, except for two things.
All linker sets that might possibly be present in the kernel must be
listed in "sys/i386/i386/setdefs.h".  And all C symbols that are
also referenced from assembly language code must be listed in
"sys/i386/include/asnames.h".  It so happens that failure to do
these things will have no impact on the a.out kernel.  But it will
break the build of the ELF kernel.

The ELF bootloader works, but it is not ready to commit quite yet.
1997-04-22 06:55:47 +00:00
Kazutaka YOKOTA 29c78ed5ef Fixed typo in the set_keyboard_param().
Spotted by: Philippe Charnier@xp11.frmug.org
1997-04-22 02:04:15 +00:00
Nate Williams a4586acb0c - Better fix for 3C589D support. Revert previous changes and add a
delay after we reset the card to allow the card to come back to life.
  It appears the newer card takes longer to reset.

Submitted by:	Samuel Lam <skl@ScalableNetwork.com>
1997-04-21 13:38:32 +00:00
Bruce Evans 4b04349ab9 Fixed the type of a timeout function and removed casts that hid the
type mismatches.  There was no problem in practice (at least on 386's).
The timeout args still get bogusly cast from int to `void *' via
caddr_t and back to int.
1997-04-20 18:02:40 +00:00
Bruce Evans 20925249e7 Fixed the type of timeout functions and removed casts that hid the
type mismatches.  mcd and scd were/are particularly bogus.  They
used a general purpose function taking 2 args for the timeout
function and fudged varargs stuff to supply the second arg for the
timeout case.  This broke `cc -mrtd'.  Bounce through a timeout
function instead.  The timeout arg still gets bogusly cast from
int to `void *' and back.
1997-04-20 17:26:55 +00:00
Bruce Evans 14da13a2f1 Fixed the type of timeout functions and removed casts that hid the
type mismatches.  Not taking an arg in sequencer_timer() broke
`cc  -mrtd'.
1997-04-20 16:54:58 +00:00
Bruce Evans 8fb722b5e1 Fixed the type of timeout functions and removed casts that hid the
type mismatches.  There was no problem in practice (at least on 386's).

Don't cast NULL in calls to timeout functions.  pcvt is fully prototyped
and doesn't support K&R.

Timeout functions take args of type `void *', so use magic numbers of
type `void *' for UPDATE_* to reduce the danger of wrong conversions.

Removed FreeBSD-pre-1.1-related TIMEOUT_FUNC_T macro.  It was especially
bogus for the pre-1.1 case.
1997-04-20 16:38:22 +00:00
Bruce Evans 5e994ca33f Fixed the type of timeout functions and removed casts that hid the
type mismatches.  Not taking an arg in scrn_timer() broke `cc -mrtd'.
1997-04-20 16:05:33 +00:00
Bruce Evans 5a837b22e5 Fixed the type of timeout functions and removed casts that hid the
type mismatches.  There was no problem in practice (at least on 386's).
1997-04-20 15:36:12 +00:00
Bruce Evans 68f7a74b48 Fixed inconsistent extern declaration of a timeout function and
removed a cast that helped hide the problem.  There was no problem
in practice (at least on 386's).
1997-04-20 15:25:33 +00:00
Bruce Evans 8bd28861d8 Fixed linting of and compilation of the gcc byte-swapping macros
properly.  Simply don't use the gcc macros if we're not gcc, and
declare prototypes for the byte-swapping functions in case the
macro versions are not used.  The previous fix was wrong and broke
libpcap, which abuses -Dlint.

Don't pollute the namespace if _POSIX_SOURCE is defined.  This is
broken - it makes almost everything in <machine/endian.h> inaccessible
if _POSIX_SOURCE is defined, yet <machine/endian.h> is not a POSIX
header.  Other systems don't do it any better.

Removed always-false `BYTE_ORDER == BIG_ENDIAN' ifdef.
Obtained from:	partly from Lite(2?) and NetBSD
1997-04-20 11:44:32 +00:00
Poul-Henning Kamp a688c7b0ee Fix up the "hlt vector" change I made.
Reviewed by:	bde, bde, bde
1997-04-20 06:41:26 +00:00
Bruce Evans 0e4f24a34e Avoid division by 0 in check_part(). (It occurred when max_nsectors == 0.
This case is clearly an error, but we keep calling check_part() to get
diagnostics.)

Fixed nearby indentation and commenting bugs.
1997-04-19 14:14:17 +00:00
KATO Takenori e747d90dbf Don't disable CPU cache in init_486dlc. If BIOS supports Cyrix 486,
BIOS enables CPU cache and other registers.  If BIOS does not supports
it, CPU cache is disabled at reset time.

This commit closes PR/3292.

PR:		3292
1997-04-19 05:25:19 +00:00
Bruce Evans 63e32a69f2 Don't call timeout() for DTR wakeup or busy check if the relevant timeout
is already active.  This fixes "timeout table full" panics under 100%
interrupt load and other weird conditions.
1997-04-18 18:28:09 +00:00
Justin T. Gibbs ba5da33265 No longer use AAP for queueing SCBs to the QINFIFO.
Clean up the unexpected busfree handler.  We now look directly at the
message that might have caused the bus free to occur instead of looking
at an SCB flag.  This makes the handling more robust and also allows for
recovery actions that might cause an "unexpected busfree" to be performed
even if an SCB is not availible to "tag".  Most notably, this happens
when we don't find an SCB for a reconnecting target.
1997-04-18 16:34:36 +00:00
Kazutaka YOKOTA 03dcce7f3d Incorporate kludge/fix from `syscons' ver 1.207 and 1.209.
1) Dell Latitude XPi
This laptop has a strange, IMHO broken :-), keyboard controller which
wouldn't disable the keyboard interrupt. The kludge is to disable tty
intr. during set_keyboard(), used for changing LED and setting
typematic.

The patch also changes the function name:
    set_keyboard() -> set_keyboard_param()
Although it is a static function, the name corrides with a routine in
`syscons' and is confusing when debugging the kernel which has both
`syscons' and `pcvt' with DDB. (Suggested by Bruce)

2) doreset() bug
doreset() failed to preserve some bits in the keyboard controller's
command byte during keyboard reset. This bug may put some keyboard
controllers in old motherboards (386 and 486) in a strange state,
resulting in complete keyboard lockup or random key input.

Reviewed by:	Joerg
1997-04-18 12:06:34 +00:00
Nate Williams 9fdb458452 Quick and dirty attempt to get the zp device to work with the 3c589D.
Increase the delay in read_eeprom_data() by two orders of magnitude.

> A better fix would be to make read_eeprom_data() call
> f_is_eeprom_busy() after the DELAY().

Submitted by:	Samuel Lam <skl@ScalableNetwork.com>
1997-04-17 14:33:11 +00:00
Andrey A. Chernov eff7ae0f7b Comment out rawcb, it is not used / not present anymore 1997-04-16 15:09:37 +00:00
KATO Takenori 03245f094d Use reset port before clearing page table in cpu_reset if PC98 is
defined.  Clearing page table could hang some new PC-98.
1997-04-16 12:11:37 +00:00
Bruce Evans 06e33296dd Only do indirections in ENTRY() if _ARCH_INDIRECT is defined. 1997-04-15 14:06:34 +00:00
Poul-Henning Kamp 3845d1185d Forget all about APM. Instead of "hlt" call through a vector which
APM can then fiddle with.  Default for the vector is to "htl; ret"
1997-04-14 18:12:05 +00:00
Jordan K. Hubbard 0863cbc199 YAMF22 1997-04-14 16:47:38 +00:00
Bruce Evans da3df630ac Use the same IOPL check as in syscons.
Reviewed by:	pst, joerg
1997-04-14 15:54:39 +00:00
Bruce Evans 58611a61ed Fixed printing of registers in dbflalt_handler(). The registers
were always in a tss; that tss just changed from the one in the
pcb to common_tss (who knows where it was when there was no curpcb?).
Not using the pcb also fixed the problem that there is no pcb in
idle(), so we now always get useful register values.
1997-04-14 13:52:52 +00:00
Justin T. Gibbs 085059c3ea Be more careful about how SCBs are cleaned up during error recovery.
Add some more diagnostic information to timeouts.
1997-04-14 02:27:50 +00:00
Justin T. Gibbs 3db6c00e72 New name for the EtherExpress register file. 1997-04-14 00:40:04 +00:00
Justin T. Gibbs 5a2037874f Add Intel EtherExpress16 support into the ie driver, removing the need
for the ix driver.

Add a shutdown hook that resets the etherexpress so that Windoze can find
the card after a warm boot.

Submitted by: Aaron Smith <aaron@tau.veritas.com>
Obtained From: NetBSD
1997-04-14 00:37:53 +00:00
Justin T. Gibbs c1aa7eb5f4 GENERIC, LINT:
Add an ie entry that corresponds to the location the old ix entry used
to probe and kill the ix entry.

files.i386:
Remove entries for the ix driver.
1997-04-14 00:35:25 +00:00
Bruce Evans d12ee02d12 Don't forget to set `runtime' in fork_trampoline(). The time slice before
switching to a child for the first time was being counted twice.  I think
this only affected unimportant statistics.

Simplified arg handling in fork_trampoline().  splz() doesn't actually
smash the registers of interest.
1997-04-13 16:58:08 +00:00
John Dyson f39aebddfc Decrease the amount of memory allocated for bouncing. This will
allow large systems to boot successfully with bounce buffers compiled
in.  We are now limiting bounce space to 512K.  The 8MB allocated for
a 512MB system is very bogus -- and that is now fixed.
1997-04-13 04:07:24 +00:00
John Dyson aec17d5078 The pmap code was too generous in the allocation of kva space for
the pv entries.  This problem has become obvious due to the increase
in the size of the pv entries.  We need to create a more intelligent
policy for pv entry management eventually.
Submitted by:	David Greenman <dg@freebsd.org>
1997-04-13 03:35:30 +00:00
John Dyson 5856e12e69 Fully implement vfork. Vfork is now much much faster than even our
fork. (On my machine, fork is about 240usecs, vfork is 78usecs.)

Implement rfork(!RFPROC !RFMEM), which allows a thread to divorce its memory
	from the other threads of a group.

Implement rfork(!RFPROC RFCFDG), which closes all file descriptors, eliminating
	possible existing shares with other threads/processes.

Implement rfork(!RFPROC RFFDG), which divorces the file descriptors for a
	thread from the rest of the group.

Fix the case where a thread does an exec.  It is almost nonsense for a thread
	to modify the other threads address space by an exec, so we
	now automatically divorce the address space before modifying it.
1997-04-13 01:48:35 +00:00
Justin T. Gibbs f91ddb3f3c Drop the number of allowed tags back down to 8. Pluto uses a higher value
which mistakenly got committed.

Fix two bugs in the ahc_reset_device code:
	Limit search for SCBs to process to those that are active and
	are not queued for done processing.

	It's okay for an SCB to not have a waiting next SCB.
1997-04-10 19:14:58 +00:00
Bruce Evans 1a2efb7550 Removed unused or apparently-unused #includes, especially of the
deprecated header <sys/dir.h>.
1997-04-10 14:35:32 +00:00
Kazutaka YOKOTA d0b8731a66 Preserve some bits in the keyboard controller command byte when
resetting the keyboard.

Well, sorry, this bug is totally my fault. I DID intend to preserve
them, but somehow I failed.

The bug puts some old keyboard controllers in a strange state,
resulting in keyboard freeze or random key input.

The fix closes PR kern/3067.
1997-04-10 12:26:50 +00:00
Bruce Evans 7077d3c008 Regenerate (removed unused #includes from ibcs2*_sysent.c). 1997-04-09 15:46:25 +00:00
Bruce Evans 3892bcbc70 Removed unused #includes. 1997-04-09 15:44:47 +00:00
Bruce Evans fb36e0817c Regenerate (removed unused #includes in linux_sysent.c). 1997-04-09 15:37:04 +00:00
Bruce Evans cfb1738cb3 Removed unused #includes. 1997-04-09 15:34:09 +00:00
Stefan Eßer 5c03639065 Mask out revision register in consistency test of class register. 1997-04-09 11:34:50 +00:00
Stefan Eßer 6df09d1e0b Fix spelling of align and interrupt in comments. 1997-04-09 09:16:27 +00:00
Stefan Eßer b4b8847934 Fix consistency test to not fail on pre PCI 2.0 motherboards 1997-04-09 09:15:03 +00:00
KATO Takenori 5eba6c71a9 Enables lnc driver on PC-98 to support NEC SV-98/2-B06 PCI card.
Cascade mode of DMA is disabled when PC98 is defined because PC-98
doesn't support it.
1997-04-08 10:33:24 +00:00
Justin T. Gibbs 8d94b804a1 Fix an infinite loop caused by calling ahc_run_done queue while the
driver is waiting a bus settle delay.  There should really be a facility
for the controller driver to "freeze" its queue during recovery operations
which would make all of this gymnastics unnecessary.
1997-04-07 18:32:47 +00:00
Peter Wemm e2d8771131 Lower the spl() of the new process from splhigh() right away, since
nothing else will lower it until either much later, or never(?) for
kernel processes.

This basically re-fixes what Bruce fixed in rev 1.29 of kern_fork.c,
which was broken again now the child does not execute back up the fork()
calling tree.
1997-04-07 11:42:09 +00:00
Peter Wemm a0c3795f19 Use UPAGES_HOLE instead of UPAGES in case it's changed some time.
Rename the PT* index KSTK* #defines to UMAX*, since we don't have a kernel
stack there any more..

These are used to calculate VM_MAXUSER_ADDRESS and USRSTACK, and really
do not want to be changed with UPAGES since BSD/OS 2.x binary compatability
depends on it.
1997-04-07 09:30:22 +00:00
Peter Wemm de871ab682 Define UPAGES_HOLE at 2 (same as current UPAGES) in case UPAGES changes
later.  This is used to calculate the top of user address space.
1997-04-07 09:27:21 +00:00
Peter Wemm e8fa13fdd9 Clean up some dead wood. Kill the page table page for mapping the
proc0/idlePTD/bootstrap stack into place in user space.  We save 4K.
Remove p0upa, it is now unneeded.
1997-04-07 08:38:19 +00:00
Peter Wemm a2a1c95c10 The biggie: Get rid of the UPAGES from the top of the per-process address
space. (!)

Have each process use the kernel stack and pcb in the kvm space.  Since
the stacks are at a different address, we cannot copy the stack at fork()
and allow the child to return up through the function call tree to return
to user mode - create a new execution context and have the new process
begin executing from cpu_switch() and go to user mode directly.
In theory this should speed up fork a bit.

Context switch the tss_esp0 pointer in the common tss.  This is a lot
simpler since than swithching the gdt[GPROC0_SEL].sd.sd_base pointer
to each process's tss since the esp0 pointer is a 32 bit pointer, and the
sd_base setting is split into three different bit sections at non-aligned
boundaries and requires a lot of twiddling to reset.

The 8K of memory at the top of the process space is now empty, and unmapped
(and unmappable, it's higher than VM_MAXUSER_ADDRESS).

Simplity the pmap code to manage process contexts, we no longer have to
double map the UPAGES, this simplifies and should measuably speed up fork().

The following parts came from John Dyson:

Set PG_G on the UPAGES that are now in kernel context, and invalidate
them when swapping them out.

Move the upages object (upobj) from the vmspace to the proc structure.

Now that the UPAGES (pcb and kernel stack) are out of user space, make
rfork(..RFMEM..) do what was intended by sharing the vmspace
entirely via reference counting rather than simply inheriting the mappings.
1997-04-07 07:16:06 +00:00
Peter Wemm 271b264e4c No longer use an i386tss as the basis of our pcb - it wasn't particularly
convenient and makes life difficult for my next commit.  We still need
an i386tss to point to for the tss slot in the gdt, so we use a common
tss shared between all processes.

Note that this is going to break debugging until this series of commits
is finished.  core dumps will change again too. :-(  we really need
a more modern core dump format that doesn't depend on the pcb/upages.

This change makes VM86 mode harder, but the following commits will remove
a lot of constraints for the VM86 system, including the possibility of
extending the pcb for an IO port map etc.

Obtained from: bde
1997-04-07 06:45:18 +00:00
Bruce Evans 9546766a1b Documented new serial console flags.
Removed dead serial console options.

Reorganised sio and serial console options.

Added undocumented options CLUSTERDEBUG and NPX_DEBUG.
1997-04-07 01:26:34 +00:00
Doug Rabson 2f29db8883 Fixes to ibcs2_getdents, including using struct dirent instead of
struct direct, not using UFS' definition of DIRBLKSIZ, using directory
seek cookies to make reading non-UFS directories reliable
(e.g. cd9660, ext2fs).

A special thanks to Robert Eckardt for providing an ISC binary of GNU
ls so that I could test these changes.
1997-04-06 14:10:50 +00:00
Stephen McKay bc19f8a39e Prevent wedging of the stat clock because of missed interrupts.
This should cure the "alternate system clock has died!" problem.

Discussed with: bde, joerg
1997-04-06 13:25:48 +00:00
Peter Dufault 0ddf9be1f0 Make MOD_* macros almost consistent:
Use the name argument almost the same in all LKM types.  Maintain
the current behavior for the external (e.g., modstat) name for DEV,
EXEC, and MISC types being #name ## "_mod" and SYCALL and VFS only
#name.  This is a candidate for change and I vote just the name without
the "_mod".

Change the DISPATCH macro to MOD_DISPATCH for consistency with the
other macros.

Add an LKM_ANON #define to eliminate the magic -1 and associated
signed/unsigned warnings.

Add MOD_PRIVATE to support wcd.c's poking around in the lkm structure.

Change source in tree to use the new interface.

Reviewed by:	Bruce Evans
1997-04-06 11:14:13 +00:00
Doug Rabson c9e191b82a Remove dependancy on UFS' DIRBLKSIZ definition.
2.2 candidate.

Submitted by:	bde
1997-04-06 10:10:50 +00:00
John Dyson a04c970a7a Fix the gdb executable modify problem. Thanks to the detective work
by Alan Cox <alc@cs.rice.edu>, and his description of the problem.

The bug was primarily in procfs_mem, but the mistake likely happened
due to the lack of vm system support for the operation.  I added
better support for selective marking of page dirty flags so that
vm_map_pageable(wiring) will not cause this problem again.

The code in procfs_mem is now less bogus (but maybe still a little
so.)
1997-04-06 02:29:45 +00:00
Justin T. Gibbs 844b7c2d86 Fix a bug in the selection timeout handler that was introduced when the
selection loop was merged with the poll_for_work loop.  We cannot assume
that the SCB for the selection timeout is the current SCB.  Instead we
must look at the SCB at the head of the waiting for selection list.

This fixes part of a problem reported by David Malone, but does not explain
why he was getting selection timeouts in the first place.
1997-04-05 21:41:13 +00:00
Doug Rabson d41979a063 Fix linux_getdents so that it can cope with filesystems which translate
the directory format (ext2fs, cd9660).  For these filesystems, it must use
cookies to find the correct offset to use for subsequent reads.  Without it,
linux /bin/ls tends to loop re-reading the same block over and over again.

2.2 candidate.
1997-04-05 14:50:56 +00:00
Bruce Evans 8e71151378 Moved COMCONSOLE, CONADDR and CONUNIT to defunct options. 1997-04-05 13:21:08 +00:00
Bruce Evans 24bb2ffb15 Removed defaults for dead options CONADDR and CONUNIT. 1997-04-05 13:15:50 +00:00
Bruce Evans de09b61a0c Use device flags instead of options for serial console configuration
(see LINT).  There is a new low-level console type that is more suitable
for use with gdb-remote.

Fixed setting of speed at probe time for the serial console (if any).

Reviewed by:	dfr
1997-04-05 13:11:27 +00:00
Justin T. Gibbs 0f3a99aade Now that we use AAP, we have to explicitly unpause the sequencer when
queueing an abort SCB.
1997-04-04 19:36:04 +00:00
Justin T. Gibbs f98b4a3bdc NOOP commit to correct the comment for the last commit:
Bump the timeout for an "ordered tag" recovery action from 1 to 5 seconds.

Remove the multiple timeout panic.  Its very easy to get into a situation
where a timedout command will time out a second time even though the
recovery code is working fine.  A good example is:

1) Command times out during recovery
2) reset the timeout for the command
3) Recovery actions complete and all transactions are requeued
4) second timeout fires off which puts us back into recovery bogusly
5) another transaction that timedout once during the first recovery action
   times out causing the panic.

In essence, the correct solution to the problem is to put every transaction
back up into the work queue and have their timeout handling done in the same
way that all commands are handled.  The CAM layer makes this easy, so it
will have to wait until then.
1997-04-04 04:21:43 +00:00
Justin T. Gibbs 5ea0ae111d When not using SCB paging, we can always directly index the SCB of interest
either by looking it up in the array of pending, per target, untagged
transactions, or by using the tag value passed in during the identify.  The
old code only direct indexed for tagged transactions.  This makes the
"findSCB" routine only necessary when SCB paging is enabled, so appropriately
conditionalize it.  This greatly simplifies the non SCB paging code flow.
1997-04-04 04:09:29 +00:00
Brian Somers 42e9ba47f8 Make the default VERASE key the <-- key and remove root's
`stty's.  'nuff said.

Inventor:	joerg@FreeBSD.org
Reviewer:	sos@FreeBSD.org
1997-04-03 21:42:42 +00:00
Poul-Henning Kamp 8520e7cbc1 If flag 0x4000 (Sleephack) is defined, assume that the disk is sleeping
if all registers are 0xff.

This allows me to run with flags 0xc0ff on my IBM-DMCA-21440 disk, which
gives 5MB/sec sequential read :-)

If you have a laptop, try adding flag 0x4000 to your disk, and tell me if
it makes any difference for you.
1997-04-03 09:43:50 +00:00
Justin T. Gibbs d98667394d make obj before building the aic7xxx assembler. This puts the object
files in the right place.

The clean rule still isn't quite right since currently config doesn't
allow the specification of arbitrary clean rules.
1997-04-03 05:57:16 +00:00
Steve Passe 938401213d PAL support: magic numbers moved into format_params structure.
Revised AFC interface.
Fixed DMA_PROG_ALLOC size misdefinition.

Submitted by:	richard@cogsci.ed.ac.uk (Richard Tobin)
1997-04-02 01:48:39 +00:00
Bruce Evans 12f2987754 Removed a wrong comment of mine.
Removed unused #includes.
1997-04-01 16:22:31 +00:00
Bruce Evans cc289dff53 Fixed gratuitous ANSIisms.
Removed unused declarations.
1997-04-01 16:13:31 +00:00
Bruce Evans 3f39dbc52d Removed potentially harmful garbage <vm/lock.h> and fixed bogus
use of it.  It was actually harmless because the use was null due
to fortuitous include orders and identical (wrong) idempotency
macros.
1997-04-01 08:39:07 +00:00
David Greenman 9caaadb63a Changed the way that the exec image header is read to be filesystem-
centric rather than VM-centric to fix a problem with errors not being
detectable when the header is read.
Killed exech_map as a result of these changes.
There appears to be no performance difference with this change.
1997-03-31 11:11:26 +00:00
Joerg Wunsch 514e9fd6b8 Implement the `detach' command for remote GDB. It gets you back at DDB. 1997-03-30 16:03:00 +00:00
Poul-Henning Kamp 015056ae61 Fix embarrasing typo that survived because I applied the wrong patch-
file.
Noticed by:	Eric Jones <ejon@psa.pencom.com>
1997-03-30 09:08:00 +00:00
Peter Wemm bf6c0d31b7 Regenerate (include file changes, stray blank lines (cosmetic),
and a syscall vector was out of sync with it's .master file)
1997-03-29 13:15:23 +00:00