Commit Graph

540 Commits

Author SHA1 Message Date
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
matt 00caca484f Change IPL_LEVELS to NIPL.
current_spl_level is dead.
2008-04-29 17:09:47 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
matt 825088eda6 Merge kernel changes in matt-armv6 to HEAD. 2008-04-27 18:58:43 +00:00
cegger 376411d2dd device_t / softc split. From Hans Rosenfeld. 2008-04-16 09:39:01 +00:00
chris d23686181e Fix device_t/softc split fallout.
A device_t should never be cast with void*.  This fixes reboot on acorn32.
I also suspect it'll fix a panic mjf was seeing due to corruption of the
alldevs list.
2008-04-13 01:14:26 +00:00
chris 2fb78588e4 Ignore size alignment issues, as we're never going to have a case where
copying a three extra bytes will cause an issue.
2008-04-12 16:10:46 +00:00
tsutsui 5147571380 Split devict_t/softc for ncr5380sbc SCSI, and misc cosmetic changes. 2008-04-04 16:00:57 +00:00
cube 76f56e694a Set the device_t back pointer in the softc. 2008-03-18 23:52:16 +00:00
cube 7aa6248cdf Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
2008-03-18 20:46:35 +00:00
cube 607ead0ef4 Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend).  Use proper types and ansify where appropriate.
2008-03-14 15:09:09 +00:00
cube cf80f73d17 Split device_t and softc for the NE2000 Ethernet chip and all its variants
and attachments.  Use device_t accessors, correct types, and ANSIfy when
appropriate.
2008-03-12 14:31:11 +00:00
cube 8ecf8999bf Split the softc from the device_t for all lpt(4) variants and attachments
except the ppbus stuff (which doesn't compile) and ulpt(4) which is
unrelated and can be dealt with separately.

As usual, it comes with related cosmetic changes.
2008-03-07 17:15:51 +00:00
dyoung e4f3892584 Use pmf_device_register1() instead of shutdownhook_establish() to
register com_cleanup() as the shutdown hook.

Add a generic suspend routine.  Suspend and resume com@isa.

Protect against dereferencing a NULL softc in comioctl().

Destroy both a mutex and a callout in com_detach().

Cosmetic: use aprint_*_dev().  Use PMF_FN_ARGS, PMF_FN_PROTO.
2008-02-29 07:02:04 +00:00
chris fa96148b7b Misc updates to hopefully improve vidcvideo console usability:
* add virtual consoles by using wsdisplay_vcons
* make use of generic scrollback support for consoles
* enable colour support for vidcvideo consoles
* use the default NetBSD font, rather than picking a sony one
* make kernel output green, so it's obvious.

This was tested at 800x600 in 8bpp on an A7000+ and 2MB VRAM RiscPC.

To actually benefit from these changes wscons=YES needs to be added to
your rc.conf
2008-02-29 00:37:26 +00:00
drochner bb33f35f20 Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
2008-02-20 21:43:33 +00:00
joerg 2fa7e92d02 Missing assym.h dependencies. 2008-02-14 00:35:56 +00:00
joerg 7eb4a6d1de Fix syntax. 2008-02-14 00:25:39 +00:00
joerg e69482d49d Introduce device_find_by_xname and device_find_by_driver_unit to replace
alldevs iterations all over src.

Patch discussed with and improved on suggestioned from cube@.
2008-02-12 17:30:57 +00:00
chris 08a72f8b45 Further tweaks to Kinetic support. All memory in ths sytem is now used.
Non-Kinetic memory is placed into a seperate freelist so preference is
given to the kinetic memory.
2008-02-09 13:17:32 +00:00
chris 37f9401024 Fix-up boot32 to work on A7000+
Logically the previous code should have worked but didn't.  It appeared to
fail when reading the relocation table from physical memory.

To work-around this issue we now compact the relocation table (it shrinks
from ~800 entries to ~15 on a 2.5MB kernel)  The compacted table is small
enough to copy into the page of memory we use to do the relocations.  The
relocation code can now find the table, and carry out the relocations.

To help with debugging the screen border will change colour:
Red:   Running without the MMU turned on (IE 1-1 physical mapping)
       Note that the border will stay red a while as we're copying the
       kernel over at this point.
Green: We've finished copying the kernel over (unless the code breaks
       this will be rarely seen)
Blue:  We're running on the bootstrap L1 table, and just about to call
       the kernel.

Other tweaks include:
* copy the kernel 32bits at a time, rather than 8 bits at a time.
* assert that the relocations are 32bit aligned (so the above works)
* flush the cache and write buffers before turning off the MMU.

Tested by myself on an A7000+.  Tested by skrll@ on Risc-PC and A7000.
2008-02-03 14:59:16 +00:00
chris 67bda63986 Add an arm/conf/std.arm file which contains common arm options, initially
just options CPU_IN_CKSUM.

Include std.arm in all arm platform std files.

