Commit Graph

1474 Commits

Author SHA1 Message Date
chs b9604a3f30 make this compile again after PMAP_NEW cleanup. 1999-09-16 14:52:06 +00:00
thorpej 3b01d1b872 Rename the machine-dependent autoconfiguration entry point `cpu_configure()',
and rename config_init() to configure() and call cpu_configure() from there.
1999-09-15 18:10:33 +00:00
chs f3a668ed84 eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
1999-09-12 01:16:55 +00:00
bad 1a3995bac1 In apciparam() in the ospeed == 0 case, actually set the cfcr to the new
value.
1999-09-10 22:49:33 +00:00
mycroft c3e1f6741d A foolish consistency. 1999-08-30 18:58:01 +00:00
thorpej 2cf3330a1b Garbage-collect reference to <sys/dmap.h>. 1999-08-23 22:29:37 +00:00
simonb 06a92524c2 Include <sys/bswap.h> for function prototypes. i386, pc532 and vax
still include <machine/byte_swap.h> and define macros for some of
the bswap*() functions.
1999-08-21 05:39:51 +00:00
simonb 299578ebd5 Spell "privilege" correctly (correct spelling from Jonathan Stone). 1999-08-16 02:59:22 +00:00
bad 9e8bff3633 Another sacrifice to appease egcs: wrap "if .. if .. else" in braces. 1999-08-13 11:40:46 +00:00
thorpej ba76e54050 Use C-style comments. 1999-08-12 10:46:33 +00:00
thorpej 28fb7c1eb8 Define cpu_number() as discussed on tech-smp. 1999-08-10 21:08:05 +00:00
thorpej eb20bbc780 Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied.  Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX.  This platforms still have this bug until their
XXX spl*() functions are fixed.
1999-08-05 18:08:08 +00:00
thorpej 868dfcb228 Store computed PSL values in an array indexed by abstract interrupt
level, rather than individual shortwords.
1999-08-01 21:50:17 +00:00
thorpej d721481d50 Make sure the branch target of the delay loop is aligned to a cache
half-line (8-byte) boundary.  Inspired by a discussion w/ Scott Reynolds.
1999-08-01 21:32:17 +00:00
thorpej 22d6c3f13b Fix APCI console initialization; we were forgetting to update cn_tab.
From Christoph Badura.
1999-08-01 21:30:21 +00:00
thorpej 9c48987e94 Ooops, add a missing break. 1999-08-01 18:17:26 +00:00
thorpej 749eee308d If building without ITECONSOLE, don't install our own NMI handler. Just
leave the ROM's NMI handler in place.
1999-07-31 21:49:03 +00:00
thorpej f4da661b4a Nuke the DCA check. ACPI can only be console on a 425e. 1999-07-31 21:17:08 +00:00
thorpej c870d5243c Skip "serial 1" on non-425e models. It's mapped to DCA at 9 on every
other 4xx model, and the "not configured" could be pretty annoying.
1999-07-31 21:15:20 +00:00
thorpej e1f99936c8 Nuke apcicheckdca(). Since "serial 1" only exists as an APCI serial
port on the 425e, key off that instead.
1999-07-31 21:14:36 +00:00
thorpej 232492c350 Oops, forgot to add MMUID_385. 1999-07-31 20:50:48 +00:00
thorpej 5ab8857d4e Add HP385. 1999-07-31 20:19:31 +00:00
thorpej f7b10e4c9f defopt HP385. 1999-07-31 19:56:48 +00:00
thorpej 72fa12a41c Oops, forgot the HP_385 case in identifycpu(). 1999-07-31 19:52:35 +00:00
thorpej ca091a5e33 Fix oversight in last. 1999-07-31 17:20:22 +00:00
thorpej 7d1889a8bd Identify the 385 and 425e. Partially from OpenBSD. 1999-07-31 01:26:04 +00:00
thorpej 7c21482563 Add 385 and 425e SPU detection. From OpenBSD. 1999-07-31 00:45:28 +00:00
thorpej 834772047c Add MMUIDs for the 385 and 425e, and a machine ID for the 385. From OpenBSD. 1999-07-31 00:28:20 +00:00
augustss a7cd454b1d It's time to be COMPAT_14. 1999-07-29 10:37:12 +00:00
cgd f886376518 be more efficient when doing the SYSTEM_LD_TAIL for -g kernels: don't
copy them just to strip them, use strip -o.
1999-07-26 05:20:44 +00:00
christos 41cc9a0eb8 enable PPP_BSDCOMP, PPP_DEFLATE, PPP_FILTER, PFIL_HOOKS, IPFILTER_LOG
on the GENERIC kernels that had them commented out.
XXX: Please note, that not all the kernels have all the options defined!
1999-07-20 07:40:34 +00:00
thorpej 0945bf58b0 Add examples for including the kernel crypto bits from either crypto-us
or crypto-intl, commented out, with instructions to use only one, and
adjust the prefix as necessary.
1999-07-09 18:55:33 +00:00
mrg ecdad0ec33 clean up a bit after jason :)
- fix emitrules() like emitfiles() to deal with the prefix (otherwise it
  would attempt to find the file in the normal base for the NORMAL_C rule).
- add emitincludes() which adds include directives for each prefix to the
  $INCLUDES variable in the makefile.
- add %INCLUDES to each Makefile.arch to deal with the above.

this makes "prefix" actually work in a usable manner, and now i can move
on to fixing compiler warnings (errors) in the ESP code. :)
1999-07-09 09:52:55 +00:00
thorpej 3ebbe095e0 Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
1999-07-08 18:05:21 +00:00
itojun 5effafcaa6 kernel configuration for IPv6/IPsec. should be in GENERIC in the future.
(source code will be committed soon)
1999-07-01 07:00:12 +00:00
itojun 427639cdce - Call ip6intr if INET6 is defined.
- remove "need-flag" for mac68k esp driver, as it is not used in anywhere
  and conflicts with IPsec ESP header.

This should be the only MD change in IPv6 support, except kernel config file.
Very sorry if you have any compilation problem with it (I believe it is okay).
If your favorite arch is not included in here, please add a
call to ip6intr() from softintr handle.
1999-06-28 08:20:40 +00:00
thorpej b59b8bd5c6 Enable DDB history. 1999-06-23 22:42:52 +00:00
oster 7824f40e5f Add a '#include <sys/resourcevar.h>' to each of these to allow them
to compile again.
1999-06-22 14:51:57 +00:00
thorpej 9e9f068f43 Add the guts of mlockall(MCL_FUTURE). This requires that a process's
"memlock" resource limit to uvm_mmap().  Update all calls accordingly.
1999-06-18 05:13:45 +00:00
thorpej 0288ffb53a pmap_change_wiring() -> pmap_unwire(). 1999-06-17 19:23:20 +00:00
thorpej f5a527bb4e Remove pmap_pageable(); no pmap implements it, and it is not really useful,
because pmap_enter()/pmap_change_wiring() (soon to be pmap_unwire())
communicate the information in greater detail.
1999-06-17 18:21:21 +00:00
thorpej 602d8e81f7 Don't (ab)use uvm_map_pageable() to allocate PT pages. Instead, do
some internal reference counting on PT pages.  We still allocate them
with the page fault routine (a wire-fault, now), but no longer free
PT pages from pmap_pageable().
1999-06-15 22:18:07 +00:00
kleink 857dfc7058 Slightly rearrange the SSIR inline assembly implementation in order to avoid
making assumptions on C symbol name prefixes.
1999-06-15 15:26:34 +00:00
kleink 51eb26bf7e Slightly rearrange the inline assembly in ledcontrol() to avoid frobbing a
C symbol name prefix.
1999-06-15 15:18:55 +00:00
thorpej 2c35c7bd03 Only declare block major numbers for devices which can be the root device. 1999-06-07 20:31:27 +00:00
thorpej d76e7b8c6d Don't pass a nam2blk around at all; just have setroot() and friends reference
dev_name2blk[] directly.  Addresses PR #7622 (ITOH Yasufumi), although
in a different way.
1999-06-07 20:16:08 +00:00
thorpej beb8d06638 Generally update the comment above vunmapbuf(). 1999-05-26 22:19:33 +00:00
thorpej a2d06a4721 Generally update the comment above the vmapbuf() implementations. 1999-05-26 22:07:36 +00:00
thorpej 2580d306ab Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags.  PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that.  INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now).  This will eventually
change now these maps are locked, as well.
1999-05-26 19:16:28 +00:00
lukem e4a87aa1a9 * convert to using MI allocsys(). most ports were using an MD allocsys(),
although a couple still used the old pre-4.4-lite (?) mechanism.
* use format_bytes() to format the various printf()s that print out memory sizes
1999-05-20 08:21:42 +00:00
thorpej c10a926030 Allow the caller to specify a stack for the child process. If NULL,
the child inherits the stack pointer from the parent (traditional
behavior).  Like the signal stack, the stack area is secified as
a low address and a size; machine-dependent code accounts for stack
direction.

This is required for clone(2).
1999-05-13 21:58:32 +00:00
drochner fe310dd299 include <lib/libkern/libkern.h> for intoa()/inet_ntoa() 1999-05-07 16:19:27 +00:00
kleink 3d292e1a35 Fix a label name botch introduced in rev. 1.92; Ignatios owes me a non-beer. 1999-05-01 19:11:34 +00:00
christos d27f70c075 Include opt_compat_sunos.h 1999-04-29 16:22:03 +00:00
kleink e1529b8f93 Pull in the right generic m68k header. (Where was my mind?) 1999-04-29 14:38:39 +00:00
thorpej b8073b401b Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
1999-04-26 22:46:44 +00:00
simonb 5d8b1ef3e4 g/c REAL_CLISTS. 1999-04-25 02:56:26 +00:00
chs 05b971dd5f in pmap_pageable(), rather than marking a PT page as not modified
to trick the pagedaemon into freeing it later, just unmap the page
and free it immediately.  fixes PR 7337.
1999-04-22 04:24:52 +00:00
kleink ed74932033 Add COMPAT_SVR4 for m68k. 1999-04-19 21:22:56 +00:00
chs f455dd6596 add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.
1999-04-11 04:04:04 +00:00
kleink 6cdc67693f It's amazing how many typos I can invent in a new multi-line comment. 1999-04-10 17:31:02 +00:00
drochner 13bff3d3e5 remove unneeded old-vm includes 1999-04-10 14:28:22 +00:00
drochner 04ef8b5750 actually include <net/if_ether.h> to get these constants 1999-04-09 09:34:13 +00:00
drochner 39fce9ba9d remove leftover #endif 1999-04-01 20:50:52 +00:00
thorpej 967b8c433c Don't call configure() from cpu_startup(). 1999-04-01 00:17:45 +00:00
thorpej 455b121ce8 In pmap_enter(), set the appropriate page attributes based on access_type.
The m68k maintains modified and referenced information for us, but seeding
the page attributes can save us a pv list traversal.
1999-03-30 00:12:32 +00:00
simonb c286d2a5e9 Hopefully get the last of the "ifdef UVM" bogons in genassym.cf's. 1999-03-28 06:00:18 +00:00
mycroft 93768384ee Fix a bug in pmap_collect_pv(), even though nobody currently uses it:
When we put a page on the collection list, we must subtract NPVPPG from the
total free count: one for each pv_entry that's free in that page, and one for
each free pv_entry in other pages that we're going to eat by moving the ones
in the page being collected.
1999-03-27 05:57:02 +00:00
mycroft 9affa543a5 Oops; forgot to change some pmap_enter() calls. 1999-03-27 03:34:08 +00:00
mycroft 12d512bbb7 Oops; vm_offset_t -> vaddr_t. 1999-03-27 00:30:06 +00:00
mycroft 9c6b797796 Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
  because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
  avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot.  Also, DO NOT use
  pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
  access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
  access_type = 0.  This should probably be revisited.
1999-03-26 23:41:25 +00:00
thorpej 587eda7c3f Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
1999-03-25 23:11:51 +00:00
mrg ca5f9685bb clean up kernel/config files files for machVM lossage. 1999-03-24 06:06:09 +00:00
mrg d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
drochner 76fa1751fe Add a macro to check for sufficient pointer alignment in bus.h context,
"BUS_SPACE_ALIGNED_POINTER()".
Equal to the param.h "ALIGNED_POINTER()" normally, but obeys additional
requirements of the bus_space_xxx_n() macros. (BUS_SPACE_DEBUG)
1999-03-23 21:29:03 +00:00
chs ab7269f62a if uvm_fault() fails with KERN_RESOURCE_SHORTAGE, send a SIGKILL
and print a message about it.  this will be used to recover from
out-of-swap conditions.
1999-03-18 04:56:01 +00:00
sommerfe bc533621ed defopt MINIROOTSIZE 1999-03-17 18:59:21 +00:00
minoura e518820ca8 Pullin m68k/ieee.h. 1999-03-15 11:55:53 +00:00
thorpej 673ddc8f39 Style nits in last. 1999-03-01 22:24:53 +00:00
scottr d32ed292af defopt BUFCACHE and BUFPAGES. 1999-02-27 06:39:34 +00:00
is f71d843a65 synchronize types, and s/curproc/p/ in one forgotten place 1999-02-26 22:37:57 +00:00
is 84971e3a6f mac68k part of pr 6152 fix, and missing bits for the others 1999-02-25 23:13:39 +00:00
is 75469a775e hp300 part of the fix for pr 6152 1999-02-25 22:34:41 +00:00
lukem dcab0210a0 convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
kleink f69591d12d Use of casts as lvalues is a GNU C extension; rearrange slightly. 1999-02-10 17:03:26 +00:00
he f96a373094 Avoid "unterminated character constant" error from mkdep (really cc).
I guess in some sense it's stupid to use cc to depend .S files.
1999-02-08 10:45:11 +00:00
thorpej ad268a2ff8 STANDALONE -> _STANDALONE. 1999-02-06 21:19:24 +00:00
thorpej 3bf59302e9 Workaround for disks that respond slowly to selection, provided by
David Jones in PR #3769.

Every day, I hate this driver more and more.
1999-02-06 03:30:32 +00:00
thorpej e6c245c5df Implement pmap_prefer() for systems w/ an HP MMU (which has a virtually-tagged
cache).  This helps to avoid cache alias problems, and can improve performance
in the case where physical pages have multiple mappings (since the pages will
not have to be marked cache-inhibited).
1999-02-02 21:06:55 +00:00
thorpej f108f0164e Nuke the "pmapvacflush" debugging code. 1999-02-02 20:52:21 +00:00
mycroft 3e6e3322d8 Format consistency. 1999-01-24 12:56:51 +00:00
mycroft 082204fa3d Standardize format. 1999-01-22 14:12:07 +00:00
thorpej 2fb041ce0a No need for <sys/mtio.h> 1999-01-19 18:18:41 +00:00
chuck 32244a5a1a MNN is now the default 1999-01-16 20:13:17 +00:00
thorpej 8922647c58 Some minor, mostly costmetic, changes to CPPFLAGS/CFLAGS. 1999-01-15 23:37:05 +00:00
thorpej c84a74b16b Don't define "mc68020". Nothing uses it. 1999-01-15 23:21:25 +00:00
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
cgd 7ff7b02fac allow LDSTATIC definition to be overridden by bsd.own.mk/mk.conf 1998-03-02 20:01:05 +00:00
thorpej 5ec2d93c1e Fix a typo. 1998-02-27 19:13:04 +00:00
perry 1ed8ea9966 note second parm of sysarch() is now void *, + trivial KNF, etc. 1998-02-25 21:41:55 +00:00
thorpej 89d112dd92 Switch this kernel to UVM. 1998-02-24 11:05:37 +00:00
thorpej 7027d87a18 Duh! Use uvm_km_valloc_wait(), NOT uvm_km_zalloc() to allocate user page
tables.  (Thanks for pointing that out, Chuck!)
1998-02-24 07:42:05 +00:00
thorpej 772da350d4 Disable the message buffer during crash dumps by clearing msgbufenabled,
not msgbufmapped.
1998-02-19 04:18:30 +00:00
cgd 3bbb7f7d45 Move pmap_map() function definition to MD headers, as appropriate. It's
an internal function, and the VM system shouldn't try to prototype it.
(Note that some ports _don't_ prototype it.)
1998-02-18 02:05:32 +00:00
thorpej 8354e68508 Remove "class" declarations, and add "devclass" declarations where
appropriate.  Fix several inconsistencies between device class and
attributes.  Mostly from Chris Demetriou.
1998-02-16 22:12:45 +00:00
thorpej 65e20aa9a8 Add first-cut support for UVM. NOTE! User page table allocation does not
currently work with UVM in this pmap!  This is due to a bug in the interaction
between kernel_object and submaps which will be addressed shortly.
1998-02-16 21:01:39 +00:00
thorpej d8f3ddff17 Add support for UVM. 1998-02-16 20:54:51 +00:00
scottr f49dd3ef30 Avoid declaring the "astpending" and "want_resched" globals in cpu.h,
as this breaks C++ code that happens to indirectly include this header.
Both Matthias Scheler and I noticed this, independently.

This problem notably does not affect the atari and sun3/sun3x ports,
which have already implemented a similar solution.
1998-02-13 07:41:45 +00:00
thorpej 223caea788 pmap_page_index() is not used in the MACHINE_NEW_NONCONTIG case. 1998-02-08 18:47:06 +00:00
thorpej 2f55a48f5c Implement MACHINE_NEW_NONCONTIG and switch the hp300 port to use it. 1998-02-08 18:37:55 +00:00
mycroft b5c132e4d2 Prototype __flt_rounds() consistently. 1998-02-03 01:26:20 +00:00
is b3fa451227 Amiga uses the common m68k/sig_machdep.c now. Also moved its definition from
the other 68k ports' files.${port} to arch/m68k/conf/files.m68k.
1998-02-01 21:23:24 +00:00
ross 3a83745247 In some hp300-derived pmaps, in pmap_page_protect(), don't walk off the
end of the list of physical->virtual entires into NULL space if the last
entry is (mysteriously) wired in the pmap. Add a DEBUG printf on alpha.
1998-01-31 01:32:55 +00:00
mycroft 15ae963bea When dumping, print out the device number as major,minor. 1998-01-24 16:46:23 +00:00
thorpej 871cf5e7ce Update for changes to config. 1998-01-12 18:30:41 +00:00
thorpej 1ac3d5db35 Put SPU options in opt_spuconf.h, add device classes. 1998-01-12 18:29:48 +00:00
thorpej 1ef77e68aa Oops, fix a printf format. 1998-01-11 23:16:04 +00:00
thorpej f522bda243 Convert the hp300 LANCE driver to use bus.h 1998-01-11 21:57:02 +00:00
thorpej 5021043b13 ia->ia_addr is of type `bus_addr_t'. 1998-01-11 21:56:13 +00:00
thorpej 582d47fcf0 ia->ia_addr is a physical address, not a kernel virtual address. 1998-01-11 21:55:08 +00:00
thorpej 1687835b3e Pass down bus space tags to children, and use types appropriate for
bus.h.
1998-01-11 21:53:04 +00:00
thorpej 774d66001e Add bus_space.c 1998-01-11 21:42:44 +00:00
thorpej 77706becd7 Initial implementation of bus_space functions for hp300. Some cleanup
of this will be possible once some pmap changes are made.
1998-01-11 21:40:52 +00:00
thorpej b69358e4ca bus.h for the hp300 port. Only supports bus_space for now. 1998-01-11 21:26:04 +00:00
perry 6f57e5c573 multiple include protect machine/limits.h, fixes pr 4473 (from Mika Nystrom) 1998-01-09 22:23:44 +00:00
thorpej 4deb927ee6 Regen. 1998-01-09 06:59:27 +00:00
thorpej 2f3e61a54a Put RCS IDs into generated files, in the correct place. 1998-01-09 06:59:10 +00:00
thorpej c4a3ed1697 Regen: Back out RCS ID related changes. 1998-01-08 01:02:05 +00:00
thorpej ddb3a0e478 Back out RCS ID related changes. 1998-01-08 01:01:27 +00:00
thorpej 6ac24f05df Garbage-collect VM_PMAP. 1998-01-06 08:46:11 +00:00
thorpej 2317f9064e Garbage-collect pm_stchanged. 1998-01-06 08:40:50 +00:00
thorpej 07f835de1f Garbage-collect PMAP_ACTIVATE() call here; it's no longer necessary. 1998-01-06 07:49:36 +00:00
thorpej 61567b54de Garbage-collect pm_stchanged; it's not used by anything. 1998-01-06 07:02:58 +00:00
thorpej d11b109f2b Garbage-collect use of the PCB's copy of the user segment table pointer. 1998-01-06 06:51:40 +00:00
thorpej a8f80ad4fd Fix a bogosity apparently inherited from when the Utah 4.3BSD code base
was converted to use Mach VM for Net2/4.4BSD.  The user segment table
pointer was originally stored in the PCB.  When Mach VM came along,
however, it was also stored in the pmap, and loaded into the PCB in
pmap_activate().  pmap_activate() would then note that the PCB's USTP
was now in sync with the pmap's USTP, and the low-level context switch
code would use the value from the PCB.

