Commit Graph

941 Commits

Author SHA1 Message Date
scw 7e2f2acb8e Flesh out the memory controller driver (at least for the MCECC chip)
and attach it at mainbus since it depends both PCCChip2 and VMEChip2
(or the VMEChip2 interrupter) starting first.

We can finally enable, detect and log DRAM ECC errors.
(The PROM disabled ECC checks by default)
2001-07-27 18:38:54 +00:00
scw 5b69ac0a44 Apply pmap_k{enter_pa,remove} patches provided by Chuck Silvers. 2001-07-23 20:34:00 +00:00
wiz a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
scw b4c68ef164 Descend into wrtvid in all but the install pass. 2001-07-19 18:18:30 +00:00
thorpej babefc5331 Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint the back-end
at dmamap load time that the mapping will be used for a unidirectional
transfer of the specified direction.
2001-07-19 15:32:10 +00:00
scw eef68ab123 In bus_dmamap_sync4060(), fold the POSTREAD case into the PREREAD case
where it belonged in the first place.
2001-07-18 17:21:49 +00:00
scw 6a9bccd130 Make absolutely sure page tables are not cacheable on 040/060 cpus.
(Not strictly required for the 040, but mandatory for the 060).
Also revamp cache enable/disable functions for the benefit of
bus_dmamem_map().
2001-07-18 17:18:53 +00:00
scw db111a0133 Restore FPU context properly on 68060-specific kernels... 2001-07-18 17:13:15 +00:00
abs 01b024cd5b Standardise TCP_COMPAT_42 as commented out, grouped with other COMPAT options,
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
2001-07-08 16:32:12 +00:00
scw c1ab2b5460 bcopy -> memcpy
bzero -> memset
bcmp -> memcmp (note that the MI libsa's memcmp() still calls bcmp()...)
2001-07-07 09:06:43 +00:00
scw ff267f1e06 bzero -> memset
bcopy -> memcpy
bcmp -> memcmp
2001-07-07 07:51:37 +00:00
scw 8593b82c71 One less item (h/w assisted soft interrupts) 2001-07-06 20:12:34 +00:00
scw 35110949ce Ditch the `simulated' software interrupt in favour of
hardware-assisted soft interrupts on all boards.
(Note: VMEChip2-less 162/172 not yet tested)

This greatly simplifies the `rei' path and allows
interrupt nesting to be tracked somewhat more easily.

As a result we now have a working CLKF_INTR() macro
and can detect uvm_fault() being called from an interrupt
(although there may still be a very short race detecting
the latter; need to investigate further).
2001-07-06 19:00:12 +00:00
scw 6d598bac6d Another instance of the MD siop driver which slipped the net... 2001-07-03 17:36:01 +00:00
wiz f3f6c5b675 `accessible' only has one `a'. 2001-06-19 12:52:20 +00:00
christos 0f380fac15 Add an e_trapsignal member to struct emul, so that emulated processes can
send the appropriate signal depending on the trap type.
2001-06-18 02:00:48 +00:00
thorpej 8eb3b954f1 Don't need to prototype child_return() here, it's in <sys/proc.h>. 2001-06-14 22:56:55 +00:00
wiz 0a600be867 receive, not recieve 2001-06-12 15:17:10 +00:00
scw 712d37e53b G/C an unused parameter to isrdispatch_vectored(). 2001-06-11 11:26:42 +00:00
scw 9b0b23c664 Stack adjustment for autovectored interrupts wasn't quite right... 2001-06-11 11:24:40 +00:00
scw 179dd3e579 sigh. It also helps to switch back to .text ... 2001-06-10 17:31:38 +00:00
scw 08fb0e543b Pick the right bit to check... 2001-06-10 17:03:01 +00:00
scw 8aad61265b On 162 and up, get the CPU speed from the firmware and only fall back
to calculating it on the fly if the firmware's value is bogus.

This fixes problems caused by rounding errors on some board/speed
combinations.
2001-06-10 16:48:19 +00:00
scw aab2376d45 Refuse to boot on 162/172 and 167/177 if the user has not removed
the jumper which tells 1xx-Bug where to locate its scratch data.

Instead, print a message informing the user to RTFM (which needs to
be updated to include this info. ;-)
2001-06-10 16:45:52 +00:00
scw 89546c98a1 Enable DHCP and BOOTP as supported diskless NFS boot options. 2001-06-10 14:40:47 +00:00
scw 967e648941 Use the versions of dev_net.[ch] in libsa in order to get DHCP support.
In other words, mvme68k's "netboot" finally supports DHCP.
2001-06-10 14:12:48 +00:00
scw ea5249214a Add rnd(4) pseudo-device. 2001-06-10 13:16:07 +00:00
chs 821ec03ed9 replace vm_map{,_entry}_t with struct vm_map{,_entry} *. 2001-06-02 18:09:08 +00:00
scw 78aad8f79e Mark evcnt(9) item as done. 2001-06-01 08:31:07 +00:00
scw 59ba4788ce Deprecate intrcnt/intrnames in favour of the generic evcnt(9) interface. 2001-05-31 18:46:07 +00:00
lukem d84d2c6c85 add missing #include "opt_kgdb.h" 2001-05-30 15:24:23 +00:00
mrg 67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
scw 9c1aa86e46 One less item (MD siop driver is no more). 2001-05-29 08:20:42 +00:00
mrg 3783ca5d30 define _KERNEL_OPT as well as _KERNEL. we will use this in the future to
get kernel "opt_foo.h" headers, rather than _KERNEL && !_LKM.
2001-05-29 02:20:20 +00:00
scw d5c72b21e5 s/ncsrc/osiop.
While I'm here, ditch some excess baggage which is useless for
the RAMDISK kernel.
2001-05-28 18:39:45 +00:00
scw eb9637dd7e Add COMPAT_15 and comment out COMPAT_SUNOS. (It's hardly used and saves
a bit of space on low memory models).
2001-05-28 11:14:41 +00:00
chs 11a9651c8f replace vm_page_t with struct vm_page *. 2001-05-26 21:27:10 +00:00
chs 118ddca24a replace {simple_,}lock{_data,}_t with struct {simple,}lock {,*}. 2001-05-26 16:32:40 +00:00
scw c22fb1db55 Finally nobble the bus_dmamap_sync() problem with osiop(4).
Basically, bus_dmamap_sync() `PREREAD' needs to flush the cache
for the start and end of the region if it is not aligned to
a cacheline boundary, otherwise a subsequent POSTREAD can *purge*
valid data which was in the cacheline but *outside* the region
passed to bus_dmamap_sync().

Bus snooping doesn't always help here because osiop(4) calls
bus_dmamap_sync() with POSTREAD even if no data was actually
transferred! (And we can't rely on snooping on the 68060 models anyway).
2001-05-16 19:06:46 +00:00
scw 7e86548d5c doh, make the last fix compile for '147. 2001-05-13 18:35:19 +00:00
kleink ba6a8bf61e Update to reflect that unlike in m68k a.out environments, where the .align
directive is given a log2 argument, .align is given a linear argument in
m68k ELF environments.
2001-05-12 00:55:34 +00:00
scw e2177c7f71 Ensure the caches are flushed before changing the `cacheble' state
of a page.
2001-05-11 13:05:06 +00:00
scw 6ca2fd54c1 Take the offset and length into account inside bus_dmamap_sync().
(Inspired from the Atari version).

This fixes a problem seen with the new MI osiop driver.
2001-05-11 13:01:44 +00:00
scw 4d440b4035 G/C a printf which has moved to the MI code. 2001-05-03 19:03:53 +00:00
scw c038390035 Recognise `osiop' as a boot device. 2001-05-03 17:58:45 +00:00
scw 6d231d4107 Attach `osiop' at pcctwo instead of `ncrsc'. 2001-05-03 17:54:30 +00:00
scw adf7013d7f Match `osiop' instead of `ncrsc' now. 2001-05-01 07:33:29 +00:00
scw 813efd148a Don't panic in _bus_dmamap_sync() if a segment start address/length are
not aligned to a cacheline boundary.

Instead round down the start address, round up the length and "DTRT".
2001-05-01 07:32:51 +00:00
thorpej cf67ac7122 Per discussion w/ chuck and chuck, restructure the md page stuff
to use a structure called "vm_page_md", and use __HAVE_VM_PAGE_MD
and __HAVE_PMAP_PHYSSEG.
2001-05-01 02:19:13 +00:00
scw ff4a29679f Switch to the MI 53c710 driver recently committed by Izumi Tsutsui. 2001-04-30 09:05:58 +00:00
thorpej 2b27ac7a99 Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
each vm_page structure.  Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM.  These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.

This deprecates struct pmap_physseg.  As a transitional measure,
allow a port to #define PMAP_PHYSSEG so that it can continue to
use it until its pmap is converted to use VM_MDPAGE_MEMBERS.

Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now).  Changes to other pmap
modules will follow.
2001-04-29 22:44:31 +00:00
scw 81be7c00b7 Compute PAGER_MAP_SIZE at runtime to avoid needlessly crippling large-
memory models for the benefit of small-memory models.

