Commit Graph

407 Commits

Author SHA1 Message Date
dyoung
94d985722a It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled.  So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks().  Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown().  No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown().  I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that.  Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.
2008-11-11 06:46:40 +00:00
he
22d492ac84 Adapt to changes in arm/arm32/mem.c -- use a mutex to control
access to DEV_MEM.  OK'ed by matt.
2008-11-08 10:18:10 +00:00
apb
f46c1de7cb Use ${TOOL_SED} instead if plain sed in Makefiles. 2008-10-25 22:27:34 +00:00
tsutsui
a371a94350 - use aprint_debug_dev(9) for debug info
- use aprint_normal_dev(9) rather than aprint_normal(9) + device_xname()
2008-10-11 20:36:40 +00:00
tsutsui
1a0c6c8f90 Remove advertising clause for UCB in various genassym.cf files,
which were derived from genassym.c in 4.4BSD-Lite2 (or 386BSD).
Closes PR misc/39573.  Approved by martin@.
2008-09-20 18:29:04 +00:00
tls
fca9d633b9 Add accept filters to GENERIC kernels where they exist. 2008-08-10 15:31:20 +00:00
simonb
0751ba4bff Add "options WAPBL" to standard GENERIC/INSTALL type configs. 2008-07-31 07:40:59 +00:00
cegger
2dea63fe78 use device_lookup_private to get softc 2008-06-13 13:08:57 +00:00
rafal
ba04e43210 Let the shark boot again. Fixes port-shark/38929. While I'm here fix the
splsoft... macros to always raise the IPL (oops!).
2008-06-11 23:31:35 +00:00
cegger
3ebed4b37a - use device_lookup_private to get softc
- ansify
fixes build errors about assignments of different pointer types
2008-06-11 21:16:28 +00:00
he
9072349832 Something, somewhere has started emitting a number of new ELF sections,
and these need to be removed when objcompying to netbsd.aout.  The new
ones were .debug_frame, .debug_loc, .debug_pubnames, and .debug_aranges.
2008-06-07 18:47:41 +00:00
tsutsui
6b0322861b Add options COMPAT_40 to files which have options COMPAT_30. 2008-05-30 20:10:01 +00:00
macallan
92b89da10e nuke clause 3 2008-05-08 02:03:22 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
matt
825088eda6 Merge kernel changes in matt-armv6 to HEAD. 2008-04-27 18:58:43 +00:00
macallan
94959c08d1 first step for X on rev. 4 Sharks - add support for mmap()ing ISA IO,
legacy VGA and SVGA aperture via /dev/ttyE0
Mappings are restricted to root ( hi Elad )
2008-04-17 00:03:36 +00:00
cube
d293cfca1a Split device_t and softc for all attachments of vga(4). 2008-03-14 22:12:08 +00:00
rmind
c6186face4 Welcome to 4.99.55:
- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
2008-03-01 14:16:49 +00:00
jmmv
055a66c56c Remove GENERIC.local from the repository
Make all the kernels that currently include their corresponding GENERIC.local
file use the cinclude directive instead of include.  This way config(1) will
not complain if the file cannot be found.

After doing this, remove the GENERIC.local files from the repository so that
the user will not see modified files during updates, and local changes to
them cannot end up in the repository by mistake.

Discussed in tech-kern@ earlier this month.  No strong objections.
2008-02-29 14:42:32 +00:00
drochner
bb33f35f20 Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
2008-02-20 21:43:33 +00:00
joerg
e69482d49d Introduce device_find_by_xname and device_find_by_driver_unit to replace
alldevs iterations all over src.

Patch discussed with and improved on suggestioned from cube@.
2008-02-12 17:30:57 +00:00
jmmv
ecaa0bc39a Support a GENERIC.local file. 2008-02-09 22:18:11 +00:00
chris
67bda63986 Add an arm/conf/std.arm file which contains common arm options, initially
just options CPU_IN_CKSUM.

Include std.arm in all arm platform std files.

This should reenable the asm in_cksum code for all arm platforms.

