Commit Graph

1228 Commits

Author SHA1 Message Date
bouyer dc306354b0 Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
1999-01-15 13:31:15 +00:00
thorpej e598335d1c Garbage-collect `mbutl'. 1999-01-09 22:10:12 +00:00
thorpej e279508ccb In pmap_zero_page() and pmap_copy_page(), set copyback caching of the
pages on the 68040 and 68060, to avoid cache consistency problems (since
regular mappings are copyback cached as well), per Ignatios Souvatzis.
1999-01-09 18:40:12 +00:00
augustss fc5f9ee81d Add -Wpointer-arith warning since `void *' arithmetic is not ANSI C. 1999-01-08 19:26:12 +00:00
thorpej 289b2e154f In pmap_zero_page() and pmap_copy_page(), don't bother invalidating the
mappings for CADDR1 and CADDR2, unless we're built w/ -DDEBUG.  Since
these addresses are only used in these routines, we can "lazily invalidate"
them by just using them again.  This makes these routines a teeny bit faster,
as it saves 1 or 2 TBIS's per call.

Suggested by Leo Weppelman <leo@netbsd.org>.
1999-01-08 05:15:43 +00:00
thorpej 795321b030 Make pmap_collect() actually do something useful. If called with a user
pmap, forget all of the mappings for the user address space for that pmap.
This causes the PT pages to be freed so that they can be reclaimed by the
VM system. [*]

[*] Actually, in the current implementation, it merely causes the wiring
count on the PT pages to drop to 0, which allows them to be reclaimed by
the pagedaemon.  Handling of PT pages needs to be completely rewritten.
1998-12-21 09:02:43 +00:00
thorpej d6bc370c2d Use a memory pool for pmap structures. 1998-12-21 08:51:39 +00:00
thorpej 43b82d559c Improve pmap_copy_page() and pmap_zero_page(). Don't use pmap_enter()/
pmap_remove() for the temporary addresses.  This is completely unnecessary
as the temps are used ONLY for these routines, and we have better control
over the mapping by manipulating the PTE ourself.  On VAC systems, cache-
inhibit the mapping to prevent wasting a cache load.

These routines are now significantly faster.

Add a DIAGNOSTIC check in pmap_enter() for kernel pmap and (CADDR1 or CADDR2);
nothing should be adding mappings there via that interface.
1998-12-21 06:58:39 +00:00
thorpej 51d0670371 Clean up a whole load of comments, making many of them truthful, and
indicating which functions are INTERFACE vs. which aren't.
1998-12-20 01:15:52 +00:00
thorpej 80e50e26a8 Unclutter a bit. Use a PMAP_DPRINTF() macro where possible, getting rid
of loads of #ifdef DEBUG ... stuff.
1998-12-19 23:51:47 +00:00
thorpej 6659e7174e In pmap_testbit(), if we end up traversing the PV list, cache a hit on the
bit to speed future tests.
1998-12-19 23:21:51 +00:00
thorpej 97f422e85b Make pmap_changebit() take bits to set and a PTE mask, rather than a bit
and a boolean.
1998-12-19 23:01:47 +00:00
thorpej d36a60d9cb G/c PMAPSTATS. It's unneeded clutter right now. 1998-12-19 21:11:14 +00:00
thorpej 459052a0fb Wire down some SCSI disk units. 1998-12-19 20:05:19 +00:00
itohy 36416d8500 Added options COMPAT_LINUX and EXEC_ELF32 as comments
to GENERIC configuration files.
1998-12-15 19:50:00 +00:00
itohy c05dadc113 Added COMPAT_LINUX support. 1998-12-15 19:36:36 +00:00
thorpej ebd6430388 Add some brackes to make EGCS happy. 1998-12-11 18:46:18 +00:00
hwr 59acb69be1 Add (commented out) 'gre' pseudo device line. Feedback is welcome.
Inspired by Klaus Klein.
1998-11-25 20:30:44 +00:00
kleink 94696a9ac3 Add support for the BUFCACHE config option. 1998-11-24 13:19:48 +00:00
mrg db3051d720 fix problems in many d_mmap routines:
- returned EOPNOTSUPP rather than -1.
	- no check for negative offset.
