Commit Graph

375 Commits

Author SHA1 Message Date
drochner a5a5473c25 remove now unnecessary "pci_enumerate_bus" definitions 2004-07-29 16:55:25 +00:00
kleink c004d32eb8 Reflect <sys/endian.h> rev. 1.4: make htonl() et al. arguments and
results uint{16,32}_t.  Noted by Ian Zagorskih.
2004-06-10 16:01:39 +00:00
thorpej e33c2bb5d5 Add the %MAKEOPTIONSAPPEND token at the end of the file, after the
common Makefile.kern.inc has been included.
2004-06-04 04:45:49 +00:00
wiz 1249084227 "panicking" needs a k. 2004-05-16 15:44:10 +00:00
he bf3ab88a22 Use lower optimization level (-O0) for miscfs/genfs/genfs_vnops.c
in order to avoid an internal compiler error with gcc 3.3.3 nb2.
2004-05-14 08:58:32 +00:00
he d05f876265 Avoid lint failure in setjmp.h; lint doesn't handle __attribute__
modified declarations.
2004-05-13 19:54:25 +00:00
kleink 7b3b647647 Factor out W{CHAR,INT}_{MAX,MIN} into their own header file. 2004-05-08 21:51:47 +00:00
drochner c83eb997b8 nothing cares about __HAVE_SIGINFO anymore, so nuke it 2004-03-26 21:39:57 +00:00
wiz f0d2889eb5 Move
(c) TNF
line from 4-clause UCB to 3-clause UCB license; in other words,
remove UCB's ad clause from the license TNF grants.
There is no point in TNF demanding that UCB's ad clause be followed
when even UCB doesn't demand it any longer.

Ok'd by board@ and agc@.
2004-03-24 15:38:41 +00:00
scw 62a0c71155 Make COMPAT_NETBSD32 build again. 2004-03-17 20:23:28 +00:00
scw fffcfa6444 Always check for the SHmedia entry point hack. The in-tree toolchain
doesn't need it, but SuperH's toolchain does.
2004-03-17 20:22:11 +00:00
scw 3b1323d3c7 Pass the ABI (32/64-bit) to the linker. 2004-03-17 20:20:43 +00:00
cl ea5ec0212d add kernel part of concurrency support for SA on MP systems
- move per VP data into struct sadata_vp referenced from l->l_savp
  * VP id
  * lock on VP data
  * LWP on VP
  * recently blocked LWP on VP
  * queue of LWPs woken which ran on this VP before sleep
  * faultaddr
  * LWP cache for upcalls
  * upcall queue
- add current concurrency and requested concurrency variables
- make process exit run LWP on all VPs
- make signal delivery consider all VPs
- make timer events consider all VPs
- add sa_newsavp to allocate new sadata_vp structure
- add sa_increaseconcurrency to prepare new VP
- make sys_sa_setconcurrency request new VP or wakeup idle VP
- make sa_yield lower current concurrency
- set sa_cpu = VP id in upcalls
- maintain cached LWPs per VP
2004-03-14 01:08:47 +00:00
wiz 73e1501b98 parameter with two es. From Peter Postma. 2004-02-24 15:22:01 +00:00
wiz d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
martin da4e67accc Do not export __HAVE_RAS to userland. Applications are supposed to try
rasctl() and detect failure with EOPNOTSUPP.
2004-01-18 18:23:19 +00:00
jdolecek 089abdad44 Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
  as FPU state), and is the last potentially blocking operation;
  all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
  by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
  for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread
2004-01-04 11:33:29 +00:00
jmc 695a2a2f9f Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
2003-12-10 02:04:00 +00:00
jdolecek f76cf6a9ea need cast to (long long) for %llx format when compiling 64bit kernel 2003-12-08 08:08:40 +00:00
scw f8506c0dbb Ditch some cruft which crept in with the last commit. 2003-12-07 20:03:47 +00:00
scw 081b7696ba Simplify the round/trunc page, and btop/ptob macroes. 2003-12-07 20:03:04 +00:00
scw c70112f9ae Quell a bunch of compiler warnings by avoiding using 'long long'. 2003-12-07 20:01:58 +00:00
scw 4d1e9c4846 De-lint.
(hey, these have never been linted before anyway ;)
2003-12-07 20:00:38 +00:00
scw 0a42a14b70 Re-write and simplify _sh5_stb1_tlbload to avoid branches. 2003-11-28 08:15:10 +00:00
scw 85c506fb3b While NetBSD/sh5 has never needed a sigcode trampoline, other parts of
the kernel seem to assume 'esigcode - sigcode' is non-zero.
2003-11-28 08:12:52 +00:00
scw 62816f9d48 Ditch some obsolete toolchain definitions and flags. 2003-11-09 23:30:39 +00:00
scw f64ae6c776 s/NULL/0/ 2003-11-09 21:39:48 +00:00
scw 4c4ac42348 More format string fallout. 2003-11-09 21:37:08 +00:00
scw eb042dabb2 Fix format string lossage. 2003-11-09 21:12:08 +00:00
scw cd75387049 Clear r3 to zero after dealing with the pseudo-header. 2003-11-09 12:24:48 +00:00
scw 2f54b52eac Print a trap/intr frame's SPC value. 2003-11-09 12:22:15 +00:00
scw 89a3825de9 In scif_rxsoft, bail early if the input buffers have not been initialised yet.
This can happen if we drop into ddb on the serial console before
scif_attach() has been called.
2003-11-09 12:19:54 +00:00
dsl 2ffbd2ab99 Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)
2003-11-04 10:33:15 +00:00
jdolecek 3abecdb88d avoid stong words in comments 2003-11-01 17:35:42 +00:00
cl ef56cc40ab Reduce code duplication by adding mi_userret() in sys/userret.h
containing signal posting, kernel-exit handling and sa_upcall processing.