Uses a heuristic of min(onboard_ram_size/2, 16MB).
2001-04-29 07:53:56 +00:00
scw 89e9fc44d5 Do the same as mac68k/pmap.c:1.70 to prevent wired pages being
removed by pmap_collect().
2001-04-29 07:41:58 +00:00
bouyer 937a7a3ed9 Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
  ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
  to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
  peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
  recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
  scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
  (no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
  set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
  the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
  will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
2001-04-25 17:53:04 +00:00
thorpej 1c3a62e066 Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative.  It may be possible to
optimize these a little more.
2001-04-24 04:30:50 +00:00
thorpej 55044638aa Remove pmap_kenter_pgs(). It was never really adopted by
anything, and the interface itself wasn't as flexible as
callers would have probably liked.
2001-04-22 23:42:11 +00:00
thorpej 69abdbf60c Undo a misguided previous change to the pmap_update() API. 2001-04-22 23:19:26 +00:00
thorpej 4738622712 Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
2001-04-22 00:33:59 +00:00
thorpej 7f10ba88b1 #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
2001-04-21 23:51:14 +00:00
thorpej 15f731ee94 pmap_update() should not be equated with "flush entire TLB", it is
used to process deferred pmap operations.  Since these pmaps don't
defer anything, pmap_update() is a noop.
2001-04-21 17:25:01 +00:00
kleink f06533a1ee Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 17:13:04 +00:00
kleink 739cb75837 Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 15:29:02 +00:00
kleink cdcf9f46c5 Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
2001-04-14 22:46:19 +00:00
kleink a7c20e5788 Add definitions of C99 integer constant macros. 2001-04-14 22:38:33 +00:00
scw 9beeeabe1b Define a PAGER_MAP_SIZE of 4MB for the benefit of low-memory models.
XXX: This may still not be low enough for models with less than 8MB RAM...
2001-04-14 16:02:24 +00:00
scw dd8c947561 Implement a real microtime() by reading the timer counter register.
On mvme147 this gives 6.25uS resolution, and 1uS on all other boards.
2001-04-14 13:53:05 +00:00
scw c605c91bdf Fix bootline argument passing from the Bug PROM. 2001-04-14 13:43:07 +00:00
kleink 7affdab52e Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-14 12:19:49 +00:00
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
lukem 723cd818d8 move duplicate definitions for:
pc, lpt, joy, ocis, apm, satlink, i4bctl, i4brbch, i4btel, i4btrc, i4b
from the port-specific arch/*/*/conf.c files into sys/conf.h
2001-03-21 22:25:52 +00:00
soren 912c115675 s/vm_page_alloc_memory/uvm_pglistalloc/ in panic message. 2001-03-21 18:40:28 +00:00
chs ac3bc537bd eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>
2001-03-15 06:10:32 +00:00
scw bb17ec14d3 Conditionalise inclusion of opt_compat_svr4.h for the benefit of LKMs. 2001-03-13 18:47:19 +00:00
scw e4a4f09fa8 Make this compile again; chan_attn() prototype has changed. 2001-03-11 20:24:52 +00:00
thorpej 2c4c690f14 Add the BUS_DMA_STREAMING flag. 2001-03-07 22:42:16 +00:00
scw 23cf8fe52b Add a missing _ASM_LABEL() 2001-02-15 11:49:25 +00:00
bjh21 fe3273fbb4 Patch from PR kern/8001, submitted by Rafal Boni.
This adds support for EtherExpress/16 cards with 16k of RAM, and in the
process adds general support for PIO mode on these cards.  This entails
changing the way the i82586 driver handles bus barriers, since it doesn't
allow for strange cases like this.

This has been tested on the i386 port with the 'ix' driver in both
16KB (which was the source of the problem) and 32KB modes, as well
as with the 'ef' driver.  I've tested it (briefly) with 'ei' on arm26
as well.  In theory, drivers other than 'ix' should follow precisely the
same code paths as before.
2001-01-22 22:28:43 +00:00
scw 2c13177ff8 Create machine/m68k symlinks before trying to build the program. 2001-01-21 10:58:04 +00:00
tv e58532a4bf No-op commit to force update to a non-"-kk" revision. 2001-01-18 17:47:58 +00:00
fvdl c7f1462f3e Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
2001-01-17 00:07:18 +00:00
thorpej d74e432ed3 Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
2001-01-15 20:19:50 +00:00
thorpej 45de366b2e Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>.  This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.
2001-01-14 23:50:28 +00:00
thorpej a3ec356d52 splimp() -> splvm() 2001-01-14 03:22:04 +00:00
thorpej d85a75f583 Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
2001-01-14 02:00:37 +00:00
scw 65137701cf g/c the HP/UX core-dump code; it references a function which no longer exists. 2001-01-11 08:44:36 +00:00
dbj e992baf394 fix logic error in bus_dmamap_sync that was preventing from flush/purging
full pages instead of only by cache lines
2000-12-26 07:27:01 +00:00
jdolecek de31133f1d split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.

XXX I wish m68k ports would share trap.c
2000-12-23 09:35:51 +00:00
scw 8336df62f7 Some small optimisations:
o Avoid checking cputype when the kernel is built for one cpu variant only.
 o In writeback(), don't use bcopy() to write a mere 16 bytes of 16-byte
   aligned data; it's much quicker to copy it inline.
2000-12-22 21:02:05 +00:00
scw d11562c429 A couple of minor functions which return pointers need to do so in %a0 now.
Spotted by Chuck Silvers.
2000-12-22 20:57:21 +00:00
scw 00627955a1 Some minor optimisations to avoid checking {cpu,mmu}type when
the kernel was built for only one type of CPU.
2000-12-20 16:53:50 +00:00
scw 4350a7f2b7 Unification of the m68k syscall() function. 2000-12-19 21:09:54 +00:00
bouyer c71f40d166 Add pseudo-device vlan 2000-12-19 10:42:02 +00:00
scw e82303a96d s/MDECDIR/MDEC_DIR/ 2000-12-18 21:27:01 +00:00
jdolecek cacec11253 delete obsolete comment 2000-12-17 15:52:39 +00:00
scw 5cabdd3709 Some snippets of documentation for mvme68k... 2000-12-14 20:30:14 +00:00
jdolecek ca57e681bd g/c obsolete vtrace(2) stuff 2000-12-13 18:13:05 +00:00
scw 5d5ebb1b73 Simplify the reboot code:
Always jump through the PROM's reset vector, regardless of board type.
  Fix a stack offset problem in the mvme147 reset code path.
2000-12-10 20:00:21 +00:00
scw 8ace7abc75 A small splx()/spl0()/soft interrupt related optimisation. If we're
dropping to spl0, use inline code to check if a soft interrupt is
pending instead of taking the hit of a function call to do the check.
2000-12-10 18:43:02 +00:00
scw c5b6f43634 Define `splzs()' to be `splserial()' instead of `spl4()', which was
wrong anyway since it blindly set SPL to 4 regardless of the prevailing
level.
2000-12-10 18:00:24 +00:00
scw 1a0a12c5b4 Bah. Somehow the a.out versions of the bootxx symbols got deleted; put
them back.
2000-12-09 22:33:24 +00:00
scw a3dc741c03 Delete the commented out EXEC_ELF32 now that it's in std.mvme68k.
(Spotted by Simon Burge)
2000-12-09 21:02:09 +00:00
scw 3c748b810f Missed this one in yesterday's bootloader commits:
Change BUGCRT from bugcrt.o to bugstart.o.
2000-12-07 21:37:51 +00:00
scw 3f7cfb70ef Add "options COMPAT_AOUT_M68K". 2000-12-07 08:40:06 +00:00
scw ac80517816 Add some #defines for offsets into the bugargs structure, and make the
register names usable within assembly code.
2000-12-05 21:57:13 +00:00
scw 86c7dac956 Replace the startup C code with assembler, which avoids having to
explicitly tell the compiler what registers the Bug args come in on.
2000-12-05 21:54:33 +00:00
scw 7da5cde117 bootxx doesn't need the code relocating stub linked in. 2000-12-05 21:51:38 +00:00
scw 634dc65636 Backout the last change; I'll deal with it another way. 2000-12-05 19:54:09 +00:00
scw 1f9f7cbe53 UPAGES -> 2 as recommended by Chuck Silvers. 2000-12-05 18:46:10 +00:00
scw 2ec144518f Add loadfile_machdep.h to list of installed machine headers. 2000-12-05 18:42:18 +00:00
scw 37f5782c0a Update pm_stats.resident_count when entering pages in the kernel pmap. 2000-12-05 16:07:39 +00:00
scw bfcd71c79c Clean up the build process to ensure libsa/libbug are built
before linking the bootloaders.
2000-12-04 21:25:57 +00:00
scw 349445391c Make this work with the ELF tape bootloader. 2000-12-04 21:24:34 +00:00
scw 5a17a935bc Declare `start' in addition to `_start'. 2000-12-04 20:31:16 +00:00
scw 269a30a733 s/a6/fp/ again... 2000-12-04 18:48:18 +00:00
scw e267f2466b Add support for ELF boot blocks. 2000-12-04 18:44:51 +00:00
scw b29bcb645b The LOAD_TEXTA flag is required when loading a.out kernels.
Also add some non-standalone versions for the benefit of installboot(8).
2000-12-04 18:41:51 +00:00
scw c28723715c Prefix the register names with `%'. 2000-12-04 18:40:05 +00:00
scw d0da91f9e2 Use -fomit-frame-pointer when compiling bugcrt.c; a6 needs to be reserved
for Bug arguments.
2000-12-04 18:35:16 +00:00
scw 9fc2cc70dc Include the a.out m68k compatibility module. 2000-12-03 15:40:06 +00:00
scw 2e68384b0c Back out the previous change after discussion with thorpej and cgd. 2000-12-03 15:38:30 +00:00
scw 53323bf36d Revert the previous change, after discussion with thorpej and cgd. 2000-12-03 15:37:46 +00:00
scw 57b29e6754 Fix symbol table loading. 2000-12-02 17:28:08 +00:00
scw 6de7ccd2d3 On exit from syscalls, don't trash %A0 if the process is
using the COMPAT_AOUT_M68K emulation package.
2000-12-02 17:00:46 +00:00
scw e4326b372a Set things up so that DDB can get to the symbol table in ELF kernels. 2000-12-02 13:57:05 +00:00
scw 66a84140b8 Use "EMUL_HAS_SYS___syscall" instead of checking p->p_emul.
Removes dependency on COMPAT_AOUT_M68K.
2000-12-02 13:45:14 +00:00
tsutsui a8fdbdec1c Remove unused pcbb() macro. 2000-12-01 17:57:43 +00:00
scw 97490c9997 Add __attribute__((__packed__)) to cpu_disklabel to get around
the ELF padding/alignment constraints.
2000-12-01 00:02:22 +00:00
scw 75f2f8f242 Delete an extraneous underscore in the last commit. 2000-11-30 23:47:45 +00:00
scw bd8955b9b6 Only try to attach those devices which have been configured
in the kernel config file.
2000-11-30 22:54:31 +00:00
scw c4a189ad74 Print some more details of the memory managed by each ASIC. 2000-11-30 22:51:35 +00:00
scw ba98135ea8 Add EXEC_ELF32 2000-11-30 22:31:27 +00:00
scw 7051df32f5 Support booting an ELF kernel, plus numerous tweaks due to
the gas.new/ELF transition.
2000-11-30 22:26:26 +00:00
scw 9121962f0e Copy the syscall return value into A0, as per the SVR4 ABI.
Also prepare for COMPAT_AOUT_M68K.
2000-11-30 21:29:11 +00:00
scw d3251e5074 Prepare to switch mvme68k bootloader over to the MI loadfile(). 2000-11-30 21:20:43 +00:00
scw 7248616dee Ditch an extra % in a register prefix, and s/a6/fp/ 2000-11-30 21:18:07 +00:00
scw 614e494d9e Add register prefixes. 2000-11-29 09:18:32 +00:00
scw 930411f925 Missed a couple of register prefixes... 2000-11-29 09:11:53 +00:00
scw fecb49d172 Add register prefixes. 2000-11-29 09:09:39 +00:00
jdolecek 17a9fd0da5 split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate
2000-11-26 11:47:23 +00:00
scw a643cf07a5 Add the memory controller ASIC driver. 2000-11-25 21:46:42 +00:00
scw 46d0d060fd Oops, missed a trailing comma ... 2000-11-25 21:06:12 +00:00
scw eff5b700a8 Enable compatibility for earlier releases. 2000-11-25 20:35:32 +00:00
scw ee58c485bf Add CD9660, plus some general cleanup. 2000-11-25 19:33:39 +00:00
scw 2aa72fcec2 Include the cd9660 filesystem and cd(4). 2000-11-25 19:21:50 +00:00
scw 5529847b99 Don't base this on the GENERIC config file; there's too much
unnecessary bloat in it for an installation kernel.
2000-11-25 19:18:46 +00:00
scw 636c4f5c12 G/C some long-obsolete functions. 2000-11-25 18:49:59 +00:00
scw 73e60771ab Fix the code which probes the memory controller ASICs. We can now
deal with the 2nd one not being present.
2000-11-25 11:25:07 +00:00
scw 2129dff0f7 The ramdisk now needs 1024 blocks. 2000-11-24 19:40:15 +00:00
scw bf5610e667 Some minor optimisations. 2000-11-24 14:49:44 +00:00
scw 55ecb0e64a `emul_sunos' is now declared in the appropriate header file. 2000-11-24 10:29:21 +00:00
scw dcd1f30fb8 First cut of a driver for the Memory Controller ASICs found
on mvme16x and mvme17x boards.
2000-11-24 09:42:09 +00:00
scw 7d191ffe77 Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
 . add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
 . fix a few drivers which have dependencies on the implementation.
2000-11-24 09:36:40 +00:00
scw a70c48655b Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
2000-11-24 09:27:42 +00:00
scw 06e91c089b Replace the inline C versions of bus_space_{read,write}_N() with
inline assembler. This generates significantly more efficient code,
and trims ~1KB off the size of an mvme68k GENERIC kernel...
2000-11-24 09:05:55 +00:00
scw 7bd36d34a1 Use the MI md_root.c. 2000-11-24 08:54:08 +00:00
tsutsui 161004f8c3 s/struct const sysent/const struct sysent/
(BTW, luna68k was missed in emul/execsw changes?)
2000-11-21 23:19:42 +00:00
scw f86349723d Put the call to mvme68k_init() back where it was originally. 2000-11-21 22:08:04 +00:00
tsutsui 2c7e91a09e Define proper macros for FP frame offsets rather than magic numbers. 2000-11-21 13:54:13 +00:00
scw f33cb83f53 Call zs_set_speed() to calculate the initial timing constants. 2000-11-21 11:41:37 +00:00
jdolecek baae0324b9 restructure struct emul and execsw, in preparation to make emulations LKMable:
* move all exec-type specific information from struct emul to execsw[] and
  provide single struct emul per emulation
* elf:
  - kern/exec_elf32.c:probe_funcs[] is gone, execsw[] how has one entry
    per emulation and contains pointer to respective probe function
  - interp is allocated via MALLOC() rather than on stack
  - elf_args structure is allocated via MALLOC() rather than malloc()
* ecoff: the per-emulation hooks moved from alpha and mips specific code
  to OSF1 and Ultrix compat code as appropriate, execsw[] has one entry per
  emulation supporting ecoff with appropriate probe function
* the makecmds/probe functions don't set emulation, pointer to emulation is
  part of appropriate execsw[] entry
* constify couple of structures
2000-11-21 00:37:49 +00:00
scw b6f0a678dd Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
2000-11-20 19:35:28 +00:00
chs c62d17a551 rationalize the use of b_flags for geteblk() buffers.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
2000-11-20 08:24:08 +00:00
scw a29dff3290 Fix a braino in the last commit. 2000-11-18 22:46:07 +00:00
scw 4b0eb0e2dd Allow a degree of tolerance when calculating the baudrate timing constant. 2000-11-18 22:34:25 +00:00
scw d00258d484 bus_dmamem_map() expect a cpu-relative physical address... 2000-11-16 19:12:20 +00:00
scw 598ce19336 Doh! Revert all but the baudrate clock changes from that last commit;
a bunch of local stuff crept in.
2000-11-15 21:32:03 +00:00
thorpej ecf0470012 We use 4K pages on the mvme68k. Override PAGE_SIZE and friends to
be compile-time constants.
2000-11-14 19:12:58 +00:00
scw d7b439dff5 udp.c is now needed in SRC_sa. 2000-11-11 11:36:17 +00:00
scw 096c3068dd The ZS chips are actually clocked at 5MHz and 10MHz on mvme147 and
mvme162 respectively. Thanks to Neil Lubdan and a frequency counter. :-)
2000-11-09 19:51:57 +00:00
itojun 0c84fad435 more rnd(4). 2000-10-04 22:26:49 +00:00
itohy c2672f184b Fix the type of pmap_zero_page_uncached from void (paddr_t) to
boolean_t (paddr_t) to make it compile again.
2000-09-28 03:41:50 +00:00
jdolecek b1f94e26ab don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
2000-09-24 15:59:26 +00:00
jdolecek 49c105ffdb add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
2000-09-24 12:32:31 +00:00
scw 5f6802db57 Add pmap_zero_page_uncached(), and the PMAP_PAGEIDLEZERO macro. 2000-09-22 08:27:00 +00:00
scw 0161d6a880 Pass the requested cpu irq priority through to the VME chipset-specific
backend.

