Commit Graph

399 Commits

Author SHA1 Message Date
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
martin c591ec88c0 FPU_EMULATE moved to arch/m68k/conf/files.m68k 2003-06-24 19:56:22 +00:00
martin d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
thorpej e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
thorpej 36da248c07 Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

There were some side-effects that I didn't anticipate, and fixing them
is proving to be more difficult than I thought, do just eject for now.
Maybe one day we can look at this again.

Fixes PR kern/21517.
2003-05-10 21:10:23 +00:00
thorpej b77900c3c2 Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM.  Machine-dependent code is
responsible for initializing them before main() is called.  Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

This also eliminates some kludges such as having to burn kernel_map
entries on space used by the kernel and stolen KVA.

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
2003-05-08 18:13:12 +00:00
dsl d91455ce26 Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
2003-05-02 08:45:10 +00:00
tsutsui 09c17d2c36 Initialize struct consdev more properly. 2003-05-01 23:25:52 +00:00
tsutsui 3077e80f76 KNF 2003-05-01 23:02:35 +00:00
ragge 1989d659bb Preserve the symbol table in the LKM || KSYMS cases also. 2003-04-27 10:42:48 +00:00
ragge d8c8fa8111 Add pseudo-device ksyms. 2003-04-26 14:10:04 +00:00
ragge 69a66687f8 Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
2003-04-26 11:05:05 +00:00
ragge 766d04f56a Add ksyms device major. 2003-04-25 21:10:46 +00:00
tsutsui 2ec93e87e3 Remove extra \n's in boot message. 2003-04-19 21:30:14 +00:00
tsutsui 14e6518ceb Fix typo, and TAB/space cosmetics. 2003-04-19 16:43:59 +00:00
tsutsui 7b4af0e724 Sync with reality. (it's my development machine) 2003-04-19 16:37:21 +00:00
tsutsui cc1ee25971 Disable options DIAGNOSTIC. 2003-04-19 16:35:03 +00:00
tsutsui fd46661ecf Remove definitions of SIZE and STRIP which should be defined elsewhere. 2003-04-19 07:34:15 +00:00
tsutsui a34a62065c Revert part of previous. sdstrategy() no longer calls
bounds_check_with_label() for RAW_PART.
2003-04-18 15:57:37 +00:00
christos b9f9db3ca2 Bye Bye UCONSOLE 2003-04-10 22:06:51 +00:00
thorpej 9a8042f242 Use PAGE_SIZE rather than NBPG. 2003-04-08 22:57:53 +00:00
thorpej cc2c493bc4 Use PAGE_SIZE rather than NBPG. 2003-04-02 07:35:54 +00:00
thorpej 44b9a2a1ec Use PAGE_SIZE rather than NBPG. 2003-04-02 04:05:31 +00:00
tsutsui 3917373a21 - Since current sdstrategy() calls bounds_check_with_label() implicitly,
allow overwriting disklabel for RAW_PART in bounds_check_with_label().
- Also allow overwriting disklabel even for !RAW_PART if securelevel == 0
  so that installboot(8) can write bootblock against 'a' partition.
- labelsector is at top of RAW_PART, not 'a' partition.
2003-03-30 08:37:16 +00:00
tsutsui b1b52ec626 Use 32bit daddr_t. 2003-03-30 08:01:13 +00:00
perseant eab869e1c0 Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
2003-02-27 19:22:36 +00:00
tsutsui 397febeb94 Backout previous. <sys/lock.h> is pulled from <sys/tty.h>. 2003-02-11 17:25:14 +00:00
tsutsui ff77623786 MI z8530sc driver now requires <sys/lock.h>. 2003-02-10 11:38:30 +00:00
wiz 9115df8c49 success, not sucess. Noted by mjl. 2003-01-28 22:35:02 +00:00
pk be1188e00d Provide locking required by the interrupt handlers running at IPL_SERIAL. 2003-01-28 12:35:31 +00:00
jdolecek 225c76a84a add prototype for switch_lwp_exit() 2003-01-21 21:59:49 +00:00
tsutsui 7de4540345 TAB/space cleanup. 2003-01-18 12:28:59 +00:00
thorpej 71b2230367 Merge the nathanw_sa branch. 2003-01-18 06:05:42 +00:00
tsutsui 9a5dedeaea Fix -Wsign-compare and -Wuninitialized warnings. 2003-01-11 16:01:49 +00:00
tsutsui 5db9bf0614 Fix -Wsign-compare warnings. 2003-01-11 16:00:48 +00:00
lukem 4bb41ae2f2 Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile.  Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.
2003-01-06 17:40:18 +00:00
wiz 7e681f7063 interrupt with two rs. 2003-01-06 13:04:54 +00:00
thorpej dbb0f0ebed Use aprint_normal() for cfprint routines. 2003-01-01 01:47:30 +00:00
tsutsui 738ea71fdd Remove __P(). 2002-12-20 16:54:15 +00:00
tsutsui 2cac3aae2d Remove __P(). 2002-12-20 16:39:10 +00:00
tsutsui 0687b33b99 Remove __P(). 2002-12-20 16:23:46 +00:00
thorpej 78ea2dd367 Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
2002-12-10 05:14:24 +00:00
lukem 0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
thorpej 09dfaace39 The traditional C preprocessor is fixed in GCC 3.3 now, so no need
to skip -traditional-cpp for HAVE_GCC3.
2002-11-26 18:51:12 +00:00
wiz e78e668887 Fix typo (responsiness -> responsiveness). 2002-11-22 12:20:58 +00:00
chs f9c2080322 merge pmap.c for all 4k-page motorola-MMU (or compatible) m68k platforms. 2002-11-05 07:41:17 +00:00
chs 6348674004 merge pmap.h for all 4k-page motorola-MMU (or compatible) m68k platforms. 2002-11-03 19:56:27 +00:00
chs 95aae207e0 use a merged sys_machdep.c for all the motorola-MMU m68k platforms. 2002-11-03 02:29:37 +00:00
chs 42a0d8fa15 use "static __inline" instead of "extern __inline" so that we can
build without optimization.
2002-11-03 01:34:41 +00:00
chs bcfb5eee88 enhance the common m68k db_memrw.c to handle read-only kernel text
and switch all the motorola-MMU m68k platforms to use it.
2002-11-02 20:26:36 +00:00
chs 40e5b8394f finish conversion to the common m68k cacheops:
add support for machine-specific flavors of the ops for off-chip caches.
many thanks to Izumi Tsutsui for his help with this.
2002-11-02 20:03:04 +00:00
chs c28a94e9e1 untangle includes a bit:
don't include cpu.h in pmap.h, nor cacheops.h in cpu.h.  instead,
include cpu.h and cacheops.h in just those .c files that need them.
2002-10-28 00:55:13 +00:00
jdolecek c82ab2eb79 now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
2002-10-26 13:50:17 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
chs 1c2419d28a merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
 - use m68k/cacheops.*, remove duplicates from cpu.h.
 - centralize a few declarations in (all the copies of) cpu.h.
 - define M68K_VAC on platforms which have a VAC.
 - switch the sun platforms to the (now common) proc_trampoline().
 - do the phys_map thang on the sun platforms too, no reason not to.
2002-10-20 02:37:21 +00:00
junyoung e4b7588c28 Add NEW_BUFQ_STRATEGY (disabled by default). 2002-10-18 15:11:08 +00:00
elric 5ab71e20b0 Added commented out cgd(4)s to GENERIC configs. 2002-10-14 18:39:22 +00:00
chs cb76676a56 merge pte.h for m68k w/ motorola or compatible MMU
(only 4k-page platforms so far).
2002-10-14 05:18:45 +00:00
provos 2f7a0aaac8 add SYSTRACE; approved perry. 2002-10-06 02:11:54 +00:00
elric d19d268a95 assign majors for raw and cooked cgd's. 2002-10-04 18:28:24 +00:00
jdolecek 2bbadb1fa6 make ha_name const 2002-10-02 20:21:32 +00:00
jdolecek c802e99987 make ka_name const 2002-10-02 20:21:01 +00:00
thorpej 021b694d77 Use CFATTACH_DECL(). 2002-10-02 04:40:08 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
jdolecek 2405f564a2 constify, should fix warning for mainbus.c 2002-09-27 20:06:44 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
thorpej 274c086b22 Remove <sys/map.h> 2002-09-26 18:54:30 +00:00
thorpej 71404bb533 Don't include <sys/map.h>. 2002-09-25 22:21:01 +00:00
martti 81e8d78cd4 Add one space between "#option" and "<tab>IPFILTER_DEFAULT_BLOCK" 2002-09-25 11:49:48 +00:00
chs c081614ea2 it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not.  doh.
2002-09-22 07:53:39 +00:00
chs 55e1f79335 add pmap_remove_all() hook (empty on most platforms so far). 2002-09-22 07:17:08 +00:00
martti 3b553bac54 Added (commented out) IPFILTER_DEFAULT_BLOCK. 2002-09-20 10:39:48 +00:00
lukem 3ea2e21f82 enable USERCONF by default; it's small and extremely useful to have available. 2002-09-18 02:43:53 +00:00
tsutsui 6ea9721865 Add (missed) entries for md(4). 2002-09-14 11:16:16 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
thorpej 139cdc3125 Make nbuf, nswbuf, and bufpages unsigned. Make all operations on these
variables unsigned, and update places where their values are printed.
2002-08-25 20:21:33 +00:00
abs 2287052465 PIPE_SOCKETPAIR, MALLOC_NOINLINE and VNODE_OP_NOINLINE are all appropriate for
the 'minimal memory' configurations.
2002-08-22 14:36:48 +00:00
briggs 0b956d0b8b Implement pmc(9) -- An interface to hardware performance monitoring
counters.  These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface.  Initially, the Intel XScale
counters are the only ones supported.
2002-08-07 05:14:47 +00:00
thorpej 3912e469dd Rename cdev_systrace_init() to cdev_clonemisc_init(), so it can
be properly used by any misc. cloning device.  While here, correct
a comment to indicate that "open" is the only entry point and that
everything else is handled with fileops.
2002-07-19 16:38:14 +00:00
scw bef00d4895 m68k syscall rototill:
- Switch all m68k-based ports over to __HAVE_SYSCALL_INTERN.
 - Add systrace glue.
 - Define struct mdproc in <m68k/proc.h> instead of <machine/proc.h>.
   (They were all defined exactly the same anyway, other than a couple
   of the MDP_* flags.)
2002-07-13 08:28:40 +00:00
abs eb73becae2 Ensure all INSTALL config files consistantly include PIPE_SOCKETPAIR,
MALLOC_NOINLINE, and VNODE_OP_NOINLINE. The exceptions are when they
include another config files that already defines the options, or if
they are for an embedded board, just define a few extra options, and
do not already define PIPE_SOCKETPAIR.
2002-07-05 13:40:10 +00:00
christos 3b50728cf4 MD systrace gluons. 2002-06-17 16:32:57 +00:00
lukem fde6ae6f04 Enable "pseudo-device clockctl" in all kernels, except
installation related kernels (INSTALL* and RAMDISK*).
This enables rc.conf(5) $ntpd_chroot to be used "out of the box"
2002-06-17 05:14:02 +00:00
thorpej d941ddfee0 Don't use -traditional-cpp if HAVE_GCC3. 2002-06-04 21:39:09 +00:00
thorpej f4e7583fb8 Make this work with an ISO C preprocessor. 2002-05-30 21:49:20 +00:00
drochner 60b6f587bc Subtract vm_map_min(kernel_map) from kernel virtual addresses to get offsets
into kernel_object where this was missing.
This is a no-op on ports where VM_MIN_KERNEL_ADDRESS==0, ie all but
cesfic.
Confirmed and corrected by Chuck Silvers.
2002-05-22 14:29:23 +00:00
tsutsui 4a46bc7dbc boot block info stuff is now in MI <sys/bootblock.h>. 2002-05-21 16:11:11 +00:00
lukem f35d18a7da Update to <sys/bootblock.h>'s shared_bbinfo.
From Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>.
2002-05-20 14:05:22 +00:00
tsutsui e8b1f54f84 Use ${.TARGET} where appropriate. 2002-05-18 19:03:10 +00:00
thorpej 4daab7072a Don't access a scsipi channel's periph table directly; use
scsipi_lookup_periph().
2002-05-16 02:50:53 +00:00
matt 84eb329d14 Eliminate commons (including many used ones). Clean up variable references. 2002-05-14 02:03:00 +00:00
jdolecek 77a65b5e56 use _KERNEL_OPT rather than _KERNEL && !_LKM 2002-05-11 09:39:25 +00:00
tsutsui 8b87191ece Add _rtt(), which is called by panic() in libsa/panic.c,
which is useed from ustarfs.c.
2002-04-30 13:10:56 +00:00
tsutsui 68d3a4f0ee Add ustarfs ops. 2002-04-30 13:09:05 +00:00
tsutsui 2d9bb7f94e Add getchar(). 2002-04-30 13:08:01 +00:00
tsutsui 27c8560138 Make sure whole DPRINTF()s are actually disabled on normal build.
It seems compiler does not remove text strings in while(0) statement
on its optimization.
2002-04-30 01:07:26 +00:00
tsutsui d60ade3462 Install bbinfo.h. 2002-04-27 10:20:38 +00:00
tsutsui 9f51b11c37 Use a magic structure with a magic number instead of using nlist(3)
for installboot(8) to patch proto bootblocks.
(This is a preparation to migrate MI installboot.)
2002-04-27 10:19:57 +00:00