Commit Graph

1395 Commits

Author SHA1 Message Date
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