This should reenable the asm in_cksum code for all arm platforms.

Also remove the now unused in_cksum_arm.S.
2008-01-27 12:37:10 +00:00
chris be877f2c8a Add support to support code for Kinetic card. The kernel is loaded into
the Processor local memory, so that should provide a speed up.

Currently DMA won't work, as we only tell the kernel about the kinetic
memory, and exclude the motherboard memory. I'll look at fixing this over
the weekend.

Add support for kernels > 4MiB.  The -current INSTALL kernel has now hit
25KiB over 4MiB and we were only adding L1 mappings for 4MiB.

Also added lots of tracing which I used to work out what boot32 was doing,
and so what the kernel was meant to be doing.  This is disabled by default.

Out of paranoia also become a client of all domains before setting the ttb,
just in case RISC-OS ever decides to use domains.

All of this has been tested on my Kinetic Risc-PC.  I've carried out a full
install onto it, and hope to use it for testing out the interrupt work I've
been doing.
2008-01-26 00:16:57 +00:00
chris f6be197e27 Fix support for kinetic in the bootloader.
With these changes the kinetic dram blocks are correctly identified and
passed into the kernel.

Note that I've a pending kernel change to understand the kinetic blocks
and do something useful with them.
2008-01-26 00:01:54 +00:00
chris 3f1a682126 Leave the SA's clockswitching enabled. It allows the SA to run at full
speed when running things from cache, rather than being in step with the
memory clock.
2008-01-25 23:18:59 +00:00
joerg ce67bf568b Fix dependencies on assym.h. 2008-01-25 18:54:26 +00:00
chris 2c030c103e Zero out the whole of the structure, not just the first 4 bytes. IE use
sizeof(*bconfig) not sizeof(bconfig)

Now a small kernel will boot up on my RISC-PC, an install kernel won't
though, it hangs at the switch from RISC-OS to NetBSD.
2008-01-21 00:41:13 +00:00
joerg 3615cf7715 Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
2008-01-20 18:09:03 +00:00
chris 131e68c2e1 Remove arm support for IPKDB.
It hasn't worked since arm was broken out from arm32 in Jan 2001, and
no-one has noticed or cared to fix it.
2008-01-19 13:11:09 +00:00
matt e1adc2881b Add IPL_SOFT* defined at IPL_NONE.
Change _ARM32_INTR_H to _ACORN32_INTR_H
2008-01-08 06:30:22 +00:00
matt 306d43c5bf Remove unused variable. 2008-01-08 06:29:39 +00:00
ad a5edcb2c82 Missing arg to cv_timedwait(). 2008-01-05 17:38:50 +00:00
ad 4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
ad 2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
tsutsui 99221a563b Use TAILQ_FIRST(3) and TAILQ_NEXT(3) macro. 2007-12-05 12:31:25 +00:00
ad 4b293a84e1 Interrupt handling changes, in discussion since February:
- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
2007-12-03 15:33:00 +00:00
xtraeme 4ba09b41c3 Remove System V semaphores and share memory options to set the limits:
SEMMNI, SEMMNS, SEMUME and SHMMAXPGS.

They can be tweaked via sysctl now. Ports that were setting values on
them weren't touched, I only removed the ones that were commented out.
2007-11-04 14:34:19 +00:00
yamt 23005df1e0 defparam PAGER_MAP_SIZE. 2007-10-25 13:03:03 +00:00
yamt ac301375d9 fix warnings. 2007-10-25 12:48:11 +00:00
garbled d974db0ada Merge the ppcoea-renovation branch to HEAD.
This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
2007-10-17 19:52:51 +00:00
ad 9f56dfa520 Merge brelse() changes from the vmlocking branch. 2007-10-08 18:02:53 +00:00
ad 2af68666da Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
2007-10-08 16:41:05 +00:00
dyoung 6f7649313f Constify. 2007-08-26 22:28:52 +00:00
tsutsui 320e4f3fc5 Remove all references to spl_mask. Now it isn't used by any sources.
Discussed on port-arm.
2007-08-13 02:04:50 +00:00
adrianp 475217d719 Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
2007-08-06 21:26:53 +00:00
jmmv 3e495310cf Print some debugging information when DEBUG is set, not when TERSE is
unset.  The latter is not a "standard" definition, and was used in very
few places anyway.
2007-07-30 12:25:14 +00:00
ad 66fefd117b It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 12:15:35 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
martin c2534a819b Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
2007-06-04 08:55:18 +00:00
yamt f03010953f merge yamt-idlelwp branch. asked by core@. some ports still needs work.
from doc/BRANCHES:

	idle lwp, and some changes depending on it.

	1. separate context switching and thread scheduling.
	   (cf. gmcgarry_ctxsw)
	2. implement idle lwp.
	3. clean up related MD/MI interfaces.
	4. make scheduler(s) modular.
2007-05-17 14:51:11 +00:00