Also remove the now unused in_cksum_arm.S.
2008-01-27 12:37:10 +00:00
joerg
3615cf7715 Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
2008-01-20 18:09:03 +00:00
he
d8a7a4f892 Remove the debugging sections too when converting from an ELF
to an a.out file, after the addition of the "debugging always
included" file added recently.
2008-01-19 18:10:13 +00:00
chris
131e68c2e1 Remove arm support for IPKDB.
It hasn't worked since arm was broken out from arm32 in Jan 2001, and
no-one has noticed or cared to fix it.
2008-01-19 13:11:09 +00:00
matt
ace1262f40 current_intr_depth is dead. kill it off for good. 2008-01-06 03:01:59 +00:00
matt
e7574fcb84 Make sure interrupt handler is updating curcpu()->ci_depth 2008-01-06 01:19:42 +00:00
ad
503fb6483e A quick hack to make cpu_intr_p() work on shark. Needs to be fixed
properly by someone who does arm assembly.
2008-01-06 00:56:18 +00:00
christos
adf68778f6 Add PaX stuff for testing. 2008-01-05 20:14:01 +00:00
ad
2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
tsutsui
99221a563b Use TAILQ_FIRST(3) and TAILQ_NEXT(3) macro. 2007-12-05 12:31:25 +00:00
ad
4b293a84e1 Interrupt handling changes, in discussion since February:
- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
2007-12-03 15:33:00 +00:00
skrll
64ad60da4f Remove the .note section when creating the a.out kernel image. 2007-11-17 09:07:42 +00:00
jmmv
d749362b97 Drop pccons. Obsoleted by wscons, now fully supported in NetBSD/shark.
OK'ed by thorpej@ and tsutsui@ a while ago.
2007-10-28 18:01:54 +00:00
yamt
23005df1e0 defparam PAGER_MAP_SIZE. 2007-10-25 13:03:03 +00:00
joerg
d238692c3e Initialise the callbacks for tty.t_rstrt_ch in ttymalloc
as all drivers but Sun/SPARC's kd.c use the same arguments.
Separate callout_reset into callout_schedule and the initial
callout_setfunc using that.
2007-10-18 18:54:56 +00:00
garbled
d974db0ada Merge the ppcoea-renovation branch to HEAD.
This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
2007-10-17 19:52:51 +00:00
tsutsui
320e4f3fc5 Remove all references to spl_mask. Now it isn't used by any sources.
Discussed on port-arm.
2007-08-13 02:04:50 +00:00
tsutsui
5c47006ea3 In irq_setmasks(), refer spl_masks[current_spl_level] directly
rather than spl_mask which is a saved value in splraise() and
splx() functions because the latter one is not always sync'ed with
current_spl_level and interrupt state could be mangled.

Okay'ed by chris@, and should close PR port-shark/22355.
2007-08-13 01:55:31 +00:00
tsutsui
13c8b8da87 Restore a device major for sd(4), which can be attached at atapibus(4).
Fixes part of PR port-shark/36693.
2007-08-08 13:08:11 +00:00
jmmv
348921e110 Move 'options FONT_VT220L8x16' to a common place for all kernels so that
the user needn't remember to add this option to get a font that is almost
identical (but fixed!) to the built-in one.
2007-08-05 13:37:31 +00:00
tsutsui
72e8fd4495 Make clockintr() return 1 since it's always handled so that
clock interrupt is properly acounted by evcnt(9) in isa_irq.S.
2007-08-04 20:14:21 +00:00
jmmv
b77d937244 Only deal with isa dma stuff if this is available/needed. Fixes the build
of kernels when, e.g. the audio driver is disabled.

Per cube@'s suggestion.
2007-08-03 16:02:17 +00:00
jmmv
d291012153 Switch NetBSD/shark's installation kernel and disk image to use wscons
instead of pccons, just like its GENERIC kernel does.

This obsoletes pccons in this platform, which will probably be removed
later.
2007-07-31 19:51:58 +00:00
jmmv
f6199f0afb Force vga(4) to override the font built into the VGA ROM by one that
properly supports all characters expected by wscons.  While doing this
configure a font that resembles the native one as much as possible.

This is a prerequisite for switching INSTALL to use wscons.
2007-07-31 19:35:37 +00:00
jmmv
5575290bc2 Fix build of kernels that use vga or igsfb together with pccons by avoiding
a warning mentioning an unused static function.
2007-07-30 13:02:01 +00:00
jmmv
3e495310cf Print some debugging information when DEBUG is set, not when TERSE is
unset.  The latter is not a "standard" definition, and was used in very
few places anyway.
2007-07-30 12:25:14 +00:00
jmmv
38b7aff676 Replace usages of bcopy:
- Use memmove to copy memory blocks that are likely to overlap.  Fixes
  some rendering problems in programs that use, for example, the "insert
  rows" feature.  This was reproducible with sysinst as explained here:
  http://mail-index.netbsd.org/tech-install/2007/07/29/0000.html
