Commit Graph

248 Commits

Author SHA1 Message Date
bjh21 f3ef35c447 Add rudimentary 80C04 support (basically saying "Oh look, an 80C04!").
Move printing the initial ":" into the board driver, like i82586.c does.
Don't bother printing the amount of RAM, as it's always 64 KB.
2000-09-21 22:20:38 +00:00
bjh21 40aba7cd4d Split the arm26 Ether3 (ea) driver into an MI driver for the SEEQ 8005 chip,
and a front-end driver for the Ether3.  Only semantic change is to remove
ea_claimirq() and ea_releaseirq() on the grounds that the seem too spurious
to warrant a callback to the front-end.
2000-09-18 20:51:14 +00:00
bjh21 41b1cb9327 Remove mention of truly dead files 2000-09-18 20:08:43 +00:00
bjh21 f32aac93cb Add an ROMTEXTBASE option to change where the text segment is linked. This
might be useful for making rommable kernels if I can get the rest of the
infrastructure sorted.
2000-09-18 18:33:33 +00:00
bjh21 bae27bc250 Make the FOURMEG kernel a bit smaller. Still not small enough. 2000-09-18 18:30:01 +00:00
bjh21 35dc9595d6 Move the user structure for process 0 into the same page as its stack segment,
the same as for every other process.  It probably doesn't matter, but it makes
me feel more comfortable.
2000-09-18 18:01:39 +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
bjh21 7c9498f7cb Move setsoftast() and friends into cpu.h and make them into macros, so arm26
is the same as every other port (except arm32).
2000-08-25 16:43:46 +00:00
bjh21 36f4367186 <machine/spl.h> -> <machine/intr.h> (missed this one last time) 2000-08-25 10:37:58 +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
bjh21 acb0541a4b Use symbolic names for interrupt lines. 2000-08-23 17:28:51 +00:00
bjh21 769e82477f Move contents of <machine/spl.h> to <machine/intr.h>.
Add IST_* macros to <machine/intr.h>, mostly for the feature-list tickbox.
Generally tidy up.
2000-08-22 21:27:21 +00:00
bjh21 6e3e3a755d Don't include <machine/spl.h> any more.
Include <machine/intr.h> everywhere than uses spl(9) functions.
2000-08-22 21:22:48 +00:00
thorpej 58e7a6954b Add spllock(). See spl(9) for details. 2000-08-22 19:46:26 +00:00
bjh21 a776e1268d General cleanup of definitions of translation table stuff.
Also add PPN[8] for the A540.  Now all I need are two more RAM cards for my
A540 so I can test it.
2000-08-21 14:37:51 +00:00
thorpej 23a7f255d4 Make sure we provide splsched() as described in spl(9). 2000-08-21 02:06: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
bjh21 567f2768d1 Implement the easy ptrace requests and turn off the difficult ones. 2000-08-20 15:16:49 +00:00
bjh21 ba6517aa9c Adjust register spacing to take A0 into account. This should make supporting
8-bit uses of the 8005 (such as, I suspect, 8-bit Ether3 cards) easier.
2000-08-20 13:43:23 +00:00
bjh21 ef49e5cd42 Exclude cpu_Debugger if DDB is not defined. 2000-08-20 13:41:44 +00:00
bjh21 cc396125ae Add support for clearing IRQ 0, which is latched by the IOEB (on IOEB systems). 2000-08-18 12:50:00 +00:00
bjh21 a81231398b Oops. Remember to close the comment! 2000-08-17 22:09:10 +00:00
bjh21 6bc85d382a Add cdevsw entries for bpf, tun, com, lpt. 2000-08-17 16:31:52 +00:00
bjh21 7fd0191223 Hard-wire the unit number of the on-board wdc so podules don't confuse it.
Add commented-out wd, atapibus etc in GENERIC and FOURMEG.  Not yet tested.
2000-08-17 13:38:51 +00:00
bjh21 999646a30b Add some extra levels for MI drivers. 2000-08-16 23:58:29 +00:00
bjh21 d7eebd9227 Basic driver for CHIPS 82C710 Universal Peripheral Controller and friends,
as used on later arm26 system (A5000, A4, A3010, A3020, A4000).

