Commit Graph

1997 Commits

Author SHA1 Message Date
simonb de56fe22b8 Welcome to 2023. Wrap lines so the years fit in to 80 columns with
a leading kernel log timestamp.
2023-01-01 00:09:52 +00:00
jakllsch 0946466ff9 remove lingering strip(4) remnants 2022-12-28 18:19:44 +00:00
pgoyette 189762b34e Create compat_100 module infrastructure now that we have branched
for NetBSD-10
2022-12-19 23:19:51 +00:00
brad 50bb9ed19f Split the BMP280 / BME280 driver into common code and create I2C and
SPI attachments.
2022-12-03 01:04:42 +00:00
yamt 6dafc627f2 assym.mk: Fix assym.d generation
It seems that the genassym/mkdep output has been changed.
This commit adapts the assym.d generation rule to the new output.
2022-11-19 07:54:25 +00:00
jmcneill 500d9e354b Add driver for Cadence I2C controller. 2022-11-05 17:31:37 +00:00
skrll 8d974145b5 MI PMAP EFI_RUNTIME support 2022-10-28 07:16:34 +00:00
rillig ec77a15a7f sys/conf/link.mk: clean up
The modifier ':C' did not need the modifier 'g', as there couldn't ever
be more than one match per word. Using the modifier ':from=to' is easier
to read.

Align the variable assignments. There was no point in having 3 different
alignment styles in the same file.

Remove underscore from .for iteration variable, as it is not needed.

No functional change.
2022-08-27 21:49:33 +00:00
rillig e93e388826 sys/conf: fix typo in comment 2022-08-27 20:42:16 +00:00
rillig dcbe8570db sys: document how to run lint on the kernel code (experimental) 2022-08-27 20:37:49 +00:00
riastradh cc725e3507 viocon(4): New virtio tty driver imported from OpenBSD.
viocon* at virtio?

/dev/ttyVI??

Tested under qemu with:

qemu-system-aarch64 ... \
  -device virtio-serial \
  -chardev socket,path=/tmp/ttyVI00,server=on,wait=off,id=ttyVI00 \
  -device virtconsole,chardev=ttyVI00,name=org.NetBSD.dev.ttyVI00 \
  ...

I updated MAKEDEV.conf to create /dev/ttyVI?? on all ports where it
looks likely to work based on:
(a) having pci or a non-pci virtio attachment,
(b) `qemu-system-$ARCH -M ?' mentioned something resembling the port,
    and
(c) `qemu-system-$ARCH -device virtio-serial' launched without
    complaining about the virtio-serial device.

