Commit Graph

229 Commits

Author SHA1 Message Date
itohy 7710d527c5 Allow multiple event handlers to be installed to an IRL.
The IRL is specified as IPL (2nd arg of sysasic_intr_establish()).
Current mapping:
	IRL9	IPL_BIO
	IRL11	IPL_NET
	IRL13	IPL_TTY
2002-11-15 13:29:26 +00:00
tsutsui f76d1dd00a Tidy up config files:
- make GENERIC more generic
- add GENERIC_MD, which has MEMORY_DISK stuff and just includes GENERIC
- add a call of dbsym(8) in Makefile.dreamcast.inc

Approved by marcus.
2002-10-30 12:22:55 +00:00
jdolecek c82ab2eb79 now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
2002-10-26 13:50:17 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
elric 5ab71e20b0 Added commented out cgd(4)s to GENERIC configs. 2002-10-14 18:39:22 +00:00
elric d19d268a95 assign majors for raw and cooked cgd's. 2002-10-04 18:28:24 +00:00
thorpej bd5bb4652b Add trailing ; to CFATTACH_DECL 2002-10-02 15:45:10 +00:00
itohy d64dac0bb7 ../../../../arch/dreamcast/dev/g2/gapspci.c:62: macro `CFATTACH_DECL' used with only 5 args 2002-10-02 09:49:38 +00:00
thorpej c5e91d447d Use CFATTACH_DECL(). 2002-10-02 04:55:47 +00:00
thorpej c4cbfcf060 Use CFATTACH_DECL(). 2002-10-01 02:54:11 +00:00
thorpej 9a711d6985 Declare all cfattach structures const. 2002-09-27 20:29:02 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej bb34bc8caa When in a match routine, the cfdata we're passed always references
our own cfdriver, so don't bother comparing the names, since they
will always match.
2002-09-27 02:16:28 +00:00
lukem 3ea2e21f82 enable USERCONF by default; it's small and extremely useful to have available. 2002-09-18 02:43:53 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
briggs 0b956d0b8b Implement pmc(9) -- An interface to hardware performance monitoring
counters.  These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface.  Initially, the Intel XScale
counters are the only ones supported.
2002-08-07 05:14:47 +00:00
hannken 69d849b171 Convert to new device buffer queue interface.
Approved by: Marcus Comstedt <marcus@netbsd.org>
2002-07-27 11:07:35 +00:00
thorpej 3912e469dd Rename cdev_systrace_init() to cdev_clonemisc_init(), so it can
be properly used by any misc. cloning device.  While here, correct
a comment to indicate that "open" is the only entry point and that
everything else is handled with fileops.
2002-07-19 16:38:14 +00:00
tsutsui 0fe49daba1 Add keydescs for swapctrlcaps, and clean up formating. 2002-07-05 14:29:06 +00:00
junyoung 3d826105dc alloc_attr -> allocattr
Approved by Matthias Drochner.
2002-07-04 14:37:10 +00:00
christos 3b50728cf4 MD systrace gluons. 2002-06-17 16:32:57 +00:00
lukem fde6ae6f04 Enable "pseudo-device clockctl" in all kernels, except
installation related kernels (INSTALL* and RAMDISK*).
This enables rc.conf(5) $ntpd_chroot to be used "out of the box"
2002-06-17 05:14:02 +00:00
drochner d2b9876081 move initialization of the "struct pglist" returned by uvm_pglistalloc()
from the calling code into uvm_pglistalloc() itself for consistency
and easier error handling
2002-06-02 14:44:35 +00:00
thorpej 204183c0fa * Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses.  For busses behind a bridge, it points to
  a persistent copy of the bridge's pcitag_t.  This can be very useful
  for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
  uses OFW device nodes to enumerate the bus.  When a PCI bus that is
  behind a bridge is attached, pci_attach_hook() allocates a new PCI
  chipset tag for the new bus and sets it's "curnode" to the OFW node
  of the bridge.  This is used as a starting point when enumerating
  that bus.  Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
2002-05-16 01:01:28 +00:00
thorpej dada8613e1 Let machine-dependent code specify how to enumerate the bus.
Currently, everyone uses pci_enumerate_bus_generic().
2002-05-15 19:23:51 +00:00
thorpej e19aab3751 Implement pci_decompose_tag(). 2002-05-15 17:09:04 +00:00
uch b1f3b48aa2 Don't reset to old interrupt level at the exit of interrupt handler.
It didn't ensure the maximum interrupt nest depth.
2002-05-10 20:14:39 +00:00
uch 8db367d98c remove trap.h 2002-05-09 12:42:08 +00:00
uch 7571effdda adapt to new pmap. 2002-05-09 12:33:18 +00:00
uch 303d5b61d8 change bootstrap stack to below the 'start' 2002-05-09 12:32:55 +00:00
uch 3a1a0b37af IOM_RAM_BEGIN is changed to specify physical address. 2002-05-09 12:32:09 +00:00
thorpej b8e4c037bd De-obfuscate somewhat; define and use register bit constants, etc. 2002-05-03 04:42:08 +00:00
thorpej 46a3731866 Move the CPU/clock/memory-related options to std.dreamcast, since
they are constant across all Dreamcast systems.
2002-05-03 01:36:02 +00:00
uch 4d7b6d37d1 switch to NEW_TOOLCHAIN 2002-04-25 17:01:47 +00:00
atatat d1b3852365 Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
2002-04-25 15:06:20 +00:00
thorpej eedd94475c * Move the mii_bitbang attribute into dev/mii/files.mii
* Pull in dev/mii/files.mii from conf/files, rather than playing
  the magic "files include order" dance in N machine-dependent
  configuration definitions.
2002-04-16 20:50:16 +00:00
gmcgarry 6e066ba77a Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
2002-04-12 08:10:45 +00:00
lukem d213d804f7 Rename MEMORY_DISK_SIZE (formerly MINIROOTSIZE) to MEMORY_DISK_ROOT_SIZE,
which was suggested by Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> as
being more consistent with what it's controlling...
2002-04-02 05:30:34 +00:00
uch 0ae715f6d2 All the sh3 ports had an identical procfs_machdep.c, so use a common
file under arch/sh3/sh3.
2002-03-27 10:44:38 +00:00
uch b095a0d0c5 ANSIfy, KNF 2002-03-25 18:59:39 +00:00
uch cfe4dfb98f add autoconf.h for new mainbus driver. 2002-03-24 18:28:12 +00:00
uch e8300f3659 adapted to new interrupt code and shb changes. 2002-03-24 18:21:08 +00:00
uch 422c178bc7 add cpu device. sync with shb change. 2002-03-24 18:14:27 +00:00
uch 5f6dd2098e Remove unneeded device and fix comment 2002-03-24 18:13:01 +00:00
uch 3d1452008e remove unneeded header 2002-03-24 18:11:09 +00:00
atatat 31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
uch 93da9db963 cosmetic changes, fix comments. 2002-03-17 17:55:22 +00:00
uch 81cdeb6cdd adapt to kernel stack treatment changes. 2002-03-17 14:05:10 +00:00
ad b89e39b91a Reorganise the wsfont stuff slightly so that multiple display adapters
with different bit/byte order requirements can co-exist happily.
2002-03-13 15:05:13 +00:00
uch d7285d12b4 clean up a little. 2002-03-11 15:58:20 +00:00
lukem cd19d52695 * rename MINIROOTSIZE to MEMORY_DISK_SIZE, so that all md(4) options
are now consistently named
* fold opt_mdsize.h into opt_md.h
2002-03-10 19:56:37 +00:00
uch 672baca18b proc0 and page table intialize routines are moved to sh3_machdep.c 2002-03-10 07:46:12 +00:00
uch f9201a1606 common part are moved to sh3/include/param.h 2002-03-10 07:45:31 +00:00
uch dc55dc2c73 remove unneeded code and files. 2002-03-08 13:22:11 +00:00
uch 2f603eaa17 CTL_MACHDEP definitions are integrated into sh3/include/cpu.h again. 2002-03-04 14:36:13 +00:00
uch bf5bf0be48 remove obsolete headers. 2002-03-03 14:59:55 +00:00
uch 90baa8b206 SR related parts moved to psl.h. cpufunc.h segments.h are removed.
kernel mode checking is only SR.MD. no check stack pointer.
2002-03-03 14:31:24 +00:00
uch 17fbf85dc3 machine dependent sysctl are moved to machine/cpu.h
dreamcast, hpcsh ... CPU_CONSDEV
	mmeye, evbsh3	 ... CPU_CONSDEV, CPU_LOADANDRESET
2002-03-03 14:28:48 +00:00
uch 24ebe31f30 remove unneeded configuration. 2002-03-03 14:27:24 +00:00
uch 6042c0a3fc Initial support for KGDB on the sh3. 2002-03-02 22:26:25 +00:00
uch 9c21656766 cpu_dumpconf, reserve_dumppages, dumpsys, cpu_reset are moved to sh3/sh3_machdep.c 2002-02-28 16:54:28 +00:00
uch f52cc0a5e4 Fix comment to reflect reality. 2002-02-28 16:52:46 +00:00
simonb 4324f37586 Use "#define<tab>". 2002-02-28 03:17:23 +00:00
uch bbc655c4fb Cleanup register definition 2002-02-28 01:56:57 +00:00
uch 40382c6556 Change foo_r0_r1 macro in sh3/locore.h to foo(Rn, Rm) 2002-02-28 01:53:42 +00:00
uch 06fbd079f5 Remove unneeded header. 2002-02-28 01:52:28 +00:00
christos 6b030ee036 - define other DEV_ constants that the local port uses.
- delete cdev_decl(mm) since <sys/conf.h> does it.
2002-02-27 01:19:03 +00:00
simonb d9ab16ba2f Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
  are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
2002-02-26 15:13:19 +00:00
uch 693be1956c Move common exception vector and scheduler code to
sh3/sh3/exception_vector.S and sh3/sh3/locore_subr.S. exception
vectors are installed by sh_cpu_init().  machine/locore.S contains
kernel entry, interrupt handler, and some MD code.
2002-02-24 18:19:40 +00:00
uch 45407e955f setjmp,longjmp are moved to sh3/locore_subr.S 2002-02-22 19:45:31 +00:00
uch f694c9fdd7 New NetBSD/sh3 clock framework.
+ hardclock source is moved from TMU1 to TMU0.
 + SH3/SH4 common kernel support.
 + PCLOCK estimation.
 + remove duplicated code.
2002-02-22 19:43:58 +00:00
uch 1bdc7cc5ca Clean up functions
disable_intr, enable_intr, disable_interrupt, enable_interrupt,
disable_ext_intr, enable_ext_intr.
New functions:
for external interrupt:
_cpu_intr_suspend and _cpu_intr_resume.
for exception:
_cpu_exception_suspend and _cpu_exception_resume.
2002-02-19 17:21:18 +00:00
uch 70826aa2cd sh_cpu_init() is added. its initialize cache, MMU ops appropriately.
machine locore code call this at first.
2002-02-17 20:57:09 +00:00
uch 615800d782 Fix calling convention. r0-r7 are caller saved. 2002-02-17 20:53:01 +00:00
uch 4202622d3c if PCLOCK isn't setted, use estimated value calculated by kernel. 2002-02-01 17:52:54 +00:00
jdolecek 6d265bd894 add options PIPE_SOCKETPAIR to individual kernel configs
the option is commented out on everything but kernels I was able
to recognize as INSTALL-like or ones for small memory machines
2002-01-27 13:23:08 +00:00
thorpej 1964af2d8a Update for a leading-underscore-free ELF world. 2002-01-27 09:02:37 +00:00
manu 2efb671770 Added clockctl 2002-01-12 13:00:46 +00:00
martin b506d6e135 Add PPPoE to all generic kernels that should be able to use it.
XXX TODO: do this for INSTALL kernels too, add sysinst support and make the
XXX needed binaries available on the ramdisk root fs.
2001-12-28 12:21:52 +00:00
gmcgarry bdd225baa1 Add a blurb to the top of all GENERIC files. This serves three purposes:
- to clarify some terminology
- to clarify the intention of the GENERIC file
- to cross-reference some useful man pages
2001-12-14 05:34:45 +00:00
atatat b45c51b1fc Roll the rest of the ports over to the new MI kernel build machinery.
Any problems reported by testers have been fixed, and massive
cross-compiling of kernels has shown that any problems that remain
with actually building kernels are not related to this.
2001-12-09 05:00:40 +00:00
atatat 239aeafb2e Fixes to eliminate some compiler complaints, such as:
suggest explicit braces to avoid ambiguous `else'
suggest parentheses around assignment used as truth value
2001-12-04 15:27:35 +00:00
lukem ecb81c3f6d - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
  "options FOO=xxx"). options that take a value were converted to
  defparam recently.
