Commit Graph

402 Commits

Author SHA1 Message Date
scw cee1e443db Use DEV_BSIZE in place of MAXBSIZE for the static 'iobuf' in devopen().
Use of the latter caused the 1st and 2nd stage boot loaders to occupy
over 64k of memory. This caused them to fail on a 4Mb mvme147 since
they are loaded at 0x3f0000.
Reported by Kristen A. McIntyre and Maxime Kurkdjian.
1998-06-11 19:04:57 +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 9ef6fa7387 Build pmap_boostrap.o without profiling; we can't call mcount before the
mmu is enabled!
1998-05-31 23:28:07 +00:00
thorpej a7f360c6c9 Specify a non-profiling C rule. 1998-05-31 23:25:41 +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
scw cd18732d2f Move 'pseudo-device md' from VME147 to RAMDISK, where it belongs.
For some reason, 'pseudo-device vnd' was missing from VME147; added.
1998-05-08 21:37:29 +00:00
kleink aa36ad1f55 Fix some arithmetics lossage on typeless pointers. 1998-05-07 21:01:41 +00:00
thorpej 0a358dfd77 options UVM no longer needed; it's now standard 1998-05-04 05:01:11 +00:00
thorpej fcb3331f98 Switch to UVM. 1998-05-04 05:00:12 +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
is ddc5b81d4f 68060 has 8k + 8k caches. 1998-03-18 22:19:40 +00:00
bouyer 9f50fca1fd Add commented out "options FFS_EI" 1998-03-18 16:34:41 +00:00
thorpej 63dfa5e1a1 Minor cosmetic cleanup; no functional change. 1998-03-18 07:18:50 +00:00
thorpej 86d534a7d9 - Make MACHINE_NEW_NONCONTIG non-optional.
- Maintain two copies of the number and size of physical memory segments.
  One copy, mem_clusters[], contains _all_ of physical RAM, for crash dumps.
  The other copy, phys_seg_list[], starts out with all of physical RAM (and
  is used to initialize mem_clusters[]), but is adjusted to be the memory
  actually managed by the VM system.
- Fix computation of physmem; when support for MACHINE_NEW_NONCONTIG was
  added, physmem was accidentally changed to not take into account the memory
  located before the kernel, or the memory taken up by the kernel itself.
1998-03-18 07:16:10 +00:00
thorpej 02fa4134dc - Make MACHINE_NEW_NONCONTIG non-optional.
- G/C some things left over from the old noncontig code.
1998-03-18 07:12:49 +00:00
thorpej c718c9e278 - Make MACHINE_NEW_NONCONTIG non-optional.
- Make initialization of the message buffer a little less magic-looking.
- Maintain two copies of the number and size of physical memory segments.
  One copy, mem_clusters[], contains _all_ of physical RAM, for crash dumps.
  The other copy, phys_seg_list[], starts out with all of physical RAM (and
  is used to initialize mem_clusters[]), but is adjusted to be the memory
  actually managed by the VM system.
- Fix crash dumps with regard to multiple memory segments.
1998-03-18 07:11:22 +00:00
thorpej c0cfbf8d7d Make MACHINE_NEW_NONCONTIG non-optional. 1998-03-18 07:07:11 +00:00
cgd 9da165424c allow LDSTATIC definition to be overridden by bsd.own.mk/mk.conf 1998-03-02 19:57:00 +00:00
perry 1ed8ea9966 note second parm of sysarch() is now void *, + trivial KNF, etc. 1998-02-25 21:41:55 +00:00
chuck e308ffd825 compute st_map size properly 1998-02-24 19:01:59 +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
scw d38d12d85a Whoops, cgd's pmap_map change got lost! Put it back. 1998-02-21 19:22:00 +00:00
scw 0e88177c0b Implement changes for MACHINE_NEW_NONCONTIG and UVM. 1998-02-21 19:03:25 +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
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 54aa7dfae0 Correct a think'o I made some time ago, and note that the dump routines
here are broken if VME memory cards exist in the system.
1998-02-08 09:33:14 +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 2d53e59a47 Update for changes to config. 1998-01-12 19:51:03 +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 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 b46484bb8a RCSID Police. 1998-01-05 20:51:25 +00:00
perry 015e898c02 RCSID Police. 1998-01-05 07:02:46 +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 287b63b321 - Make pmap_activate() and pmap_deactivate() take a struct proc *.
- Define active_user_pmap() and use it in the appropriate places (from hp300
  port).
