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).
Add prototypes to (most of) src/sys/arch/pmax/pmax. (The un-protytyped
parts still have pending merges with the Pica port.)
Fix splx() glitches in pmax/clock.c.
Delete old cpu/fpu identification from pmax/autoconf.c, use r4400/r4600/idt
aware code from Pica port, now in mips/mips/mips_machdep.c.
Delete unused multi-CPU autoconfiguration code; NetBSD/pmax does not
support decsystem 5800s anyway.
Update the pmax SCSI drivers (rz and tz) to use <machine/conf.h>.
Fix the driver entry points to have the correct signatures -- add
"ioflag" args to read() and write(), add "struct proc *p" arg to
open and close.
Stop using __BDEVSW_DUMP_OLD_TYPE, and update the rzdump and tzdump
entry points to have the correct, MI signatures.
NB: this is just syntactic sugar: both the caller and the dump entry
points ignore the additional args, and do exactly what they did before.
This must be fixed before using dump entry points in non-pmax drivers
(e.g., the MI scsi code).
add prototyped declarations for the callbacks which add old-style
(4.4bsd/pmax conf.old) SCSI controllers, and which configure SCSI slaves
on such controllers.
rewriting the SII driver to work with the MI scsi would be a better option,
if time were available, and the MI scsi code supported SCSI controllers with
an 8k upper bound on transfers.
Add prototyped declarations for scsiGroup0Cmd and scsiGroup1Cmd.
Add prototype declarations for scsiPrintSense. Cut the inqiury-response
pretty-printer from tz.c and rz.c and paste it in as scsiPrintInquiry.
-Wall -Wmissing-prototypes:
Add prototypes.
Fix printf() format strings (%x vs pointer-arg, %x with a long int).
Fix a possibly-uninitialized shadowing local variable "resid" in tzdone().
include <sys/systm.h> to get prototypes for printf() and bcopy().
Move to mips/pmax/genassym.c, as (most of) the assembler locore code is
being merged into a generic-MIPS locore.
Remove the redundant pmax/pmax/genassym.c.
* cut-and-paste all the code for both r2000 (MIPS-I) and r4000 (MIPS-III)
into both the pica and pmax locore.S.
* Change the names of the small segments of vector code that are
bcopied to the machine vector locations, to avoid clashing.
Get rid of the Sprite MachXXX names for the vector code, and
use use mips_r2000_xxx and mips_r4000_xxx instead.
Update the names used in the vector-copying code and trap handlers
to match.
* Most of the rest of the pica locore.S was copied from the pmax
locore.S, and then edited to work on an r4000. The names of
functions and of manifest constants stayed the same, although
both assmbler code and constant values changed.
cut-and-paste such code into contiguous blocks protected by
#if / #endif. Much of the cache and trap-handling code
needs r3000-only register fields, on the r3000, and r4000-only
insns and registers on the r4000.
* change the pmax r2000 exception-handling code to extract a trap
code with the user/kernel bit at 0x20 rather than 0x10.
(r2000s have 4-bit execption codes, r4000s have 5-bit.)
Use the a 16 from-user-space + 16-from-kernel space jump table,
just like on the r4000 pica port.
* add NOPs to the common code where required by the r4000 pipeline
constraints.
* add _C_LABEL() macros to the r4000 locore.
Comitted to provide a snapshot for others to test, and work on a cleaner merge.
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.
Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.
Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.
TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.
or for which the Pica port is an older revision of the pmax branch.
A merged version with the NetBSD/pmax revision history is in mips/mips/.
cpu_exec.c
elf.c
mem.c
process_machdep.c
* Delete pmax-specific functions and declarations from trap.c
* Delete mips-geeneric functions and declaratinos from pmax_trap.c
* Rename the function pointer used to handle hardware interrupts to
"mips_hardware_intr". Define it in trap.c. Change references elsewhere,
including machdep.c.
Verified to boot on a 5000/200.
* Add spl4() and spl5() functions from the Pica port.
* Add MachFPTrap() as an alternate entry point for MachFPInterrupt.
The r4k reports floating-point execptions as a trap, not an interrupt,
and the Pica port uses the name MachFPTrap().
* Add nops to the Mach_spl?() functions and MachFPInterrupt, as required
for the r4k port.
Commit "floppy" interrupt counter for vmstat -i.
always be eight digits.
Copy the kn02 memory-interrupt reporting function to the kn03 (5k/240)
memory-error handler, since the 3MAXPLUS seems to use the same ECC hardware
as the 3MAX.
to mips/include/asm.h.
Until all references to <machine/machAsmDefs.h> in the pmax and
pica tree are changed to use <mips/asm.h> directly, just do
#include <mips/asm.h>, for compatibility.
opcodes from the Pica port. Per Fogelstrom claims the latter are all
supposedly MIPS-II (r6000) instructions, rather than MIPS-III (R4000),
but we haven't checked to be sure. Are LL/SC really in MIPS-II?
CVS:: ----------------------------------------------------------------------
code following the MIPS ELF abi.
* Move the kn01 interrupt handler outside of #ifdef DS5000, to support
3100-only kernels.
* Add #ifdef DS3100 around kn01_enable_intr() to allow configuring
turbochannel-only kernels.
Configuration-time support for specific models of DECstation still needs
more thought/work.