Commit Graph

1620 Commits

Author SHA1 Message Date
pk 48ad000318 Slight optimization when pv_unlink'ing last entry (suggested by Eric Fair).
Use MR4() macro where appropriate.
1997-07-06 12:29:54 +00:00
pk c3af302842 Use setpgt4m() in setptesw4m(). 1997-07-06 12:22:39 +00:00
pk aff11374d7 Defer setting the CACHEPAGETABLES flag until cache_enable(). 1997-07-02 14:52:59 +00:00
pk 94113eb121 Remove a bogon. 1997-07-02 14:39:24 +00:00
pk 363c28ce88 Fix typo in last commit. 1997-06-29 18:44:21 +00:00
pk adc8e8d8b0 Accommodate non-VM_PMAP_HACK code. 1997-06-28 19:59:03 +00:00
pk a9b31740a2 Remove __VM_PMAP_HACK. 1997-06-28 19:56:12 +00:00
thorpej 0404c01c46 #define DB_AOUT_SYMBOLS 1997-06-26 01:26:56 +00:00
thorpej 7c03f46228 Don't print a warning if the returned transfer count is less than 0.
This can happen during perfectly normal operation if:
	(a) We are using DMA to select a target, and
	(b) we are interrupted by another target reselecting us.
Per discussion with Paul Krannenburg.
1997-06-26 00:31:20 +00:00
thorpej cf016f61f4 foosize()'s return value is in DEV_BSIZE units; adjust the size obtained
from the disklabel accordingly.
1997-06-24 00:56:28 +00:00
pk f9d3344f9c xysize(): only call xyopen()/xyclose() if not already open, per the
current `openmask'.
1997-06-18 20:47:00 +00:00
pk 4269e0eab1 xdsize(): only call xdopen()/xdclose() if not already open, per the
current `openmask'.
1997-06-18 20:45:03 +00:00
mrg 5dad1a32a4 move installboot.8 into src/share so everyone builds it. 1997-06-16 13:58:24 +00:00
pk ddfaeab080 Change `pv_va' entry to a `vm_offset_t' as suggested in PR#3703.
Also, re-arrange pmap_page_protect4_4c() like the 4m variant; add
a more detailed panic message.
1997-06-12 21:02:43 +00:00
pk 0bf9195444 Erase kernel PTEs in pmap_page_protect4m(). This bug would leave spurious
entries in the kernel address space, eventually leading to panics in
pv_unlink().   This takes care of PRs 3575 & 3703.
1997-06-12 19:14:28 +00:00
mrg 552af779d2 bring mrg-vm-swap2 onto mainilne. 1997-06-12 15:46:19 +00:00
mrg dc6a98e92c bring mrg-vm-swap2 onto mainilne. 1997-06-12 15:09:23 +00:00
pk cbc17e9dd1 ie2,ie3 and ie4 are 32-bit. 1997-06-10 21:54:21 +00:00
pk 1ab49e584f Avoid "false positives" in match routines. 1997-06-10 20:59:10 +00:00
pk 2851bca951 vme_establishintr: remove SUN4 arch check; this now works on sun4m as well. 1997-06-10 20:57:48 +00:00
veego 6ab737a609 Initialize machine from MACHINE and machine_arch from MACHINE_ARCH. 1997-06-08 23:59:57 +00:00
thorpej 38b9b3385b Update for changes in the core ISP driver. 1997-06-08 06:35:45 +00:00
pk 7de2a6f83d Use the `ranges' property to deal with VMEbus address spaces. 1997-06-07 19:16:23 +00:00
pk af40331aec Add some VME address modifiers used by vmebus_translate(). 1997-06-07 19:10:57 +00:00
veego de7e49a954 Add 'char machine_arch[] = "xxx";' for the new sysctl hw.machine_arch. 1997-06-06 23:26:01 +00:00
pk d7b698b984 Set `rr_iospace' to PMAP_OBIO when translating relative sbus addresses. 1997-06-01 22:10:39 +00:00
mrg 81f7adf672 need to bump this back to version 1.7 (last one). 1997-06-01 14:08:58 +00:00
mrg 76b4fd4206 need to bump this back to version 1.7. 1997-06-01 14:08:15 +00:00
mrg 2a4bfcce7b need to bump this back to version 1.7. 1997-06-01 14:07:27 +00:00
mrg 640e369d6c need to bump this back to version 1.7. 1997-06-01 14:07:01 +00:00
mrg 887cadb09b need to bump this back to version 1.7. 1997-06-01 14:06:23 +00:00
mrg e3ee873c1f need to bump this back to version 1.7. 1997-06-01 14:05:49 +00:00
mrg 7cedf69cbd Completely rearrange SPARC boot code, modeling it after alpha and hp300
ports' boot programs.  Also added support for loading gzip'd kernels,
useful for booting from floppy.  From Jason R. Thorpe <thorpej@nas.nasa.gov>,
tested by Matthew Green <mrg@eterna.com.au> and Erik Fair <fair@clock.org>.
1997-06-01 03:39:03 +00:00
pk 4f292fbb17 Remove `bustype' argument from bus_tmp(). 1997-05-24 20:17:04 +00:00
pk ec02e14ae2 Remove all `bustype' arguments from map[io]dev() and REG2PHYS(). 1997-05-24 20:16:06 +00:00
pk e59f568ea7 Remove `bustype' argument from map[io]dev(). 1997-05-24 20:16:05 +00:00
pk 3137152cb5 Remove all `bustype' arguments from map[io]dev() and REG2PHYS(). 1997-05-24 20:16:04 +00:00
pk 5ec5d5bca3 Remove `bustype' argument from map[io]dev(). 1997-05-24 20:16:03 +00:00
pk 954e31e49a Remove all `bustype' arguments from map[io]dev() and REG2PHYS(). 1997-05-24 20:16:02 +00:00
pk 3cb17e53d3 Remove `bustype' argument from map[io]dev(). 1997-05-24 20:16:01 +00:00
pk b3aae0c409 Remove `bustype' argument from map[io]dev(). 1997-05-24 20:15:58 +00:00
pk 821f712972 Remove all `bustype' arguments from map[io]dev() and REG2PHYS(). 1997-05-24 20:15:58 +00:00
pk 9f2499dc98 mapdev() looses the `bustype' argument. It's superseded by `rr_iospace'
on all archs.
1997-05-24 20:13:48 +00:00
pk 72c03c7df9 Use page type encoding macros from pmap.h 1997-05-24 20:09:45 +00:00
pk fb5c729d4a Use `rr_iospace' to track the MMU page type bits. On sun4c/sun4m the
iospace value is always learned from the PROM; on sun4, we infer it
from the BUS_* parameters.