However, pmap_activate() would also load the hardware MMU context if
the pmap was the current pmap (or, in the case where pmaps can be shared,
such as in NetBSD, if the proc was the current proc).  The low-level
context switch code would then reload the hardware _again_ using the
USTP from the PCB.

However, the optimization of not calling pmap_activate() if "stchanged"
was false ended up causing some processes to use stale USTP values from
the PCB when the low-level context switch code reloaded the hardware!
This was noticed by using a real vfork(2) (which worked for some time
before failing, surprisingly!)

Since I'm hard pressed to find any real optimization here (since the
hardware was always reloaded once, sometimes twice!), the code now always
calls pmap_activate(), which uses the correct USTP value (the one in the
pmap).  The PCB's USTP is now ignored, and should eventually be g/c'd.

Another optimization can actually be performed, and I have added a comment
describing what it is, but have not yet implemented it.

Also note that most of the loadustp() functions where actually incomplete.
This has been corrected.  These functions should probably be split up into
MMU-specific operations, and called indirectly, rather than doing constant
run-time decision making based on values that will never change during the
course of a boot's lifetime.
1998-01-05 23:16:21 +00:00
perry 086015d681 RCSID Police. 1998-01-05 21:13:51 +00:00
perry e464358f5f make script insert RCS ids into generated files 1998-01-05 21:12:34 +00:00
perry 3e0fad1868 RCSID Police. 1998-01-05 06:28:44 +00:00
thorpej b9f1b716f3 Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
1998-01-03 01:12:59 +00:00
thorpej dd966fca05 Change an argument name to PMAP_ACTIVATE() to more accurately describe the
semantics of the argument.
1998-01-01 20:05:23 +00:00
thorpej 9c20093835 Make pmap_activate() and pmap_deactivate() take a struct proc *. 1997-12-31 10:12:55 +00:00
scottr fa1347ed5b Prompt for total sectors, and calculate sane defaults for sectors per
cylinder and total sectors.
1997-12-29 07:15:10 +00:00
scottr 89b10b928f Do better reporting of transmit errors. 1997-12-26 22:37:05 +00:00
thorpej ff7a4d0472 Add COMPAT_13. 1997-12-22 05:31:23 +00:00
hpeyerl 6563f769af update for correct SPU type and COMPAT_13. 1997-12-21 17:15:01 +00:00
thorpej a5252fc287 Fill out more file system information, from Havard Eidnes, and hacked a bit
by me.
1997-12-15 23:17:19 +00:00
tv 0a558b3f1f Standardize COMPAT_SUNOS -- remove all references to
sunos_exec_aout_makecmds() in machdep.c for various architectures and put
it in exec_conf.c like the other emulations; rename exec.h to
sunos_exec.h.
1997-12-04 15:33:17 +00:00
kleink c87631771e Add COMPAT_13. 1997-12-01 14:52:51 +00:00
fair 315f8de9c2 add pseudo-device rnd, commented out 1997-11-20 08:11:14 +00:00
lukem 6c986561ee * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
1997-11-17 01:57:23 +00:00
veego 8b485c5962 Add a missing #if NARP > 0 around arpintr(); and add a #include "arp.h"
for NARP. This is for the 'new' arp system.
1997-11-13 10:43:06 +00:00