Commit Graph

1840 Commits

Author SHA1 Message Date
bde
e72b0c43a4 Clear the single-step flag for signal handlers. This fixes bogus trace
traps on the first instruction of signal handlers.

In trap.c:syscall(), fake a trace trap if the single-step flag was set
on entry to the kernel, not if it will be set on exit from the kernel.
This fixes bogus trace traps after the last instruction of signal handlers.

gdb-4.18 (the version in FreeBSD) still has problems with the program in
the PR.  These seem to be due to bugs in gdb and not in FreeBSD, and are
fixed in gdb-5.1 (the distribution version).

PR:		33262
Tested by:	k Macy <kip_macy@yahoo.com>
MFC after:	1 day
2002-01-10 11:49:55 +00:00
nyan
f33c9933e7 Merged from sys/dev/sio/sio.c revisions 1.354 and 1.358. 2002-01-06 09:54:50 +00:00
jhb
68929e8e5a Change the preemption code for software interrupt thread schedules and
mutex releases to not require flags for the cases when preemption is
not allowed:

The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent
switching to a higher priority thread on mutex releease and swi schedule,
respectively when that switch is not safe.  Now that the critical section
API maintains a per-thread nesting count, the kernel can easily check
whether or not it should switch without relying on flags from the
programmer.  This fixes a few bugs in that all current callers of
swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from
fast interrupt handlers and the swi_sched of softclock needed this flag.
Note that to ensure that swi_sched()'s in clock and fast interrupt
handlers do not switch, these handlers have to be explicitly wrapped
in critical_enter/exit pairs.  Presently, just wrapping the handlers is
sufficient, but in the future with the fully preemptive kernel, the
interrupt must be EOI'd before critical_exit() is called.  (critical_exit()
can switch due to a deferred preemption in a fully preemptive kernel.)

I've tested the changes to the interrupt code on i386 and alpha.  I have
not tested ia64, but the interrupt code is almost identical to the alpha
code, so I expect it will work fine.  PowerPC and ARM do not yet have
interrupt code in the tree so they shouldn't be broken.  Sparc64 is
broken, but that's been ok'd by jake and tmm who will be fixing the
interrupt code for sparc64 shortly.

Reviewed by:	peter
Tested on:	i386, alpha
2002-01-05 08:47:13 +00:00
nyan
ddadf4ecdb Disabled the olpt driver temporarily to avoid 'repeat make_dev' panic. 2001-12-31 09:02:24 +00:00
nyan
f09046c959 MFi386: revision 1.178 2001-12-22 01:35:44 +00:00
nyan
6adab23060 MFi386: revision 1.124 2001-12-22 01:34:09 +00:00
nyan
d81e7692ac Merged from sys/dev/syscons/syscons.c revision 1.377. 2001-12-22 01:32:32 +00:00
nyan
eef8963bce cosmetic changes. 2001-12-22 01:30:19 +00:00
nyan
dfb500ec21 MFi386: revision 1.179 2001-12-22 00:38:32 +00:00
nyan
d63be1f72e MFi386: revision 1.486 2001-12-22 00:35:49 +00:00
nyan
a07a4f944b Merged from sys/isa/{fd.c,fdreg.h} revisions 1.222 and 1.15, respectively. 2001-12-16 09:00:03 +00:00
iedowse
75709290bf Enable UFS_DIRHASH in the GENERIC kernel.
Suggested by:	silby
Reviewed by:	dillon
MFC after:	5 days
2001-12-14 16:27:11 +00:00
nyan
0faafb01e6 Fixed to draw mouse cursor. The syscons driver for PC98 uses different
attributes from i386.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
MFC after:	3 days
2001-12-14 15:27:15 +00:00
nyan
f2075f1d45 MFi386: revision 1.485 (the previous commit is not completely) 2001-12-12 12:27:59 +00:00
jhb
1c79a2c04a Overhaul the per-CPU support a bit:
- The MI portions of struct globaldata have been consolidated into a MI
  struct pcpu.  The MD per-CPU data are specified via a macro defined in
  machine/pcpu.h.  A macro was chosen over a struct mdpcpu so that the
  interface would be cleaner (PCPU_GET(my_md_field) vs.
  PCPU_GET(md.md_my_md_field)).
- All references to globaldata are changed to pcpu instead.  In a UP kernel,
  this data was stored as global variables which is where the original name
  came from.  In an SMP world this data is per-CPU and ideally private to each
  CPU outside of the context of debuggers.  This also included combining
  machine/globaldata.h and machine/globals.h into machine/pcpu.h.
- The pointer to the thread using the FPU on i386 was renamed from
  npxthread to fpcurthread to be identical with other architectures.
- Make the show pcpu ddb command MI with a MD callout to display MD
  fields.
- The globaldata_register() function was renamed to pcpu_init() and now
  init's MI fields of a struct pcpu in addition to registering it with
  the internal array and list.
- A pcpu_destroy() function was added to remove a struct pcpu from the
  internal array and list.

Tested on:	alpha, i386
Reviewed by:	peter, jake
2001-12-11 23:33:44 +00:00
obrien
9f689db796 Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.
2001-12-10 08:09:49 +00:00
dillon
462173ce40 Allow maxusers to be specified as 0 in the kernel config, which will
cause the system to auto-size to between 32 and 512 depending on the
amount of memory.