This obsoletes the `bustype' argument in bus_tmp().
1997-05-24 20:08:41 +00:00
pk ea0f4900ff Always use `rr_iospace' to track the MMU page type bits.
This obsoletes the `bustype' argument in map[io]dev().
1997-05-24 20:03:03 +00:00
pk 957b6c1c18 Define macros for encoding I/O space bits into the physical address
passed to pmap_enter().
1997-05-24 19:59:25 +00:00
pk ae61406a77 Replace bus_tmp() by mapdev() equivalent. 1997-05-19 19:59:36 +00:00
pk f88bf0a6e9 Replace bus_tmp() with mapdev() equivalent. 1997-05-19 19:56:26 +00:00
pk 350c3993aa Remove bus_tmp(). 1997-05-18 21:26:40 +00:00
pk c0036ae48d Remove bus_tmp(); it's just a special case of mapdev(). 1997-05-18 21:26:22 +00:00
pk dc9c65530d Define a `vme' device on `iommu' and allow `vmes' and `vmel' as sub-busses. 1997-05-18 19:41:02 +00:00
pk 18a4aeea23 A bit of framework for sun4m VME busses. 1997-05-18 19:37:37 +00:00
pk 0914945bfe Keep a shadow copy of the aux register's contents. 1997-05-17 17:52:50 +00:00
gwr e2a58b69f7 Add #define __VM_PMAP_HACK as a temporary measure. 1997-05-16 21:35:30 +00:00
pk 7ae81c002a Actually use the passed physical address in viking_cache_flush(). Also,
use hardcoded cache parameters for now.
1997-05-15 22:53:01 +00:00
pk 72d640a497 Tweak gain curve (from nsayer@kfu.com; PR#2909) 1997-05-15 22:32:56 +00:00
pk 3f1da95bc5 Nuke old `mmu3l' references. 1997-05-15 22:25:45 +00:00
pk 4f48bf2bb1 Change some malloc -> MALLOC and free -> FREE
More accuracy in diag/panic messages (part of PR3602; Eric Fair).
1997-05-15 19:19:49 +00:00
augustss e63a553175 Change the interface between high and lowlevel audio drivers again:
Set the encoding parameters slightly differently.
Remove the SW encoding/decodinf functions from this interface
and move them to the audio_parameter struct; this is both more efficient
and flexible.
1997-05-09 22:16:27 +00:00
augustss c4a52794f1 Convert to new orthogonal audio encoding scheme and implement
some of the new encodings.  The change to ioctl AUDIO_GETENC is
NOT backwards compatible.
1997-05-07 18:51:31 +00:00
mycroft 84bca5d679 Don't use _SUBDIRUSE outside of bsd.subdir.mk. 1997-05-07 17:28:47 +00:00
lukem 8744fe853c clean up use of whitespace 1997-05-07 01:55:23 +00:00
pk 45cc2d6db4 turbosparc: 256 contexts, page tables cannot be cached. 1997-05-06 21:00:54 +00:00
pk 6c717dd82c Bump version number to celebrate the fact that the bootblocks can be used
unmodified across all platforms.
1997-05-04 14:19:22 +00:00
pk a05df4e228 * finish off support for the 82077 chip as found on sun4m machines.
* add non-dma mode bit to `specify command', so formatting disks starts
  working (thanks to Jeremy Cooper for finding out about this).
1997-05-02 13:03:44 +00:00
pk 3e9d89dcd0 Switch to copy of file in /sys/dev/ic. 1997-05-02 08:30:42 +00:00
augustss 526ef2f618 Change the interface between the high and low level audio drivers
so that all audio encoding parameters are set at once.  This simplifies
the interface and make error checking easier.
1997-04-29 21:01:33 +00:00
pk 547d95a029 Remove esp FLUSH when residual bytes are present in FIFO, the ncr53c9x
driver will flush when necessary. Doing the FLUSH here interferes
with DMA-enabled target selection.
1997-04-27 22:12:40 +00:00
mrg 00e4b647d9 add NetBSD RCSid. 1997-04-22 07:48:31 +00:00
mycroft 58fbadc150 Put back missing label. 1997-04-21 18:20:14 +00:00
mycroft 89205383a7 Make microtime() work correctly with a 4- or 4C-only kernel. 1997-04-21 05:47:08 +00:00
pk 43445623fd mmmmap() should return -1, not ENOTSUP.
Optimize the case of writing to /dev/zero etc, like the alpha,i386 and m68k.
1997-04-19 21:28:53 +00:00
pk d3028dd4a2 * Remove ineffective and incorrect cache flush in viking_mmuenable().
* A bunch of cosmetic changes.
1997-04-18 19:51:05 +00:00
thorpej 5b733ef58a STRIP -> STRIPFLAG 1997-04-17 07:41:05 +00:00
pk 2357b53997 Avoid race for the chip's interrupt pending status bits in zscnputc()
by introducing a single-character queue to defer kernel console output
until the transmitter interrupt handler runs.
1997-04-14 21:26:28 +00:00
pk 5c54a811e3 Add CY7C601 to SUN4 cpu section (Sun 4/300, 4/400 series). Noticed by
Ralph Sauther.
1997-04-14 21:05:13 +00:00
pk fbf7bcc591 Cypress 605 cache can be run in write-back mode (fingers crossed..). 1997-04-11 20:32:13 +00:00
pk 1774dc8fbe Add Cypress 605 with MMU version 0xb (reported by Harald Barth). 1997-04-11 20:21:56 +00:00
pk b153a134ce Fix obvious bug: missing `return'.
viking_flush: make sure to really expunge all entries in a cache bucket
by poking it (2 * `associativity' - 1) times; noted by Chris Torek.
1997-04-11 20:06:53 +00:00
pk 5eccdd69a6 Avoid compiler warning. 1997-04-11 20:00:10 +00:00
pk ea87baf550 Since all kernel regions are pre-allocated, we can safely copy kernel
mappings to a user pmap when it's created rather than at context
allocation time.  Also, do not copy the kernel's region administration
to every user pmap, especially since no memory appears to be allocated
to copy it into.

As a result of this, we must now switch to context 0 in both pmap_copy_page()
and pmap_zero_page() (XXX).
1997-04-09 23:53:40 +00:00
mrg bb07095632 as per discussion with torek, allow TC=1. also add option
to allow TC=0.  the zilog documentation says not to allow
TC=0 -- however, i tested this and it "does work", as far
as i could tell, so, allow this use if so desired.
1997-04-09 13:15:13 +00:00
pk 242d365b70 Move "range" property description out of generic `romaux'.
Add getproplen() function.
1997-04-08 20:08:53 +00:00
pk cc7899605a Move "range" property description out of generic `romaux'.
Allocate room for this property when needed in bus attachment.
1997-04-08 20:08:20 +00:00
pk bb1d4e0540 Move "range" property description out of generic `romaux'. 1997-04-08 20:06:26 +00:00
pk efeeba419f sun4c and sun4m `aux' register bits differ slightly. 1997-04-07 21:00:34 +00:00
pk fab7831bfc sun4c `nbuf' workaround: make threshold dependend on value of MAXBSIZ. 1997-04-06 21:41:36 +00:00
pk c124058e0b Undo previous change; it can't have any effect (thinko..) 1997-04-04 21:01:49 +00:00
pk d1603d004b Use sc_hwreset() hook to reset ledma (if applicable). 1997-04-04 20:29:23 +00:00
christos ad36b6970e Add netatalk netisr 1997-04-03 17:25:18 +00:00
pk 332d00ad1d Take another register snapshot at the end of dumpsys() to refresh the PCB
which may have been altered while writing the dump. Also, save PC in
the PCB.
1997-04-02 20:56:28 +00:00
pk 102497370d Garbage-collect a few items. 1997-03-31 22:03:11 +00:00
pk 9c2ddb4a59 `*_get_fault_status' should not get profiled; use ALTENTRY for now. 1997-03-31 22:00:39 +00:00
pk cd9e3a7b59 Remove bogon from otherwise unused fdchwintr() function. 1997-03-31 20:27:32 +00:00
pk b8cc0f044e Deal differently with physical memory gaps resulting from alignment
restrictions.
1997-03-31 19:53:41 +00:00
mycroft 9bc200ea19 Fix formatting error in Sun 4 printf(). 1997-03-31 17:21:00 +00:00
mycroft ac89281245 Fix bogus preprocessor conditional that caused the trap page to
not be rounded up when it should be.
1997-03-31 16:42:52 +00:00
christos dd3f97976c Comment out DIAGNOSTIC panic in trap code translation. The DIAGNOSTIC is
correct, but unfortunately in trap.c trapsignal(p, SIGSEGV, code) passes
the address of the fault in code, instead of the trap code. So we punt for
now doing checking for trap code validity until this gets fixed.
1997-03-30 17:18:19 +00:00
thorpej 161f6c6f6b Don't allocate mclrefcnt[]; it's dead and gone. 1997-03-27 21:01:49 +00:00
pk 6fee4ceb1f viking_cache_enable: clear caches only if not yet on.
viking_pcache_flush: don't use flash-clear; use hard-coded parms instead(XXX)
1997-03-27 16:02:10 +00:00
gwr 37b247edde Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/ 1997-03-26 22:42:13 +00:00
gwr 71e43d14ab Move findroot/setroot stuff from configure() to cpu_rootconf(). 1997-03-26 22:38:40 +00:00
pk b468feeebf In pmap_remove(), check for an empty segment before calling one of the
helper functions. This cuts down the number of needless function calls
by approx. 80%, which has a healthy effect on the responsiveness of
a machine under heavy process creation/teardown loads.
The VM system seems to be fond of asking to delete page mappings
which aren't there..
1997-03-25 23:04:02 +00:00
pk eb3b79e0f2 Move `#endif /* SUN4M */' downward. 1997-03-24 22:56:37 +00:00
pk 4a77b646a2 Add `c_associativity' field. 1997-03-24 19:56:58 +00:00
pk f62b65006f Clamp burst sizes to maximum value of parent.
Reset ledma from leattach().
1997-03-23 22:54:26 +00:00
pk a13464f5c9 Garbage collect. 1997-03-22 22:13:17 +00:00
pk f839bb9816 Add a `[ide]c_ncachelines' field to cacheinfo structure; initialize
and use it where appropriate.
Add `swift' and `turbosparc' cache enable function.
1997-03-22 22:03:25 +00:00
pk 8d0c0fd49b For each major "module", define a separate set of MMU control register bits. 1997-03-22 19:15:53 +00:00
pk e38b52a46b Thinko. 1997-03-21 16:29:34 +00:00
pk 1bc742e6dd cypress_cache_enable: clear bits explicitly before setting. 1997-03-21 15:35:51 +00:00
pk d584dba41d Use `setpgt4m()' in some more places. 1997-03-21 15:19:29 +00:00
pk 3a7c1b8d57 viking: flush cache before enabling MMU. 1997-03-21 14:30:19 +00:00
pk e221d20b5b Compute a cache attribute correctlier. 1997-03-21 08:39:40 +00:00
pk cb8601ae21 In viking_pcache_flush(), use a "flash flush" during boot-strapping. 1997-03-21 01:49:03 +00:00
pk 28350d7d18 Set pcache_flush_line function pointer for correct cache configuration. 1997-03-21 01:47:15 +00:00
pk 31f3ff5346 Store cache associativities in the `cacheinfo' structure, and use it
in computing the cache "alias distance" and in the viking cache line
flush function.
1997-03-21 01:32:15 +00:00
pk d79f5b1733 Add declaration. 1997-03-20 23:57:30 +00:00
pk 5704efd375 Replace many setpte4m() calls with a simpler helper function because
the address of the desired PTE location is readily available in the
callers context (setpte4m() retraces the entire 3-level structure
to arrive at the PTE location).

Also, in many cases we can do away with the distinction between pmaps
that have or have not allocated a context. This is really only useful
in cases where we're interested in the REF or MOD bits which can differ
in the TLB version of a PTE.  By doing this, we avoid getpte()'s which
in many cases instruct the MMU to start a table walk only to find out
that there's nothing there after going 2/3 of the way, or waste a TLB
entry because of TLB flushing soon after getpte() completes.

In addition, there's a hook to flush the cache line corresponding to
the (kernel virtual) location of a PTE entry when it gets altered.
1997-03-20 23:48:37 +00:00
pk 6cea599cbf Add hook for flushing a single cache line. 1997-03-20 23:26:23 +00:00
pk 63c1c6ab1c Remove a bunch of no-ops. 1997-03-20 21:44:21 +00:00
pk 5718c246fd Define various no-op functions. 1997-03-20 21:16:20 +00:00
pk 7cf0d72881 Add a `no-op' function that the compiler can not touch. 1997-03-20 21:10:31 +00:00
mycroft 7a55cafeeb Implement set_format. 1997-03-20 16:51:38 +00:00
thorpej 9018eb5208 Use if_media to select media (or autoselect rules) on the Sun4m. 1997-03-17 03:24:26 +00:00
pk a372844a7a Add fix_align() and emulinstr() prototypes. 1997-03-15 22:25:15 +00:00
pk 27b2f0ec7c Fix a `new-ARP' pasto. 1997-03-15 22:13:55 +00:00
pk cc87278540 Remove trailing comma in enum definition. 1997-03-15 20:54:10 +00:00
pk ad1f2b7812 Remove call to mmu_pagein4m(), which is of little use. 1997-03-15 20:31:33 +00:00
pk f8918b9be9 Simplify `4m' versions of pmapbootstrap() and mmu_reservemon():
allocate and initialize all kernel page tables before looking at the
PROM maps, which allows mmu_reservemon4m() to simply walk the PROM tables
without having to allocate bits and pieces of our own kernel tables.

Slightly optimize getcontext() macros in mutli-arch kernels.

Remove un-needed `4m' version of mmu_pagein().
1997-03-15 20:24:09 +00:00
is 07b064e02e New ARP system, supports IPv4 over any hardware link.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
1997-03-15 18:09:08 +00:00
christos 4b697aa304 add emul.c 1997-03-15 02:36:00 +00:00
christos 358f6940ee - fix return value in case we failed to write to the destination register.
- pretty-print registers.
1997-03-15 00:39:51 +00:00
christos 2c62945461 - move instruction emulation and alignment fixing to emul.c
- add sparc-v8 {s,u}{mul,div}{cc,} instruction emulation
1997-03-14 23:57:58 +00:00
christos d9d8878ed1 Asi instruction struct was missing the immediate bit! 1997-03-14 23:54:07 +00:00
mycroft cbbcf185ae Put the genassym.sh output in a temp file, and mv -f it, in case
it fails spectacularly and doesn't clean up.
1997-03-14 23:23:45 +00:00
cjs ca5f101ba7 Remove code that stops transfers of >63K. The Sun 4 doesn't have this
limitation, and minphys() is supposed to catch this on other architectures.
1997-03-14 19:57:20 +00:00
pk 8a5abffaf5 Add some instrumentation to keep track of PMEG allocation.
Enabled #if DIAGNOSTIC.
1997-03-14 14:28:45 +00:00
cgd e36a5ca4de change microcode array definitions from "unsigned short" to the more
correct u_int16_t, and remove bogus casts that the old definition
required.
1997-03-13 04:07:44 +00:00
mycroft 919efaeb60 Make the microcode table const. 1997-03-13 03:33:03 +00:00
mycroft ac3b8b13b7 Don't share the silence block between devices. Make silence filling work for
more encodings, and make it device-independent.  From Lennart Augustsson, in
PR kern/3305.
1997-03-13 02:19:32 +00:00
cgd 96153388c0 add in the 'isp' device, for Qlogic ISP 1020-based Sbus SCSI board support 1997-03-13 00:46:13 +00:00
pk 9ceaaf3e7b Turn off "cache pagetables bit" on non-MXCC modules. 1997-03-12 22:52:19 +00:00
mycroft b8d7e3deab No longer needed. 1997-03-12 22:40:07 +00:00
cgd cf26d31ad2 NetBSD RCS ID tweaks, a few comment block tweaks. Also, make copyright
notices consistent (per Matt Jacob).
1997-03-12 21:06:41 +00:00
cgd 099e30a322 ISP 10x0 driver from Matthew Jacob of NASA Ames Research Center.
(March 12, 1997 version).
1997-03-12 20:44:50 +00:00
pk 8e4a126035 Use `mcxx' from cpuinfo instead of re-consulting the MMU registers 1997-03-12 15:44:28 +00:00
christos 0d71b22d50 Use genassym.cf 1997-03-12 15:17:13 +00:00
christos 3e35754576 Added genassym.cf 1997-03-12 15:16:35 +00:00
pk 6e3c9f3b59 Make sure to disable interrupts in the Interrupt Enable register as soon
as we've mapped it.
1997-03-12 11:04:35 +00:00
pk b197276005 Correct output from cpumatch_unknown() and add missing viking variant
to cpu table (noticed by Andrew Gillham).
1997-03-12 09:08:29 +00:00
cgd a0d3809966 specs for ISP 10x0 (isp) driver Sbus attachment. From Matt Jacob. 1997-03-12 06:43:25 +00:00
pk 92d853e309 4m memory fault traps: simplify fault address logic, since per-CPU
fault-status reading stubs pre-cook the arguments.

illegal instruction trap: catch iflush instructions that cause this trap
on some CPU/MMU combinations.
1997-03-11 01:20:25 +00:00
pk 01e424f233 Insert RCS Id. 1997-03-11 01:03:07 +00:00
pk abc39039f1 Move some parts of CP detection to cpu_attach() in cpu.c.
Call get_cpuinfo() for the boot CPU to collect the minimum information
to get the bootstrap rolling.
sun4/sun4c: the Interrupt Enable register is now mapped here after pmap
is initialized (was in locore).
Replace `cpumod' and `mmumod' with `cpuinfo.*' equivalents.
Allow more than one CPU to be configured in mainbus_attach().
1997-03-11 01:01:59 +00:00
pk 476ef3b431 Per-CPU information which is collected in cpu_attach().
Many things in here were imported from an earlier version from Aaron
Brown and are not yet used. This version has all the attributes of a
snapshot; more to come as addtional CPU/MMU details get implemented.
1997-03-11 00:55:24 +00:00
pk eb71a02a7f Re-write of CPU/MMU detection code.
Use a table driven classification based on CPU and MMU implementation/version
fields. Each CPU class or module defines a collection of routines that
implement CPU or MMU specific operations that can collect detailed setup
information.

All information is collected in a `cpu_softc' structure provided by the
auto-configuration code. However, in the interest of SMP support this
structure is located at a fixed virtual address identified by the
symbol `cpuinfo'. The `boot' CPU currently uses the the physical page(s) at
address 0x2000 for its cpuinfo. Consequently, the fixed virtual address
will be `KERNBASE+0x2000'.

The cache flush routines for several systems (sun4/4c vs. sun4m;
virtual vs. physical tags) have been factored out. Function pointers
to an appropriate set are located in `cpuinfo'. The former global
`cacheinfo' structure is now also a part of `cpuinfo'. Because of the
fixed virtual address of `cpuinfo' no extra performance penalties
are incurred by this move. In multi-architecture kernels, there's
no longer the need for run-time `cputyp' tests in this part of the system.
1997-03-11 00:44:00 +00:00
pk 8d2c03c810 Replace `cputyp' run-time tests by inserting multiple branches and NOPing
some at startup depending on architecture.

Use `get_faultstatus' field in `cpuinfo' (initialized in cpu.c) to branch
to CPU/MMU specific fault status reading stubs on memory fault traps.

Remove code top map the Interrupt Enable register on sun4/sun4c. Its VA
has moved to a high location and is now mapped in autoconf.c after
pmap has initialized. Note: this renders NMIs during bootstrap() fatal
(maybe loading %tbr should be deferred).
1997-03-11 00:09:29 +00:00
pk 7d6231865e Use cache flush routines provided in `cpuinfo'. 1997-03-10 23:55:40 +00:00
pk 129d9d5cf6 Move VA of the sun4/sun4c Interrupt Enable register from locore.
Define VA for the per-CPU `cpuinfo' structure.
1997-03-10 23:54:41 +00:00
pk a566decb35 Use many things from the newly defined `cpuinfo' structure:
- vcache_flush_*() routines.
	- cpu_type/cpu_flags
	- per cpu context table and context administration glue.
	- different macros to enable sun4/3-level mmu support.

Simplify sun4m version of pmap_bootstrap() a bit; more to do still.

Move installation of page tables in MMU into a separate routine, in
anticipation for SMP.
1997-03-10 23:26:11 +00:00
pk ca1c4cc6c3 Define CPUINFO_FAULTSTATUS for use in locore.s 1997-03-10 23:15:03 +00:00
pk 4f30101165 Leave `has_iocache' unset if cache not enabled. 1997-03-10 23:13:59 +00:00
pk 593dbcc7dd Replace `cpumod' with `cpuinfo.cpu_type' equivalent. 1997-03-10 23:09:55 +00:00
pk d1be7c7ea4 New location of Interrupt Enable register on sun4/sun4c. 1997-03-10 23:08:31 +00:00
pk d8fc2afd1e Replace `cpumod' with `cpuinfo.cpu_type' equivalents. 1997-03-10 23:01:40 +00:00
pk 3811437545 Redo attach code somewhat. Have a go at matching le's and lebuffer's on
machines where the PROM does not provide a parent/child relationship.
1997-03-10 22:58:22 +00:00
pk 9119c9c189 Add a field indicating this instance has attached to an `le', so we
can have a go at matching le's and lebuffer's on machines where the
PROM does not provide a parent/child relationship.
1997-03-10 22:56:54 +00:00
pk e5f0b8a132 Remove `cpumod' and `mmumod' and several related constants.
This functionality is now taken over by cpuvar.h
1997-03-10 22:50:37 +00:00
pk 95d5138e93 Move some constants from param.h in here 1997-03-10 22:47:52 +00:00
pk 137dda4ac6 Add getmid 1997-03-10 21:49:11 +00:00
pk 18b2bdb000 Fix calculation of max virtual memory to be gobbled up by the buffer cache.
Apply "stop-gap" nbuf clamp only on sun4/4c and if nbuf not explicitly
configured in.
1997-03-03 23:07:15 +00:00
thorpej e33bdc63ae Update for MI 53c9x driver. 1997-02-27 01:30:05 +00:00
thorpej f868730b6a esp carries ncr53c9x attribute 1997-02-27 01:17:09 +00:00
thorpej 5464afa761 Convert the SPARC esp driver to be a front-end for the MI 53c9x driver. 1997-02-27 01:16:19 +00:00
gwr 2de163471e Minimal changes to adapt to removal of NCR5380_PERMIT_RESELECT.
This driver should be updated to allow per-target control over
disconnect/reselect, but I will leave that to the port masters.
1997-02-26 22:29:08 +00:00
fvdl 115b6d92fa Define ALIGNED_POINTER 1997-02-24 23:16:53 +00:00
abrown 4ca0768334 Fix bug in pmap_page_copy and pmap_page_zero that caused data corruption
when paging on Sun4m machines with SuperSPARC processors. Essentially,
the copy/zero operations were done via uncached memory accesses, which
bypassed the snooping logic of the write-back caches, causing stale data
to be copied or generated.
Pointed out by Chris Torek <torek@bsdi.com>
1997-02-22 00:06:06 +00:00
pk ddb0d6fa06 Add `-mno-fpu' to compiler flags; pulled up from 1.2 version. 1997-02-05 00:12:46 +00:00
pk 095b310e77 db_expr_t is now a long. 1997-02-05 00:01:50 +00:00
pk 79da30bb31 typo. 1997-02-04 21:59:26 +00:00
perry 19d153fc48 Nuke some options GENERIC residue. 1997-02-04 04:57:10 +00:00
perry 0b3a46d6b3 Nuke some GENERIC residue. 1997-02-04 04:31:55 +00:00
mrg 96c21c1fcf no need to delcare mcount here; fixes warnings(errors) when compiling a kernel with profiling. 1997-02-01 20:56:40 +00:00
thorpej 739f23a219 This file is obsolete; this information is now generated by config(8). 1997-01-31 05:12:49 +00:00
thorpej 2525eee053 Use new machine-independent mountroothook code. 1997-01-31 02:15:54 +00:00
thorpej 801f7e1a0e Use new machine-independent setroot() and mountroothook code. 1997-01-31 02:07:29 +00:00
thorpej f159c829df Adopt for new file system and root spec grammar. 1997-01-31 02:06:41 +00:00
pk 772b81afe0 In cpu_startup(), after configure() returns, re-zero proc0's user area.
This largely nullifies the effect of proc0's stack running into the
user area during auto-configuration.
1997-01-27 21:18:17 +00:00
pk 4364fc8f2c Adapt to sys/lib/lib{sa,kern}/Makefile.inc changes 1997-01-24 01:18:22 +00:00
pk 0a5eeae37c `::' => `:' ; per recent sys/lib/*/Makefile.inc changes. 1997-01-24 00:58:20 +00:00
thorpej e256e03227 Arrange the code that sets the options flags such that the user can
completely override the defaults (including disabling DMA) in the
kernel config file.
1997-01-23 02:11:23 +00:00
pk a9142bd25b Drop strchr(), it's in libkern now; we didn't use it anyway. 1997-01-21 21:07:04 +00:00
thorpej 7b40f5228e "md" is declared in sys/conf/files, now. 1997-01-21 09:39:20 +00:00
mrg 152f8d880d add MSDOSFS. 1997-01-17 03:43:56 +00:00
mrg c71a371532 use pseudo-device ipfilter, not ipl. 1997-01-07 11:35:01 +00:00
mrg 394d540361 add PFIL_HOOK and ipl, both commented. 1997-01-06 07:35:39 +00:00
mrg fb5d192bc3 include the GENERIC kernel, and then map the disks. 1997-01-06 07:34:14 +00:00
mrg ad6281b640 use NIPL. 1997-01-05 21:32:15 +00:00
mrg ca896854ef add ipl device. 1997-01-05 13:43:04 +00:00
pk a0f6df960f RAMDISK_HOOKS => MEMORY_DISK_HOOKS 1997-01-01 23:46:29 +00:00
mrg 718a70d239 oops; rd -> md paul left behind... 1996-12-31 07:12:43 +00:00
pk d5b11782b5 rename: ramdisk => md 1996-12-28 23:27:00 +00:00
pk 603b61c3e0 rename: ramdisk => md 1996-12-28 23:22:07 +00:00
pk 31045b4490 Annul `__builtin_classify_type' and `__extension__' if __lint__. 1996-12-27 20:55:28 +00:00
pk be41891152 For now, define `__indr_reference' and `__warn_references' as empty
macros if __GNUC__ not defined.
1996-12-27 20:51:31 +00:00
pk 269e64e16b asm => __asm__ 1996-12-27 20:48:56 +00:00
pk bb12d8fd9a Prevent `unused function' warning (from Robert Evans; PR#2770). 1996-12-23 01:46:30 +00:00
thorpej e34f47039d XXX Stop-gap for larger MAXBSIZE: limit nbuf to 128, so we don't chew
XXX up all of the available pmegs lower-model SPARC CPUs.
1996-12-21 06:21:56 +00:00
pk 9b87837f21 Panic if `auxreg' is requested but is not there. Not much we can do about
users of AUXIO_REG; they'll die with a data fault.
1996-12-11 00:51:06 +00:00
pk 2f296724a8 Not all sun4m's have an `auxio'. 1996-12-10 23:24:56 +00:00
pk e0df2a7e78 Kill __BROKEN_INDIRECT_CONF. 1996-12-10 23:19:38 +00:00
pk 3f316d7783 Comply with recent autoconfiguration changes. Diffs graciously supplied
by Chris Demetriou.
1996-12-10 23:19:13 +00:00
pk 841d1ec634 Comply with recent autoconfiguration changes. Diffs graciously
supplied by Chris Demetriou.
1996-12-10 22:54:46 +00:00
thorpej d502e68402 Fill in sc_link.max_target 1996-12-10 21:27:16 +00:00
pk 92c4c71040 Finish import of floppy formatting code; not really usable yet, lots of
data overruns.
1996-12-10 14:44:53 +00:00
thorpej ef5333043b Copyright assigned to The NetBSD Foundation. 1996-12-09 17:46:44 +00:00
pk 10a182e399 Revise communication between hw & sw interrupt handler.
Deal with sun4m software interrupt mechanism.
1996-12-08 23:41:39 +00:00
pk 837dd8e3e1 Import formatting code from the i386 version.
Revise communication between hw & sw interrupt handler.
1996-12-08 23:40:32 +00:00
pk 6b31797b23 Detect `lebuffer' parents and use the provided buffer. 1996-12-06 22:07:59 +00:00
pk d539e60bb2 Uncomment lebuffer devices 1996-12-06 22:02:32 +00:00
pk 554078cb87 Declare lebuffer 1996-12-06 21:57:57 +00:00
pk 31b46bcf59 Special Lance buffer glue. 1996-12-06 21:52:01 +00:00
cgd 96acdadef7 First step inn removing config_scan() and the hacks that gave devices
on indirect-config busses a (permanent) softc that they could share
between 'match' and 'attach' routines:

Define __BROKEN_INDIRECT_CONFIG so that old autoconfiguration
interfaces are used, until drivers are converted to use the new
interfaces (actually, converted back to use the _older_ interfaces)
which prohibit indirect configuration devices from receiving a softc
in their match routine that they can share with their attach routine.
1996-12-05 00:13:47 +00:00
pk 0d4df7bdb3 Handle T_IDIV0 like T_DIV0. 1996-12-01 23:21:07 +00:00
pk 08b929f619 trap 0x2a: divide by zero for hardware [su]div instruction. 1996-12-01 23:19:00 +00:00
jonathan 4c1d96de78 * Replace explicit -O2 in CFLAGS with COPTS macro. Default COPTS?= -O2.
Lets users over-ride with makeoptions COPTS="..." in kernel config files.

  Leave `mandatory' flags (like  -msoft-float which  on m68k enforces no
  FP in kernel) in CFLAGS.
1996-12-01 06:12:25 +00:00
jtc 9da5f60715 PROF -> GPROF 1996-11-30 02:48:57 +00:00
pk c5c074b053 remove header munging hack. 1996-11-29 15:00:25 +00:00
pk 48830f7cb1 ffs bootblock install can be simplified since installboot(8) handles that now.
To install a TFTPable boot image, we have to play the header tricks here.
1996-11-29 14:59:32 +00:00
pk af0ec0d1d4 installboot(8) now handles required a.out header munging.
Also, the munging is extended by inserting an instruction that branches
past the header, so the same boot image can be used on all supported
sun platforms.
1996-11-29 14:55:20 +00:00
pk b2f875fce9 Handle Sbus burst settings in dma reset(). 1996-11-28 10:30:34 +00:00
pk 7e3ef21ca4 Fix typo in D_BURST* macros. 1996-11-28 09:37:34 +00:00
pk 4d21d576ef Add some `DMA ESC gate array' specific constants. 1996-11-27 21:50:42 +00:00
pk 13ad3421cd DMA draining macros have moved to dma.c 1996-11-27 21:49:53 +00:00
pk c7f438cd11 Handle the `ESC gate array' variant of the DMA engine, including an
essential bug work-around. Graciously supplied by David Miller.

Also re-arrange the macros that do the dma drain song-and-dance for
better clarity.
1996-11-27 21:48:19 +00:00
pk c0a9fe4e7a Cancel any queued timer events before re-scheduling a timeout, so esp_abort()
can be called from other places besides the timeout handler.
1996-11-27 21:34:59 +00:00
pk 4526babc82 Pay attention to DMA errors as reported by DMAINTR() returning -1. If this
happens reset everything.

Re-schedule a timeout when first attempting to abort an operation.
1996-11-27 21:24:20 +00:00
pk c1274b3cff Stabilize timeout values in fdcresult() and out_fdc() by adding delay()s.
Noted by Jason Thorpe over in the i386 driver.
1996-11-27 21:14:33 +00:00
pk 3cb63476b7 One control block per target is insufficient if you have a full complement
of targets attached and access those simultaneously (like in a ccd(4) array).
We (now) allocate (somewhat arbitrarily) three per target.
Noticed by Marshall Midden.
1996-11-22 22:36:57 +00:00
pk 1ab7502adf Initialize cache aliasing bits for MicrosparcIIs. 1996-11-18 11:23:32 +00:00
pk ab9677d1d6 Move *PAGER options and `machine sparc' to std.sparc. 1996-11-18 00:10:19 +00:00
pk 89b8591c60 Add explicit casts to `%l*' formatted arguments. 1996-11-16 23:14:58 +00:00
pk b61f7eb526 Remove `unused variable' warning. 1996-11-16 23:00:24 +00:00
pk ba50a4fa6e Remove "trap#29" debugging code. These traps have disappeared since a bug
was fixed in the pamp code ("stale PTEs", pmap.c rev. 1.62).
1996-11-16 20:45:13 +00:00
jtc 16b48272c4 Define _BSD_CLOCKID_T_ and _BSD_TIMER_T_ 1996-11-15 22:38:45 +00:00
thorpej 35c9c776fe Use bitmask_snprintf(). 1996-11-13 06:13:39 +00:00
thorpej 4ad70417a0 Centralize the declaration of the "en" driver (Efficient Networks, Inc.
155Mb/sec ATM interface).
1996-11-12 23:58:01 +00:00
pk 037130a502 Allow larger text (64MB) and data (256MB) segments.
On sun4/sun4c with a virtual address hole (starting at 512MB), this seems
like a reasonable compromise: about 196MB left for shared libs and sysv-style
shared memory segments.
On the sun4m the limits can easily be made larger: consider turning
MAXTSIZ and MAXDSIZ into tunable variables..
1996-11-12 21:08:51 +00:00