- minor whitespace & formatting cleanups
2001-11-28 10:21:10 +00:00
lukem 0fa231134c - replace "defopt" with "defparam" for options which must take a value,
as config(8) will warn for value-less defparam options
- minor whitespace/formatting cleanup
- consolidate opt_tcp_recvspace.h and opt_tcp_sendspace.h into opt_tcp_space.h
2001-11-20 14:34:18 +00:00
lukem 03aef4723c cleanup:
options SPACE TAB
	makeoptions TAB
	psuedo-device TAB
	remove trailing whitespace
	replace multiple spaces -> tabs
	options "FOO" -> options FOO
	options "FOO=bar" -> options FOO=bar
	options "FOO=\"bar\"" -> options FOO="\"bar\""
2001-11-20 12:56:17 +00:00
msaitoh 32b3143333 Fix incorrect kernelmode check in INTRENTRY macro.
Broken INTRENTRY causes CPU reset when sigaltstack is used.
2001-10-27 03:46:19 +00:00
thorpej 693eff0e2e No need to set MACHINE now that config(8) sets it. 2001-10-23 19:55:56 +00:00
chris 0e7661f023 Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
2001-09-10 21:19:08 +00:00
thorpej b42556773f Driver for the Dreamcast mouse, based on the programming info
on Marcus's web site.