MFC after:	1 week
2001-12-09 01:57:09 +00:00
des
3f2c11b222 PROCFS requires PSEUDOFS. 2001-12-04 11:48:16 +00:00
nyan
8770493443 Split the sio driver for pc98 into bus front end and back end.
(merged from the files in sys/dev/sio)
2001-11-26 12:29:53 +00:00
nyan
c3d5f3646e MFi386: revision 1.326. 2001-11-17 13:48:31 +00:00
nyan
8317fa9a92 MFi386: revision 1.483 2001-11-17 13:16:51 +00:00
nyan
1a6ce29a0c Use make_dev_alias() instead of call make_dev() twice. 2001-11-12 13:06:04 +00:00
phk
c3a51f1df9 GC userconfig after Peter axed it 15 months ago. 2001-11-05 21:46:35 +00:00
phk
7dbff3eb30 Don't call cdevsw_add(). 2001-11-04 09:09:41 +00:00
phk
b63a001058 Rename the top 7 bits if disk minors to spare bits, rather than type bits. 2001-11-04 09:01:07 +00:00
nyan
69e1de63e6 MFi386: sys/i386/i386/machdep.c revisions 1.481 and 1.482 2001-10-30 00:53:19 +00:00
nyan
786fe54fdb Removed pmc_isa_identify function. It is not needed.
Submitted by:	takawata
2001-10-28 04:16:50 +00:00
jlemon
70fedc69f3 cn_tab no longer exists, use cnadd() to add a console device. Note that
this may result in duplicate console output in some cases.
2001-10-24 18:30:05 +00:00
nyan
20952e6eff Added the pmc driver which supports power management controller of
old NEC PC-98NOTE.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
MFC after:	1 week
2001-10-24 14:46:40 +00:00
amorita
0310ac5efc fix broken `compat_atdisk'(replace raw device name with block device's).
Reviewed by:	nyan
MFC after:	3 days
2001-10-23 09:39:09 +00:00
amorita
fae9a5e7bf Fix compile error of the case using `LINE30' option.
Reviewed by:	nyan
MFC after:	3 days
2001-10-23 08:54:50 +00:00
imp
1f68057239 First commit after a repo copy of isa/sio* -> dev/sio:
Move sio from isa/sio.c to dev/sio/sio.c.  The next step is to break
out the front end attachments, improve support for these parts on
different busses, and maybe, if we're lucky, merging in pc98 support.
It will also be MI and live in conf/files rather than files.*.

Approved by: bde
Tested with: i386, pc98
2001-10-22 02:48:38 +00:00
bde
1455602288 Use the i386 version of npx.c. It has been merged with the pc98 version.
Approved by:	nyan
Not tested by:	bde
2001-10-21 06:14:12 +00:00
mjacob
731f80846f Remove wx. 2001-10-20 18:50:31 +00:00
nyan
a573eae018 MFi386: sys/i386/isa/npx.c revisions from 1.114 to 1.116 2001-10-19 12:30:16 +00:00
nyan
e9415d13e6 Changed IO_NPXSIZE to 8 2001-10-19 12:24:45 +00:00
nyan
750a83c997 MFi386: sys/i386/isa/clock.c revision 1.177 2001-10-19 11:52:49 +00:00
nyan
1e0052ad05 MFi386: sys/i386/isa/pcaudio.c revision 1.63 2001-10-19 11:50:00 +00:00
nyan
365804abfc Merged from sys/isa/sio.c revisions from 1.344 to 1.347 2001-10-19 11:48:47 +00:00
nyan
1e787850fb MFi386: sys/i386/conf/GENERIC revision 1.320 2001-10-19 11:46:13 +00:00
mjacob
4335e90047 Make SCSI changer and SES devices standard in generic kernels.
Reviewed by:	ken@kdm.org
2001-10-16 22:22:58 +00:00
nyan
f7758bd82e Rewrite the pc98 bus_space stuff.
The type of bus_space_tag_t is now a pointer to bus_space_tag structure,
and the bus_space_tag structure saves pointers to functions for direct
access and relocate access.

Added bsh_bam member to the bus_space_handle structure, it saves access
method either direct access or relocate access which is called by
bus_space_* functions.

Added the mecia device support. If the bs_da and bs_ra in bus tag are set
NEPC_io_space_tag and NEPC_mem_space_tag respectively, new bus_space stuff
changes the register of mecia automatically for 16bit access.

Obtained from:	NetBSD/pc98
2001-10-07 10:04:18 +00:00
rwatson
9455f9c698 o Modify pc98 syscons code to use securelevel_gt() instead of
direct variable checks.  (Yet another API to perform direct hardware I/O).

Obtained from:	TrustedBSD Project
2001-09-26 20:26:32 +00:00
brooks
8139e573c2 The faith(4) device is no longer a count device so don't specify a count. 2001-09-25 18:56:40 +00:00
nyan
c5d0c002c2 - Added #include <sys/systm.h>
- Cosmetic change
2001-09-24 06:41:06 +00:00
obrien
00751b927c + Fix misplacement of `txp'
+ Document our -CURRENT debugging bits
2001-09-24 03:23:48 +00:00
peter
bafec19c67 Cleanup and split of nfs client and server code.
This builds on the top of several repo-copies.
2001-09-18 23:32:09 +00:00
jhb
68925c112b Whitespace fixes. 2001-09-18 21:05:04 +00:00
nyan
3ea6caf048 MFi386: sys/isa/fd.c revision from 1.205 to 1.219. 2001-09-16 12:39:59 +00:00
nyan
4387977199 Allocate i/o and memory resources using gdc driver. 2001-09-16 12:38:39 +00:00