1998-01-01 19:52:50 +00:00
scw 3adf82c90e Grok boot partition argument delimited by a colon. Force RB_ASKNAME
when partition argument is present.
1997-12-17 21:33:10 +00:00
scw c0ba23773d Always write primary bootstrap code to raw partition, even when the
secondary bootstrap is on partition >= b.
1997-12-17 21:30:23 +00:00
scw ea634df03a Workaround for bug in 147Bug PROM (my version, 2.2, at least) which
prevents booting from tape in the obvious way.
1997-12-17 21:28:02 +00:00
scw 4b78217d87 Conf file suitable for the ramdisk installation kernel. 1997-12-17 21:24:11 +00:00
scw f7b8b2dc36 Add file-system KERNFS for the benefit of miniroot install. 1997-12-17 21:20:06 +00:00
scw ea4e9ca4f6 Doh! 'avail_end' is a physical offset, not a page number! 1997-12-06 20:29:59 +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
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
thorpej ce4c770f88 Make sure CPP, AR, AS, and RANLIB are defined. 1997-11-12 23:11:50 +00:00
thorpej a421995756 Define LORDER, NM, and TSORT here, like we do the rest of the tools. 1997-11-12 22:25:31 +00:00
thorpej 6e1637f157 asm volatile -> __asm__ __volatile 1997-11-05 04:05:00 +00:00
mycroft ec5fd4954e Set rr0_dcd.
Don't set DCD_IE and CTS_IE here; let the MI code do it.
Handle MDMBUF.
1997-11-02 08:05:06 +00:00
scw d0d3cc7965 Remove paragraph describing problem with initialising VMEbus RAM cards'
parity bits. Initialisation now handled during kernel startup.
1997-11-01 19:18:39 +00:00
scw cb8172bce4 Chnage MACHINE_NONCONTIG implementation such that the message buffer is
always located at the end of onboard RAM. This allows locore.s to zero
any offboard RAM to initialise the parity bit which most VMEbus RAM cards
have. Without this, many cards buserr on the first read access.
Thanks to Herb Peyerl for the idea.
1997-11-01 17:56:47 +00:00
lukem 3e8e744696 getopt returns -1 not EOF 1997-11-01 06:49:14 +00:00
scw 6eb98e720f Finally nobble the last MACHINE_NONCONTIG gremlins. Needed to add
<machine/vmparam.h> to pmap.c and locore.s. Plus, genassym.sh needed
to have USRSTACK removed due to conflict with vmparam.h
1997-10-21 19:25:08 +00:00
scw 3c1ce11613 Fix includes. (Make sure <vm/vm.h> gets pulled in before <sys/sysctl.h>) 1997-10-19 10:53:14 +00:00
christos e42293ca28 fix chrtoblk declaration 1997-10-16 23:37:34 +00:00
explorer 80513cb5ae o Make usage of /dev/random dependant on
pseudo-device   rnd                     # /dev/random and in-kernel generator
  in config files.

o Add declaration to all architectures.

o Clean up copyright message in rnd.c, rnd.h, and rndpool.c to include
  that this code is derived in part from Ted Tyso's linux code.