many of these fix potential security problems in these drivers.


XXX XXX XXX
the d_mmap cdev routine should be changed to have a prototype like:
	paddr_t (*d_mmap) __P((dev_t, off_t, int));

by someone!
1998-11-19 15:38:20 +00:00
oster cf5710c839 Added a (commented out) configuration line for the RAIDframe device driver. 1998-11-16 16:44:55 +00:00
oster c74d32c5fc Updating of bdev's and cdev's to support RAIDframe. 1998-11-13 04:47:03 +00:00
thorpej 49c62c4336 Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
  entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
  When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
1998-11-11 06:41:23 +00:00
frueauf a894e3a493 Add braces to make egcs happy. 1998-11-09 15:53:51 +00:00
tron b296275bb4 Defopt SYSVMSG, SYSVSEM and SYSVSHM. 1998-10-19 22:09:13 +00:00
thorpej 49dd2f5055 Need <sys/device.h> 1998-10-18 18:39:43 +00:00
thorpej adc5eb3a57 Fix a thinko in previous. 1998-10-18 17:15:04 +00:00
drochner 2468738337 change handling of libkern:
-sys/lib/libkern builds as library per default (as it was documented all
 the time)
-ports able to LKM set "KERN_AS=obj" explicitely in their Makefiles
 (for now; should depend on actual "option LKM" or -better- functions
 included for LKM use should be pulled in by a stub)
-always link libcompat before libkern - libkern stuff can be referred to
 by libcompat, but not the other way
1998-10-15 18:37:13 +00:00
chuck 8bef431273 remove unused share map code from UVM:
- update calls to uvm_unmap_remove/uvm_unmap (mainonly boolean arg
        has been removed)
1998-10-11 23:20:59 +00:00
thorpej 908cdfe4e3 Add scsibus entry points to the cdevsw[]. 1998-10-10 02:00:49 +00:00
thorpej d681cf055a configure() prototype is in <sys/device.h> 1998-10-06 20:50:15 +00:00
thorpej c01f29bdf1 Sigh, we are going to have to burn a vector for Just Sigreturn again,
for now, until we have a more generic {get,set}context().  Update the
comment for trap #3 accordingly.
1998-10-04 23:38:55 +00:00
thorpej ed03ee06e1 Update for signal changes. 1998-10-01 08:28:30 +00:00
thorpej d15a64c38b Adapt to signal changes. 1998-10-01 02:53:53 +00:00
thorpej 8b220e1148 Define SYS_compat_13_sigreturn13. 1998-10-01 00:29:51 +00:00
thorpej bcf14a99e2 Garbage collect trap #1 and trap #2 handlers; they're moved to
trap_subr.s
1998-09-30 23:47:33 +00:00
thorpej 1e62485c23 If !COMPAT_13, make trap #1 produce an illegal instruction. Fix the comment
for trap #2 to reflect that it's the trace trap.
1998-09-30 23:13:58 +00:00
thorpej a11e6632a8 Pull in opt_compat_netbsd.h 1998-09-30 23:01:28 +00:00
thorpej 35d282c8d5 Make sure SYS_exit and SYS___sigreturn14 are defined. Garbage collect
SYS_sigreturn.
1998-09-30 22:23:13 +00:00
thorpej 38084c6615 Note that trap #1 is compat_13_sigreturn, and give trap #3 to syscalls
which require special handling, e.g. sigreturn on m68k.