XXX the pc532, sparc, sparc64 and vax ports should have their
XXX userret() code rearranged to use this.
2003-10-31 16:44:34 +00:00
simonb 6d85c5e0d5 Don't pass the (unused) return value args to the
trace_enter()/systrace_enter() functions.
2003-10-31 03:28:12 +00:00
kleink a3fabb9e7f Use <sys/ieee754.h> where applicable. 2003-10-26 20:55:30 +00:00
fvdl a08babb013 NULL -> 0 for preempt() argument. 2003-10-21 00:49:34 +00:00
briggs 11088af0ac Add SIGTRAMP_VALID(). 2003-10-18 18:29:53 +00:00
jdolecek ef5bb330f5 reassing majors for crypto and pf to use the newly defined MI major
range
2003-10-10 22:42:39 +00:00
jdolecek 4e915c9ccd update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
2003-10-10 21:21:25 +00:00
thorpej 901da40cf9 Add some accessor macros for the ucontext:
* _UC_MACHINE_PC() - access the program counter
* _UC_MACHINE_INTRV() - access the integer return value register
* _UC_MACHINE_SET_PC() - set the program counter (this requires
  special handling on some platforms).
2003-10-08 22:43:01 +00:00
lukem 1c33b4e6a4 Overhaul MBR handling (part 1):
<sys/bootblock.h>:
    *	Added definitions for the Master Boot Record (MBR) used by
	a variety of systems (primarily i386), including the format
	of the BIOS Parameter Block (BPB).
	This information was cribbed from a variety of sources
	including <sys/disklabel_mbr.h> which this is a superset of.

	As part of this, some data structure elements and #defines
	were renamed to be more "namespace friendly" and consistent
	with other bootblocks and MBR documentation.
	Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
    *	Deprecated in favor of <sys/bootblock.h> (the latter is more
	"host tool" friendly).

amd64 & i386:
    *	Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
	be consistent with the naming convention of the msdosfs tools.

    *	Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
	and it's confusing to have two functionally equivalent bootblocks,
	especially given that "ufs" has multiple meanings (it could be
	a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

    *	Rework pbr.S (the first sector of bootxx_*):
	    +	Ensure that BPB (bytes 11..89) and the partition table
		(bytes 446..509) do not contain code.
	    +	Add support for booting from FAT partitions if BOOT_FROM_FAT
		is defined.  (Only set for bootxx_msdos).
	    +	Remove "dummy" partition 3; if people want to installboot(8)
		these to the start of the disk they can use fdisk(8) to
		create a real MBR partition table...
	    +	Compile with TERSE_ERROR so it fits because of the above.
		Whilst this is less user friendly, I feel it's important
		to have a valid partition table and BPB in the MBR/PBR.

    *	Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
	with other platforms.

    *	Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
    	we can boot off FAT partitions.

    *	Crank version of /usr/mdec/boot to 3.1, and fix some of the other
	entries in the version file.

installboot(8) (i386):
    *	Read the existing MBR of the filesystem and retain the BIOS
    	Parameter Block (BPB) in bytes 11..89 and the MBR partition
	table in bytes 446..509.  (Previously installboot(8) would
	trash those two sections of the MBR.)

mbrlabel(8):
    *	Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
	to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
2003-10-08 04:25:43 +00:00
thorpej 68723a995b * Shuffle some data structures so, and add a flags word to ksiginfo_t.
Right now the only flag is used to indicate if a ksiginfo_t is a
  result of a trap.  Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap.  Expands to 0 if the ksiginfo_t was
  not the result of a trap.  This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
  Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
  the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern.  Reviewed and OK's by Christos.
2003-10-08 00:28:40 +00:00
scw 486ed93284 Kernel bits for siginfo on sh5. 2003-10-05 09:57:47 +00:00
jdolecek e6286b949a Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

Range 0-191 is reserved for machine-specific assignments, range
192+ are MI assignments.

Follows recent discussion on tech-kern@
2003-10-05 08:04:24 +00:00
nathanw 4d59420344 Move __cpu_simple_lock_t and __SIMPLELOCK_{UN,}LOCKED to machine/types.h
so that they can be used in a namespace-friendly way.
2003-09-26 22:45:41 +00:00
simonb 550b4bef88 Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.
2003-09-26 12:02:55 +00:00
cl 4fb604b287 add MD part of SA/pthread pagefault handling on sh5 2003-09-18 22:40:04 +00:00
scw 6e67b64a47 Add support for non-executable mappings. 2003-09-08 08:01:52 +00:00