- Use memcpy in situations where the blocks cannot overlap.
2007-07-29 18:01:11 +00:00
jmmv
daea18cac0 Disable the mouse driver during installation. Not needed. 2007-07-29 15:14:08 +00:00
ad
63811f5275 Generic soft interrupts are mandatory. 2007-07-14 21:48:17 +00:00
ad
88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
uwe
c75253c460 Nuke traces of PCI. Minor cosmetic clean ups. 2007-06-03 01:52:54 +00:00
uwe
dcaa9bf80c Include igsfb_ofbusvar.h by its full official name. 2007-06-03 01:31:31 +00:00
uwe
217bc0b26b Make the name of the multiple-inclusion guard symbol match the file location. 2007-06-03 01:28:54 +00:00
msaitoh
8ce1f4fff2 fix typos 2007-04-29 20:23:34 +00:00
jmmv
42390b383a Install both netbsd and netbsd.aout into / when running a "make install" in
the kernel's compilation directory.

Fixes PR port-shark/17569.
2007-03-12 15:09:35 +00:00
thorpej
165d4e6d83 Rewrite the ARM mutex implementation to be of the simple-mutex variety.
Because pre-v6 ARM lacks support for an atomic compare-and-swap, we
implement _lock_cas() as a restartable atomic squence that is checked
in the IRQ handler right before AST processing.  (This is safe because,
for all practical purposes, there are no SMP pre-v6 ARM systems.)

This can serve as a model for other non-MP platforms that lack the
necessary atomic operations for mutexes (SuperH, for example).

Upshots of this change:
- kmutex_t is now down to 8 bytes on ARM; about as good as we can get.
- ARM2 systems don't have to trap and emulate SWP or SWPB for mutexes.

The acorn26 port is not updated by this commit to do the LOCK_CAS_CHECK.
That is left as an exercise for the port maintainer.

Reviewed and tested by Matt Thomas.
2007-03-09 19:21:57 +00:00
matt
004b1a75b4 Make sure to include IPL_SOFT* and IPL_STATCLOCK when setting up IRQ masks. 2007-03-09 18:20:51 +00:00
matt
d471ccf3aa Clean the bitrotting ofw code. Don't export export the underlying irq
dispatch mechanism to the rest of the kernel; they don't need to know.
Nuke IRQSTATS entirely.

XXX ofwgencfg_clock needs to taught about timecounters
2007-03-08 20:48:39 +00:00
christos
5ebcdbe8b5 fix caddr_t fallout. 2007-03-04 10:21:25 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tsutsui
4f4391e397 Move mkldscript.sh, which is used to create ldscript dynamically to
merge link_set_* sections into the text section for a.out kernels,
from sys/arch/arm/conf/ to sys/conf/ since there is no ARM specific
stuff in it and other ports would share it.
2007-03-04 02:35:49 +00:00
mrg
9c61411e69 make this build without wscons or vga enabled. 2007-02-23 05:53:36 +00:00
thorpej
f6d76ae22a TRUE -> true, FALSE -> false 2007-02-22 16:45:48 +00:00
matt
0bd63d4831 Enable TMPFS 2007-02-20 16:14:49 +00:00
matt
2c6d199d35 Switch shark from intrcnt to evcnt 2007-02-20 01:51:16 +00:00
matt
f2151241de Move softintr_init from irq_init to cpu_configure. 2007-02-19 21:38:37 +00:00
matt
c77b6c330d Add IPL_SOFT 2007-02-18 21:04:21 +00:00
macallan
e8e145b6d9 fix typo - softintr.c is in arch/arm/arm/ not arch/arm/ 2007-02-18 08:10:41 +00:00
matt
981ae6645d Don't export spl_smasks or soft_interrupts. They are local to intr.c
Make sure that softintr_init() is called when needed.
Assume __HAVE_GENERIC_SOFT_INTERRUPTS is defined (since newlock2 requires it).
2007-02-18 07:48:20 +00:00
matt
37f7079751 Call softintr_init() 2007-02-18 07:20:40 +00:00
matt
6aa56b9197 Compile in arm/arm/softintr.c 2007-02-18 07:17:57 +00:00
matt
39cadbf356 Add __HAVE_GENERIC_SOFT_INTERRUPTS support for shark. This was done by
extenting the current arm generic intrs to support softintrs.  Add
IPL_SOFTCLOCK, IPL_SOFTNET, IPL_SOFTSERIAL.
2007-02-18 07:13:17 +00:00
ad
b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
macallan
2b8bf5f8d1 have OF re-initialize the console before calling OF_exit() so we actually
end up in something usable
2007-01-25 02:20:23 +00:00
hubertf
142c2a33ba Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
2007-01-24 13:08:11 +00:00
macallan
ed57b01256 add bus_space_*_stream() methods 2007-01-21 23:19:57 +00:00
yamt
8bf7662829 merge yamt-splraiseipl branch.
- finish implementing splraiseipl (and makeiplcookie).
	  http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
	- complete workqueue(9) and fix its ipl problem, which is reported
	  to cause audio skipping.
	- fix netbt (at least compilation problems) for some ports.
	- fix PR/33218.