This differs from the old sigreturn trap in that we require the syscall
number to be in register d0, just like the regular syscall entry point.
This will allow sigreturn to be versioned in the future without the need
to allocate another trap vector.
1998-09-30 22:14:11 +00:00
mycroft 7b15b3b56d Minor change. 1998-09-13 12:01:41 +00:00
thorpej 70e641047c In cpu_coredump(), use MID_MACHINE rather than MID_* (whatever it expands
to).
1998-09-09 11:17:24 +00:00
thorpej 8abe0d6b1c Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code.  Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).
1998-09-09 00:07:48 +00:00
lukem c9db84ecc9 distclean is a synonym for cleandir 1998-09-05 15:15:14 +00:00
kleink ef1837c1ad Fix typo in previous (!UVM case, hence insignificant). 1998-09-03 12:38:31 +00:00
frueauf 56c79255db Fix typo: dbaddr_t -> db_addr_t. 1998-08-31 19:20:17 +00:00
thorpej 70b6acd9df Use NFS_BOOT_BOOTPARAMS until we change the boot program to use DHCP 1998-08-28 04:56:15 +00:00
kleink a6d3fb3799 vm_offset_t -> {paddr_t,vaddr_t}, vm_size_t -> vsize_t 1998-08-20 08:33:41 +00:00
mycroft 62b1bf3e2e Assign my copyrights to TNF. 1998-08-15 10:51:16 +00:00
mycroft 6dc903202f Assign my copyrights to TNF. 1998-08-15 10:10:47 +00:00
scottr 3e2efa4365 Fix a prototype tyop spotted by Bill Studenmund: s/clnintr/clnlintr/ 1998-08-12 06:46:57 +00:00
kleink 005ae749a7 Oops, make a sentence added in previous commit parseable. 1998-08-02 19:42:35 +00:00
thorpej 3ff8e6493a Don't cast the null residual pointer passed to vn_rdwr(). 1998-07-28 18:34:52 +00:00
drochner 49bb9d8214 adapt to LANCE driver split 1998-07-21 17:36:01 +00:00
thorpej e99bc6379d Don't deref a NULL tty pointer in the interrupt routine. This can happen
if we're the serial console, we have not yet been open'd, and we get an
interrupt for one reason or another.
1998-07-20 17:35:17 +00:00
kleink e641acf153 In configure(), initialize the HIL driver's software state before enabling
interrupts; if there's an interrupt pending (i.e. because the user pressed
a key or moved his mice while the kernel was being loaded), the interrupt
handler may safely be run.  Fixes PR port-hp300/5397.
1998-07-20 10:47:50 +00:00
thorpej d681d158c7 Remove the raw HYPERchannel kludge. 1998-07-15 17:45:52 +00:00
veego 1b46ebe1d9 Add elf_machdep.h to the INCS list. 1998-07-12 17:53:29 +00:00
thorpej 639cc899cf Basic elf_machdep.h for m68k; doesn't include relocations, yet. 1998-07-12 01:17:58 +00:00
thorpej 1ea93eea1c Define one page free list, and put all pages on it. 1998-07-08 04:35:23 +00:00
thorpej 4220ffab81 Loop until all netisrs are consumed; netisrs processed down the list might
cause additional netisrs to be scheduled.
1998-07-07 18:27:13 +00:00
jonathan 3472ba67bb * defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID (from unsaved buffers).
TODO: revisit interaction between native compat and emul compat usage.
1998-07-05 18:27:18 +00:00
jonathan 011f2bda08 defopt NS, NSIP. 1998-07-05 06:49:00 +00:00
jonathan 5c0c5dd0b4 defopt ISO TPIP. 1998-07-05 04:37:35 +00:00
jonathan 8db0fcdbf7 defopt CCITT. 1998-07-05 02:12:22 +00:00
jonathan 3751946b97 defopt INET, NETATALK. 1998-07-05 00:51:04 +00:00
jonathan 466e784ee1 defopt DDB. 1998-07-04 22:18:13 +00:00
thorpej e9b40e3d85 Dont' check sysflags here... just look for NHPIB or IHPIB device IDs. 1998-07-01 22:47:12 +00:00
thorpej a1e53914d7 If sysflags tells us we have an internal HP-IB interface, don't bother
reading the DIO device ID at select code 7, but rather hard-wire the ID
to the IHPIB ID.  This prevents us reading what might look like a valid
ID to another device when IHPIB is present.  (IHPIB doesn't always return
a correct device ID, grumble.)
1998-07-01 22:46:29 +00:00
thorpej b6d050ef0f Make use the `end' consistent. 1998-07-01 06:05:18 +00:00
lukem bd8d501f7e remove options FIFO; it's now the default 1998-06-26 01:53:43 +00:00
thorpej 37b378d836 defopt COMPAT_HPUX 1998-06-25 23:56:39 +00:00
thorpej 8aee7782f5 defopt COMPAT_SUNOS 1998-06-25 23:40:33 +00:00
thorpej 971b8956ef defopt KTRACE 1998-06-25 21:18:11 +00:00
kleink 10370475a3 In device_register(), explicitly initialize a static local variable
(seen_netdevice) with 0.
1998-06-17 13:08:47 +00:00
cgd 651b44e211 Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install.  (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.)  The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change.  Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
1998-06-12 23:22:30 +00:00
tv 00ede2160e Change ddb_init() for a.out to provision for kernels which are not booted by
the current 'bootblock' method, like the Shark, which preloads and preformats
the symbol table right in the boot code.
1998-06-09 01:57:41 +00:00
thorpej c1ca72eaf8 Build pmap_boostrap.o without profiling; we can't call mcount before the
mmu is enabled!
1998-05-31 23:18:57 +00:00
thorpej 92d8ae0ee3 Specify a non-profiling C rule. 1998-05-31 23:18:05 +00:00
thorpej 019443d82c Profiling version of the BASALT kernel. 1998-05-30 17:56:08 +00:00
scottr 47391e90cb Sync with mac68k: correct some errors if building a kernel with DEBUG. 1998-05-27 05:58:40 +00:00
is 7a0f63f982 Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
1998-05-24 19:32:34 +00:00
is 6a6812fd92 Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
1998-05-23 20:51:06 +00:00
thorpej 6626878e7b It is no longer necessary for pmap_pinit() and pmap_release() to be
pmap interface functions, as NetBSD no longer uses statically allocated
pmaps (except for the kernel pmap, which is special-cased anyhow).
1998-05-19 19:00:11 +00:00
hpeyerl a0872a3916 duh. need SYSV* stuff. 1998-05-19 15:20:40 +00:00
kleink 3e08a4a027 Spell `interrupt' correctly. 1998-05-18 17:37:38 +00:00
hpeyerl 96ee790741 Add the HP35470A DAT drive. 1998-05-17 17:09:55 +00:00
kleink 687ea7404c Fix some arithmetics lossage on typeless pointers. 1998-05-08 16:55:15 +00:00
kleink aa36ad1f55 Fix some arithmetics lossage on typeless pointers. 1998-05-07 21:01:41 +00:00
thorpej 09175fe9f8 options UVM no longer needed; it's standard 1998-05-04 05:01:55 +00:00
thorpej d1f4011d1d Switch to UVM. 1998-05-04 05:01:30 +00:00
thorpej 61665b7bc6 TCP_CWM option doesn't exist anymore; it's all run-time. 1998-05-01 05:24:34 +00:00
thorpej 80c08c1784 Turn off TCP_COMPAT_42, turn on TCP_CWM. 1998-04-29 04:57:49 +00:00
scottr 4804060a6b GC the old MACHINE_NONCONTIG code. 1998-04-26 21:24:27 +00:00
frueauf 863ece9212 egcs warning: don't use a char for array index, cast it to int. 1998-04-20 20:41:05 +00:00
tv b21bfbde11 Add -Wno-main conditional on compiler being gcc 2.8 or egcs. (This adds
a HAVE_GCC28 check-variable that can now be used to add other gcc-2.8
flags in cases where they may be useful, or to remove gcc 2.7.2 "bug
workaround" flags.)
1998-04-12 23:47:41 +00:00
thorpej f1821c7811 Adjust for recent ttyopen() and dialout device changes. 1998-03-28 23:49:06 +00:00
scottr 2f2b4dae56 Optimize some cycles out of the clock interrupt handler when
USE_LEDS is defined.
1998-03-21 08:05:37 +00:00
scottr 727b8bc7ac Charles Hannum pointed out that if a clock interrupt was posted while
we were in ledcontrol(), the heartbeat twinkler would just punt on
updating the LED even though it had already updated the status.  (This
was broken in v1.73 of locore.s).

Rather than resurrect the old code, simplify ledcontrol() and don't
bother with mutual exclusion.  As mentioned by the comments describing
this function, we really don't need to be that precise.  We do, however,
want to guarantee instructions that modify the status variable directly,
so the function is now primarily inline assembly.
1998-03-21 07:45:59 +00:00
bouyer 9f50fca1fd Add commented out "options FFS_EI" 1998-03-18 16:34:41 +00:00