1997-10-13 00:46:08 +00:00
thorpej 1ae5ca3411 Initialize interrupt handlers and message buffer in mvme68k_init(). 1997-10-13 00:21:08 +00:00
thorpej 118885e061 Consolidate some initialization in mvme68k_init(). 1997-10-13 00:19:37 +00:00
thorpej 05c4cae34d We don't need to call isrinit() twice. 1997-10-13 00:18:28 +00:00
scw e01a82f2a0 Describe how to configure and use VMEbus RAM cards with an MVME147 card. 1997-10-12 15:45:12 +00:00
scw 73699f5ad7 Fix bug whereby if no VMEbus RAM is defined, a MACHINE_NONCONTIG kernel
would fail to boot.
1997-10-12 15:41:39 +00:00
scw 01e0c4c896 Move MACHINE_NONCONTIG from std.mvme68k to <machine/vmparam.h> as per
Jason's request.
1997-10-12 15:39:35 +00:00
scottr 017e6c7f10 Address PR 4120 by synchronizing v{,un}mapbuf() with the i386 vm_machdep.c,
v 1.27, pulling in changes made there by Charles Hannum.  Also, incorporate
a few tweaks made by Gordon W. Ross in the sun3 version of this change.
1997-10-11 06:38:45 +00:00
scw 2dde7e366d Added support for VMEbus RAM cards via MACHINE_NONCONTIG.
The kernel should still compile and run without it, but I've
put the config option in std.mvme68k so it's built like this
as standard.
1997-10-09 21:39:16 +00:00
jtc 4229acf79d Fix tipo inherited from old version of TNF copyright template. 1997-10-09 08:37:20 +00:00
thorpej 3b4ad2b60e Copyright assigned to The NetBSD Foundation. 1997-10-05 18:15:51 +00:00
lukem 7d508b124f define SIZE?=size, and use ${SIZE} instead of size. makes cross
compilation easier
1997-10-03 07:17:00 +00:00
christos 7f41ec0345 PR/4162: Chris Jones: make cleandir does not work properly; it does not
remove the object files and the .depend file in the kernel build directory.
1997-09-30 22:50:53 +00:00
scw d2cd21c0ef Fixed typo. in FPU_68882 entry for MVME147 1997-09-28 11:29:48 +00:00
leo ef6f3f7e25 Move the definition of MSGBUFSIZE up to the machine-arch level if
possible. Pointed out by Bernd Ernesti.
1997-09-20 12:08:24 +00:00
leo d4713d24c2 Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
1997-09-19 13:52:37 +00:00
mycroft a9155c5057 Set the status word as well, and remove a bogus comment. 1997-09-12 10:29:20 +00:00
mycroft cba224ed23 FPCOPROC is no longer used here. 1997-09-12 09:29:13 +00:00
mycroft 4e5b47eba3 fputype is defined in locore.s now. 1997-09-12 09:27:49 +00:00
mycroft 11393fe5b9 Add and use fputype. Optimize floating point save/restore routines a bit more
if only one CPU type is defined.  Eliminate FPCOPROC.  Merge some of the
68060 floating point stuff from the x68k port.
1997-09-12 09:25:36 +00:00
mycroft 8a8fa1ee59 Eliminate some uses of FPCOPROC. 1997-09-12 08:19:00 +00:00
mycroft 1192cdbe7e FPCOPROC is already in the Makefile; no need for it here. 1997-09-12 08:14:06 +00:00
mycroft 50cfb2fcdd Kill vestiges of Locore.c. 1997-09-12 07:55:17 +00:00
mycroft 982f24e698 Always initialize all registers in setregs(). 1997-09-12 07:00:30 +00:00
mycroft 16a8787248 Fix execve(2) and *setregs() interfaces so emulations can set registers in a
more correct way.  (See tech-kern.)
1997-09-11 23:01:44 +00:00
bouyer 6f3bab1f59 Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
1997-08-27 11:22:52 +00:00
phil b6a75eabb2 Add "#file-system UNION" as per PR 1032. (Should mvme68k have a
GENERIC conf file with "everything?")
1997-07-22 18:49:21 +00:00
drochner bdb232d2b6 Don't use <lib/libsa/if_ether.h> anymore. This was a copy of the
old (before ARP changes) <netinet/if_ether.h>, intended for
temporary use.
1997-07-22 17:41:01 +00:00
kleink 50d3039914 Fix another oversight from last commit. 1997-07-20 11:03:03 +00:00
kleink cd9e9b6a2b Fix `return();' vs. `return;' in last commit; pointed out by Steve Woodford. 1997-07-20 10:57:32 +00:00
jtk d36d6d14ab use locator defines in "locators.h" to index cf_loc[] 1997-07-17 02:01:26 +00:00
leo 198bd713f2 Generate assym.h dependencies when making 'depend'. 1997-07-12 22:07:36 +00:00
perry ad1710ce1e update comment from 1981 on memory and disk prices -- pr-2754 from Curt Sampson 1997-07-12 16:18:36 +00:00