Commit Graph

788 Commits

Author SHA1 Message Date
tsutsui
3eb4d24002 No need to export autoconf.h to userland. 2006-07-01 17:24:19 +00:00
tsutsui
06801cfcf5 Remove obsolete display.h. 2006-07-01 17:19:39 +00:00
tsutsui
0b60e69029 Use MI <dev/ic/pcdisplay.h> rather than MD <machine/display.h>. 2006-07-01 17:15:46 +00:00
liamjfoy
aeee5deab9 Add CARP to GENERIC kernel configs. CARP is not enabled by default.
ok: christos
2006-06-28 15:19:27 +00:00
tsutsui
eec8d4d1e5 Make some local functions static. 2006-06-25 16:52:01 +00:00
tsutsui
0aa05e92ff Remove unused struct abus stuff. 2006-06-25 16:46:15 +00:00
tsutsui
d71cfc62f0 Make some local functions static. 2006-06-25 16:44:02 +00:00
tsutsui
6e1a8fe413 - make a local variable static
- remove struct user dumppcb, which is declared in mips_machdep.c
2006-06-25 16:29:14 +00:00
tsutsui
82f68c0092 Rename arc_trap.c to interrupt.c, which derived from ancient pica_trap.c
but currently contains only interrupt stuff. Ok'ed by soda.
2006-06-25 16:11:41 +00:00
tsutsui
f2e4550a60 Implement separate statclock(9) handler which uses the MIPS3 CPU INT5
internal timer compare register. Based on hp300 and arm implementation.

This is enabled by options ENABLE_INT5_STATCLOCK, but disabled by default.
2006-06-24 04:00:21 +00:00
tsutsui
2a8a21a021 Misc minor cleanup for arc interrupt handlers:
- always enable options MIPS3_ENABLE_CLOCK_INTR and just clear the compare
  register in cpu_intr() to make CLKF_BASE() works
  properly
- prepare only possible number of cpu_inttab
- use macro for interrupt priority number passed to arc_set_intr()
  to avoid confusion
- merge arc_hardware_intr() into cpu_intr()
- check independent timer interrupt first in cpu_intr()
- tweak MIPS_SR_INT_IE before calling hardclock timer handlers so that
  spllowersoftclock(9) will be invoked properly in hardclock(9)
- reenable interrupt for timer in cpu_intr() rather than each timer handlers

okay'ed by soda.

