Commit Graph

2431 Commits

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