Commit Graph

3783 Commits

Author SHA1 Message Date
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