Commit Graph

2740 Commits

Author SHA1 Message Date
Poul-Henning Kamp
f645b0b51c First part of a little cleanup in the calendar/timezone/RTC handling.
Move relevant variables to <sys/clock.h> and fix #includes as necessary.

Use libkern's much more time- & spamce-efficient BCD routines.
2006-10-02 12:59:59 +00:00
Poul-Henning Kamp
c29ba5fe6e Remove the no longer relevant or correct bootinfo sysctls. 2006-09-30 10:08:09 +00:00
Ruslan Ermilov
9fddcc6661 Fix our ioctl(2) implementation when the argument is "int". New
ioctls passing integer arguments should use the _IOWINT() macro.
This fixes a lot of ioctl's not working on sparc64, most notable
being keyboard/syscons ioctls.

Full ABI compatibility is provided, with the bonus of fixing the
handling of old ioctls on sparc64.

Reviewed by:	bde (with contributions)
Tested by:	emax, marius
MFC after:	1 week
2006-09-27 19:57:02 +00:00
Ruslan Ermilov
6c9fdda750 Added COMPAT_FREEBSD6 option. 2006-09-26 12:36:34 +00:00
Jung-uk Kim
0da90eb878 Fix style nits. No md5 changes in .o's. ;-) 2006-09-08 21:46:01 +00:00
Warner Losh
c70759dcdd Add pc98 specific code to adjust the firmware geometry when it differs
from the actual geometry.  This enables support of disks larger than
~120GB on pc98 boxes.  They make great little network appliances.
I've been using these changes for the past year or so on my network
storage pc98 box :-).
2006-08-09 18:25:07 +00:00
Marcel Moolenaar
302981e72a Remove sio(4) and related options from MI files to amd64, i386
and pc98 MD files. Remove nodevice and nooption lines specific
to sio(4) from ia64, powerpc and sparc64 NOTES. There were no
such lines for arm yet.
sio(4) is usable on less than half the platforms, not counting
a future mips platform. Its presence in MI files is therefore
increasingly becoming a burden.
2006-07-29 18:38:54 +00:00
John Baldwin
19e9205a23 Simplify the pager support in DDB. Allowing different db commands to
install custom pager functions didn't actually happen in practice (they
all just used the simple pager and passed in a local quit pointer).  So,
just hardcode the simple pager as the only pager and make it set a global
db_pager_quit flag that db commands can check when the user hits 'q' (or a
suitable variant) at the pager prompt.  Also, now that it's easy to do so,
enable paging by default for all ddb commands.  Any command that wishes to
honor the quit flag can do so by checking db_pager_quit.  Note that the
pager can also be effectively disabled by setting $lines to 0.

Other fixes:
- 'show idt' on i386 and pc98 now actually checks the quit flag and
  terminates early.
- 'show intr' now actually checks the quit flag and terminates early.
2006-07-12 21:22:44 +00:00
Matt Jacob
626b06c711 Make the firmware assist driver resident in
preparation for isp using it.

Reviewed by:	sam, max
2006-07-09 16:41:22 +00:00
Sergey Babkin
d81175c738 Backed out the change by request from rwatson.
PR:		kern/14584
2006-06-26 22:03:22 +00:00
Sergey Babkin
7a799f1ef0 The common UID/GID space implementation. It has been discussed on -arch
in 1999, and there are changes to the sysctl names compared to PR,
according to that discussion. The description is in sys/conf/NOTES.
Lines in the GENERIC files are added in commented-out form.
I'll attach the test script I've used to PR.

PR:		kern/14584
Submitted by:	babkin
2006-06-25 18:37:44 +00:00
Alexander Leidinger
28a3ae7f88 Remove COMPAT_43 from GENERIC (and other kernel configs). For amd64 there's
an explicit comment that it's needed for the linuxolator. This is not the
case anymore. For all other architectures there was only a "KEEP THIS".
I'm (and other people too) running a COMPAT_43-less kernel since it's not
necessary anymore for the linuxolator. Roman is running such a kernel for a
for longer time. No problems so far. And I doubt other (newer than ia32
or alpha) architectures really depend on it.

This may result in a small performance increase for some workloads.

If the removal of COMPAT_43 results in a not working program, please
recompile it and all dependencies and try again before reporting a
problem.

The only place where COMPAT_43 is needed (as in: does not compile without
it) is in the (outdated/not usable since too old) svr4 code.

Note: this does not remove the COMPAT_43TTY option.

Nagging by:	rdivacky
2006-06-15 19:58:53 +00:00
Marius Strobl
acb8c14985 Make the ISAPNP code optional and only enable it on i386 and pc98 (used
for CBUS-PNP cards there) by default, as there are no amd64 and sparc64
machines with ISA slots and which therefore could make use of this code
known to exist. For sparc64 this additionally allows to get rid of the
compat shims for in{b,w,l}()/out{b,w,l}() etc and the associated hacks.

OK'ed by:	imp, peter
2006-06-12 21:07:13 +00:00
John Baldwin
e3d7caf487 Enable a few more things in x86 NOTES to get broader LINT coverage:
- Turn on iwi(4), ipw(4), and ndis(4) on amd64 and i386.
- Turn on ral(4) and ural(4) on i386, pc98, and amd64.
2006-06-12 20:38:17 +00:00
Warner Losh
78878cef94 Add the ability to subset the devices that UART pulls in. This allows
the arm to compile without all the extras that don't appear, at least
not in the flavors of ARM I deal with.  This helps us save about 100k.

If I've botched the available devices on a platform, please let me
know and I'll correct ASAP.
2006-06-12 04:21:50 +00:00
Yoshihiro Takahashi
261fe6f6c9 MFi386: revisions 1.627, 1.628 and 1.629. 2006-06-05 11:53:36 +00:00
Yoshihiro Takahashi
b6e3627ecb typo. 2006-05-27 04:40:41 +00:00
Poul-Henning Kamp
a67173a28a Aling to new console and gdb_port semantics 2006-05-26 13:33:28 +00:00
Marius Strobl
136eda1dc3 - Add C-bus and ISA front-ends for le(4) so it can actually replace
lnc(4) on PC98 and i386. The ISA front-end supports the same non-PNP
  network cards as lnc(4) did and additionally a couple of PNP ones.
  Like lnc(4), the C-bus front-end of le(4) only supports C-NET(98)S
  and is untested due to lack of such hardware, but given that's it's
  based on the respective lnc(4) and not too different from the ISA
  front-end it should be highly likely to work.
- Remove the descriptions of le(4), which where converted from lnc(4),
  from sys/i386/conf/NOTES and sys/pc98/conf/NOTES as there's a common
  one in sys/conf/NOTES.
2006-05-17 21:25:23 +00:00
Marius Strobl
dcaf1a3834 - As only the PCI front-end of le(4) is common to all platforms move its
entry to the PCI NICs section so it's in the same spot in all GENERIC
  config files.
- Add a note to the description of pcn(4) informing that is has precedence
  over le(4).
2006-05-17 20:44:01 +00:00
Poul-Henning Kamp
f6ce2a64f7 Send the pcvt(4) driver off to retirement. 2006-05-17 09:33:15 +00:00
Poul-Henning Kamp
c40da00ca3 Since DELAY() was moved, most <machine/clock.h> #includes have been
unnecessary.
2006-05-16 14:37:58 +00:00
Ruslan Ermilov
155d9f6a98 Kill more references to lnc(4).
Submitted by:	grep(1)
2006-05-16 12:15:39 +00:00
Yoshihiro Takahashi
7d11a60e60 Switch from the lnc driver to the le driver. But C-NET(98)S support is
dropped.
2006-05-15 11:15:34 +00:00
Poul-Henning Kamp
5405ab4889 Clean out sysctl machdep.* related defines.
The cmos clock related stuff should really be in MI code.
2006-05-11 17:29:25 +00:00
Doug Ambrisko
32397ce071 Add in linsysfs. A linux 2.6 like sys filesystem to pacify the Linux
LSI MegaRAID SAS utility.

Sponsored by:		IronPort Systems
Man page help from:	brueffer
2006-05-09 22:27:01 +00:00
Yoshihiro Takahashi
ecad9def1d Remove unneeded include. 2006-05-08 12:05:04 +00:00
Yoshihiro Takahashi
56c134bef1 - Move defines for PC-98 machine type from pc98/cbus/cbus.h into
pc98/pc98/pc98_machdep.h.
- Fix PC98_SYSTEM_PARAMETER_SIZE.
- Remove unused defines.
2006-05-08 12:03:58 +00:00
Yoshihiro Takahashi
9f61d3129a Add the ath and the wlan crypto support. 2006-05-08 11:55:57 +00:00
Marcel Moolenaar
64220a7e28 Rewrite of puc(4). Significant changes are:
o  Properly use rman(9) to manage resources. This eliminates the
   need to puc-specific hacks to rman. It also allows devinfo(8)
   to be used to find out the specific assignment of resources to
   serial/parallel ports.
o  Compress the PCI device "database" by optimizing for the common
   case and to use a procedural interface to handle the exceptions.
   The procedural interface also generalizes the need to setup the
   hardware (program chipsets, program clock frequencies).
o  Eliminate the need for PUC_FASTINTR. Serdev devices are fast by
   default and non-serdev devices are handled by the bus.
o  Use the serdev I/F to collect interrupt status and to handle
   interrupts across ports in priority order.
o  Sync the PCI device configuration to include devices found in
   NetBSD and not yet merged to FreeBSD.
o  Add support for Quatech 2, 4 and 8 port UARTs.
o  Add support for a couple dozen Timedia serial cards as found
   in Linux.
2006-04-28 21:21:53 +00:00
Marcel Moolenaar
cea4d8752f o Move ISA specific code from ppc.c to ppc_isa.c -- a bus front-
end for isa(4).
o  Add a seperate bus frontend for acpi(4) and allow ISA DMA for
   it when ISA is configured in the kernel. This allows acpi(4)
   attachments in non-ISA configurations, as is possible for ia64.
o  Add a seperate bus frontend for pci(4) and detect known single
   port parallel cards.
o  Merge PC98 specific changes under pc98/cbus into the MI driver.
   The changes are minor enough for conditional compilation and
   in this form invites better abstraction.
o  Have ppc(4) usabled on all platforms, now that ISA specifics
   are untangled enough.
2006-04-24 23:31:51 +00:00
Yoshihiro Takahashi
c64cc84500 Add minidump.h for pc98. 2006-04-21 12:13:59 +00:00
Yoshihiro Takahashi
23fc45b550 MFi386: revision 1.625. 2006-04-21 12:12:21 +00:00
John Baldwin
39092e79ed Don't allow userland to set hardware watch points on kernel memory at all.
Previously, we tried to allow this only for root.  However, we were calling
suser() on the *target* process rather than the current process.  This
means that if you can ptrace() a process running as root you can set a
hardware watch point in the kernel.  In practice I think you probably have
to be root in order to pass the p_candebug() checks in ptrace() to attach
to a process running as root anyway.  Rather than fix the suser(), I just
axed the entire idea, as I can't think of any good reason _at all_ for
userland to set hardware watch points for KVM.

