Commit Graph

248 Commits

Author SHA1 Message Date
bjh21 4942923809 Handle detecting the available media and state of medium selection links
on EtherLan 100 (and presumably 500) boards.
2000-12-17 22:29:26 +00:00
jdolecek cacec11253 delete obsolete comment 2000-12-17 15:52:39 +00:00
bjh21 72735aa75a Correct embarrassing null-pointer-dereference bug. Also fixes interrupt
enabling.
Default to 10base2 for now, since automatic media selection doesn't work.
2000-12-16 18:24:36 +00:00
bjh21 3ebcd51009 I think bit 0 of the status register is the interrupt status on read. 2000-12-16 18:23:14 +00:00
bjh21 3c5709c088 Separate out checkvectors(), so it can be used elsewhere for debugging. 2000-12-16 16:45:11 +00:00
bjh21 395a883e48 Pull across arm32 rev 1.19:
Remove ALTENTRY().  It's dangerous and should not be used.
2000-12-14 20:50:56 +00:00
bjh21 e266a563d8 Filter out non-ASCII characters from podule descriptions.
I think my MIDI card had a \r at the end, which was confusing.
2000-12-14 20:40:29 +00:00
bjh21 84d111ea01 Move RCSID to the end of locore so it doesn't end up in zero page if we
compile with an asm.h which doesn't know about section .ident.
2000-12-14 20:30:03 +00:00
bjh21 a6b4048c85 Get ELF RCSIDs back 2000-12-14 20:26:42 +00:00
bjh21 14198dc0bd Sync with arm32 -- they've got ELF stuff there these days. 2000-12-14 19:28:12 +00:00
bjh21 acff6e4375 Use _C_LABEL rather than _C_FUNC. 2000-12-14 19:22:39 +00:00
bjh21 afb44982ee Correct the mangled-vectors check. 2000-12-11 23:51:58 +00:00
bjh21 0692c35dda Since BBBB correctly disables the CPU cache at startup, we now decide whether
to leave it disabled based on the bottom bit of cpu0's cf_flags.
2000-12-11 23:46:50 +00:00
bjh21 d606f7e6e0 Move most of the RISC OS shutdown into BASIC code.
Issue Service_PreReset to get the hardware to a sane state.
Use *ShutDown to log off fileservers.
Use the correct arguments to Cache_Control.
Using Service_PreReset seems to have rendered the Podule_ReadID trick
unnecessary, so g/c it.
2000-12-11 22:19:18 +00:00
bjh21 4f1ee09e5f It looks like UBC_WINSIZE needs to be at least PAGE_SIZE. 2000-12-10 14:28:45 +00:00
bjh21 4f5619bc7c Prototype kdb_trap(). 2000-12-10 01:31:48 +00:00
bjh21 7e79390d64 Delint. 2000-12-10 01:27:35 +00:00
bjh21 6073fc61bf Indirect the SWI handler through the current emulation, thus providing a
syscall() for MI code.  Hope it never calls it itself.
2000-12-10 01:18:52 +00:00
bjh21 477863502b DIAGNOSTIC check for mangled exception vectors. 2000-12-10 01:02:04 +00:00
bjh21 559ea94aca Fix arguments to ktrsys*() functions. 2000-12-09 18:57:17 +00:00
bjh21 6d66ade542 We no longer have zeropage.S. It was merged into locore.S last week. 2000-12-09 18:54:01 +00:00
bjh21 86dd29d1f5 Add a definition of BUS_SPACE_ALIGNED_POINTER. 2000-12-09 18:47:15 +00:00
bjh21 8df54708da If we get an odd IOEB type, tell the user. I have a feeling issue 1 A5000s
might trip this.
2000-12-09 18:04:05 +00:00
bjh21 38d918f85f Proper support for the Unix backplane in those machines that have one.
Not very well-tested, but it seems to work.
2000-12-09 17:52:44 +00:00
bjh21 facbe746d0 Provide friendly names for the IRQs as they're wired in normal machines. 2000-12-09 15:16:01 +00:00
bjh21 3e0d9a1b4a Fix multiple-file loading. Bump version number to 0.41. 2000-12-09 13:30:25 +00:00
bjh21 4c4e11c0f8 Merge zero page into the start of locore. This allows us to just map the
start of the kernel text segment in at address 0 to get zero-page properly
mapped.  This should save us one page, but that may need a bit of extra
shuffling before we can easily tell UVM about it.
2000-12-07 21:48:58 +00:00
bjh21 cb5273b547 First attempt at an EtherH driver. Can just about transmit and receive
packets.  Interrupt enabling is left to the RISC OS driver, medium selection
is untested and it's hard-wired to the MAC address of my card.  Not really
for production use.
2000-12-01 14:28:36 +00:00
bjh21 9307dc5373 Reduce default UBC_NWINS to save precious KVM. 2000-11-30 20:59:36 +00:00
bjh21 32b19479ca Drastically reduce PAGER_MAP_SIZE so we don't run out of KVM so soon. 2000-11-30 12:16:00 +00:00
bjh21 eb0dc305da Insert clock low after ack bit. 2000-11-26 18:53:12 +00:00
bjh21 f801b80192 Zero-length reads seem to confuse the chip, so don't do that. 2000-11-26 18:12:36 +00:00
bjh21 70562420ce Support multiple files on the command line (they're catted together).
Ditch a.out support while we're here (to save updating it).
2000-11-25 18:30:23 +00:00
bjh21 98253a5467 It seems that all versions of BBC BASIC V can load a text file specified on
the command line, so we don't need to tokenize it first.

This makes it less than clear what file type BBBB should have, so let's not
make an issue of it.
2000-11-25 13:32:51 +00:00
bjh21 564a044dcb Using bsd.man.mk looked silly without a man page. Use bsd.prog.mk without
PROG instead.
2000-11-22 00:36:22 +00:00
bjh21 fc955e1104 Move BBBB out of the kernel tree so other architectures can see it. 2000-11-22 00:32:53 +00:00
bjh21 c4eb6c6325 Rudimentary manual page for BBBB. 2000-11-22 00:18:47 +00:00
bjh21 986c78ced4 New mechanism for building the tokenised version of BBBB under NetBSD. This
saves us having to keep a uuencoded version around.
2000-11-21 23:47:37 +00:00
bjh21 99899665e8 Move of BBBB to a more sensible location.
Look in sys/arch/arm26/boot/BBBB,fd1 for old commit messages.
2000-11-21 23:44:24 +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
bjh21 b4ef973eab IDE hard discs seem to work -- turn them on by default. 2000-10-14 23:46:40 +00:00
bjh21 a449e4af6d Ensure that the IOC is attached before any other devices, mostly because
the UPC driver needs to know whether the system's got an IOEB in it.

The way this is implemented is a mess -- I need to get my mind round
autoconfiguration again.
2000-10-14 23:44:42 +00:00
bjh21 7270db5ec0 Change to semantics of irq_establish: IRQs are now enabled by default, which
I think is the same as all other ports.
2000-10-14 23:41:01 +00:00
itojun 9e47af8814 enable rnd device. they are now mandatory for ssh/sshd support,
so it makes more sense to enable it.
please disable them if there's any issues, but in that case, in-tree
ssh/sshd won't work.
2000-10-04 03:35:53 +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
bjh21 d0dfd74448 COrrect comment at top and add options NFS_V2_ONLY. 2000-09-23 12:58:26 +00:00
bjh21 b6ba812d35 Much juggling of pmap startup sequence:
* All of pmap_init is now deferred to the first call of pmap_create.  This
  allows us to allocate stuff dynamically using malloc.
* pv_table (which is needed before malloc is available) is temporarily
  allocated using pmap_steal_memory in pmap_bootstrap, and then
  re-allocated using malloc in pmap_create, with the old allocation being
  given back to UVM.  This should save some memory on small machines, but
  the malloc overhead probably soaks it up.
2000-09-23 12:54:47 +00:00
bjh21 3112fd4f14 Add a pmap_steal_memory implementation. This has two good consequences.
First, it reduces the kernel text segment by 1k or so.
Second, it should enable me to eventually allocate the pv_table dynamically.
2000-09-23 11:10:58 +00:00
bjh21 7751c0fd46 If we haven't got DDB in the kernel, there's not much point hanging onto the
symbol table.
2000-09-21 23:22:51 +00:00
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