Commit Graph

333 Commits

Author SHA1 Message Date
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
tsutsui 4090172b20 Don't forget to initialize sc_dev. 2008-03-29 05:42:45 +00:00
tsutsui 048fb884fc Split device_t and softc for MI mc146818 clock,
and other related misc cosmetics.
2008-03-28 19:05:49 +00:00
imp 64708da5c1 Fix a typo in a comment. 2008-03-08 05:05:25 +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
dyoung dae2e11ac8 Use device_t and accessors. Use aprint_*(). 2008-02-11 20:27:01 +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
tsutsui db09bcc34f Move todr_attach(9) calls from each MD attachment to MI mc146818_attach(). 2008-01-10 15:17:39 +00:00
wiz 35023be713 Fix typo in macro name and comments. 2008-01-09 20:38:34 +00:00
tsutsui 03b0d74e1e Set proper mask values for ipl_sr_bits[] and
use C99 initializer to avoid confusion.
Tested on gxemul.
2008-01-08 16:15:04 +00:00
dogcow 585198d4ab I'm not positive that the mips_ipl_si_to_sr assignments are correct - but
at least the thing compiles now.
2008-01-08 14:28:35 +00:00
dogcow da6c04f088 explicitly include <sys/device.h> 2008-01-08 14:26:58 +00:00
ad 8c68ad876e Fix headers. 2008-01-04 22:17:04 +00:00
ad 0fbfbb4408 Correct headers. 2008-01-04 22:15:58 +00:00
ad 225df3f88d Don't pull in unrelated gunk. 2008-01-04 22:03:25 +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
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
martin 984c6bf848 Bump SYMTAB_SPACE significantly, so that the MTX-1 kernel builds with
symbols again.
2007-08-11 23:48:04 +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 63811f5275 Generic soft interrupts are mandatory. 2007-07-14 21:48:17 +00:00
dyoung 1ee8f4a418 Extract common code from i386, xen, and sparc64, creating
config_handle_wedges() and read_disk_sectors().  On x86, handle_wedges()
is a thin wrapper for config_handle_wedges().  Share opendisk()
across architectures.

Add kernel code in support of specifying a root partition by wedge
name.  E.g., root specifications "wedge:wd0a", "wedge:David's Root
Volume" are possible.  (Patches for config(1) coming soon.)

In support of moving disks between architectures (esp. i386 <->
evbmips), I've written a routine convertdisklabel() that ensures
that the raw partition is at RAW_DISK by following these steps:

        0 If we have read a disklabel that has a RAW_PART with
          p_offset == 0 and p_size != 0, then use that raw partition.

        1 If we have read a disklabel that has both partitions 'c'
          and 'd', and RAW_PART has p_offset != 0 or p_size == 0,
          but the other partition is suitable for a raw partition
          (p_offset == 0, p_size != 0), then swap the two partitions
          and use the new raw partition.

        2 If the architecture's raw partition is 'd', and if there
          is no partition 'd', but there is a partition 'c' that
          is suitable for a raw partition, then copy partition 'c'
          to partition 'd'.

        3 Determine the drive's last sector, using either the
          d_secperunit the drive reported, or by guessing (0x1fffffff).
          If we cannot read the drive's last sector, then fail.

        4 If we have read a disklabel that has no partition slot
          RAW_PART, then create a partition RAW_PART.  Make it span
          the whole drive.

        5 If there are fewer than MAXPARTITIONS partitions,
          then "slide" the unsuitable raw partition RAW_PART, and
          subsequent partitions, into partition slots RAW_PART+1
          and subsequent slots.  Create a raw partition at RAW_PART.
          Make it span the whole drive.

The convertdisklabel() procedure can probably stand to be simplified,
but it ought to deal with all but an extraordinarily broken disklabel,
now.

i386: compiled and tested, sparc64: compiled, evbmips: compiled.
2007-06-24 01:43:34 +00:00
dyoung 82cc8fc351 In sys/kern/Make.tags.inc, create an intermediate variable FINDCOMM.
FINDCOMM contains the find(1) command that produces the list of
NetBSD sources that all architectures share, COMM.  For backwards
compatibility, evaluate FINDCOMM to produce ${COMM}.