MFC after:	3 days
Also thinks hardware watch points on KVM from userland are bad:	bde, rwatson
2006-03-14 16:13:55 +00:00
Yoshihiro Takahashi
ed40c5a34d MFi386: revision 1.1220. 2006-03-04 07:31:58 +00:00
John Baldwin
57fb5e6097 - Use bus_setup_intr() and bus_teardown_intr() to register device driver
interrupt handlers rather than BUS_SETUP_INTR() and BUS_TEARDOWN_INTR().
  Uses of the BUS_*() versions in the implementation of foo_intr methods
  in bus drivers were not changed.  Mostly this just means that some
  drivers might start printing diagnostic messages like [FAST] when
  appropriate as well as honoring mpsafenet=0.
- Fix two more of the ppbus drivers' identify routines to function
  correctly in the mythical case of a machine with more than one ppbus.
2006-02-22 18:16:26 +00:00
Yoshihiro Takahashi
d41b34d1cd MFi386: revision 1.622.
> Clear carry flag in get_mcontext so that setcontext does not
> return a bogus error.

MFC after:	3 days
2006-02-09 11:50:22 +00:00
Yoshihiro Takahashi
2afd016ce3 The asr driver was moved to NOTES for i386. So 'nodevice asr' is not
needed anymore.
2006-02-09 11:43:13 +00:00
Yoshihiro Takahashi
df55e78b6f MFi386: Enable the ce(4). 2006-02-02 11:14:13 +00:00
Poul-Henning Kamp
d3e64681d6 Move the old BSD4.3 tty compatibility from (!BURN_BRIDGES && COMPAT_43)
to COMPAT_43TTY.

Add COMPAT_43TTY to NOTES and */conf/GENERIC

Compile tty_compat.c only under the new option.

Spit out
	#warning "Old BSD tty API used, please upgrade."
if ioctl_compat.h gets #included from userland.
2006-01-10 09:19:10 +00:00
Warner Losh
d5e61c97a6 By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT into
param.h.  Per request, I've placed these just after the
_NO_NAMESPACE_POLLUTION ifndef.  I've not renamed anything yet, but
may since we don't need the __.

Submitted by: bde, jhb, scottl, many others.
2006-01-09 06:05:57 +00:00
Warner Losh
501755f4f6 Define __HAVE_ACPI and/or __PCI_REROUTE_INTERRUPT, as appropriate for
each platform.  These will be used in the pci code in preference to
the complicated #ifdefs we have there now.
2006-01-01 20:59:28 +00:00
Yoshihiro Takahashi
3b52aaddac MFi386: revision 1.621 2005-12-26 12:46:36 +00:00
Yoshihiro Takahashi
d0873c5d1d Fix build error. 2005-12-23 12:14:55 +00:00
John Baldwin
b439e431bf Tweak how the MD code calls the fooclock() methods some. Instead of
passing a pointer to an opaque clockframe structure and requiring the
MD code to supply CLKF_FOO() macros to extract needed values out of the
opaque structure, just pass the needed values directly.  In practice this
means passing the pair (usermode, pc) to hardclock() and profclock() and
passing the boolean (usermode) to hardclock_cpu() and hardclock_process().
Other details:
- Axe clockframe and CLKF_FOO() macros on all architectures.  Basically,
  all the archs were taking a trapframe and converting it into a clockframe
  one way or another.  Now they can just extract the PC and usermode values
  directly out of the trapframe and pass it to fooclock().
- Renamed hardclock_process() to hardclock_cpu() as the latter is more
  accurate.
- On Alpha, we now run profclock() at hz (profhz == hz) rather than at
  the slower stathz.
- On Alpha, for the TurboLaser machines that don't have an 8254
  timecounter, call hardclock() directly.  This removes an extra
  conditional check from every clock interrupt on Alpha on the BSP.
  There is probably room for even further pruning here by changing Alpha
  to use the simplified timecounter we use on x86 with the lapic timer
  since we don't get interrupts from the 8254 on Alpha anyway.
- On x86, clkintr() shouldn't ever be called now unless using_lapic_timer
  is false, so add a KASSERT() to that affect and remove a condition
  to slightly optimize the non-lapic case.
- Change prototypeof  arm_handler_execute() so that it's first arg is a
  trapframe pointer rather than a void pointer for clarity.
- Use KCOUNT macro in profclock() to lookup the kernel profiling bucket.

Tested on:	alpha, amd64, arm, i386, ia64, sparc64
Reviewed by:	bde (mostly)
2005-12-22 22:16:09 +00:00
Yoshihiro Takahashi
6a901529f5 Enable the cs and disable the amdsmb and nfsmb on pc98. 2005-12-22 16:16:42 +00:00
Warner Losh
b0493a9984 Move device 'cs' into i386/pc98 specific NOTES. It is broken on ppc
because it uses i386 specific calls.  Maybe it could be added to
amd64, but I'm not so sure it would work there so I've not added it
there.
2005-12-20 23:00:11 +00:00
Yoshihiro Takahashi
b8a8ce140f Merged from sys/dev/sio/sio.c revision 1.463. 2005-12-18 11:16:31 +00:00
Yoshihiro Takahashi
944b597264 Switch MACHINE to "pc98" on FreeBSD/pc98.
Add copyright.

Approved by:	FreeBSD/pc98 development team.
2005-12-08 12:35:12 +00:00
Ruslan Ermilov
5219ffdbe0 cpp(1) only understand integer arithmetical expressions, so
_MACHINE == i386 test always succeeds, even on non-i386 (both
sides of expressions become 0).  Remove the comment since
_MACHINE and _MACHINE_ARCH are going away.
2005-12-06 13:22:14 +00:00
Ruslan Ermilov
44e09d2fa2 Fix -Wundef warnings from compiling GENERIC and LINT kernels of
all architectures.
2005-12-06 11:19:37 +00:00
Ruslan Ermilov
342ed5d948 Fix -Wundef warnings found when compiling i386 LINT, GENERIC and
custom kernels.
2005-12-05 11:58:35 +00:00
Yoshihiro Takahashi
54586e49a3 MFi386: revision 1.1215 (add savagedrm). 2005-11-30 11:58:01 +00:00
Ruslan Ermilov
6646524f34 - Allow duplicate "machine" directives with the same arguments.
- Move existing "machine" directives to DEFAULTS.
2005-11-27 23:17:00 +00:00
Ruslan Ermilov
1a581012df Add missing "struct" in i386/i386/machdep.c,v 1.497 by deischen@. 2005-11-24 08:16:18 +00:00
John Baldwin
1dab802e37 Garbage collect machine/smptests.h now that it is empty and no longer used. 2005-11-22 22:55:48 +00:00
John Baldwin
7417e80b4e Don't enable PUC_FASTINTR by default in the source. Instead, enable it
via the DEFAULTS kernel configs.  This allows folks to turn it that option
off in the kernel configs if desired without having to hack the source.
This is especially useful since PUC_FASTINTR hangs the kernel boot on my
ultra60 which has two uart(4) devices hung off of a puc(4) device.

I did not enable PUC_FASTINTR by default on powerpc since powerpc does not
currently allow sharing of INTR_FAST with non-INTR_FAST like the other
archs.
2005-11-21 20:22:35 +00:00
Yoshihiro Takahashi
643d537fcd MFi386: Remove obsolete options. 2005-11-09 12:26:37 +00:00
Yoshihiro Takahashi
4cf092a1fa Move the isa, npx, mem and io devices and the PC98 option from GENERIC
into DEFAULTS.
2005-10-28 15:30:51 +00:00
Ruslan Ermilov
c9003bc7fa Catch up with new interrupt handling code. 2005-10-26 06:44:59 +00:00
John Baldwin
58553b9925 Rename the KDB_STOP_NMI kernel option to STOP_NMI and make it apply to all
IPI_STOP IPIs.
- Change the i386 and amd64 MD IPI code to send an NMI if STOP_NMI is
  enabled if an attempt is made to send an IPI_STOP IPI.  If the kernel
  option is enabled, there is also a sysctl to change the behavior at
  runtime (debug.stop_cpus_with_nmi which defaults to enabled).  This
  includes removing stop_cpus_nmi() and making ipi_nmi_selected() a
  private function for i386 and amd64.
- Fix ipi_all(), ipi_all_but_self(), and ipi_self() on i386 and amd64 to
  properly handle bitmapped IPIs as well as IPI_STOP IPIs when STOP_NMI is
  enabled.
- Fix ipi_nmi_handler() to execute the restart function on the first CPU
  that is restarted making use of atomic_readandclear() rather than
  assuming that the BSP is always included in the set of restarted CPUs.
  Also, the NMI handler didn't clear the function pointer meaning that
  subsequent stop and restarts could execute the function again.
- Define a new macro HAVE_STOPPEDPCBS on i386 and amd64 to control the use
  of stoppedpcbs[] and always enable it for i386 and amd64 instead of
  being dependent on KDB_STOP_NMI.  It works fine in both the NMI and
  non-NMI cases.
2005-10-24 21:04:19 +00:00
Poul-Henning Kamp
733634738e Eliminate two unused arguments to ttycreate(). 2005-10-16 20:22:56 +00:00
Yoshihiro Takahashi
cb614592cf Reduce diffs from i386/i386/machdep.c 2005-10-16 12:33:14 +00:00
John Baldwin
4fdd2813ff Merge over the remaining changes from i386 of the ksiginfo_t changes so
that this compiles.

Pointy hat to:	davidxu
2005-10-14 22:03:39 +00:00
John Baldwin
021eda1d85 Remove the sx(4) driver at the request of the author. The author
originally wrote it for 4.x and hasn't really had the time to fully update
it to 5.x and later.  Also, the author doesn't use the hardware anymore as
well.  If someone does need this driver they can always resurrect it from
the Attic.

Requested by:	Frank Mayhar frank at exit dot com
2005-10-14 18:24:58 +00:00
David Xu
9104847f21 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most
changes in MD code are trivial, before this change, trapsignal and
   sendsig use discrete parameters, now they uses member fields of
   ksiginfo_t structure. For sendsig, this change allows us to pass
   POSIX realtime signal value to user code.

2. Remove cpu_thread_siginfo, it is no longer needed because we now always
   generate ksiginfo_t data and feed it to libpthread.

3. Add p_sigqueue to proc structure to hold shared signals which were
   blocked by all threads in the proc.

4. Add td_sigqueue to thread structure to hold all signals delivered to
   thread.