Note the real fix is to make CLKF_BASE() check all independent
interrupt sources including jazz and isa devices.
2006-06-24 03:50:38 +00:00
tsutsui
0d19f25f87 Fix typo and a function name in panic message. 2006-06-17 14:11:16 +00:00
tsutsui
0b8cd19c9e Remove extern from function declarations. 2006-06-17 14:10:28 +00:00
tsutsui
ec9a7dcbfd - don't forget to set _dm_vmspace in BUS_DMA_ALLOCNOW case
- also set ARC_DMAMAP_COHERENT hint in the case if buf is in KSEG1
  (I'm not sure if ALLOCNOW is worth for linear buffer, i.e. nsegs=1 case)
2006-06-15 17:06:19 +00:00
tsutsui
04595a48c6 Before calling the handler of timer at isa for hardclock(9),
clear MIPS_SR_INT_IE in struct clockframe status to prevent
unintentional spllowersoftclock(9) in hardclock(9).
This may be required because current CLKF_BASEPRI() implementation
of NetBSD/arc doesn't check ICU_MASK and all ISA devices share
the same MIPS CPU INT2 interrupt.

BTW, has anyone tried IPL_ICU_MASK on any mips ports?
2006-06-13 13:51:31 +00:00
tsutsui
5c40f381f5 Account ISA interrupts by evcnt(9) 2006-06-12 15:39:01 +00:00
tsutsui
0f6618f084 - rename struct intrhand -> struct isa_intrhand
- remove unused ih_what member
2006-06-12 15:24:31 +00:00
tsutsui
ac30b81a3c Remove a declaration of nonexistent function. 2006-06-12 15:06:32 +00:00
tsutsui
8ce1487a46 Move arcsisabr.c from arc/isa to arc/dti because it's DescStation specific. 2006-06-12 15:04:40 +00:00
tsutsui
114eee6487 Check whether the specified interrupt handler is valid before referring it. 2006-06-11 06:34:52 +00:00
tsutsui
f6e0502337 - use CPUFLAGS rather than CFLAGS/AFLAGS
- specify "-march=r4000 -mabi=32" rather than -mips2
2006-06-11 05:03:20 +00:00
tsutsui
a465c6b884 Tweak bus_space_barrier(9) macro to appease
"left-hand operand of comma expression has no effect"
warnings by gcc4.
2006-05-26 13:23:34 +00:00
elad
8ccb6c9341 integrate kauth. 2006-05-14 21:55:09 +00:00
tsutsui
edf0da13d9 In !defined(PCI_NETBSD_CONFIGURE) case, check PCI_ID_REG and PCI_CLASS_REG
before CSR fixup.
2006-04-16 07:10:45 +00:00
tsutsui
f66776b16a Pass mips_dcache_align to pci_configure_bus(9) for cacheline_size. 2006-04-16 05:09:58 +00:00
tsutsui
78354f8518 Add bmtphy at mii, found on 3Com 3C982-TXM:
> bmtphy0 at ex0 phy 24: Broadcom 3c905C internal PHY, rev. 7
2006-04-15 12:58:26 +00:00
tsutsui
0d0bf3b542 Add support for pci_configure_bus(9) (a.k.a. options PCI_NETBSD_CONFIGURE)
so that PCI devices over ppb(4) work properly on PCI based NEC machines.

Tested on my NEC JC94 (Express5800/230) and 3Com 3C982-TXM,
which has a DEC/Intel 21154 PCI-PCI bridge and two 3C920 Ethernet chips.
2006-04-15 12:53:09 +00:00
tsutsui
c51f229f25 Detect FAS216 chip on some Olivetti machines. (untested)
Based on a patch for old asc driver from Maki Kato:
http://mail-index.netbsd.org/port-arc/2000/10/07/0003.html
2006-04-15 12:41:45 +00:00
tsutsui
7336546bdd This file is mostly identical with GENERIC except pccons/wscons,
so just include GENERIC and use "no" keyword of options(4).

XXX arc/dev/pccons.c needs cleanup for -Wshadow and -Wcast-qual.
2006-04-15 12:26:22 +00:00
tsutsui
a410f672e0 Ack interrupts only if they are actually handled. 2006-04-15 09:07:50 +00:00
tsutsui
b34ad9c583 Misc cosmetics. 2006-04-15 09:01:11 +00:00
tsutsui
c234c43a71 Include "ioconf.h" rather than declare struct cfdriver foo_cd in each file. 2006-04-15 08:49:47 +00:00
blymn
3c0adb7d99 Make i/o statistics collection more generic, include tape drives and
nfs mounts in the set of devices that statistics will be reported on.
2006-04-14 13:09:05 +00:00
tsutsui
9c7179ce5d Remove declarations for cpu_model[] since it's in <sys/systm.h>. 2006-04-09 01:18:14 +00:00
pavel
dc1372c547 Add stf to all kernel configs which have INET6 and gif, except the INSTALL
ones and those for specific machines of developers. PR 32304.

OK'ed by rpaulo.

N.B. stf is a cloning device, so it still must be enabled by
"ifconfig stf0 create".
2006-03-28 20:58:39 +00:00
thorpej
21374641a5 Use device_unit(). 2006-03-26 04:32:33 +00:00
yamt
ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
thorpej
a1050c527b Use device_is_a(). 2006-02-25 17:32:43 +00:00
thorpej
458b3e43f7 Use device_parent(). 2006-02-23 05:37:46 +00:00
perry
fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +00:00
cube
6ff13154dd Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
2006-02-05 05:01:48 +00:00
rpaulo
df5390003c bpfilter doesn't accept count anymore. 2006-02-04 02:42:27 +00:00
reinoud
a92fdbbc53 Add commented out UDF file-system entry in all GENERIC configurations. 2006-02-02 21:32:08 +00:00
christos
606bb2caed free -> dealloc
unsigned -> size_t for alloc/dealloc
2006-01-25 18:28:25 +00:00
skrll
504686f15c Don't try and create/cleanup symlinks before objdirs are created.
Doesn't everyone use ro src?
2005-12-28 08:04:44 +00:00
perry
50a256a3a0 __asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
2005-12-24 23:23:59 +00:00
perry
5f1c88d70d Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:06:46 +00:00
thorpej
c97c3de6e9 Remove the tablet line discipline. 2005-12-20 05:35:27 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
elad
4591e5acfd Add (commented out) Veriexec options and pseudo-device to GENERIC kernels,
and remove the i386 GENERIC_VERIEXEC config.
2005-12-09 23:34:01 +00:00
tsutsui
ff9b47d69e Adjust comments for options FFS_NO_SNAPSHOT.
XXX: This option should be mentioned in options(4).
2005-12-07 09:10:11 +00:00
tsutsui
5599c27331 Call arc_bus_space_malloc_set_safe() explicitly after VM initialization
is complete.
2005-12-06 17:56:25 +00:00
thorpej
cfc81086d9 swcr -> swcrypto 2005-11-25 16:41:31 +00:00
thorpej
7385cdd346 "pseudo-device crypto" really refers to the /dev/crypto API to the
opencrypto framework, not the framework itself.  Update the comment
accordingly.
2005-11-25 16:35:11 +00:00
thorpej
751f32db24 Add "pseudo-device swcr" (commented out if "pseudo-device crypto" is also
commented out).
2005-11-25 16:30:23 +00:00
yamt
bc21da4cfb bus_dmamem_map: honour BUS_DMA_NOWAIT. noted by Manuel Bouyer.
bus_space_map: always do NOWAIT allocation as it used to be before yamt-km.

we have too many copies!
2005-11-24 13:08:32 +00:00
dbj
8000972bbe . Have dbsym explicitly suggest increasing SYMTAB_SPACE when
an overflow occurs.
   . Make this error a fatal build time error
   . Move the support for dbsym into the MI Makefile.kern.inc,
     conditional upon the SYMTAB_SPACE option being defined in
     the kernel config file.
2005-11-24 12:54:29 +00:00
tsutsui
8d456d84c1 Fix page size values passed to arc_wired_enter_page() for NEC-R96 and Tyne.
Detected by gxemul. (Wow, gxemul is also trying to emulate these machines!)
2005-11-20 09:21:36 +00:00
tsutsui
6e53249d84 Include <dev/ic/i8042reg.h> for MI pckbc rather than <machine/kbdreg.h>. 2005-11-20 04:38:11 +00:00
tsutsui
1b00f38f4f Remove the following item:
>	-   if (ipending & INT_MASK_REAL_DEV) == 0,
>	    softnet() and softclock() are handled with all interrupt disabled.
>		-> overblocking, possibly causes missing hardclock()

XXX: It seems some other mips ports (algor, evbmips, pmax, sgimips)
XXX: also have the similar problem.
2005-11-16 14:25:15 +00:00
tsutsui
d9a0be54d3 Explicitly enable interrupts before softintr is handled as noted
in the TODO file. At least this fixes "sn0: receive buffers exhausted"
messages on my NEC-JC94.

XXX: does anyone know what "Dont reenable" comment means, which was
XXX: there since initial import of pica (not arc).
2005-11-15 15:07:36 +00:00
tsutsui
b7deaff52a Reflect MIPS_INT_MASK_CLOCK and INT_MASK_REAL_DEV removal. 2005-11-15 15:00:15 +00:00
tsutsui
8a69f0ef96 Remove MIPS_INT_MASK_CLOCK and INT_MASK_REAL_DEV macro and
use MIPS_INT_MASK_5 and MIPS3_HARD_INT_MASK directly.
They were not used since interrupt service function was
moved from MI mips/trap.c to MD part long ago.
2005-11-15 14:03:20 +00:00
tsutsui
45991188b7 Remove COPY_SIGCODE definition, which is not used anywhere. 2005-11-15 13:45:30 +00:00
tsutsui
a452ef42e4 constify 2005-11-15 12:12:21 +00:00
tsutsui
c6c355d343 Remove netisr handling from the list since arc has switched to
MI mips softintr.c (though it still uses splhigh()/splx() pair
and maybe it's better to use atomic insns).
2005-11-15 12:09:43 +00:00
tsutsui
7d2d9d6fe1 Bump MAXPHYS from 32K to 64K.
asc.c has now its own asc_minphys(), and both osiop and oosiop at jazzio
work fine with 64K MAXPHYS.
2005-11-06 11:15:40 +00:00
tsutsui
5c3034f5b3 - <machine/param.h> says:
"XXX Maxphys temporary changed to 32K while SCSI driver is fixed."
  I (and soda) don't know what the "SCSI driver" is, but add local
  asc_minphys() to limit max xfer size only for asc.c for now.
- According to old asc.c driver, DMA_START() is called before NCR_CMD_DMA
  command. I'm not sure which DMAC or ASC should be started first, but
  move DMA command from asc_dma_go() to asc_dma_setup().
- Disable NCR_F_DMASELECT (which allows DMA xfer for select command)
  since it caused some problem on PICA.

Now gxemul-0.3.6.2 reaches mountroot() sd0 (but can't exec /sbin/init yet).
2005-11-06 11:09:17 +00:00
tsutsui
fdb3b14bb4 Adapt arc port to the new MI mips3 wired map functions.
Tested on NEC-RD94 with several PCI and jazzio devices.
2005-11-05 09:50:50 +00:00
chs
59fddeceaa turn off DEBUG and DIAGNOSTIC in GENERIC kernels so that they
are compatible with the LKMs that are part of the release.
2005-11-03 16:48:29 +00:00
tsutsui
5797e5013d DELAY() is done (though the implementation is MIPS3 dependent). 2005-10-30 07:55:46 +00:00
tsutsui
bdf356473e Use new delay(9) for DELAY(9). 2005-10-30 07:53:16 +00:00
tsutsui
bc7a643d4f Use mips3_cp0_count_read() for precise microtime(9).
XXX microtime(9) function should be moved from machdep.c to timer.c?
2005-10-30 05:27:14 +00:00
tsutsui
48c586e2b6 According to the new mips3_cp0_count_read() based delay(9),
NEC-JC94 seems to have 200MHz clock, not 150MHz.
2005-10-30 04:35:49 +00:00
tsutsui
49b8c2626d - use mips3_cp0_count_read() for delay(9).
- delay(9) should take unsigned int, not int.
2005-10-30 04:34:03 +00:00
tsutsui
c0caafab2b Set up ci_cpu_freq, ci_cycles_per_hz and ci_divisor_delay in curcpu()
from platform->clock.
2005-10-30 04:31:22 +00:00
yamt
aec75b1cc6 - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
  have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
  from sys/bufq.h to sys/bufq_impl.h.
  (is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c.  (not tested)
2005-10-15 17:29:10 +00:00
tsutsui
73d1e286b2 Define MIPS3_PG_SIZE_MASK_TO_SIZE() macro in the MI mips header. 2005-10-10 02:14:43 +00:00
tsutsui
97776d231d - Use mtc0/mfc0 rather than dmtc0/dmtc0 for the PageMask register.
- Tidy up some comments.
2005-10-01 02:05:19 +00:00
tsutsui
0c1404101b - Remove duplicated #include.
- kseg2iobufsize should be vsize_t, not vaddr_t.
2005-09-29 10:39:43 +00:00
yamt
d597202302 make VMSWAP optional again. 2005-09-17 14:38:38 +00:00
yamt
7e71f567e4 include "conf/std". 2005-09-17 09:44:05 +00:00
jmmv
ec93365612 Initial addition of tmpfs, an efficient memory file-system. This project
was developed as part of Google's Summer of Code 2005 program.  This
change adds the kernel code, the mount_tmpfs utility, a regression test
suite and does all other related changes to integrate these.

The file-system is still *experimental*.  Therefore, it is disabled by
default in all kernels.  However, as typically done, a commented-out
entry is added in them to ease its setup.

Note that I haven't commited the required mountd(8) changes to be able
to export tmpfs file-systems because NFS support is still very unstable
and because, before enabling it, I'd like to do some other changes.

OK'ed by my project mentor, William Studenmund (wrstuden@).
2005-09-10 19:20:48 +00:00
kleink
aece7a90fd Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges.  Noted by David Holland in PR kern/31126.
2005-09-06 21:40:37 +00:00
tsutsui
912e6b6757 options<space><tab> 2005-08-28 13:23:22 +00:00
tsutsui
54713c08ec Count jazzio timer interrupts by evcnt(9). 2005-08-20 17:58:49 +00:00
christos
93c362d7ef Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels 2005-08-19 05:19:49 +00:00
christos
758a209d23 64 bit inode changes. 2005-08-19 02:03:49 +00:00
yamt
38ca5312d2 revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
2005-07-31 04:04:30 +00:00
yamt
558fded29a add "options VMSWAP" to non INSTALL kernels. 2005-07-30 06:35:34 +00:00
yamt
1d0891101c defflag VMSWAP. 2005-07-30 06:33:33 +00:00
hubertf
673730506c Add support for reading cloop2 compressed filesystem image,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
2005-07-17 00:08:27 +00:00
tron
04b9c3437f Add (commented out) IPSEC_NAT_T option. 2005-07-07 17:05:46 +00:00
rpaulo
64fd052c74 Add file-system PTYFS (commented out) so that people know its existence.
Ok'ed by Christos Zoulas and Hubert Feyrer.
2005-06-25 12:05:15 +00:00
junyoung
17670568fe Use FS_OPS() macro. 2005-06-23 19:44:00 +00:00
dyoung
a37289db57 Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.

To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/.  That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such.  I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
2005-06-12 19:46:15 +00:00
he
9eabff5290 Appease -Wcast-qual by adding consts in appropriate places. 2005-06-09 16:02:19 +00:00
tsutsui
4e54a2cc7c - Rename options NEW_BUFQ_STRATEGY -> options BUFQ_READPRIO.
(still commented out)
- Add (also commented out) options BUFQ_PRIOCSCAN.

Suggested by perry and soda on tech-kern.
Please refer options(4) for details for these options.
2005-06-09 14:43:29 +00:00
he
aafdb08c5a Fix the various todr_gettime() and todr_settime() fallouts from
-Wcast-qual differently, by instead changing the signatore of those
"functions" to take a "volatile struct timeval*" instead of a
"struct timeval*".  Many places, these functions are called with
&time, and time is declared as volatile in <sys/kernel.h>.  This
way we can get rid of all the ugly casts which now also triggered
warnings, and caused more code to be added to work around the
problem.

Reviewed by thorpej.
2005-06-04 20:14:24 +00:00
tsutsui
64cdf507bf workaround for volatile struct timeval time vs todr_*() arg mismatch. 2005-06-03 12:32:44 +00:00