The VME2chip can use this to translate a VMEbus irq to a cpu irq.

The VMEchip (on mvme147) can't deal with the VMEbus irq and cpu irq
being different so we just panic in that case for now.
2000-09-19 19:35:52 +00:00
scw 18deccffca Add IPL_SERIAL. 2000-09-19 19:31:34 +00:00
scw 53d57897d0 Use the complete ethernet address stored in nvram on mvme162/mvme167
instead of faking the first 5 nibbles a'la mvme147.

Apparently recent mvme16x boards have a new 5 nibble prefix...
2000-09-15 08:50:24 +00:00
thorpej 72a24b4eae Add an align argument to uvm_map() and some callers of that
routine.  Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.
2000-09-13 15:00:15 +00:00
scw 4bf2309112 Partially back-out the previous change. What was I thinking... 2000-09-09 19:51:36 +00:00
scw 7f3786d36a Add preliminary support for the MVME162-LX 200/300 series of boards.
Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

	o Real floating point hardware (the 68LC040 model isn't tested),
	o The VMEchip2 must be present,
	o If offboard VMEbus RAM is not present, at least 8MB of onboard
	  RAM is required.
	o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
	  RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
	  supported with offboard RAM, but not without some funky values in
	  the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
2000-09-06 19:51:42 +00:00
thorpej 4db6fc7542 Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity.  Its use in
roundrobin() still needs some work.
2000-08-25 01:04:06 +00:00
scw da7dfaefcc Though the VMEchip2 documentation is not explicit on the subject, a
VMEbus analyser confirms that D8 transfers are possible on all the
master ranges.
2000-08-23 08:13:14 +00:00
thorpej 58e7a6954b Add spllock(). See spl(9) for details. 2000-08-22 19:46:26 +00:00
scw 72f826d727 A VMEbus RAM board configured for use by mvme68k can now be
treated as just another available VMEbus slave image as far as
bus_dma(9) is concerned.

To preserve faster onboard memory, mvmebus_dmamem_alloc() will
allocate first from the offboard VMEbus RAM slave image if present,
and assuming its address modifier matches the caller's constraints.
This can be overidden by specifying the BUS_DMA_ONBOARD_RAM flag.
2000-08-21 20:50:13 +00:00
scw 3cac59ee4f Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
2000-08-20 21:51:31 +00:00
thorpej a86d1f4891 Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it).  Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.
2000-08-20 21:50:06 +00:00
scw 3f2adcb2b0 Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
	. Get VMEbus slave mode going on mvme147. This should be easy.
	. Fix up the A16 slave mappings.
	. Bounce buffer support. (Messy, but pretty much a `must have'.)
	. Figure out how to deal with `location monitor' interrupts
	  within the framework. (Useful for Busnet, among other things.)
	. It would be nice to make use of the VMEchip2's DMA facilities...
2000-08-20 17:07:41 +00:00
scw b77bc217e1 Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
2000-08-13 17:00:51 +00:00
itojun 85dda25e94 move "options PULLDOWN_TEST" into sys/sys/mbuf.h (in #ifdef _KERNEL),
as it is no wthe default setting for everyone.

the reason we still use the name "PULLDOWN_TEST" while it is now default:
kame code sharing.
2000-08-13 01:31:15 +00:00
scw e09ab8e986 G/C an unused variable. 2000-08-12 20:09:12 +00:00
scw a92a92c554 Avoid calling printf() when we're either in DDB, or about to call
Debugger(). Use db_printf() instead.

This fixes a problem whereby it was impossible to enter the debugger
if the CPU was spinning in lockmgr() for the proclist lock, because
printf() calls logwakeup(), which eventually calls proclist_lock_read(),
which then spins in lockmgr() yet again...

[Note: This change was prematurely committed to the 1.5 branch by
       mistake. Since it would've been pulled up anyway, I won't
       be sending a pullup request.]
2000-08-08 08:26:21 +00:00
jdolecek e25636b5da g/c RB_DFLTROOT
I've tried hard to find also various usage() messages and remove the
appropriate flag from there as well, hopefully all occurences are covered.
2000-07-29 20:06:27 +00:00
scw 44c9e5e16e Really make this work for `dependall'. Also strip bootst.bug before
running it through wrtvid.
2000-07-28 20:08:20 +00:00
scw 379de37900 Make these work for the `dependall' target. 2000-07-27 21:06:53 +00:00
mason 4a353b5330 Moving to a default of 64 PTYs. 2000-07-27 17:53:35 +00:00
scw 0d5db1f645 Bump DFLDSIZ to 32MB since 16MB is no longer enough for some
parts of `make build'.
2000-07-27 14:48:58 +00:00
scw 8f4e16a29e G/C some obsolete HP-UX related flags, and prevent multiple
inclusion while I'm here.
2000-07-27 14:26:15 +00:00
scw 110b948408 G/C MDP_HPUXTRACE since it is never set anywhere, so we don't actually
support HP-UX processes doing the tracing.
2000-07-27 14:25:14 +00:00
scw 2f335ce72b Nuke __BROKEN_DK_ESTABLISH, and add __HAVE_DEVICE_REGISTER. 2000-07-25 20:52:27 +00:00
jdolecek 0cd22457c9 add netboot.bin to CLEANFILES 2000-07-24 18:43:16 +00:00