5. i386 and amd64 now return POSIX standard si_code, other arches will
   be fixed.

6. In this sigqueue implementation, pending signal set is kept as before,
   an extra siginfo list holds additional siginfo_t data for signals.
   kernel code uses psignal() still behavior as before, it won't be failed
   even under memory pressure, only exception is when deleting a signal,
   we should call sigqueue_delete to remove signal from sigqueue but
   not SIGDELSET. Current there is no kernel code will deliver a signal
   with additional data, so kernel should be as stable as before,
   a ksiginfo can carry more information, for example, allow signal to
   be delivered but throw away siginfo data if memory is not enough.
   SIGKILL and SIGSTOP have fast path in sigqueue_add, because they can
   not be caught or masked.
   The sigqueue() syscall allows user code to queue a signal to target
   process, if resource is unavailable, EAGAIN will be returned as
   specification said.
   Just before thread exits, signal queue memory will be freed by
   sigqueue_flush.
   Current, all signals are allowed to be queued, not only realtime signals.

Earlier patch reviewed by: jhb, deischen
Tested on: i386, amd64
2005-10-14 12:43:47 +00:00
Gleb Smirnoff
9c26aa3c12 Polling is now configured with help of ifconfig(8), not sysctl.
Prodded by:     maxim
2005-10-07 09:23:51 +00:00
Yoshihiro Takahashi
ea7d61cd29 Use 'PC Card' 2005-09-30 13:17:54 +00:00
Yoshihiro Takahashi
819766797e Switch from OLDCARD to NEWCARD on pc98. 2005-09-27 13:10:24 +00:00
Warner Losh
f31f999d7d Remove references to OLDCARD. 2005-09-25 21:26:09 +00:00
Christian S.J. Peron
33cdc78d01 Introduce a kernel config for the Mandatory Access Control framework.
This kernel config briefly describes some of the major MAC policies
available on FreeBSD. The hope is that this will raise the awareness
about MAC and get more people interested.

Discussed with:	scottl
2005-09-18 03:15:36 +00:00
Yoshihiro Takahashi
f7b1bf814d Add some defines for EPSON machines and use them. 2005-09-14 12:42:39 +00:00
Yoshihiro Takahashi
42244f27c2 Remove EPSON PC-386 note A/W/AE/WR support. 2005-09-14 12:39:06 +00:00
Yoshihiro Takahashi
74a91701b2 Remove unused functions. 2005-09-13 11:34:07 +00:00
Yoshihiro Takahashi
e3dd1d33b2 Remove EPSON_NRDISK support. 2005-09-13 11:33:25 +00:00
Yoshihiro Takahashi
4f6c3d8332 MFi386: revision 1.1204. 2005-07-21 11:13:12 +00:00
Ken Smith
22e59cec3b Add recently invented COMPAT_FREEBSD5 option.
MFC after:	3 days
2005-07-14 15:39:06 +00:00
John Baldwin
db015a9153 Fixup some more fallout from the lapic/i8254 changes:
- Make sure timer0_max_count is set to a correct value in the lapic case.
- Revert i8254_restore() to explicitly reprogram timer 0 rather than
  calling set_timer_freq() to do it.  set_timer_freq() only reprograms
  the counter if the max count changes which it never does on resume.  This
  unbreaks suspend/resume for several people.

Tested by:	marks, others
Reviewed by:	bde
MFC after:	3 days
2005-07-13 15:43:21 +00:00
Yoshihiro Takahashi
501bf5644b MFi386: revision 1.617. 2005-07-13 12:06:57 +00:00
John Baldwin
623b1a868e Remove a || 1 that crept into the i8254 commit and was subsequently
copied and pasted.  I had actually tested without this change in my
trees as had the other testers.

Reported by:	bde, Rostislav Krasny rosti dot bsd at gmail dot com
Approved by:	re (scottl)
Pointy hat to:	jhb
2005-07-05 20:13:12 +00:00
Yoshihiro Takahashi
811d79106f MFi386: r1.221 (Use a simpler implementation for the i8254 timecounter).
Approved by:	re (scottl)
2005-07-03 14:19:29 +00:00
Xin LI
60baed3742 Remove the CPU_ENABLE_SSE option from the i386 and pc98 architectures,
as they are already default for I686_CPU for almost 3 years, and
CPU_DISABLE_SSE always disables it.  On the other hand, CPU_ENABLE_SSE
does not work for I486_CPU and I586_CPU.

This commit has:
	- Removed the option from conf/options.*
	- Removed the option and comments from MD NOTES files
	- Simplified the CPU_ENABLE_SSE ifdef's so they don't
	  deal with CPU_ENABLE_SSE from kernel configuration. (*)

For most users, this commit should be largely no-op.  If you used to
place CPU_ENABLE_SSE into your kernel configuration for some reason,
it is time to remove it.

(*) The ifdef's of CPU_ENABLE_SSE are not removed at this point, since
    we need to change it to !defined(CPU_DISABLE_SSE) && defined(I686_CPU),
    not just !defined(CPU_DISABLE_SSE), if we really want to do so.

Discussed on:	-arch
Approved by:	re (scottl)
2005-07-02 20:06:44 +00:00
Yoshihiro Takahashi
aa6218d73b MFi386: revision 1.615 (change kernel crashdump format to ELF).
Approved by:	re (scottl)
2005-06-30 15:26:03 +00:00
Jean-Sébastien Pédron
aa84cd8e9e Connect reiserfs build to every platforms, not only i386 and pc98.
Reviewed by:	mux (mentor)
Approved by:	re (dougb)
2005-06-21 12:59:53 +00:00
David E. O'Brien
c3e0dfa1f8 Add .cvsignore files just like in sys/<arch>/compiled, this keeps CVS from
questing kernel config files not in CVS.

Approved by:	re(kensmith)
2005-06-20 16:52:59 +00:00
Yoshihiro Takahashi
6fd53a4f81 Sync with syscons update (Add new member to struct sc_rndr_sw). 2005-05-29 11:53:14 +00:00
Yoshihiro Takahashi
d4fcf3cba5 Remove bus_{mem,p}io.h and related code for a micro-optimization on i386
and amd64.  The optimization is a trivial on recent machines.

Reviewed by:	-arch (imp, marcel, dfr)
2005-05-29 04:42:30 +00:00
Yoshihiro Takahashi
f7965374d4 Change the spkr_set_pitch() function to a macro to fix low level profiling. 2005-05-28 13:40:27 +00:00
Yoshihiro Takahashi
6ff766dcdf MFi386: Add ReiserFS 2005-05-25 12:32:06 +00:00
Damien Bergamini
0b090f4153 Add new ral(4) and ural(4) drivers.
Approved by:	silby (mentor)
2005-05-24 16:48:07 +00:00
Yoshihiro Takahashi
914ee8ba4b Fix my copyright. 2005-05-14 10:51:16 +00:00
Yoshihiro Takahashi
b22bf66063 - Move bus dependent defines to {isa,cbus}_dmareg.h.
- Use isa/isareg.h rather than <arch>/isa/isa.h.

Tested on: i386, pc98
2005-05-14 10:14:56 +00:00
Yoshihiro Takahashi
24072ca35b - Move timerreg.h to <arch>/include and split i8253 specific defines into
i8253reg.h, and add some defines to control a speaker.
- Move PPI related defines from i386/isa/spkr.c into ppireg.h and use them.
- Move IO_{PPI,TIMER} defines into ppireg.h and timerreg.h respectively.
- Use isa/isareg.h rather than <arch>/isa/isa.h.

Tested on: i386, pc98
2005-05-14 09:10:02 +00:00
Yoshihiro Takahashi
bc3729b63f MFi386: revision 1.614. 2005-05-14 08:52:04 +00:00
Yoshihiro Takahashi
77bcc9ce35 Move the pc98 keymap define into pckbdtables.h because it should be used
only on the pckbd driver.
2005-05-12 13:39:31 +00:00
Yoshihiro Takahashi
164e09ddb4 - Move the NPX_DEBUG option to options.{i386,pc98} and use opt_npx.h.
- Move npx related defines to {i386,pc98}/include/npx.h to remove #include
  {isa,cbus}.h.
2005-05-12 12:47:41 +00:00
Yoshihiro Takahashi
257d63789e - Move lptreg.h into pc98/cbus and rename to olptreg.h.
- Remove ifdef pc98.
2005-05-10 12:30:30 +00:00
Yoshihiro Takahashi
d1725ef7ff Change a directory layout for pc98.
- Move MD files into <arch>/<arch>.
  - Move bus dependent files into <arch>/<bus>.
Rename some files to more suitable names.

Repo-copied by:	peter
Discussed with:	imp
2005-05-10 12:02:18 +00:00
Yoshihiro Takahashi
fb4c2dbf41 MFi386: revision 1.1198 (add KDB_STOP_NMI option). 2005-05-01 04:00:12 +00:00
Marcel Moolenaar
d47cce3ec8 Revert previous commit: The hwpmc(4) driver compiles on all platforms. 2005-04-20 22:19:51 +00:00
Yoshihiro Takahashi
10687779a9 Rename from apm_bioscall.s to apm_bioscall.S for removing a special rule
to build a module.  A repo-copy is not done because it has no important logs.

Pointed out by: ru
2005-04-20 12:28:20 +00:00
Warner Losh
f13ea502b5 Move this to the specific architectures that are supported. #ifdef foo
in sys/pmc.h precludes it from working on !i386, !amd64.  When that changes,
it can be moved back into conf/NOTES.
2005-04-19 22:16:46 +00:00
Warner Losh
bfe85d43c0 There's no need to include all the detauls of struct bus_space_{tag,handle}
in _bus.h when the typedef of the struct pointer will do.
2005-04-19 21:07:00 +00:00
Warner Losh
a32057cea5 Since pmc is a CPU feature, grab the mdep file from the i386 directory. 2005-04-19 21:06:06 +00:00
Warner Losh
5b930f51c9 Unbreak the pc98 build by including enough information in the _bus.h
for _bus.h to compile.