(Criterion (c) excluded sparc and sparc64.)
2022-08-12 11:15:40 +00:00
riastradh 610f9263f0 sys: Build kernel with -Wno-type-limits.
The type-limits warning is actively harmful because it discourages
writing safe portable overflow detection logic which happens, on some
architectures, to be dead code.
2022-08-03 09:37:36 +00:00
mrg 13fa9a5218 use defparam; noted by tnn@. 2022-07-24 18:04:48 +00:00
mrg 02502a24d6 make MAXLWP a real option that triggers rebuilds properly. 2022-07-23 19:15:28 +00:00
riastradh 99d298e068 drm: Use CPPFLAGS.drmkms in all local drm drivers too.
This way we don't pollute the NetBSD kernel namespace with all the
Linux compat shim definitions needed to build drm, except for the
local drm drivers that need the API.
2022-07-20 10:01:10 +00:00
rjs afb36e9a1f bwfm(4) uses firmload. 2022-06-05 13:35:52 +00:00
rin 8ea840ce18 Add MODULAR_DEFAULT_VERBOSE option. 2022-05-07 04:30:41 +00:00
reinoud 050c3c4c5d Keep UDF commented out by default 2022-04-06 14:47:54 +00:00
reinoud 4e45e5a272 UDF has been around for more than a decade in the kernel. Now with a
fsck_udf(8) it is not making sense to keep it calling `experimental'.
2022-04-06 13:59:22 +00:00
manu b33073320a Add initial support for Intel GPIO chips 2022-03-24 02:24:24 +00:00
riastradh 3cbfb035d0 sys: Include files.acpica unconditionally.
This way acpica.h always exists unconditionally, so MI code can be
conditional on NACPICA.

It is not great to have such conditionals, but it's better to have

	#include "acpica.h"

	#ifdef NACPICA > 0

than to have

	#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
	#include "acpica.h"
	#endif

	#ifdef NACPICA > 0

and we can still grep for NACPICA to find places that could be
factored better.
2022-02-16 20:14:30 +00:00
thorpej 45009b64f1 Re-factor and overhaul the "mcp23s17gpio" driver as "mcpgpio", and
add support for 8-bit and I2C variants of the chip:
- MCP23008 / MCP23S08: 8-bit (I2C / SPI)
- MCP23017 / MCP23S17: 16-bit (I2C / SPI)
- MCP23018 / MCP23S18: 16-bit (I2C / SPI), open-drain outputs

The MCP23x17 and MCP23x18 are essentially identical, software-wise; we
merely report different GPIO pin capabilities (no push-pull output for
MCP23x18).  Also, remove the tri-state capability that was previously
advertised by the old version of this driver; these chips have no way
to put the pin into a HI-Z mode.

All 3 I2C versions are supported, but the SPI front-end still only
supports the MCP23S17 for now (SPI autoconfiguration needs an overhaul).

mcp23s17gpio(4) remains present as a link to the new mcpgpio(4) man page.

XXX Still to-do: FDT integration, interrupt suppoort.

(File missed in prior commit.)
2022-01-17 16:33:00 +00:00
christos 12a78c4e40 Fix for systems that override SYSTEM_LD_TAIL 2022-01-06 17:05:32 +00:00
christos 3d3291666b use a function "runit" to echo and execute avoiding set -x. 2022-01-04 19:52:02 +00:00
jmcneill c1c2648035 Add driver for DesignWare Ethernet Quality-of-Service controller. 2022-01-03 17:19:41 +00:00
msaitoh 988ab2c9fa s/sytem/system/ 2022-01-01 10:32:28 +00:00
jnemeth 59817af01a Welcome to 2022! 2022-01-01 06:14:28 +00:00
christos 43cbec9b32 - With DEBUG=-g (which is also set when we build CTF) we build netbsd.gdb *and*
netbsd-${KERNEL_CONFIG}.debug because it is not worth having two sets of
  rules (one that builds just netbsd.gdb and one that builds both netbsd.gdb
  and netbsd-${KERNEL_CONFIG}.debug. This maintains compatibility building
  netbsd.gdb when DEBUG=-g
- When either MKDEBUGKERNEL=yes or MKDEBUG=tes we set DEBUG=-g if DEBUG was
  not set.
- We only make a debuginstall rule to install netbsd-${KERNEL_CONFIG}.debug
  if MKDEBUG=yes
2021-12-30 18:53:35 +00:00
christos 99221eeb7f forgot one KERNEL_BUILD (Tobias Nygren) 2021-12-30 17:25:40 +00:00
christos 84538de221 Use the tail of KERNEL_BUILD since it can be a full path. 2021-12-30 17:16:32 +00:00
christos e883248015 Add ${_MKTARGET_INSTALL} 2021-12-30 03:24:50 +00:00
christos 8ba2643df7 use ${INSTALL_FILE} so that unpriv builds work. 2021-12-30 03:23:05 +00:00
christos 508aca192c Enable split-debug files for kernels. Enabled by default with MKDEBUG=yes. 2021-12-29 22:22:12 +00:00
christos 69f41f5953 Rename:
MKKDEBUG -> MKDEBUGKERNEL
    MKTOOLSDEBUG -> MKDEBUGTOOLS
while keeping compatibility with the old names. Add missing documentation.
Now all debugging tunables are prefixed with MKDEBUG.
2021-12-20 20:33:20 +00:00
brad bf53d44167 A driver and user land utility for the Sparkfun Serial Controlled Motor
Driver module as illustrated here:

https://www.sparkfun.com/products/13911

A SCMD module is a ARM SOC simular to a Arduino in front of a motor
driver chip.  The single SCMD module can control two motors and up to
16 additional modules can be chained together using an internal I2C
bus.  One can interface with the SCMD using tty uart commands, SPI or
I2C.  The driver in this commit adds a kernel driver for the I2C and
SPI interfaces.  The command line utility provides a set of
convenience commands that support most of the functions of the SCMD
and is able to use the tty uart mode, SPI user land or the included
kernel driver in a uniform manor.

The use of the SCMD module is mostly for small robots and the like,
but it can control anything that is controllable by voltage.
2021-12-07 17:39:53 +00:00
rin da1c892751 ahcisata(4): Introduce AHCI_QUIRK_EXTRA_DELAY quirk for devices that
need extra delays as done by AHCISATA_EXTRA_DELAY option.

Enable this quirk for "C600/X79 AHCI". Also add commented out quirk
entries for "Bay Trail SATA (AHCI)" and "Mobile AHCI SATA Controller",
for which non-reproducible failures worked around by extra delays have
been reported.

500 ms of delays inserted by these option/quirk may be too much. Add
AHCISATA_EXTRA_DELAY_MS option to adjust number of delays in ms, like:

----
options 	AHCISATA_EXTRA_DELAY_MS=200
----

Thanks prlw1@ and jun@ for testing!
2021-11-19 23:46:54 +00:00
brad 1f3d8cb8fe Driver for the Sensirion SHT30/SHT31/SHT35 temperature and humidity
sensor such as:

https://www.adafruit.com/product/2857

This is a higher priced sensor with a lot of features, including the
ability to do sub-second periodic updates.  The driver supports
everything about the sensor except for the alert pin.
2021-11-06 13:34:39 +00:00
ryo f989f9625c revert previous: http://mail-index.netbsd.org/source-changes/2021/10/25/msg133295.html
going to add __always_inline to the functions called from _mcount()
discussed on http://mail-index.netbsd.org/source-changes-d/2021/10/25/msg013480.html
2021-10-27 03:06:59 +00:00
ryo 843ce00650 In some arch, _mcount() would be called recursively when built with COPTS=-O0.
Normally, functions called from mcount.c are expected to be expanded inline,
so _mcount() will never be called recursively. But when build with COPTS=-O0,
`static inline' functions aren't inlined, and _mcount() will be called
recursively.