2006-12-21 15:55:21 +00:00
macallan
793de63a0f add igsfb at ofbus 2006-12-07 03:11:15 +00:00
macallan
0e7f627c30 add glue for igsfb at ofbus 2006-12-07 03:10:14 +00:00
macallan
5d88b0aa20 make /dev/openfirm work in GENERIC again 2006-12-03 04:13:55 +00:00
wiz
6919c6578c s/independant/independent/, from Zafer. 2006-11-24 22:04:21 +00:00
christos
1665d5e960 fix spelling of accommodate; from Zapher. 2006-11-24 19:46:58 +00:00
jmmv
7a13fe4abf Remove tmpfs's experimental status. OK'ed by core@. 2006-11-11 18:47:08 +00:00
bjh21
ed5db5831e boot_file is not used by generic NetBSD/arm code, and its type varies by
MACHINE.  Thus, move it out of <arm/bootconfig.h> and put it into
<machine/bootconfig.h> on those MACHINEs (cats, hpcarm, and shark) where
it's used outside the file in which it's defined.
2006-10-26 23:31:47 +00:00
bjh21
3191d2a481 Change the type of initarm() on OFW-based ARM systems to match other non-hpcarm
ports.  This seems sensible since all of them call it from the same locore.S.
This makes NetBSD/shark GENERIC compile.
2006-10-26 22:49:36 +00:00
bjh21
84e47229be parse_mi_bootargs() is declared in <arm/arm32/machdep.h>, so there's no need
to declare it here too.
2006-10-24 21:03:13 +00:00
chs
e8295642bd remove MALLOC_NOINLINE, it doesn't do anything anymore. 2006-10-02 03:28:29 +00:00
elad
e8373398dc Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks! 2006-10-01 18:56:21 +00:00
manu
f309b668fd - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
2006-09-27 21:42:04 +00:00
gdamore
cf407be292 Convert shark and ofppc to new common ofrtc and MI todr code. Tested
on shark.  Ok christos@, martin@.
2006-09-13 07:14:35 +00:00
gdamore
40774842f0 Convert shark to timecounters. Tested by numerous folks, ok christos@,
martin@.
2006-09-13 07:13:03 +00:00
uebayasi
30636ef7d5 Resolve conflict (extern struct devsw devsw[] vs. static struct devsw devsw[]). 2006-09-13 06:47:28 +00:00
gdamore
39d7c2b083 Convert sequoia led's to getmicrotime() instead
of a hard coded reference to time.  This is necessary to
support timecountering.  Tested by pooka@
2006-09-12 17:50:53 +00:00
gdamore
01beb29b30 ANSIfy & KNF. 2006-09-12 17:07:14 +00:00
matt
b9525730ee deal with 'bool' definitions 2006-09-11 03:37:12 +00:00
tsutsui
663ffba751 Add __insn_barrier() to avoid too aggressive optimization by gcc4.
GENERIC compiled by gcc4 now works on my FUNAI's DNARD.
2006-09-05 15:50:37 +00:00
bjh21
e10108c7f2 Nothing in the kernel now tests __HAVE_NWSCONS, so stop defining it everywhere. 2006-09-03 13:51:23 +00:00
christos
e0df1e4c51 PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
2006-08-26 20:26:43 +00:00