What we have got:
...
upc0 at iobus0 base 0x010000: config state bb 87 1c 00 00
fdc at upc0 offset 0x3f4 not configured
wdc0 at upc0 offset 0x1f0
lpt0 at upc0 offset 0x278
com0 at upc0 offset 0x3f8: ns8250 or ns16450, no fifo
...

What we haven't got:
 - FDC support (found, but not configured).
 - Clearing lpt interrupts on arm26 systems (needs help from IOEB).
 - A upc(4) manual page.
 - More than minimal testing (my A3020s don't have root devices).
 - A proper probe routine (arm26 can't use one anyway).
2000-08-16 23:56:08 +00:00
bjh21 9d7a3f8ed7 Shuffle debugging code around to make debugging copy{in,out,}str easier. 2000-08-13 12:32:48 +00:00
bjh21 4014c03b26 Replace copyinstr, copyoutstr and copystr with slightly more sensible
assembler versions.
2000-08-13 12:31:26 +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
bjh21 5317f1db63 General cleanup and factoring out of common code in ea_readbuf and ea_writebuf. 2000-08-12 18:18:52 +00:00
bjh21 7d96bc05ba Make various types unsigned, for ease of comparison.
Use bus_space_read_multi_2 and bus_space_write_multi_2 to copy packets to/from
board.
2000-08-12 17:03:44 +00:00
bjh21 f096772215 Two changes for endianness-independence (when we finally split of the SEEQ 8005
driver and make it MI):

Set the ByteSwap bit on big-endian hosts, so we can use 16-bit transfers to get
at packets whatever.

Treat Tx/Rx headers as arrays of four bytes rather than as 32-bit words.
2000-08-12 15:29:35 +00:00
bjh21 7d83a5201a bus_space version of if_ea.c -- should have been committed before.
Transmit and receive buffer sizes aren't an intrinsic property of the card,
so they belong in if_ea.c rather than if_eareg.h.

Correct some comments in if_ea.c
2000-08-12 14:06:29 +00:00
bjh21 4493200775 Use bus_space stuff. No more ReadShort and WriteShort.
Also a few minor cleanups.
2000-08-12 13:35:08 +00:00
bjh21 7ba12358d7 return isn't a function call 2000-08-12 12:20:17 +00:00
bjh21 b108872b97 Remove spurious reset of card in probe routine -- it can almost certainly
safely be left till attach time.
2000-08-12 12:15:59 +00:00
bjh21 ef01128d16 Avoid gratuitously copying data on transmission as well, and hence do away
with the 2k packet buffer in the softc.
2000-08-12 11:56:46 +00:00
bjh21 e801d41011 Remove void casts from splx(). It returns void anyway. 2000-08-10 23:06:38 +00:00
bjh21 c636092423 Use ETHER_IS_MULTICAST where relevant. 2000-08-10 23:03:04 +00:00
bjh21 24ab4fb4f8 Check the podule has a description before using it. 2000-08-10 22:57:01 +00:00
bjh21 2fb8a3feb8 Clean up packet reception. Notably, copy data straight from the card to
mbuf(s) without using the packet buffer in the softc.  Also, clean up error
messages.
2000-08-10 22:43:45 +00:00
tshiozak dec20dab0e set MB_LEN_MAX to 32. I forgot the modification for arm26 yesterday. 2000-08-09 16:43:59 +00:00
bjh21 b642a6e612 ANSIfication and general cleaning. 2000-08-08 21:16:59 +00:00
bjh21 e74a0fd322 Major formatting cleanups. If I'm going to work on this driver, I want to be
able to read it.
2000-08-07 22:21:44 +00:00
bjh21 77a537a1ba Use M_SOFTINTR for soft interrupt sructures 2000-07-30 16:39:18 +00:00
bjh21 4d52022987 Comment tidying 2000-07-28 09:54:56 +00:00
bjh21 61edac627c Convert the arm26 rtc driver to use pk's new todr(9) interface internally.
Nothing outside the driver will notice until we get proper MI I^2C.
2000-07-27 23:51:43 +00:00
mason 4a353b5330 Moving to a default of 64 PTYs. 2000-07-27 17:53:35 +00:00
bjh21 f6ce16a43b Fix up alignment of incoming payloads. BOOTP at least now works. 2000-07-22 21:30:54 +00:00
bjh21 9c47f8b134 Read the ECID from each podule just before we launch the kernel. This means
that the ROM page registers on the podules are likely to end up pointing at
the page with the ECID in it, so NetBSD can recognise the podules.

This is necessary for my i-cubed EtherLan cards, at least.
2000-07-22 15:36:15 +00:00
bjh21 da2949153f Disable dtide since it doesn't work (and probably never will -- the card's
brain-dead).
2000-07-20 20:27:11 +00:00
bjh21 6744ec9f53 Include locore.S in the main assembly mkdep. 2000-07-20 20:26:32 +00:00
bjh21 b5d3226a07 General tidying up, notably:
- Get the Ethernet address from the card's description string, rather than
   relying on RISC OS to set it.
 - Don't mention this is a SEEQ8005 -- that's all an "ea" can be.
 - Use format_bytes to display the amount of buffer RAM.
2000-07-20 20:25:10 +00:00
bjh21 f079e15d48 - Remove asc driver, since it doesn't work
- Reduce maxusers to 2
2000-07-19 19:41:48 +00:00
bjh21 8c2ce5b135 New configuration, based on GENERIC, but small enough to fit on a system
with 4Mb of RAM (I hope).
2000-07-19 16:39:30 +00:00
bjh21 d9151a2dc8 Add a uuencoded tokenised BASIC version of BBBB, since it can't yet be
generated without RISC OS.
2000-07-16 12:54:04 +00:00
bjh21 87dbab4963 Warn about <8bpp screen modes.
Fix a typo in "page in use" message.
2000-07-16 12:46:50 +00:00
cgd a5c13f9ad4 Kwality control:
* put #includes of opt headers and headers to get protos used by
  net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
  in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
  local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
  netisr_dispatch.h (pc532) to use it.
2000-07-02 04:40:33 +00:00
bjh21 87ca5edd6f Include all the files necessary to prototype all the network soft interrupts. 2000-07-01 21:52:05 +00:00
bjh21 27eeb4183b Uncomment lots of stuff. This _is_ a GENERIC kernel, after all. 2000-07-01 17:38:07 +00:00
bjh21 86e199a889 Actually check which netisrs are needed rather than running them all.
(oops)
2000-07-01 17:33:55 +00:00
itojun d738f90fd7 raise MSIZE from 128 to 256.
- for sizeof(void *) == 8 arch, this is mandatory.  MHLEN is too small
  already (less than 80) and there are chances for unwanted packet loss due
  to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
  (even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
  extension header)

portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.
2000-06-30 17:55:11 +00:00
itojun d76ae83df8 add PULLDOWN_TEST for all the platforms.
XXX should be moved to somewhere else when stabilized
2000-06-30 17:10:15 +00:00
mrg 47ef8ee92b remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 08:32:34 +00:00
bjh21 9f33355278 Ensure rtcattach generates a newline even if the RTC is broken 2000-06-28 15:25:03 +00:00
bjh21 47b9c31e71 Minor obvious delinting 2000-06-28 15:18:16 +00:00
kleink bb2ed0f487 G/c _BSD_INTPTR_T_ and _BSD_UINTPTR_T_. 2000-06-27 05:53:22 +00:00
kleink 47b5c5e3b1 Resolve some formatting nits; add __intptr_t and __uintptr_t. 2000-06-27 04:58:51 +00:00
bjh21 ecfb72bbee Make cpu_coredump return ENOSYS rather than panicking. 2000-06-26 22:36:33 +00:00
kleink e695f72a2e Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
2000-06-26 15:42:16 +00:00
mrg 4c698e84f6 <vm/vm_param.h> -> <uvm/uvm_param.h> 2000-06-26 14:58:58 +00:00
mrg 2f159a1bac remove/move more mach vm header files:
<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
2000-06-26 14:20:25 +00:00
simonb 889c658b5b Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes.  Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-06-26 04:55:19 +00:00
kleink 133ea38323 Add a WEAK_ALIAS() macro. 2000-06-23 12:18:45 +00:00
fvdl 1ee7d22c0b Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC. 2000-06-22 20:27:49 +00:00
veego 223d7455c7 Remove the obsolete config fragments for kernel crypto, because the IPsec
crypto code is now in the kernel source tree.
2000-06-14 22:02:13 +00:00
bjh21 47b7204c67 Bring spl stuff closer to specs 2000-06-08 23:26:10 +00:00
bjh21 249785dfa4 rename mcount functions out of user namespace 2000-06-08 23:25:05 +00:00
bjh21 7a14c4b4f1 sys/dev/ic/i82586var.h needs bus_dmamap_t 2000-06-08 23:23:41 +00:00
bjh21 6af016fc7d Remove spurious includes 2000-06-08 22:33:53 +00:00
bjh21 ece024b6cf Un-__Pify. 2000-06-08 10:49:19 +00:00
soren a9aa2abf94 defopt SYSCALL_DEBUG. 2000-06-06 18:52:30 +00:00
thorpej 8871d8563a Add a comment on single-processor systems about p_cpu being initialized
by fork1().
2000-05-31 05:06:43 +00:00
thorpej e03e9e8086 Rather than starting init and creating kthreads by forking and then
doing a cpu_set_kpc(), just pass the entry point and argument all
the way down the fork path starting with fork1().  In order to
avoid special-casing the normal fork in every cpu_fork(), MI code
passes down child_return() and the child process pointer explicitly.

This fixes a race condition on multiprocessor systems; a CPU could
grab the newly created processes (which has been placed on a run queue)
before cpu_set_kpc() would be performed.
2000-05-28 05:48:59 +00:00
sommerfeld 40339b39f9 Reduce use of curproc in several places:
- Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.

 - Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.

 - Add a second proc argument for inferior() since callers all had
curproc handy.

Also, miscellaneous cleanups in ktrace:

 - ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.

 - move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

 - simplify interface to ktrwrite()
2000-05-27 00:40:29 +00:00
thorpej a7d0570e67 First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
2000-05-26 21:19:19 +00:00
jhawk 8e44b27348 Rename the machine-specific stack trace printing functions
from db_stack_trace_cmd() to db_stack_trace_print(),
and add an additional argument, a function pointer for an
output routine (i.e. printf() or db_printf()).

Add db_stack_trace_cmd() in db_command.[ch], calling
db_stack_trace_print() with db_printf() as the printer.

Move count==-1 special handling from db_stack_trace_print() [nee
db_stack_trace_cmd()] to db_stack_trace_cmd() [nascent here].

Again, I'm unable to test compilation on all affected platforms,
so advance apologies for potential brokenness.
2000-05-26 03:34:24 +00:00
thorpej 8964c35eca Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor.  Test against SONPROC as appropriate rather than
combinations of SRUN and curproc.  Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
2000-05-26 00:36:42 +00:00
jhawk f3528d725d Interface change: db_printsym() takes a third argument, pr, a function
pointer indicating how to print the symbol. This allows db_printsym()
to called in places where db_printf() is not an appropriate output
function.

While straightforward, apologies in advance if I've introduced any minor
syntax errors; I was unable to test compilation this on all the affected
platforms.
2000-05-25 19:57:30 +00:00
thorpej e1284ac3c2 Add a comment before the call to preempt() to be consistent with
other ports (i.e. I just added the comment, and arm26 already used
preempt).
2000-05-24 17:29:41 +00:00
thorpej 463931b3ba Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc.  Those
platforms should be changed to use device_register().  In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
2000-05-16 05:45:44 +00:00
bjh21 950e36ed1f Don't panic on a segfault, but drop into the debugger if it's there.
Not that this helps much, since we immediately panic in cpu_coredump instead.
2000-05-14 22:50:01 +00:00
bjh21 9f75c038c1 Add vmapbuf/vunmapbuf 2000-05-13 17:57:14 +00:00
bjh21 4b7597ffe5 Handle more cases of existing mappings in pmap_enter 2000-05-13 17:56:32 +00:00
bjh21 e65735cc74 More informative stack backtrace. Prints whole stack frames\! 2000-05-13 14:43:11 +00:00
bjh21 9d61165c26 Oops. Swedish is KB_SV. 2000-05-13 14:40:10 +00:00
bjh21 b85a45b9f1 Move out spurious defines 2000-05-13 12:17:49 +00:00
bjh21 6c97e2bd78 Initial commit of arm26 port 2000-05-09 21:55:44 +00:00