Commit Graph

225 Commits

Author SHA1 Message Date
wdk b57fe26ada Write a NetBSD disklabel to 2nd sector while retaining the Mips volume
header in the ist sector.   We now use the NetBSD label in preference
to the Mips Volume header.
2000-09-16 08:27:16 +00:00
nisimura c65b8a8ceb Nuke unused obscure #define's. 2000-09-13 05:23:37 +00:00
nisimura a101bca4b8 Needs to have machine/asm.h for userland applications. 2000-09-11 03:25:40 +00:00
nisimura eafab3fe6b RB_DFLTROOT is obsolute and G/C'ed from main trunk at late Jul of 2000. 2000-09-10 06:26:51 +00:00
wdk b38096892a Microtime calculation was seriously incorrect when HZ != 100
Give rest of clock interrupt code a revamp.  Because we are using an external
cycle counter we can now handle loosing several hundred interrupts without
the time slipping.
2000-09-06 07:52:47 +00:00
wdk f0f97fa466 * Add extra tests to ensure NetBSD disklabel is not corrupted
* For MIPS RISC/os based diskl labels create partition 8 which is used
  by sash (and where bootstrap code hides).

* If existing MIPS RISC/os label is present update disk parameter information
2000-09-04 22:35:26 +00:00
wdk 3e329a2925 * Use bus_space_write_multi_2 for priming the DMA FIFO as suggested by cgd
*  Correctly handle transfer pad operation

*  Remove check for DMA fifo flush during DMA chaining - after considerable
   thought this is not required
2000-09-04 22:28:53 +00:00
wdk 7980486e61 Add #define's for PROM entry point addresses which will be needed by any
replacement bootstrap routines
2000-09-04 22:23:34 +00:00
wdk 801b97faf2 Add wbflush() to bus_space_{write_multi,write_region,set_region,copy_region}
functions
2000-09-04 22:18:58 +00:00
wdk 35871e7996 Report memory sizes using format_bytes(9) kernel function 2000-08-29 12:12:59 +00:00
wdk 149a5fc5f2 Engage the clutch before changing gears.
If the machine uses a Z85230 ESCC device with deep buffers, we observe
output glitches when printing the zstty{0,1} probe lines when the device
is reset & reprogrammed during startup.

There is no easy 'hook' in the MI Z8530 driver, so we wait for output
buffer to drain before changing the baud rate generator prescaler value.
2000-08-29 11:25:08 +00:00
wdk 5656bdea79 Don't trust the realtime clock if the data is before 1988. This is
consistant with other ports.

Prevent uninitialized time from being written back to the RTC (1-Jan-1970)
if the machine is halted from the root device name prompt
(bootflags & RB_ASKNAME)
2000-08-29 10:34:13 +00:00
wdk aaa3f11967 Fix an obscure bug with dump corrupting files during raw reads.
If the DMA chaning interrupt couldn't be serviced immediately (higher spl
level when kernel doing something else) a few microseconds later the NCR
controller will fill its FIFO and also interrupt the CPU.

The SCSI interrupt sees the terminal count has been reached, calls
asc_dma_intr to finish the job off.   The FIFO cannot be flushed because
the block count hasn't been setup for the last dma segment (DMA chaining
still wasn't serviced).

Since the NCR 53c94 FIFO is only 16 bytes in size, any short DMA in this
size combined with the machine 'doing something else' causes the problem
to occur.

Servicing the DMA chaining interrupt before the NCR SCSI interrupt solves
this problem.

Add tests to ensure the DMA FIFO has been flushed correctly at the end of
each DMA operation just to be on the safe side.
2000-08-29 08:24:06 +00:00
thorpej 58e7a6954b Add spllock(). See spl(9) for details. 2000-08-22 19:46:26 +00:00
wdk caa807ac35 * Tidy up reading of Mips volume header information
All compatable values are copied from the MIPS volume header to the
  BSD disklabel structures.

* Add support for writing Mips volume header.

* Remove support for writing NetBSD label directly (this was broken)

These changes allow the kernel to read either a BSD disklabel created under
NetBSD/sparc or a MIPS volume header created under RISC/os.

There is a small amount of losage with the conversion between the 2
types of disk labels (mainly to do with file system types).
A table is used to map partition numbers and types between the two
types, and unless someone does something real fancy (or crazy) it should
work in both senario's

This change will allow the stand alone shell to directly load a NetBSD
kernel and mount a file system, avoiding the need for a seperate disk or
bootp server to bootstrapping NetBSD.

NetBSD/mipsco is now self sufficiant.  We are not far from having a
miniroot filesystem and removing the need to have another NetBSD
machine to create the base filesystems.

Minor Trap for young players:
   The root partition must be created with 'newfs -O' in order for the
   stand alone shell to boot the kernel

TODO:
   Add support for writing NetBSD disk labels back in - it will be useful
   for non boot disks.   I'm just not sure how to control the 2 behavours
2000-08-22 11:59:34 +00:00
thorpej 23a7f255d4 Make sure we provide splsched() as described in spl(9). 2000-08-21 02:06:31 +00:00
wdk 9ac68bcb51 - Add support for calling most prom firmware functions
- Using the prom getenv function determine the correct console port

- Remove old prom function hooks

- Tidy up bootflags (remove upper case names, fixup RB_ASKNAME) as
  recommended by Jaromír Doleèek
2000-08-19 12:13:46 +00:00
wdk 702ec79b19 #include <mips/locore.h> no longer required since implementing bus_space(9)
remove unused extern variable that is never used in mipsco port
2000-08-17 21:26:34 +00:00
wdk b9333bd4e7 Check for memory aliases when sizing physical memory. Remove 32MB memory
restriction.

Tested with 32 x 1MB SIMM's plus mix of 4MB and 1MB SIMM's to ensure the
aliases is detected in all memory configuratiions.
2000-08-17 05:05:01 +00:00
wdk 4cad781e16 Parse bootflags and attempt to find the root device from the boot command line 2000-08-16 21:54:43 +00:00
wdk bf69eb6def Trap and report memory parity errors 2000-08-16 21:00:39 +00:00
wdk 33016f23e0 * Tidy up interrupt handlers by implementing an intr_establish()
handler to hook up device interrupts and softc callbacks.

   Suggested by:  Jason Thorpe and Toru Nishimura

*  Fixup the indenting in a few places to conform to NetBSD style
2000-08-15 04:56:45 +00:00
wdk 374fb8efbc Decrement the block count to compensate for 64 bytes prefetched to fill
the DMA FIFO on non block aligned writes.   Not doing this causes large
writes (>4k) that are not aligned to incorrectly write 64bytes
of data every 4k interval.   This only occurs on raw devices - typically
newfs fails to create a clean filesystem.
2000-08-14 21:04:44 +00:00
soren 6f1de2d858 s/dev/obio/ 2000-08-13 19:25:13 +00:00
wdk 3f55a7b9aa Initial commit of port to MIPS Computer Systems RC3xxx systems.
Currently supports the RC3230
2000-08-12 22:57:55 +00:00