In arch/evbmips/Makefile, use FINDCOMM directly, because the
command-line 'echo $COMM ...' was too long.
2007-06-24 01:03:35 +00:00
tsutsui 73b3a64df4 Move declaretions of _spl*() and _{clr,set}softintr() functions
(which are in mips/locore.S) into <mips/locore.h>
from various MD files.
2007-06-17 06:04:27 +00:00
dyoung 4d1beb764e Make ADM5120 boards use the "common" disk subroutines, such as
readdisklabel(9), which are better than the evbmips disk subroutines
at finding a BSD disklabel at a different location than the evbmips
default of sector 0, offset 64.  Helps me boot a RouterBOARD 153
from a CompactFlash containing both a Master Boot Record at sector
0, and a BSD disklabel at sector 1, offset 0.
2007-06-05 21:53:10 +00:00
he e9e5beefa0 Now that curcpu() is defined in terms of curlwp() for mips, we need to
include <sys/lwp.h> where curcpu() is used.
2007-05-20 17:06:25 +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
macallan cd8fb15721 include files.wsfb 2007-04-10 02:29:42 +00:00
dyoung 5770bb4c31 Add extio, gpio. Remove admflash. Makes the compile again. 2007-04-03 23:53:34 +00:00
dyoung eabf98a2cc Add extio and gpio so that this compiles again. 2007-04-03 21:54:01 +00:00
dyoung aa13eb6f2f Add extio and gpio at mainbus so that this builds. 2007-04-03 18:06:31 +00:00
dyoung 29bf5964b4 Auto-detect RAM size. 2007-04-03 18:05:57 +00:00
dyoung 8db8860cb3 Add an example kernel configuration for the RouterBOARD 153.
XXX This is a fairly specialized configuration that I use for a
XXX wireless router.
2007-03-20 09:22:01 +00:00
dyoung 320845dda2 Add a port to the Infineon ADM5120.
Basics: the ADM5120 is a 175 MHz MIPS32 4Kc processor featuring a
6-port ethernet 10/100 switch with Auto MDI/X, a PCI controller,
USB 1.1 controller, UART, watchdog timer, eight GPIO pins, and a
multiport memory controller with both NOR and NAND flash support.
This code supports most of the devices on the ADM5120, including
the 6-port switch (each port attaches as an ethernet, admsw0 through
admsw5), the PCI controller, USB controller, GPIO, watchdog, and
UART.

Remaining work: the port includes no NOR/NAND flash drivers.  No
bootloader is included.  I have only tested the PCI bus driver with
the use of one PCI slot on the RouterBOARD 153.  It is not possible
to exploit the capabilities of the ethernet switch using bridge(4).
I have only netbooted the ADM5120 on the RB153.  Booting other
boards, and booting from flash memory, remains to be done.

Hardware availability: many low-cost routers, including the
RouterBOARD 100 series at RouterBOARD.com, use the Infineon ADM5120
processor.

Credits: Ruslan Ermilov and Vsevolod Lobko ported to the ADM5120,
and they wrote device drivers for the UART, USB controller, and
10/100 switch.  Matt Isaacs brought the port up-to-date with
NetBSD-current, made it compile, and ran it first on the RB153.
I added drivers for the PCI controller, GPIO, and watchdog timer.
I produced the bus attachment for the CompactFlash slot with advice
from Mikrotik technical support and from Matt Thomas.
2007-03-20 08:52:00 +00:00
dyoung 0a000a82df Remove the tags file before rebuilding it. 2007-03-14 19:00:57 +00:00
drochner ab07e481e4 It doesn't make sense to specify "configuration" and "interface"
locators for uhub because a hub can't have sub-devices.
This might be sanity-checked eventually.
Same for ubt now after the change to device attachment.
2007-03-14 12:27:20 +00:00
simonb a92d5c5157 Fix some caddr_t rototill fallout. 2007-03-06 00:48:07 +00:00
dogcow f18ef70a25 semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.
2007-03-05 21:05:00 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
kiyohara 8147572ab4 s/Sever/Server/ 2007-02-23 13:34:34 +00:00
thorpej 8b3bae6275 TRUE -> true, FALSE -> false 2007-02-22 05:19:00 +00:00
jmcneill e9a5822887 Add example config file for Netgear WGT624 v3 wireless router. 2007-02-17 23:26:03 +00:00
ad 3363855a4a Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
2007-02-16 02:53:43 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
hubertf 142c2a33ba Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
2007-01-24 13:08:11 +00:00
yamt 8bf7662829 merge yamt-splraiseipl branch.
- finish implementing splraiseipl (and makeiplcookie).
	  http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
	- complete workqueue(9) and fix its ipl problem, which is reported
	  to cause audio skipping.
	- fix netbt (at least compilation problems) for some ports.
	- fix PR/33218.
2006-12-21 15:55:21 +00:00
scw efb2b3439f Partition sizes are specified in terms of the physical sector size of the disk. 2006-11-25 13:09:14 +00:00