Not yet thoroughly tested, but does appear to generate events
that look okay.
2001-09-06 22:07:39 +00:00
thorpej 2d2a66209d Indent. 2001-09-06 20:04:49 +00:00
atatat 97c67a9bae Add bridge pseudo devices to GENERIC configs 2001-09-01 21:52:23 +00:00
msaitoh e380d9806e devclass of sci[f] is tty 2001-08-22 13:32:45 +00:00
msaitoh 0756145b0f fix a ldtlb handling bug:
- set to PTE{H,L,A} and call LDTLB must do atomically.
 - never call LDTLB when it's unnecessary.

Broken kernel oocasionally causes cpu reset when /etc/security is called.
Now fix this problem.
2001-08-10 18:27:08 +00:00
wiz 8eaf0a103e bcopy -> memcpy, bzero -> memset 2001-07-22 15:46:41 +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
darcy ce0ec1e208 Add System V semaphore resource limits to each GENERIC file that has an
option for System V semaphores.  It appears that there are no overrides
in the code and each file has the following added.

 options    SYSVSEM     # System V semaphores
+#options   SEMMNI=10   # number of semaphore identifiers
+#options   SEMMNS=60   # number of semaphores in system
+#options   SEMUME=10   # max number of undo entries per process
+#options   SEMMNU=30   # number of undo structures in system
 options    SYSVSHM     # System V shared memory

If anyone thinks that this is incorrect for any of these files, please
correct it.

Note - the i386 port was not forgotten.  It was done separately.
2001-06-30 11:00:31 +00:00
msaitoh a76500b70d trim PCLOCK to 49.9MHz 2001-06-24 04:57:58 +00:00
lukem d84d2c6c85 add missing #include "opt_kgdb.h" 2001-05-30 15:24:23 +00:00
chs e44e9dec8a replace vm_page_t with struct vm_page *. 2001-05-26 21:27:02 +00:00