Commit Graph

96 Commits

Author SHA1 Message Date
riastradh f2475c4d1d Nix trailing whitespace. 2020-08-28 14:58:25 +00:00
jdolecek d40a03f552 Add driver for Intel XMM7360 LTE modem, based upon Linux driver available
at https://github.com/xmm7360/xmm7360-pci

This version works on Linux, OpenBSD, and NetBSD.

OpenBSD port written for genua GmbH

Modem requires python script from the master site to initialize the network,
it will be added to pkgsrc shortly
2020-07-26 14:51:18 +00:00
maxv 857941dbf5 Add fault(4). 2020-06-07 09:45:19 +00:00
riastradh 08a157de6e Remove filemon(4).
Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings.  You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table.  (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)
2020-01-19 20:41:17 +00:00
maxv 87107185b5 Revert the removal of filemon. 2019-12-23 06:45:36 +00:00
maxv e67f51b8f7 Retire filemon, discussed on tech-kern@. 2019-12-18 07:37:17 +00:00
ozaki-r b2358a5409 Implement a front-end driver of virtio-9p called vio9p
In conjunction with mount_9p, it enables a NetBSD system running as a VM guest
to mount an exported filesystem by the host via virtio-9p.  It exports a 9p
end-point of virtio-9p via a character device file for mount_9p.

Reviewed by yamaguchi@
2019-10-28 02:56:40 +00:00
maxv 054c8b6dea Wrong major. 2019-09-15 11:45:47 +00:00
maxv 250ccf12c0 Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

	VHCI_IOC_GET_INFO   - Get the current status
	VHCI_IOC_SET_PORT   - Choose a vHCI port
	VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
	VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.
2019-09-14 06:57:51 +00:00
mlelstv b1f23fc946 Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.
2019-05-18 08:38:00 +00:00
mlelstv 26894afa16 Now the real number for ipmi 2019-05-05 17:24:00 +00:00
mlelstv a8f0d58e5b reservation for IPMI driver 2019-05-05 17:22:31 +00:00
kamil e7e18034ff Reserve DTrace sdt and fdt major numbers
Register cmajor 252 for fbt and 253 for sdt.

Previously the major number was picked randomly and it causes conflicts
with preallocated values for different devices.
2019-03-09 18:53:52 +00:00
kamil 83b223f69d Reserve majors for HAXM and example loadable kernel modules
348-350 are reserved for HAXM
351 is reserved for sys/modules/examples

Discussed on tech-kern@
2019-02-23 12:25:33 +00:00
mlelstv 8e117ced4e Reserve major number for spi driver 2019-02-23 07:33:20 +00:00
kamil 0fe7e51662 Add KCOV - kernel code coverage tracing device
The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.
2019-02-23 03:10:05 +00:00
maxv f3a4baf748 Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

	/usr/include/dev/nvmm/nvmm.h
	/usr/include/dev/nvmm/nvmm_ioctl.h
	/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.
2018-11-07 07:43:07 +00:00
thorpej 266bca89c9 Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676
2018-05-20 14:08:32 +00:00
christos b985414b8f Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet
2018-01-09 03:31:12 +00:00
jmcneill fb651b612c Add driver for QEMU Firmware Configuration device.
This interface allows the host to pass various data items and files to
the guest OS.
2017-11-25 16:31:03 +00:00
nat 03783bb56a Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
2016-12-08 11:31:08 +00:00
nonaka 4a15838ffa Fix to cannnot be opened a nvme(4) namespace device file. 2016-09-08 15:00:08 +00:00
nonaka e7c0cc5d9a Add NVMe command passthrough support. 2016-06-04 16:11:50 +00:00
skrll c0bc9f43b6 Clarify the intention here after discussing it with soda@ 2016-05-13 07:41:47 +00:00
soda 5407bb6145 - change major number limit for MI devices from 255 to 511,
because twe is already using 332
- clarify that new MI devices should go to this file
  instead of majors.{ws,usb,std,tty,storage}
- fix major number conflict about hdmicec vs tty

OKed by matt@
the expression "previously not MI" is suggested by matt@ too.
2016-05-13 02:00:36 +00:00
skrll eb30461f6b Update with info about tty/storage reservations 2016-05-11 06:42:06 +00:00
jmcneill 72fc9317eb Add an API for HDMI CEC devices. HDMI Consumer Electronics Control (CEC) is
a protocol that provides high-level control functions between CEC-capable
connected devices.
2015-08-01 21:19:24 +00:00
matt 0d3752840d Add comment about new MI device numbers in other files. 2014-09-19 17:46:28 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
mbalmer b2f05d7f17 add a device-major for lua(4) 2013-10-18 08:03:48 +00:00
rkujawa e314032c94 Add forgotten block device number for spiflash in an attempt to unbreak evbarm build. 2013-04-22 16:49:14 +00:00
rkujawa 52e9bd0cf4 Add character device for spiflash.
Obtained from Marvell, Semihalf.
2013-04-20 09:48:32 +00:00
christos 64598e0663 add a major for dtrace 2013-02-28 02:00:03 +00:00
jdc c3ca80ef0c Add an MI major number for seeprom (char 206). 2013-02-08 15:00:26 +00:00
bouyer f2b31f39d0 Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.
2012-09-19 21:24:28 +00:00
christos 6fb39d18da add a tpm driver from bsssd.sourceforge.net 2012-01-22 06:44:28 +00:00
agc a5b83a6434 grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)
2011-11-19 16:41:55 +00:00
tron 364c7183d8 Fix build of kernels without filemon(4). 2011-10-15 10:18:24 +00:00
sjg db4d363da5 Add the plumbing so one could compile filemon(4) into a kernel. 2011-10-15 00:23:08 +00:00
jmcneill ab747348b5 Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.
2011-10-02 16:39:45 +00:00
jmcneill fa30660c16 reserve char 200 for dtv 2011-07-09 14:47:27 +00:00
jmcneill bc2a81f763 unreserve kmixer 2011-01-20 19:10:02 +00:00
jmcneill 1dc6287662 reserve a major number for kmixer 2011-01-05 22:35:08 +00:00
uebayasi 9150ddda9b Reserve an MI major for coming flash(4).
hpcmips defines one in MD majors, but it's not listed in
etc/etc.hpcmips/MAKEDEV.conf, so I assume actual files are never
created in users' filesystems.

Prompted By:	pooka
2010-10-27 14:08:08 +00:00
rmind 2e6f2099c6 Import NPF - a packet filter. Some features:
- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
  Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
  supporting generic RISC-like and specific CISC-like instructions for
  common patterns (e.g. IPv4 address matching).  See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@
2010-08-22 18:56:18 +00:00
pooka 3da3ab250b For the simple cases, augment device-major with information on how
a driver expects /dev/node -> minor mappings to go and include that
information in devsw_conv.
(no, I didn't plow through all the MD majors files)
2010-04-30 20:47:17 +00:00
pooka a6795f6ae1 compress whitespace. no functional change. 2010-04-30 20:28:13 +00:00
pooka 59611015f4 Steal a static major number for rumpblk. 2010-04-14 16:05:23 +00:00
plunky c269ebf72f use a MI major number for uhso(4) driver
(requested by mrg)
2010-03-06 23:45:38 +00:00
sborrill b88195cfa1 hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio*	at pci? dev ? function ?
hdafg*		at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio
2009-09-06 17:25:55 +00:00