Pointy hat to: imp
Breakage noted by: nyan-san
2005-04-19 03:19:19 +00:00
Warner Losh
06db52b609 Break out the definition of bus_space_{tag,handle}_t and a few other types
into _bus.h to help with name space polution from including all of bus.h.
In a few days, I'll commit changes to the MI code to take advantage of thse
sepration (after I've made sure that these changes don't break anything in
the main tree, I've tested in my trees, but you never know...).

Suggested by: bde (in 2002 or 2003 I think)
Reviewed in principle by: jhb
2005-04-18 21:45:34 +00:00
Yoshihiro Takahashi
3033cea56c MFi386: revision 1.1194 (Update the drm driver). 2005-04-17 10:43:43 +00:00
Yoshihiro Takahashi
19983c91ba Remove unneeded include. 2005-04-17 09:44:17 +00:00
John Baldwin
133539f2aa Really remove the last vestiges of mixed mode from all but amd64. 2005-04-15 06:56:52 +00:00
Yoshihiro Takahashi
6ed58b70cf MFi386: revision 1.612. 2005-04-14 14:19:47 +00:00
Yoshihiro Takahashi
ce45d2c162 - Remove ifdef PC98.
- Reduce diffs from i386.
2005-04-13 13:26:48 +00:00
Yoshihiro Takahashi
aaaf1a6d53 Remove a meaningless include. 2005-04-13 13:18:32 +00:00
Yoshihiro Takahashi
91649ac9bd Move pc98 specific parts to the pc98 specific file. 2005-04-13 13:12:12 +00:00
Yoshihiro Takahashi
07665b88f4 Oops, correct typo. 2005-04-10 03:36:13 +00:00
Yoshihiro Takahashi
afa7e54ab7 Fix pc98 includes. 2005-04-08 03:38:13 +00:00
Yoshihiro Takahashi
cefad5bb41 Remove the wl driver. The devices don't work on pc98. 2005-04-08 03:36:32 +00:00
John Baldwin
c6a37e8413 Divorce critical sections from spinlocks. Critical sections as denoted by
critical_enter() and critical_exit() are now solely a mechanism for
deferring kernel preemptions.  They no longer have any affect on
interrupts.  This means that standalone critical sections are now very
cheap as they are simply unlocked integer increments and decrements for the
common case.

Spin mutexes now use a separate KPI implemented in MD code: spinlock_enter()
and spinlock_exit().  This KPI is responsible for providing whatever MD
guarantees are needed to ensure that a thread holding a spin lock won't
be preempted by any other code that will try to lock the same lock.  For
now all archs continue to block interrupts in a "spinlock section" as they
did formerly in all critical sections.  Note that I've also taken this
opportunity to push a few things into MD code rather than MI.  For example,
critical_fork_exit() no longer exists.  Instead, MD code ensures that new
threads have the correct state when they are created.  Also, we no longer
try to fixup the idlethreads for APs in MI code.  Instead, each arch sets
the initial curthread and adjusts the state of the idle thread it borrows
in order to perform the initial context switch.

This change is largely a big NOP, but the cleaner separation it provides
will allow for more efficient alternative locking schemes in other parts
of the kernel (bare critical sections rather than per-CPU spin mutexes
for per-CPU data for example).

Reviewed by:	grehan, cognet, arch@, others
Tested on:	i386, alpha, sparc64, powerpc, arm, possibly more
2005-04-04 21:53:56 +00:00
Warner Losh
b756200647 Move pc98 specific parts to the pc98 specific file. 2005-04-03 23:27:11 +00:00
Warner Losh
523ab3b440 With pc98/include, we can have pc98 and i386 specific bus space
implementations in their own files named $MACHINE/include/bus.h.  Copy
the contents appropriately.
2005-04-03 17:47:03 +00:00
Warner Losh
4dd0942599 Add reach-over include files to read i386/foo.h. In time, the pc98
specific code will migrate to these files to augment or replace the
version in i386/include and/or i386/linux.  This should, in the
fullness of time, allow many of the #ifdef PC98 in the tree.

# These files are in the public domain because there is insufficient
# creative content in them.  When you customize them, please add a
# copyright notice and license.

OK'd in principle by: nyan@
2005-04-01 23:19:43 +00:00
Warner Losh
5cc3e8555f Add i386 to machine lines 2005-04-01 22:59:25 +00:00
Yoshihiro Takahashi
a07bd8720f Add commented out ehci entry. 2005-03-30 14:05:28 +00:00
Warner Losh
ba9f795c74 bus is unused, so eliminate it.
Minor style(9) tweaks
2005-03-28 22:11:58 +00:00
John Baldwin
fc972f4cc4 Merge from i386:
- Add a i8254_pending variable to save some indirections in clkintr().
- Don't bother setting up an IRQ0 handler if we are using the lapic timer.
2005-03-24 21:36:15 +00:00
Maxim Sobolev
6bcf003260 Add USB Communication Device Class Ethernet driver. Originally written for
FreeBSD based on aue(4) it was picked by OpenBSD, then from OpenBSD ported
to NetBSD and finally NetBSD version merged with original one goes into
FreeBSD.

Obtained from:  http://www.gank.org/freebsd/cdce/
                NetBSD
                OpenBSD
2005-03-22 14:52:40 +00:00
Yoshihiro Takahashi
f227591555 s/SLIST/STAILQ/ 2005-03-20 05:22:57 +00:00
Murray Stokely
991f5121f0 Add a comment to note that pseudo-device bpf is required for DHCP.
This is mentioned in the Handbook but it is not as obvious to new
users why bpf is needed compared to the other largely self-explanatory
items in GENERIC.

PR:		conf/40855
MFC after:	1 week
2005-03-18 15:24:00 +00:00
Warner Losh
8afd8dde0c Define IRQ_NPX for the irq used for the npx. Define macro for a full
reset of of npx, as appropriate for the platform.
2005-03-16 20:44:19 +00:00
Yoshihiro Takahashi
f7fdacf1fa MFi386: revision 1.217. 2005-03-12 10:30:06 +00:00
Yoshihiro Takahashi
e3e5366a05 Backout revision 1.20. I was a misunderstanding.
Pointed out by:	Watanabe Kazuhiro
Pointy hat to:	nyan
2005-03-10 13:07:32 +00:00
John Baldwin
dd1d2889f2 - Remove the BURN_BRIDGES marked support for hooking into the ISA timer 0
interrupt.
- Remove the timer_func variable as it now has a static value of
  hardclock() and is only used in one place.

Axe borrowed from:	phk
2005-03-09 15:33:58 +00:00
Yoshihiro Takahashi
c3b74b57af MFi386: revisions 1.609 and 1.610. 2005-03-06 12:59:59 +00:00
Yoshihiro Takahashi
4dcdb61974 Don't use the ptoa() to set the 'realmem' variable. Because F/pc98's policy
is to keep the same as F/i386.
2005-03-04 14:26:23 +00:00
Wes Peters
95e2054492 Attempt to doff the pointy hat: implement 'hw.realmem' on remaining
architectures.  Pointed out by O'Brien, ScottL via email.

Reviewed by:	obrien (various)
2005-03-01 21:55:27 +00:00
Yoshihiro Takahashi
956a0ca6a9 MFi386: revisions 1.1186 and 1187
- Connect "options MP_WATCHDOG" to the LINT builds.
  - Spell "options" correctly as "options ".
2005-02-28 11:51:18 +00:00
Poul-Henning Kamp
e70377df79 Use dynamic major number allocation. 2005-02-27 22:16:30 +00:00
Tom Rhodes
183a16a3ec Remove recently added note about DEVICE_POLLING not working with SMP.
Remove warning from kern_poll.c to allow DEVICE_POLLING to be built with SMP.

Discussed with:	ru, glebius
2005-02-25 22:07:51 +00:00
Yoshihiro Takahashi
7655c399a6 Fix to support Buffalo HYPERMEMORY.
Submitted by:	Chiharu Shibata
MFC after:	3 days
2005-02-24 13:15:05 +00:00
Tom Rhodes
fda9ad60e4 According to kern_poll.c, you cannot use DEVICE_POLLING with SMP. Add a
commen about this in every NOTES file which lists DEVICE_POLLING.

PR:	46793
MFC:	1 day
2005-02-23 04:13:11 +00:00
Yoshihiro Takahashi
179c6e9063 Merged from sys/dev/sio/sio.c revision 1.458. 2005-02-11 03:41:34 +00:00
John Baldwin
3b1569715e Fix pc98 compile: merge in changes to use the local APIC timer. Also, add
missing initialization of i8254_intsrc while I am here.
2005-02-09 22:48:22 +00:00
Yoshihiro Takahashi
88d91a5ad0 Remove unused defines. 2005-02-07 12:23:07 +00:00
Poul-Henning Kamp
c81b5b21d3 Add missing isa_dmatc() function.
This may or may not be correct,  Only the pcii driver would notice and
it doesn't support PC98 yet.
2005-02-07 08:19:53 +00:00
Yoshihiro Takahashi
32b8035467 Sort includes and remove duplicate include. 2005-02-06 13:31:22 +00:00
Yoshihiro Takahashi
42d2323edd MFi386: revision 1.606. 2005-02-06 13:23:20 +00:00
Nate Lawson
3888a87205 Finish the job of sorting all includes and fix the build by including
malloc.h before proc.h on sparc64.  Noticed by das@

Compiled on:	alpha, amd64, i386, pc98, sparc64
2005-02-06 01:55:08 +00:00
Yoshihiro Takahashi
9f83151765 Merged from sys/dev/sio/sio.c revision 1.457. 2005-02-04 13:35:21 +00:00
Yoshihiro Takahashi
0faf078231 MFi386: revision 1.605. 2005-02-04 13:34:24 +00:00
Ruslan Ermilov
80c424cd2b MFi386: fix a comment. 2005-01-17 08:36:46 +00:00
Warner Losh
e253961839 In my last commit, I'd assumed that LINE30 was always defined. It
turns out that LINE30_ROW was always defined, not LINE30.  I confused
this for LINE30 and did the unifdef -DLINE30 using that mistaken
belief.  This corrects that problem.

Submitted by: nyan-san
2005-01-09 22:17:39 +00:00
Warner Losh
75a323c107 LINE30 is always defined now, so unifdef -DLINE30 for clarity. 2005-01-08 22:29:53 +00:00
Warner Losh
3e4ad73535 Merge module.h into 30line.h and remove it. It lacked a
copyright/license header and was only used by 30line.h.  It appears
that the copyright/license in 30line.h covers the old contents
module.h anyway, so this simplifies things a little while cleaning up
one obscure potential license confusion...

Revired by: nyan-san
2005-01-08 22:29:23 +00:00
Warner Losh
60727d8b86 /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
Warner Losh
125f6d40bd These are no longer relevant. They are scripts for extracting hints
from 4.x kernel config files.  User's wishing to upgrade from 4.x to 6
will need to go through 5.x, or grab this script from there.  These
scripts will remain in RELENG_5...
2005-01-07 00:54:35 +00:00
Jun Kuriyama
6f4e528a8e o Use tab instead of spaces for puc(4) line.
o Use capitalized "Ethernet" for consistency.
2005-01-05 05:25:21 +00:00
Yoshihiro Takahashi
34a9937988 Remove old wdc driver completely. 2005-01-04 11:04:03 +00:00
Warner Losh
5562482940 Catchup to wd removal 2005-01-04 07:26:51 +00:00
Warner Losh
c35aafff95 Remove last vestiges of old wd driver. ata works well on pc98 and
there was no objection on the pc98 list when I asked if it could be
removed a while ago.
2005-01-04 06:25:24 +00:00
Yoshihiro Takahashi
9bcb5389b9 MFi386: revision 1.421. 2005-01-02 09:51:07 +00:00
Poul-Henning Kamp
d214c67938 Fix comment. 2004-12-22 17:32:27 +00:00
Warner Losh
6c5c0a5ac1 Separate mse driver into a core driver and a bus attachments. Separate out
the ISA and CBUS (called isa on pc98) attachments.  Eliminate all PC98
ifdefs in the process (the driver in pc98/pc98/mse.c was a copy of the one
in i386/isa/mse.c with PC98 ifdefs).  Create a module for this driver.

I've tested this my PC-9821RaS40 with moused.  I've not tested this on i386
because I have no InPort cards, or similar such things.  NEC standardized
on bus mice very early, long before ps/2 mice ports apeared, so all PC-98
machines supported by FreeBSD/pc98 have bus mice, I believe.

Reviewed by: nyan-san
2004-12-12 20:05:50 +00:00
David Schultz
6004362e66 Don't include sys/user.h merely for its side-effect of recursively
including other headers.
2004-11-27 06:51:39 +00:00
David Schultz
11111b709f U areas are going away, so don't allocate one for process 0.
Reviewed by:	arch@
2004-11-20 02:29:25 +00:00
John Baldwin
2d68e3fb92 Initiate deorbit burn sequence for 80386 support in FreeBSD: Remove
80386 (I386_CPU) support from the kernel.
2004-11-16 20:42:32 +00:00
Yoshihiro Takahashi
2fc297fbd7 MFi386: revision 1.1170 2004-11-10 12:24:30 +00:00
Yoshihiro Takahashi
437a051986 Add FL_MFM flag to the fd_native_types structure.
Submitted by:	Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
2004-11-09 14:08:21 +00:00
Yoshihiro Takahashi
c7e77ece63 MFi386: revision 1.420 (Reduce annoying SCSI probing delay). 2004-11-04 15:20:26 +00:00
John Baldwin
d39d4a6e64 - Change the ddb paging "support" to use a variable (db_lines_per_page) to
control the number of lines per page rather than a constant.  The variable
  can be examined and changed in ddb as '$lines'.  Setting the variable to
  0 will effectively turn off paging.
- Change db_putchar() to force out pending whitespace before outputting
  newlines and carriage returns so that one can rub out content on the
  current line via '\r     \r' type strings.
- Change the simple pager to rub out the --More-- prompt explicitly when
  the routine exits.
- Add some aliases to the simple pager to make it more compatible with
  more(1): 'e' and 'j' do a single line.  'd' does half a page, and
  'f' does a full page.

MFC after:	1 month
Inspired by:	kris
2004-11-01 22:15:15 +00:00
Yoshihiro Takahashi
9bb402796d MFi386: revision 1.599 (Preserve dcons(4) buffer passed by loader(8).) 2004-10-30 12:41:20 +00:00
Poul-Henning Kamp
7229625e6d Don't set si_bsize_phys.
Use bioq_takefirst()
2004-10-29 11:12:16 +00:00
Yoshihiro Takahashi
e1dd8f11d1 Disable ed1 - ed12. 2004-10-24 12:07:02 +00:00
Poul-Henning Kamp
1ec1f41575 use bioq_takefirst() 2004-10-23 12:45:39 +00:00
Poul-Henning Kamp
c2ec6cc809 Use bioq_takefirst() 2004-10-22 08:12:49 +00:00
Yoshihiro Takahashi
9e6b875495 Merged from sys/dev/sio/sio.c (Use generic tty code). 2004-10-15 08:22:37 +00:00
Nate Lawson
3805720c53 Remove unused variable. 2004-10-15 04:59:21 +00:00
Nate Lawson
e5979322ba Remove local hacks to set flags now that the device probe does this for us.
Tested on every device except sio_pci and the pc98 fd.c.  Perhaps something
similar should be done for the "disabled" hints also.

MFC after:	2 weeks
2004-10-14 22:21:59 +00:00
Poul-Henning Kamp
9cb9afbd68 Use generic tty code instead of local stuff.
NB:  device names are now consistent:  {cua,tty}d$(port)[.lock,.init]
2004-10-13 08:27:20 +00:00
Yoshihiro Takahashi
725991af20 Add more PnP serial cards support.
PR:		kern/72226
Submitted by:	Hirokazu WATANABE <wnabe@par.odn.ne.jp>
2004-10-01 15:58:54 +00:00
Yoshihiro Takahashi
e48b233cd8 Merged from sys/dev/sio/sio.c: more tty related changes. 2004-09-20 14:01:38 +00:00
Poul-Henning Kamp
b6fa152c44 Use tty->t_sc, ttyalloc() and lock/init termios from struct tty. 2004-09-17 10:59:17 +00:00
Poul-Henning Kamp
ead167465e Include <sys/malloc.h> to satisfy new isa_dma stuff. 2004-09-17 10:55:01 +00:00
Poul-Henning Kamp
7ce1979be6 Add new a function isa_dma_init() which returns an errno when it fails
and which takes a M_WAITOK/M_NOWAIT flag argument.

Add compatibility isa_dmainit() macro which whines loudly if
isa_dma_init() fails.

Problem uncovered by:	tegge
2004-09-15 12:09:50 +00:00
Bill Paul
a07bd003bf Add device driver support for the VIA Networking Technologies
VT6122 gigabit ethernet chip and integrated 10/100/1000 copper PHY.
The vge driver has been added to GENERIC for i386, pc98 and amd64,
but not to sparc or ia64 since I don't have the ability to test
it there. The vge(4) driver supports VLANs, checksum offload and
jumbo frames.

Also added the lge(4) and nge(4) drivers to GENERIC for i386 and
pc98 since I was in the neighborhood. There's no reason to leave them
out anymore.
2004-09-10 20:57:46 +00:00
Scott Long
444ba94513 Switch the default scheduler to 4BSD to match what will go into RELENG_5 soon.
It can be switched back once 5.3 is tested and released.  Also turn on
PREEMPTION as many of the stability problems with it have been fixed.

MT5: 3 days.
2004-09-07 22:37:43 +00:00
Julian Elischer
ed062c8d66 Refactor a bunch of scheduler code to give basically the same behaviour
but with slightly cleaned up interfaces.

The KSE structure has become the same as the "per thread scheduler
private data" structure. In order to not make the diffs too great
one is #defined as the other at this time.

The KSE (or td_sched) structure is  now allocated per thread and has no
allocation code of its own.

Concurrency for a KSEGRP is now kept track of via a simple pair of counters
rather than using KSE structures as tokens.

Since the KSE structure is different in each scheduler, kern_switch.c
is now included at the end of each scheduler. Nothing outside the
scheduler knows the contents of the KSE (aka td_sched) structure.

The fields in the ksegrp structure that are to do with the scheduler's
queueing mechanisms are now moved to the kg_sched structure.
(per ksegrp scheduler private data structure). In other words how the
scheduler queues and keeps track of threads is no-one's business except
the scheduler's. This should allow people to write experimental
schedulers with completely different internal structuring.

A scheduler call sched_set_concurrency(kg, N) has been added that
notifies teh scheduler that no more than N threads from that ksegrp
should be allowed to be on concurrently scheduled. This is also
used to enforce 'fainess' at this time so that a ksegrp with
10000 threads can not swamp a the run queue and force out a process
with 1 thread, since the current code will not set the concurrency above
NCPU, and both schedulers will not allow more than that many
onto the system run queue at a time. Each scheduler should eventualy develop
their own methods to do this now that they are effectively separated.

Rejig libthr's kernel interface to follow the same code paths as
linkse for scope system threads. This has slightly hurt libthr's performance
but I will work to recover as much of it as I can.

Thread exit code has been cleaned up greatly.
exit and exec code now transitions a process back to
'standard non-threaded mode' before taking the next step.
Reviewed by:	scottl, peter
MFC after:	1 week
2004-09-05 02:09:54 +00:00
Ruslan Ermilov
f737784258 MFi386: revision 1.1172. 2004-09-02 12:50:47 +00:00
Peter Wemm
f37a929ca1 Kill count device support from config. I've changed the last few
remaining consumers to have the count passed as an option.  This is
i4b, pc98/wdc, and coda.

Bump configvers.h from 500013 to 600000.

Remove heuristics that tried to parse "device ed5" as 5 units of the ed
device.  This broke things like the snd_emu10k1 device, which required
quotes to make it parse right.  The no-longer-needed quotes have been
removed from NOTES, GENERIC etc.  eg, I've removed the quotes from:
   device  snd_maestro
   device  "snd_maestro3"
   device  snd_mss

I believe everything will still compile and work after this.
2004-08-30 23:03:58 +00:00
Dag-Erling Smørgrav
0eac4495db Remove the HW_WDOG option; it serves no purpose.
MFC after:	3 days
2004-08-29 11:10:09 +00:00
Andre Oppermann
c21fd23260 Always compile PFIL_HOOKS into the kernel and remove the associated kernel
compile option.  All FreeBSD packet filters now use the PFIL_HOOKS API and
thus it becomes a standard part of the network stack.

If no hooks are connected the entire packet filter hooks section and related
activities are jumped over.  This removes any performance impact if no hooks
are active.

Both OpenBSD and DragonFlyBSD have integrated PFIL_HOOKS permanently as well.
2004-08-27 15:16:24 +00:00
Yoshihiro Takahashi
6d0e236ade Merged from sys/dev/fdc/fdc.c revision 1.283. 2004-08-22 15:10:53 +00:00
Yoshihiro Takahashi
265d793d52 MFi386: revision 1.597. 2004-08-05 13:01:29 +00:00
Yoshihiro Takahashi
710f2673ba MFi386: revision 1.410. 2004-08-05 12:58:52 +00:00
Mark Murray
d23a262fc5 Making a loadable null.ko for /dev/(null|zero) proved rather
unpopular, so remove this (mis)feature.

Encouragement provided by:	jhb (and others)
2004-08-03 19:24:54 +00:00
Yoshihiro Takahashi
dc50f89c91 MFi386: revision 1.1167 2004-08-01 13:01:36 +00:00
Mark Murray
8ab2f5ecc5 Break out the MI part of the /dev/[k]mem and /dev/io drivers into
their own directory and module, leaving the MD parts in the MD
area (the MD parts _are_ part of the modules). /dev/mem and /dev/io
are now loadable modules, thus taking us one step further towards
a kernel created entirely out of modules. Of course, there is nothing
preventing the kernel from having these statically compiled.
2004-08-01 11:40:54 +00:00
Yoshihiro Takahashi
04fc672ad6 Merged from sys/dev/sio/sio.c revision 1.450. 2004-07-24 15:13:42 +00:00
Yoshihiro Takahashi
be1e68e14d MFi386: revision 1.596. 2004-07-19 11:17:57 +00:00
Maxim Konovalov
aa355a2679 In -CURRENT pseudo devices are not statically assigned at compile time,
remove a stale comment.

PR:		kern/62285
2004-07-18 09:03:12 +00:00
Yoshihiro Takahashi
2b117a5ab9 Rename the sound device drivers. 2004-07-17 10:22:42 +00:00
Yoshihiro Takahashi
b13793039c Merged from the following changes.
- sys/dev/fdc/fdc.c revision 1.281
  - sys/dev/fdc/fdcvar.h revision 1.3
  - sys/dev/fdc/fdc_isa.c revision 1.7
2004-07-17 10:07:19 +00:00
Poul-Henning Kamp
672c05d49c Preparation commit for the tty cleanups that will follow in the near
future:

rename ttyopen() -> tty_open() and ttyclose() -> tty_close().

We need the ttyopen() and ttyclose() for the new generic cdevsw
functions for tty devices in order to have consistent naming.
2004-07-15 20:47:41 +00:00
Yoshihiro Takahashi
dc6ea865f7 Move the fdc_alloc_resources function into the bus front end. 2004-07-15 15:00:02 +00:00
Dag-Erling Smørgrav
09a23520c0 Unbreak LINT: device card no longer takes a count. 2004-07-14 17:50:08 +00:00
Warner Losh
4b5239229c oldcard's card device no longer requires a count 2004-07-13 16:11:34 +00:00
Yoshihiro Takahashi
64c232e672 Merged from recent fdc driver changes.
Make a separate function to check FDD type.
2004-07-13 13:14:37 +00:00
Yoshihiro Takahashi
61e878c58c MFi386: revision 1.213.
Fix miss merging in previous change.
2004-07-13 12:58:36 +00:00
David Xu
53dbf30349 Add ptrace_clear_single_step(), alpha already has it for years, the function
will be used by ptrace to clear a thread's single step state.
2004-07-13 07:22:56 +00:00
Poul-Henning Kamp
911dbd84c7 Introduce ttygone() which indicates that the hardware is detached.
Move dtrwait logic to the generic TTY level.
2004-07-11 15:18:39 +00:00
Yoshihiro Takahashi
167b6b11dd MFi386: revision 1.212. 2004-07-11 13:46:10 +00:00
Yoshihiro Takahashi
fac5bedd49 MFi386: revision 1.406 2004-07-11 13:45:39 +00:00
Marcel Moolenaar
153af0fa47 MFi386: Update for the KDB framework:
o  Implement makectx().
o  Call kdb_enter() instead of Debugger().
o  Remove implementation of Debugger().
2004-07-10 23:04:42 +00:00
Marcel Moolenaar
6af8e47df7 Update for the KDB framework. Sanitize the alpha console code now that
it's in the way even more. Basicly: remove all alpha specific console
support from gfb(4), sio(4) and syscons(4). Rewrite the alpha console
initialization to be identical to all other platforms. In a nutshell:
call cninit().
The platform specific code now only sets or clears RB_SERIAL and thus
automaticly causes the right console to be selected.

sio.c:
o  Replace the remote GDB hacks and use the GDB debug port interface
   instead.
o  Make debugging code conditional upon KDB instead of DDB.
o  Call kdb_alt_break() instead of db_alt_break().
o  Call kdb_enter() instead of breakpoint().
o  Remove the ugly compatibility of using the console as the debug
   port.
2004-07-10 22:29:41 +00:00
Yoshihiro Takahashi
d5103548b4 - Merged from sys/dev/fdc/fdc.c revision 1.275.
- Break out the cbus front end from fd.c.
- Remove the pccard support because it was broken.
2004-07-08 13:56:17 +00:00
Yoshihiro Takahashi
71ca36da63 MFi386: revision 1.16. 2004-07-08 13:48:49 +00:00
Yoshihiro Takahashi
ccac00d33e Remove obsolete defines. 2004-07-08 13:47:56 +00:00
Yoshihiro Takahashi
b722c4d937 MFi386: revision 1.1164. 2004-07-08 13:47:01 +00:00
Yoshihiro Takahashi
6f5e06c605 MFi386: revision 1.1163 2004-07-01 09:34:15 +00:00
Yoshihiro Takahashi
b9d41c7aae Merged from sys/dev/sio/sio.c revision 1.446. 2004-07-01 09:32:32 +00:00
John Baldwin
3df6c4de7e - Shorten the names for the TTY related swi interrupt handlers as the
'tty:' prefix is largely redundant.
- Fix the priority of the low-priority TTY SWIs that are hung off of the
  softclock thread.

Submitted by:	bde (2)
2004-06-28 16:17:11 +00:00
Yoshihiro Takahashi
3fdb25139d Merged from sys/dev/sio/sio.c revision 1.444. 2004-06-28 13:28:20 +00:00
Poul-Henning Kamp
cb9ea5f4cb Pick the hotchar out of the tty structure instead of caching private
copies.

No current line disciplines have a dynamically changing hotchar, and
expecting to receive anything sensible during a change in ldisc is
insane so no locking of the hotchar field is necessary.
2004-06-26 09:20:07 +00:00
Yoshihiro Takahashi
dcfafc520f Merged from sys/dev/sio/sio.c revision 1.442.
(Use generic support for modemcontrol and BREAK ioctls.)
2004-06-26 04:00:46 +00:00
Poul-Henning Kamp
fdf5c3da04 Remove the TIOCDCDTIMESTAMP option.
The RFC-2783 PPS-API (<sys/timepps.h>) provides better and more
configurable service.
2004-06-22 20:32:17 +00:00
Yoshihiro Takahashi
2ed7f2ea6d Merged from sys/dev/sio/sio.c revisions 1.439 and 1.440. 2004-06-22 12:12:10 +00:00
Yoshihiro Takahashi
a9711ba5d1 MFi386: revision 1.592. 2004-06-22 12:11:20 +00:00
Yoshihiro Takahashi
dbb1228c8c MFi386: revision 1.1161 2004-06-16 14:21:52 +00:00
Poul-Henning Kamp
89c9c53da0 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
Warner Losh
28384b60be Include vm/vm_param.h to pull in KERNBASE now. This should fix the
pc98 tinderbox breakage.
2004-06-13 20:17:44 +00:00
Poul-Henning Kamp
1930e303cf Deorbit COMPAT_SUNOS.
We inherited this from the sparc32 port of BSD4.4-Lite1.  We have neither
a sparc32 port nor a SunOS4.x compatibility desire these days.
2004-06-11 11:16:26 +00:00
John Baldwin
092a5c4530 Remove atdevbase and replace it's remaining uses with direct references to
KERNBASE instead.
2004-06-10 20:31:00 +00:00
Poul-Henning Kamp
bbc8ceda71 Add missing <sys/module.h> includes. 2004-06-07 06:04:27 +00:00
Poul-Henning Kamp
13e84a71e0 Centralize the line discipline optimization determination in a function
called ttyldoptim().

Use this function from all the relevant drivers.

I belive no drivers finger linesw[] directly anymore, paving the way for
locking and refcounting.
2004-06-04 21:55:55 +00:00
Poul-Henning Kamp
fe3ec6224a Manual edits to change linesw[]-frobbing to ttyld_*() calls. 2004-06-04 20:04:52 +00:00
Poul-Henning Kamp
2140d01b27 Machine generated patch which changes linedisc calls from accessing
linesw[] directly to using the ttyld...() functions

The ttyld...() functions ar inline so there is no performance hit.
2004-06-04 16:02:56 +00:00
Poul-Henning Kamp
ba9ee6c533 Add missing <sys/module.h> #includes 2004-06-04 13:04:10 +00:00
Poul-Henning Kamp
e451f9b758 Make the remaining serial drivers call ttyioctl() rather than calling
the linedisc directly.
2004-06-04 08:02:37 +00:00
Poul-Henning Kamp
186f2b9e04 Add missing <sys/module.h> includes currently relying on nested include
in <sys/kernel.h>
2004-06-03 06:10:02 +00:00
Poul-Henning Kamp
be9bd88238 There is no need to explicitly call the stop function. In all likelyhood
->l_close() did it and ttyclose certainly will.
2004-06-01 11:57:15 +00:00
Poul-Henning Kamp
a1cda79464 There is no need to explicitly call ttwakeup() and ttwwakeup() after
ttyclose() has been called.  It's already been done once by ttyclose,
and probably once by the line-discipline too.
2004-06-01 11:38:06 +00:00
Poul-Henning Kamp
bda4474a59 ttyclose() increments t_gen. Remove redundant increments in drivers. 2004-06-01 10:15:56 +00:00
Yoshihiro Takahashi
a83e8010cc Merged from sys/dev/fdc/fdc.c revision 1.272. 2004-05-30 13:56:06 +00:00
Yoshihiro Takahashi
438bbad62b MFi386: revision 1.1160. 2004-05-18 11:56:56 +00:00
Yoshihiro Takahashi
413131337a Mereged from sys/dev/sio/sio.c revision 1.429. 2004-05-06 13:16:45 +00:00
Bruce Evans
987a42cca3 Oops, switch to using the moved cy driver for pc98 too (remove pointers
to old files in files.pc98 and "count" parameter in NOTES).
2004-05-03 16:03:41 +00:00
Marcel Moolenaar
d1d9feac7c Add option GEOM_GPT. This brings the ability to have a large number of
partitions on a single disk.
2004-05-02 20:40:19 +00:00
David E. O'Brien
4e744b5e7f Spell Ethernet correctly. 2004-05-02 18:57:29 +00:00
Yoshihiro Takahashi
4496bb391f - Remove obsolete examples.
- Add a comment about meaning of flags.
- Disable unused defines.
2004-05-01 06:53:38 +00:00
Yoshihiro Takahashi
2c7f49d5d5 Merged from sys/dev/sio/sio.c revision 1.428. 2004-05-01 06:46:10 +00:00
Yoshihiro Takahashi
5f824041cf Add the commented out rue(4) entry. 2004-04-29 08:33:26 +00:00
Yoshihiro Takahashi
944d807245 Merged from sys/isa/fd.c revision 1.270. 2004-04-25 12:43:44 +00:00
Warner Losh
d9c060ad52 sx was randomly added to NOTES. Instead, place it in the misc
hardware in properly sorted order.  Fix a little disorder while I'm
here.

Submitted by: bde
2004-04-14 02:25:31 +00:00
Yoshihiro Takahashi
8b29c1a01e Enable the sx driver on i386 and pc98. 2004-04-13 14:04:25 +00:00
Warner Losh
c3959ad01c The bs driver was replaced with the ct(pc98) driver. takahashi-san
(nyan) says this driver is now obsolete and can be removed.
2004-04-07 05:44:51 +00:00
Warner Losh
2fcbca0d85 Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and email from Peter Wemm,
Alan Cox and Robert Watson.

Approved by: core, peter, alc, rwatson
2004-04-07 05:00:01 +00:00
Yoshihiro Takahashi
e1ece6d1eb MFi386: Enable the cy driver. 2004-04-06 14:19:45 +00:00
Yoshihiro Takahashi
708fa777c3 Backout revision 1.31. The twa entries were moved to i386/conf/NOTES. 2004-04-04 04:41:52 +00:00
Yoshihiro Takahashi
a8c6f0ac9c The twa device and related options are not needed. 2004-04-01 14:23:41 +00:00
Yoshihiro Takahashi
2c08d6bea1 Add a comment about time stamper.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2004-03-29 12:51:46 +00:00
Yoshihiro Takahashi
279b998b38 - Fix PC98 supports after importing auto selection. [1]
- Fix 1.44MB floppy drive probe sequence. [2]

Submitted by:	Watanabe Kazuhiro <CQG00620@nifty.ne.jp> [1]
		chi@bd.mbn.or.jp (Chiharu Shibata) [2]
2004-03-28 13:40:23 +00:00
Yoshihiro Takahashi
420eed9af1 MFi386: revision 1.1136. 2004-03-28 12:06:29 +00:00
Yoshihiro Takahashi
94d77589ca MFi386: revision 1.586. 2004-03-28 12:03:39 +00:00
Nate Lawson
5f96beb9e0 Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde
2004-03-17 17:50:55 +00:00
Yoshihiro Takahashi
877cbbe8a8 Don't use the pcic polling. 2004-03-16 12:40:11 +00:00
Warner Losh
dc57f07049 Temporarily comment out cy.
Remove COMPAT_OLDISA
2004-03-15 10:39:37 +00:00
Warner Losh
91a5625be4 including isa_device.h was historical in this file, remove it 2004-03-15 10:39:01 +00:00
David E. O'Brien
a5b0d49470 Shorten a long comment. 2004-03-15 00:49:40 +00:00
Warner Losh
26b74a3cdb comment out bs and wd entries in the hints 2004-03-14 23:02:07 +00:00
Yoshihiro Takahashi
eba504ff39 MFi386: Remove the stl and stli drivers. 2004-03-14 09:46:36 +00:00
Yoshihiro Takahashi
4c15fdec71 Restore CDIOCREADAUDIO ioctl.
Pointed out by:	KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
2004-03-07 14:16:42 +00:00
Yoshihiro Takahashi
05f0fb092f Remove '#include <machine/bus_pio.h>'. This is meaningless. 2004-03-07 05:39:38 +00:00
Yoshihiro Takahashi
5743ccb994 Remove unneeded devices. 2004-03-07 05:38:20 +00:00
Yoshihiro Takahashi
b7ac92ac50 MFi386: revisions from 1.1127 to 1.1131. 2004-03-07 04:09:18 +00:00
Yoshihiro Takahashi
151d92a4e1 Add the agp, bfe, sk and ti devices. (the agp is disabled by default).
Remove obsolete compat_atdisk device.
2004-03-07 04:07:57 +00:00
Poul-Henning Kamp
db42ff97da Remove unused FDNUMTOUNIT() macro 2004-02-29 10:21:40 +00:00
Yoshihiro Takahashi
6cab36d49d Merged from sys/isa/fd.c revision 1.266. 2004-02-26 14:59:10 +00:00
Poul-Henning Kamp
dc08ffec87 Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
2004-02-21 21:10:55 +00:00
Poul-Henning Kamp
8e1f1df080 Device megapatch 3/6:
Add missing D_TTY flags to various drivers.

Complete asserts that dev_t's passed to ttyread(), ttywrite(),
ttypoll() and ttykqwrite() have (d_flags & D_TTY) and a struct tty
pointer.

Make ttyread(), ttywrite(), ttypoll() and ttykqwrite() the default
cdevsw methods for D_TTY drivers and remove the explicit initializations
in various drivers cdevsw structures.
2004-02-21 20:41:11 +00:00
Poul-Henning Kamp
c9c7976f7f Device megapatch 1/6:
Free approx 86 major numbers with a mostly automatically generated patch.

A number of strategic drivers have been left behind by caution, and a few
because they still (ab)use their major number.
2004-02-21 19:42:58 +00:00
Poul-Henning Kamp
0b7ed341e1 Change the disk(9) API in order to make device removal more robust.
Previously the "struct disk" were owned by the device driver and this
gave us problems when the device disappared and the users of that device
were not immediately disappearing.

Now the struct disk is allocate with a new call, disk_alloc() and owned
by geom_disk and just abandonned by the device driver when disk_create()
is called.

Unfortunately, this results in a ton of "s/\./->/" changes to device
drivers.

Since I'm doing the sweep anyway, a couple of other API improvements
have been carried out at the same time:

The Giant awareness flag has been flipped from DISKFLAG_NOGIANT to
DISKFLAG_NEEDSGIANT

A version number have been added to disk_create() so that we can detect,
report and ignore binary drivers with old ABI in the future.

Manual page update to follow shortly.
2004-02-18 21:36:53 +00:00
Yoshihiro Takahashi
63c69957ca MFi386: revision 1.397 (cosmetic changes) 2004-01-30 13:15:42 +00:00
Yoshihiro Takahashi
6c5786f2da MFi386: revision 1.1122 (typos and cosmetic changes) 2004-01-30 13:06:57 +00:00
Yoshihiro Takahashi
41319fae45 The ataraid device is not needed for pc98. 2004-01-27 15:39:32 +00:00
Jeff Roberson
048ac395be - Recruit some new ULE users by making it the default scheduler in GENERIC.
ULE will be in a probationary period to determine whether it will be left
   as the default in 5.3 which would likely mean the rest of the 5.x series.
2004-01-24 21:38:52 +00:00
Jacques Vidrine
5864cda7c6 Add PFIL_HOOKS to the GENERIC kernel configuration, primarily so
that one can load the IPFilter module (which requires PFIL_HOOKS).

Requested by:	Many, for over a year
2004-01-24 14:59:51 +00:00
Yoshihiro Takahashi
0461cbf76e MFi386: revisions from 1.1116 to 1.1119.
Remove NEWCARD related devices.
2004-01-21 16:28:19 +00:00
Yoshihiro Takahashi
9ce630976e Merged from sys/dev/sio/sio.c revision 1.418. 2004-01-21 16:12:29 +00:00
Yoshihiro Takahashi
91d0bb0b66 MFi386: revision 1.1114. 2004-01-12 03:43:05 +00:00
Yoshihiro Takahashi
6c021e3150 MFi386: revision 1.583. 2004-01-11 09:18:33 +00:00
John Baldwin
b277f64b8b Remove the AUTO_EOI_2 option for PC-98 as it has never done anything anyway
and was even commented out in NOTES.
2004-01-06 18:51:14 +00:00
David Xu
a30ec4b99c Make sigaltstack as per-threaded, because per-process sigaltstack state
is useless for threaded programs, multiple threads can not share same
stack.
The alternative signal stack is private for thread, no lock is needed,
the orignal P_ALTSTACK is now moved into td_pflags and renamed to
TDP_ALTSTACK.
For single thread or Linux clone() based threaded program, there is no
semantic changed, because those programs only have one kernel thread
in every process.

Reviewed by: deischen, dfr
2004-01-03 02:02:26 +00:00
Bruce Evans
42033f49c1 Garbage-collected CLK_USE_TSC_CALIBRATION.
i386/conf/NOTES, pc98/conf/NOTES:
Fixed the descriptions of the other CLK_* options.
2003-12-30 07:28:54 +00:00
Yoshihiro Takahashi
92c531b502 Add detach method. 2003-12-28 12:25:49 +00:00
Bruce Evans
ac0e70c401 Merged from sys/dev/sio/sio.c revision 1.417. 2003-12-26 03:06:11 +00:00
Warner Losh
6ee2f106aa The dgb driver is redundant with the digi driver in the tree. It uses
lots of old interfaces, and digi now supports all cards that dgb
supported.  The author of the driver says that this is no longer
necessary.

Approved by: babkin@
2003-12-07 04:18:52 +00:00
Warner Losh
c786876b1c There is no such thing as a pc98 machine with ISA expansion slots, nor
is there a C-BUS Cronyx Sigma board.  Remove it from pc98 files and lint.

Approved by: re <scottl>
2003-12-03 21:44:44 +00:00
Bruce Evans
f177e8630c Merged from sys/dev/sio/sio.c revisions 1.415 and 1.416.
Approved by:	nyan
(Blanket approval for simple changes in sio.)
2003-11-17 23:13:08 +00:00
Yoshihiro Takahashi
b860ed6360 opt_apic.h is not needed. 2003-11-15 12:37:15 +00:00
Yoshihiro Takahashi
bd25c916d5 MFi386: revisions from 1.1102 to 1.1105. 2003-11-15 12:33:39 +00:00
Marcel Moolenaar
fcaa2925a9 Change the clear_ret argument of get_mcontext() to be a flags argument.
Since all callers either passed 0 or 1 for clear_ret, define bit 0 in
the flags for use as clear_ret. Reserve bits 1, 2 and 3 for use by MI
code for possible (but unlikely) future use. The remaining bits are for
use by MD code.

This change is triggered by a need on ia64 to have another knob for
get_mcontext().
2003-11-09 20:31:04 +00:00
Seigo Tanimura
512824f8f7 - Implement selwakeuppri() which allows raising the priority of a
thread being waken up.  The thread waken up can run at a priority as
  high as after tsleep().

- Replace selwakeup()s with selwakeuppri()s and pass appropriate
  priorities.

- Add cv_broadcastpri() which raises the priority of the broadcast
  threads.  Used by selwakeuppri() if collision occurs.

Not objected in:	-arch, -current
2003-11-09 09:17:26 +00:00
Yoshihiro Takahashi
0e87805663 Include machine/asmacros.h instead of machine/asm.h.
Submitted by:	bde
2003-11-05 17:01:51 +00:00
Bruce Evans
2bcad53cb9 Removed reference to the garbage (and soon to be deleted) option
DPT_ALLOW_MEMIO.
2003-11-05 14:34:36 +00:00
Yoshihiro Takahashi
6628d2596a 'options APIC_IO' is replaced by 'device apic'. 2003-11-04 13:52:09 +00:00
Yoshihiro Takahashi
87780dc517 'options APIC_IO' is replaced by 'device apic'. 2003-11-04 13:31:44 +00:00
Yoshihiro Takahashi
6469c6629c MFi386: revision 1.206 2003-11-04 13:15:12 +00:00
Yoshihiro Takahashi
18cf8bfb1c MFi386: revision 1.580 2003-11-04 13:14:14 +00:00
Yoshihiro Takahashi
95755cc99b Split pc98 support into pc98/pc98/nmi.c. 2003-11-04 13:01:41 +00:00
Yoshihiro Takahashi
b84a41b421 MFi386: revision 1.579. 2003-10-31 14:54:33 +00:00
Yoshihiro Takahashi
a59a17a08d Merged from sys/isa/syscons_isa.c revision 1.24. 2003-10-31 13:48:24 +00:00
Yoshihiro Takahashi
673520bac8 MFi386: revision 1.578. 2003-10-31 13:47:43 +00:00
Yoshihiro Takahashi
a1f83c968f MFi386: revision 1.577. 2003-10-19 11:35:44 +00:00
Poul-Henning Kamp
b52b7f465d Eliminate use bio_blkno. 2003-10-18 17:51:26 +00:00
Poul-Henning Kamp
91a50fa4a5 Discontinue bio_blkno usage. 2003-10-18 17:45:45 +00:00
Yoshihiro Takahashi
ac134d1d1b MFi386: revision 1.576. 2003-10-11 09:24:58 +00:00
Yoshihiro Takahashi
6d8fc6bf6f Merged from sys/dev/sio/sio.c revisions from 1.405 to 1.414. 2003-10-05 11:55:14 +00:00
Yoshihiro Takahashi
98120869b4 MFi386: revisions 1.572, 1.573 and 1.574. 2003-10-05 09:05:45 +00:00
Yoshihiro Takahashi
d4b3b85f35 MFi386: revision 1.205 2003-10-05 08:56:49 +00:00
Poul-Henning Kamp
3f99f14bf1 OK, I messed up /dev/console with what I had hoped would be compat
code.  Convert remaining console drivers and hope for the best.
2003-09-26 19:35:50 +00:00
Poul-Henning Kamp
405f776c83 Typo in last commit: missing ')' 2003-09-26 12:13:35 +00:00
Poul-Henning Kamp
4866f95d76 Change fb_attach() and fb_detach() to take a integer unit number rather
than a dev_t.

All of the dev_t's passed were bogusly created with makedev()
2003-09-26 10:41:44 +00:00
Yoshihiro Takahashi
33e38a2cc8 Implement the bus_space_map() function to allocate resources and initialize
a bus_handle, but currently it does only initializing a bus_handle.
2003-09-23 08:22:34 +00:00
Yoshihiro Takahashi
6c04a4a3dd Merged from sys/isa/fd.c revisions 1.259 and 1.260. 2003-09-18 09:49:08 +00:00
Yoshihiro Takahashi
211822ccef Merged from sys/isa/fd.c revision 1.258. 2003-09-13 12:56:05 +00:00
Yoshihiro Takahashi
8278014bce MFi386 revisions 1.570 and 1.571. 2003-09-11 14:07:02 +00:00
Yoshihiro Takahashi
916a70c619 MFi386: revision 1.204. 2003-09-11 14:05:06 +00:00
Yoshihiro Takahashi
c475aa0304 MFi386: revision 1.1093. 2003-09-11 13:44:48 +00:00
Yoshihiro Takahashi
79a5a35f9e Merged from sys/isa/fd.c revisions 1.252, 1.253, 1.254, 1.255 and 1.257. 2003-09-11 13:35:35 +00:00
David E. O'Brien
3fc40c2484 Sort 'bge' correctly. 2003-09-10 18:54:59 +00:00
Bill Paul
a94100fa9b Take the support for the 8139C+/8169/8169S/8110S chips out of the
rl(4) driver and put it in a new re(4) driver. The re(4) driver shares
the if_rlreg.h file with rl(4) but is a separate module. (Ultimately
I may change this. For now, it's convenient.)

rl(4) has been modified so that it will never attach to an 8139C+
chip, leaving it to re(4) instead. Only re(4) has the PCI IDs to
match the 8169/8169S/8110S gigE chips. if_re.c contains the same
basic code that was originally bolted onto if_rl.c, with the
following updates:

- Added support for jumbo frames. Currently, there seems to be
  a limit of approximately 6200 bytes for jumbo frames on transmit.
  (This was determined via experimentation.) The 8169S/8110S chips
  apparently are limited to 7.5K frames on transmit. This may require
  some more work, though the framework to handle jumbo frames on RX
  is in place: the re_rxeof() routine will gather up frames than span
  multiple 2K clusters into a single mbuf list.

- Fixed bug in re_txeof(): if we reap some of the TX buffers,
  but there are still some pending, re-arm the timer before exiting
  re_txeof() so that another timeout interrupt will be generated, just
  in case re_start() doesn't do it for us.

- Handle the 'link state changed' interrupt

- Fix a detach bug. If re(4) is loaded as a module, and you do
  tcpdump -i re0, then you do 'kldunload if_re,' the system will
  panic after a few seconds. This happens because ether_ifdetach()
  ends up calling the BPF detach code, which notices the interface
  is in promiscuous mode and tries to switch promisc mode off while
  detaching the BPF listner. This ultimately results in a call
  to re_ioctl() (due to SIOCSIFFLAGS), which in turn calls re_init()
  to handle the IFF_PROMISC flag change. Unfortunately, calling re_init()
  here turns the chip back on and restarts the 1-second timeout loop
  that drives re_tick(). By the time the timeout fires, if_re.ko
  has been unloaded, which results in a call to invalid code and
  blows up the system.

  To fix this, I cleared the IFF_UP flag before calling ether_ifdetach(),
  which stops the ioctl routine from trying to reset the chip.

- Modified comments in re_rxeof() relating to the difference in
  RX descriptor status bit layout between the 8139C+ and the gigE
  chips. The layout is different because the frame length field
  was expanded from 12 bits to 13, and they got rid of one of the
  status bits to make room.

- Add diagnostic code (re_diag()) to test for the case where a user
  has installed a broken 32-bit 8169 PCI NIC in a 64-bit slot. Some
  NICs have the REQ64# and ACK64# lines connected even though the
  board is 32-bit only (in this case, they should be pulled high).
  This fools the chip into doing 64-bit DMA transfers even though
  there is no 64-bit data path. To detect this, re_diag() puts the
  chip into digital loopback mode and sets the receiver to promiscuous
  mode, then initiates a single 64-byte packet transmission. The
  frame is echoed back to the host, and if the frame contents are
  intact, we know DMA is working correctly, otherwise we complain
  loudly on the console and abort the device attach. (At the moment,
  I don't know of any way to work around the problem other than
  physically modifying the board, so until/unless I can think of a
  software workaround, this will have do to.)

- Created re(4) man page

- Modified rlphy.c to allow re(4) to attach as well as rl(4).

Note that this code works for the sample 8169/Marvell 88E1000 NIC
that I have, but probably won't work for the 8169S/8110S chips.
RealTek has sent me some sample NICs, but they haven't arrived yet.
I will probably need to add an rlgphy driver to handle the on-board
PHY in the 8169S/8110S (it needs special DSP initialization).
2003-09-08 02:11:25 +00:00
Yoshihiro Takahashi
65463a6400 Merged from sys/dev/sio/sio.c revisions 1.403 and 1.404. 2003-08-28 11:20:54 +00:00
Yoshihiro Takahashi
e4d023cef8 Switch to dev/syscons/syscons.c. 2003-08-25 07:52:11 +00:00
Yoshihiro Takahashi
07efc976b0 MFi386: revisions 1.202 and 1.203. 2003-08-23 06:06:55 +00:00
Warner Losh
ba4b44f1c4 bandaide to make this build again 2003-08-16 17:22:54 +00:00
Poul-Henning Kamp
c43001fc56 As warned: Initiate deorbit burn for the pcaudio driver. 2003-08-15 14:56:05 +00:00
Yoshihiro Takahashi
cbb06fd60c MFi386: revision 1.201. 2003-08-08 12:45:42 +00:00
Yoshihiro Takahashi
a99de58f92 Merged from sys/dev/sio/sio.c revision 1.400. 2003-08-02 09:41:31 +00:00
Yoshihiro Takahashi
91e953ae9b Merged from sys/dev/ppc/ppc.c revision 1.42. 2003-08-02 09:25:25 +00:00
Peter Wemm
9fb1db7bc8 Cosmetic: fix disorder of opt_kstack_pages.h include. 2003-07-31 01:26:40 +00:00
Yoshihiro Takahashi
064cecd480 MFi386: revision 1.1090. 2003-07-23 12:09:14 +00:00
Peter Wemm
a35b33869d Initiate de-orbit burn for fpu-less operation. 386+387 is still
theoretically supportable, but you'd really be happier with FreeBSD 2.1.8
on it.
2003-07-22 08:11:17 +00:00
Yoshihiro Takahashi
6b6ee1e771 Supported the gdc_clear function.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2003-07-21 13:00:09 +00:00
David Xu
20a2d71332 Rename thread_siginfo to cpu_thread_siginfo.
Suggested by: jhb
2003-07-15 00:11:04 +00:00
Yoshihiro Takahashi
88dbf7e716 Fixed mouse cursor support.
Submitted by:	KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
2003-07-13 08:09:31 +00:00
John Baldwin
8a9bc9c03b - Use the new resource_disabled() helper function to see if devices are
disabled.
- Change the apm driver to match the acpi driver's behavior by checking to
  see if the device is disabled in the identify routine instead of in the
  probe routine.  This way if the device is disabled it is never created.

Note that a few places (ips(4), Alpha SMP) used "disable" instead of
"disabled" for their hint names, and these hints must be changed to
"disabled".  If this is a big problem, resource_disabled() can always be
changed to honor both names.
2003-07-02 16:09:02 +00:00
Yoshihiro Takahashi
1824eaaff5 MFi386: revision 1.566. 2003-06-28 12:35:46 +00:00
David Xu
b8f480ab94 Add a machine depended function thread_siginfo, SA signal code
will use the function to construct a siginfo structure and use
the result to export to userland.

Reviewed by: julian
2003-06-28 06:34:08 +00:00
Poul-Henning Kamp
2ca77c355d Replace evil abuse of geteblk() with malloc(9). 2003-06-16 07:41:47 +00:00
Yoshihiro Takahashi
47030ceaf2 Disable unneeded devices and options. 2003-06-15 04:31:52 +00:00
Warner Losh
56738d1490 pc98 doesn't need COMPAT_OLDISA for any devices in the kernel.
However, GENERIC has wdc commented out, and COMPAT_OLDISA is required
for that.  Comment out COMPAT_OLDISA and sdd a comment to this effect
near wdc.

Reviewed by: nyan@
2003-06-12 04:19:10 +00:00
Juli Mallett
d196a10856 Note that scbus is required for SCSI, not just "required" in general.
Submitted by:	Edward Kaplan (tmbg37 on IRC)
Reviewed by:	rwatson (in principle)
2003-06-08 02:03:02 +00:00