* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.
* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S
* Garbage-collect MachHitFlushDCache()
* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.
similar design and code by Jason Thorpe and Jonathan Stone.
NOTE: the kernel-stack-switching code and cacheflush() calls in
locore.S still use #ifdef MIPS3 and need more work.
mips/include/cpu.h:
Add CPUISMIPS3 for run-time tests of what CPU architecture level
we're running on.
mips/include/locore.h:
Add declarations of locore cache-size variables for ref/def toolchain.
mips/include/mips1_pte.h:
mips1 TLB bit definitions.
mips/include/mips3_pte.h:
mips3 TLB bit definitions.
mips/include/pte.h:
define accesor macros for TLB bits (e.g., mips_pg_m_bit(),
that expand to CPU constants if only one CPU arch is configured,
or to inline functions if both MIPS1 and MIPS3 are configured.
mips/mips/locore_r2000.S:
Use MIPS1_PG_xxx constants inside mips1-specific code.
mips/mips/locore_r4000.S:
Use MIPS3_PG_xxx constants inside mips3-specific code.
mips/mips/locore.S:
Use MIPS1_PG_xxx constants inside mips3-specific code.
Use MIPS1_PG_xxx constants inside mips1-specific code.
(Needs more work!)
mips/mips/{pmap.c,vm_machdep.c,trap.c}, pmax/pmax/machdep.c:
Use MIPS3_PG_xxx constants inside mips3-specific functions,
and MIPS1_PG_XXX inside mips1-specific code.
Otherwise, use mips_pg_XXX_bit() macros where they apply,
and use "if (CPUISMIPS3) { ... } else {... }" where they don't.
mips/mips/mips_machdep.c:
Import Michael Hitch's fixes from the pmax locore-init code
into mips_vector_init().
pmax/pmax/machdep.c:
Use generic mips_vector_init() locore vector-init function.
Move mips-specific pmap definitions (PMAP_PREFER for mips3, declaratin
of pmap_bootstrap() for the system-specific machdep.c) from
arch/pmax/include/pmap.h to arch/mips/include/pmap.h.
* Move declaration of locore communcation variables (CPU family,
cache sizes, etc) to mips/include/locore.h. Delete from
pmax/include/cpu.h and older versions from pica/include/cpu.h.
* Move definitions of CLKF_BASEPRI, CLKF_USERMODE to mips/include/cpu.
* Delete duplicate definitions in pica/include/cpu.h, pmax/include/cpu.h.
Change pmax/include/psl.h to just do #include <mips/psl.h>.
pmax/include/psl.h would go away completely if it wasn't stil required
by compat/common/kern_exit_43.c.
recovering from a possible race condition in sii_intr, read the active
target from the destat register, and set the softc state pointer
`state' appropriately. (This warning is in a block that prints a
warning message, and the warning message has _never_ been seen. The
bug is probably innocuous.)
Also addresses the `more thought needed' in the log message for rev. 1.12.
respectively), so console setup code can test forconfiguration of the
correct front-end (via NDC_DC and NDC_IOASIC, respectively).
Delete 'needs-flags' from dc.c. GC obsolete uses of NDC, "dc.h".
> revision 1.33
> date: 1997/05/15 02:15:55; author: thorpej; state: Exp; lines: +8 -4
> - In sccmatch(), check any user-specified offset, allowing scc unit numbers
> to be nailed down. From Ken Hornstein <kenh@cmf.nrl.navy.mil>, PR #3626,
> slightly modified to allow wildcarded offsets.
> - Blow away the cf->cf_unit check in sccmatch(); it's bogus.
Also gc usused references to NSCC and #include "scc.h"
(The operator-precdence changes in 1.11 were pulled up in rev 1.14).
* If the chip asserts a SCSI-bus error (SII_BER) in sii_intr,
reset the SII_BER bit instead of ignoring it.
XXX SII_BER May need checking and resetting elsewhere.
Fixes broken blitting from rcons.
* Put back old 4.4bsd range test on cursor movement. 1.2 code is broken.
* Disable screensaver, it reportedly never comes back on properly.
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.
needed. When sfbattach() initializes the fbinfo data, it was corrupting
data past the struct device data actually allocated. This does not appear
to have caused a problem in the past, but causes a problem with the new
setroot() changes by Jason.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
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.
* kill scc_tty[] and needs-count.
* Add usable-when-cold version of sccparam().
* Add pre-autconf() console initialization entrypoint.
* remove lint for gcc -Wall
* wbflush() -> tc_mb()
all but the last of which have been fed through cgd and committed to the
Alpha scc driver.
mips_r2000_, mips_R2000_ -> mips1_
mips_r4000_, mips_R4000_ -> mips3_
(which are also, for mnemonic reasons, consistent with gcc flag usage,
rather than using mipsI_ and mipsIII_).
Where CACHED_TO_HYS() is still needed for kernel-virtual-to-physical
or physical-to-uncached mapping (fb drivers), replace with
`#include <mips/cpuregs.h>'.
* dcparam() with normal tty t_param interface, which calls
* cold_dcparam() called with explicit dc7085 register address
and flags, which does the work and is also callable when cold,
to set up console (or kgdb) line parameters.
* Move mips-I pte (TLBlo) definitions from pmax/include/pte.h
to mips/include/mips1_pte.h
* Move mips-III pte (TLBlo) definitions from pica/include/pte.h
to mips/include/mips3_pte.h
* Add new mips/include/pte.h, which includes exactly one of
mips1_pte.h or mips3_pte.h (which still have namespace collisions),
depending on "options MIPS1" or "options MIPS3". (hack).
Move soft kvtopte(), ptetovk() definitions to mips/include/pte.h
* Add macro PTE_TO_PADDR() to hide the different hardware TLB formats
when mapping from pte to physical address.
* Add macro PTE_READONLY() to hide lack of SW read-only bit in mips-III
tlb. (mips1 pmap uses a sw bit in the PTE, mips3 looks up RO bit in
the kernel pmap.)
* Use macros (not direct TLB frobbing) in mips/trap.c, to make it
mips-1/mips-III indepenndet.
* Change {pmax,pica}/include/pte.h to just do #include <mips/pte.h>.
NetBSD-current changes:
* change include paths to be relative to the kernel-source tree
(e.g., `/sys') instead of arch/pmax/conf.
* add explicit options for exec packages (EXEC_ELF32, EXEC_ECOFF
for COMPAT_ULTRIX)
* comment out references to still-unsuppoted MI scsi.
DEC dc503 cursor chip) into Decstation 2100,3100 cfattach front-end
and ``machine-independent'' back-end.
pm_ds.c: pmin/pmax cfattach front-end
pm.c: bt478, 503 back-end
pmvar.h: declarations of back-end normal and console attach
entry points.
include files containing model-specific I/O device configuration.
Add more options and devices (ccd, LKM, etc), as appropriate for
documentation and as examples in a "template" GENERIC config file,
even though not all of these work completely yet.
from arch/mips/mips/locore.S to arch/pmax/pmax/locore_machdep.S.
* Move ARC-specific locore code (vmstat -i counters) to
arch/pica/pica/locore_machdep.S.
* When the mips3 locore support is known to work, both ports can now use
arch/mips/mips/locore.S.
wrappers for:
gets.c getenv.c strcat.c strcpy.c
so they compile again (if _KERNEL is defined).
For bootblock space reasons it would be prereable to call the PROM entrypoints
directly, via the macro wappers in de_prom.h, rather than C function wrappers.
* Create arch/mips/Makefile.inc with source list of generic MIPS-cpu
files for tags
* Use mips/Makefile.inc and updated tag list in pmax/Makefile
* Try building bootblocks in arch/pmax/stand.
consistency with the way machdep headers for other things are done.
(the creation of the ecoff_machdep.h files was done on the CVS server, to
keep the RCS logs intact.)
macros to use to remove #ifdefs from the machine ID case check.
Eventually, these headers will contain other information, e.g.
machine-dependent relocation information, etc.
use the pre-autoconfig cold serial-console inititialization entry
points from the bus-specific cfattach front-end code.
* Delete post-autoconfig code to switch from PROM output to kernel
driver for machines with dc serial chips.
cfattach front-end code:
dc_ds for the decstation 2100( pmin), 3100 (pmax), and 5100.
dc_ioasic for the decstation 5000/200 (3max) which does not have a
DEC TC-style IOCTL asic, but is configured as if it did.
* Add pre-autoconfig code initialization of kerenl dc driver console I/O
for remote serial consoles. The hack to use PROM serial I/O until the
dc device is autoconfigured is no longer necessary.
* Add MIPS make variable pointing at $S/arch/mips
* Build locore from $MIPS/mips locore source
* Build locore.o and fp.o (fp emulation) from arch/mips locore source
* Add target and rules to build pmax-specific locore code locore_machdep.o
from $PMAX/pmax/lcore_machdep.S
>* Use `-S' rather than `-x' to remove debugging symbols.
because the pmax toolchain and gcc disagree about what is a "local"
symbol, and ld requires a "-x" to let elf2aout build bootable a.out kernels.
in the branch-emulation code was uninitialized, due to a misplaced #endif.
Remove the relevant #ifdef (macro version of GetBranchDest), and move the
XXX note about r4000 branch targets to the function definition.
serial consoles to the 1.2 branch. Includes:
* dynamically allocated new-config softc
* remove dependencies on Decstation CPU type, use flags in softc instead.
* pass in values for softc flags (q.v.) from parent-specific attach code
* #ifdef out rts/cts flow control support until it's known to work on
200s.
* redo initialization of serial consoles (needs more work).
The Lite2 changes include:
* Remove the last vestiges of high-bit-set-means-delay for output chars.
* Handle the 2100/3100 having partial modem control on line 2 only,
whereas the 5000/200 has modem control signals on lines 2 and 3.
* Add RTS/CTS support for lines 2 and 3 on a 5000/200.
* Add more s = spltty(); splx(s); where needed but not present.
is disabled by default:
>revision 1.9.4.2
>date: 1996/09/09 20:19:11; author: thorpej; state: Exp; lines: +2 -18
>Disable IOASIC_DEBUG so that autoconfiguration looks normal, by request
>of Jonathan Stone
as a console, initalize as white-on-black so console messages are legible.
(Sean Davidson reports that rcons still messes up the display, perhaps
due to using the wrong pixel depth).
1. Start at the specified entry instead of entry 0.
2. Use the blue value instead of the green when setting the blue color entry.
3. Don't use the starting index again for storing the saved entry - the cmap
pointer was previously initialized using the starting index. This fixes
a hard hang on the maxine when console output is done after calls to
set the color map (usually by the X server).
* Add changes needed/used to build 1.2 GENERIC kernel:
* Delete obsolete and ambiguous DS5000 option.
* Add CPU_R3000 which is now required to compile in mips1 locore support.
* Add an explicit declaration of HZ.
* back out COMPAT_12 for this revision.
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
* Add interrupt handler for 3MIN, where we cannot disable TC slot interrupts.
* Change mfbinit() signature to match other (pmax) TC framebuffer init
routines.
* TODO after 1.2: add {cfb,mbf,sfb}var.h. Declare init functions there.
* Make S expand to an absolute path at compile time.
* Use `-S' rather than `-x' to remove debugging symbols.
* Garbage collect unused variables.
* Reverse a handful of port-specific changes that do not correspond to
the common build model and are not needed.
a boot string for firmware that can do this, such as the SPARC and
the sun3 models. It is currently silently ignored on all other
hardware now, however. The MD function "boot()" has been changed to
also take a char *.
message-in. The remaining transfer count restored when a device is
reselected needs to be saved. The saved value is needed to compute
the number of bytes transferred if another disconnect occurs. This
fixes a random read data corruption that occurs on certain disks that
may disconnect more than once in the middle of a DMA transfer.
physical memory is sized by a loop that writes data to the first
word in a page, (writes something else to settle the bus) and then reads
back the word it wrote. If the read succeeds, the amount of physical
memory is increased by one page.
This fails on a 5000/1xx with a memory subsystem filled with 8 low-density
(4Mbyte) SIMMs. The memory-decoding hardware aliases the 32Mbytes of
physical memory at physical addresses 0, and at 32M (and presumably
at 64 and 96Mbytes.) The contiguous aliasing causes the memory-sizing
loop to continue at 32 MBytes, testing the memory that's really
at address 0, overwriting and crashing the kernel.
Fixed (for 1.2) by reading the SIMM-decoder stride size from the
motherboard, and reducing the loop bound to 32Mbytes on a 5000/1xx
with low-density SIMMs. (Other models have a non-power-of-2 maximum
memory and so are not subject to _contigous_ aliasing of physical memory).
The physical memory-sizer claims to preserve memory contents
(specifically the contents of msgbuf). The loop writes different
values into two adjacent locations and reads the contents of the
first, to ensure that whatever is read back from the first location is
from memory and isn't just the first write persisting on the bus.
The loop preserved the value of the first location, but not the second,
resulting in the second test value ('ZZZZ') over-writing a word in msgbuf.
Show proper inquiry data when version >= 1, not <= 1 (SCSI-2 devices
now display their inquiry infor).
Correct transfer length passed to dk_unbusy (b_resid hasn't been
updated yet).
* Eliminate the #ifdef DS5000 and kernel config option DS5000 altogether.
option DS5000 was a hangover from 4.4bsd/pmax; it's never been clear
if it means "support for DS5000/200" or "support for any TC machine".
This implictly fixes pr 1828.
* Use the "tc.h" and NTC generated by config for a "tc? at mainbus"
where appropriate, intsead of #ifdef DS5000.
* Canonicalize the spelling of kernel options that enable support
for particular models. Use
DS5000_25 for the Personal Decstation aka MAXINE aka KN02-ca
DS5000_100 for the 5000/1xx series aka KMIN aka KN02-ba
DS5000_200 for the 5000/200 aka 3MAX aka KN02
DS500_240 for the 5000/240 aka 3MAXPLUS aka KN03
and change DS_5000_xxx to DS5000_xxx everywhere.
* Wrap the interrupt handlers for each model in the appropriate #ifdef,
instead of wrapping all of them with "#ifdef DS5000".
* Wrap the TC autoconfig for each model in the appropriate #ifdef.
* Eliminate the #ifdef DS5000 and kernel config option DS5000 altogether.
option DS5000 was a hangover from 4.4bsd/pmax; it's never been clear
if it means "support for DS5000/200" or "support for any TC machine".
This implictly fixes pr 1828.
* Use the "tc.h" and NTC generated by config for a "tc? at mainbus"
where appropriate, intsead of #ifdef DS5000.
* Canonicalize the spelling of kernel options that enable support
for particular models. Use
DS5000_25 for the Personal Decstation aka MAXINE aka KN02-ca
DS5000_100 for the 5000/1xx series aka KMIN aka KN02-ba
DS5000_200 for the 5000/200 aka 3MAX aka KN02
DS500_240 for the 5000/240 aka 3MAXPLUS aka KN03
and change DS_5000_xxx to DS5000_xxx everywhere.
* Wrap the interrupt handlers for each model in the appropriate #ifdef,
instead of wrapping all of them with "#ifdef DS5000".
the IOASIC attached devices. The DS3100 will now configure properly.
Fix the DS5000/25 IOASIC table entry for the RTC so the RTC interrupts
get enabled.
Fix up a moved include file.
configure properly. Also fix devices with TurboChannel and mainbus
attachments so they will work if no TurboChannel was configured.
Fix clock.c for a missing variable if not including NTP support.
Also remove some extraneous includes files or use the right ones.
configure properly. Also fix devices with TurboChannel and mainbus
attachments so they will work if no TurboChannel was configured.
Fix a panic when the dtop keyboard handler receieves a character
before the device has been opened.
symbolic lookup of the CPU-level specific locore entry points to use the
r2k, not the r4k, labels.
Include header files to get prototyped declarations of ipintr() and arpintr().
Remove unused variables and parenthesize assignments in if () expressions.
Gcc warns of a possible && vs || operator-precedence bug in the network
softint dispatch code, which needs more thought.
locore calls to go via a locore-entry jumptable.
Use the mips/mips/mips_machdep.c code to initialize locore state,
exception vectors, and the locore entry vector, instead of doing
it all in mach_init().
Update dumpsys() to use new-style signatures for dump routines,
even though the pmax SCSI drivers don't actually support dumping kernel
memory.
locore calls to go via a locore-entry jumptable.
Cast the (int) arguments to MachTLBUpdateEntry() to avoid
warnings. Variables TLB entries are still type-punned as either structs
or ints, without any regard, when the pmax-specific VM code passes
them as arguments to functions.
locore calls to go via a locore-entry jumptable.
Use mips_btop(), mips_round_page, mips_trunc_seg() instead
of pmax_btop(), pmax_round_page, pmax_trunc_seg().
Add Per's software-readonly-bit mechanism, since the r2000 and r4000
hardware TLB entries are very different, and the r4k has no space for
software bits in TLB entries. That is, this pmap code still won't work
on r4000 machines. Some other solution, like another jump table for
clients of the pmap code, is necessary.
locore calls to go via a locore-entry jumptable.
Declare r2000- and r4000-specific exception-handler functions, to which
trap() and interrupt() dispatch exceptions. Initialize r2000- and r4000-
specific exception-handler vectors, when CPU_R4000 and CPU_R2000 are
defined.
Update the stack-traceback code (partially) to understand and print
the new low-level exception-handler code, via which machine exception-vectors
send exceptions to call trap() or interrupt(). This needs more work.
It just causes a kernel panic, and will until the rest of the pmax
autoconfiguration is redone to use a bus-specific probe and attach
argument, or until KN01 devices are no longer attached to the mainbus.
an vector (struct) of function pointers. Add prototype declarations for
each vector entry.
Add declarations for the r2000 (MIPS-I) and r4000 (MIPS-III) locore
versions of the relevant functions.
update the 4.3bsd/Ultrix-compatible qvss-style mmap'ed framebuffer/input-event
code to use mips_round_page() et.al., not pmax_round_page().
Add explicit "int" return types to functions. Add prototyped forward
declarations.
Fix the the definitions of dtop cdevsw entry point functions to match
their declarations. Add explicit "int" declarations to functions.
Add prototyped declarations for all local functions.
Return zero from dtopstop().
Include the external declarations from dtopvar.h.
locore functions. The new names are used by C code to construct a jump-table,.
making it less infeasible to have a single kernel image work on both
r3000 and r4000 systems.
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.
Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
remove their 'integrate' (usually defined to be 'static') keywords.
when lance drivers are split up by attachment, more than one file will
reference the copy/zero functions (i.e. not just the file that pulls in
am7990.c... and eventually inclusion of am7990.c should go away entirely).