Even if _mcount() has `__attribute__((__no_ instrument_function__))',
it has no effect on the calling external (no-inlined) function.

To avoid this, PROF.<fn> is added can be set the profiling flag of any file.
"PROF.mcount.c" is set to blank by default, mcount.c itself is compiled
without -pg.
2021-10-25 07:54:44 +00:00
jmcneill e7fa2fcb40 add defflag for AHCISATA_EXTRA_DELAY 2021-10-11 13:42:33 +00:00
msaitoh 84c8996d3d defparam NMBCLUSTERS_MAX. 2021-10-11 03:50:45 +00:00
jmcneill c3146444be efi: Add /dev/efi character device
Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.
2021-10-10 13:03:08 +00:00
andvar 207defd036 Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
2021-09-11 20:28:03 +00:00
jmcneill 065fe7e8c6 smbios: Add character device for accessing SMBIOS tables
The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.
2021-07-24 11:39:18 +00:00
jmcneill b2c90ce3cf Separate MI smbios interface from MD specific code. 2021-07-21 23:16:08 +00:00
nia 3b7d57661a mark urio/uscanner device majors obsolete 2021-06-29 10:24:41 +00:00
nia 2bf97e1a60 drm2: build with -fwrapv, since the Linux kernel does and we don't
want to spend too much time fixing their code. silences a lot of
KUBSAN warnings.

we need to use COPTS to have per-option compiler flags. help from
Riastradh.
2021-06-02 15:45:28 +00:00
yamaguchi 4910df2e45 Fix not to do if_down() before reconnect
Almost network interface do not use if_down() even when there is no
connectivity. So, pppoe(4) is also made be not used it.
This behavior can be rollbacked by SPPP_IFDOWN_RECONNECT option.
2021-06-01 03:51:33 +00:00
simonb 2d891d6353 Put the MSGBUFSIZE option in opt_param.h so that changes of its setting
in kernel config files will be picked up automatically without needing
a "make clean".  Added to opt_param.h since ports define their default
MSGBUFSIZE settings in their <arch/include/param.h> (or equivalent).
2021-05-29 12:03:34 +00:00
nakayama fa8245150b Fix previous to use the proper version file path. 2021-05-21 11:28:11 +00:00