Commit Graph

305536 Commits

Author SHA1 Message Date
thorpej 8c2c2eb16d As the final step in configuraing bus-master DMA, consult the boolean device
property "pciide-disable-dma" and disable bus-master DMA if that property is
present and true.
2024-03-31 18:59:52 +00:00
thorpej e0d4a325d1 Add machdep.rpb_type and machdep.rpb_variation sysctl nodes. 2024-03-31 17:13:29 +00:00
hannken 79f4a4f880 Using a ccd(4) with GPT (dk* at ccd*) the disk framework will call
ccdstrategy() -> ccdstart() -> ccdbuffer()  from softint context.
Allocating the buffer with PR_WAITOK here is forbidden.

Change ccdstart() / ccdbuffer() to report failure back to caller and
pass PR_WAITOK / PR_NOWAIT as an additional argument.

Call ccdstart() with PR_NOPWAIT from ccdstrategy() and on error defer
to the kthread.  Call ccdstart() with PR_WAITOK from kthread so requests
from kthread always succeed to allocate the buffers.

Remove the (non working) throttling on low memory as it is no longer needed.

Fixes PR kern/58043 "kernel crash in assert_sleepable() in -current,
dk(4) driver?"
2024-03-31 14:56:41 +00:00
christos 97a4ef4394 Restore the minimum build to install elfdefinitions.h. Provide a pre-built
copy, since we don't have m4 available. Use pax to install it because
using the Makefile needs more stuff available (nbsed) which we have not
built yet.
2024-03-31 03:20:38 +00:00
riastradh 98f50260ee docs/3RDPARTY: Record vendor and release tags for elftoolchain. 2024-03-31 00:06:23 +00:00
riastradh 3b71f8e333 tools/elftoolchain: Build with BUILTIN_ELF_HEADERS again.
The header file dependency that motivated disabling this should be
resolved now.
2024-03-30 22:39:53 +00:00
riastradh faabfc3e13 tools/elftoolchain: Handle dependencies properly.
This should properly resolve the problem christos was trying to
address by a bogus make includes hack and #ifdefs in elftoolchain.
2024-03-30 22:38:02 +00:00
andvar 7f3436c3c9 s/Unfortunatley/Unfortunately/ in comment. 2024-03-30 22:05:07 +00:00
andvar 3282d009d0 s/Westley/Wesley/ in a book reference (in comments). 2024-03-30 22:03:39 +00:00
rillig 0d863cbdf8 lint: document which fields are not reset when starting a new type
Setting all visible fields to their null value seemed as if the whole
object were reset.
2024-03-30 19:51:00 +00:00
martin 48ac458e6d Note NetBSD 10.0 2024-03-30 19:33:05 +00:00
rillig 0382e641fc lint: in the query about implicit conversions, ignore casts 2024-03-30 19:12:37 +00:00
rillig 370056d3b9 lint: add query for implicit integer-to-floating conversion 2024-03-30 17:23:13 +00:00
rillig def8e1797a lint: do not convert array subscripts from size_t to ptrdiff_t
The C standards do not specify a fixed type for an array subscript, it
just has to be an integer type.  Previously, query 4 fired for the
ubiquitous expression 'ptr[sz]' when sz had type 'size_t'.

The test platform_ilp32_long is unaffected by this change, as the
integer constant 0x80000000 has type 'unsigned int', while size_t is
'unsigned long' on those platforms, and even though the types 'unsigned
int' and 'unsigned long' have the same value space, there's still a
conversion, at least for now.
2024-03-30 17:12:26 +00:00
thorpej 99cf5fb567 Add an example devpubd hook that looks for Minipro-compatible EEPROM
programmers and sets the access permissions to 0660.
2024-03-30 16:47:55 +00:00
rillig c6466ed0f7 lint: reword messages about array subscripts to sound more natural 2024-03-30 16:47:44 +00:00
thorpej 4e13543e2b Add an example devpubd hook that detects the generic USB interface
portion of a Tigard debug board and changes the permissions of the
appropriate /dev/ugenN.* nodes to allow access without superuser
permissions, suitable for using e.g. openocd with the device.

This example can be easily modified to support other generic USB devices
that have user-space drivers where running as the superuser is not desired.
2024-03-30 06:42:10 +00:00
thorpej 2142cffc5c Descend into share/examples/devpubd/hooks 2024-03-30 06:29:33 +00:00
thorpej 70f7362772 Add an example devpubd hook that makes stable path names, using symlinks,
for USB serial interfaces, regardless of where the interface is connected
or the order of enumeration.  This requires the USB device to have a
"serialnumber" to function.  Examples:

- uftdi serial adapter with two ports:

	/dev/tty-uftdi-FT64S4YP-1 -> /dev/ttyU0
	/dev/tty-uftdi-FT64S4YP-2 -> /dev/ttyU1

- uslsa serial adapter:

	/dev/tty-uslsa-01E7ABCC -> /dev/ttyU4

This allows something like the following in /etc/remote:

sun3:dv=/dev/tty-uftdi-FT64S4YP-1:br#9600:pa=none:dc:

That path will always be stable regardless of which /dev/ttyU* node is
actually assigned when the serial adapter is plugged in.
2024-03-30 06:29:01 +00:00
thorpej 870369fb30 Add an examples directory for devpubd hooks. 2024-03-30 06:11:58 +00:00
uwe 74c925d1be exports(5): mark up the list of groups to --maproot &c as optional 2024-03-29 22:50:27 +00:00
christos 046528e7dc From enh at google dot com in tech-userlevel. Don't limit writes to BUFSIZ,
change the limit to INT_MAX; improves performance dramatically. From:
https://github.com/apple-oss-distributions/Libc/commit/\
c5a3293354e22262702a3add5b2dfc9bb0b93b85\
#diff-3b844a19cfb0aab1a23f7fbc457d3bce7453513730c489a72f66ff89d6557ff3
2024-03-29 22:39:41 +00:00
thorpej 9d92f090f4 ugen and ugenif share the same /dev/ugenN.xx namespace in such a way
that the device unit number does not necessarily match the /dev/ugenN.xx
unit number (N).  If you ONLY have ugen devices, it happens to work out
and devpubd scripts can be extremely naive.  If you ONLY have ugenif
devices, it also happens to work out, but your devpubd scripts have to
slightly more informed.  If you have a mix of ugen AND ugenif devices,
though, you're pretty much out of luck.

So, this change adds a "ugen-unit" device property which devpubd scripts
can query to determine which /dev/ugenN.xx nodes a given ugen or ugenif
device is using.
2024-03-29 19:30:09 +00:00
riastradh 5ee7326feb exports(5): Tiny punctuation fix in man page. 2024-03-29 14:15:02 +00:00
rillig 1219592417 lint: clean up 2024-03-29 08:35:31 +00:00
rillig 55398a9a51 lint: fix wording of warning about bit-field initializer 2024-03-29 07:35:45 +00:00
rillig fa5625f426 moused: remove undocumented and unused option 'C' 2024-03-29 06:13:40 +00:00
snj bc157922b7 pick some nits 2024-03-29 00:23:05 +00:00
rillig 134116ce30 lint: clean up 2024-03-28 21:04:48 +00:00
riastradh c9c7ef91a2 efiboot: Duplicate efi_bootdp before we clobber it in efi_net_probe.
Patch from jakllsch@.  Makes Socionext Synquacer boot considerably
more reliably.

PR kern/58075
2024-03-28 18:24:57 +00:00
nia cea226e5f0 Fix a few typos 2024-03-28 16:17:50 +00:00
riastradh 093cf962b0 fsirand(8): Fix security claims.
PR misc/58063
2024-03-28 15:39:42 +00:00
riastradh b2480288dc apei(4): Fix uninitialized stack access in error branch.
PR kern/58046
2024-03-28 13:40:08 +00:00
macallan 5a795c59e3 For some reason the drawing engine occasionally scribbles past the right
boundary when filling rectangles, especially annoying when we draw whitespaces
As a workaround we draw all rectangles less than 50 pixels wide by drawing
a 50 pixel rectangle into off-screen memory to the right of the visible fb and
then copy the portion we want. Keeps track of the colour and size of the
off-screen rectangle so we can avoid redrawing it whenever possible.
2024-03-28 12:50:31 +00:00
nia f8aba72830 spell uftdi(4) properly. 2024-03-28 07:59:20 +00:00
nia e3f700ed56 Recent changes 2024-03-28 07:57:31 +00:00
christos d40876c8a3 Add ${_MKTARGET_CREATE} 2024-03-27 21:55:08 +00:00
christos 1546e871c7 Remove dependency to elfdefinitions.h, this is a mess, since it needs
${TOOL_M4} which might not be available yet.
2024-03-27 21:54:43 +00:00
christos 89eb4d6b6c Don't try to compile the arch-specific relocation code if we don't have the
built-in headers (for tools)
2024-03-27 21:53:06 +00:00
rillig 30c6c279e2 lint: add missing assignment to $$ in grammar
Byacc and Bison both provide this assignment for all actions, whether
default or not, but the wording in POSIX doesn't guarantee this.
2024-03-27 21:14:09 +00:00
rillig 8910413e27 lint: clean up; extend overflow test 2024-03-27 20:09:43 +00:00
rillig e57698da95 lint: don't use 'long' in diagnostics
The size of 'long' differs between 64-bit and 32-bit platforms.
Eliminate this possible platform-dependency.
2024-03-27 19:28:20 +00:00
uwe 35565e90ce exports(5): improve mark up 2024-03-27 13:11:14 +00:00
macallan 280fb4a2da fix brainfart - only update fbi_fbsize, not the size of the visible fb... 2024-03-27 09:08:38 +00:00
macallan 5e20e31189 in gftfb_ioctl():
- identify ourselves as WSDISPLAY_TYPE_STI
- return full fb geometry in WSDISPLAYIO_GET_FBINFO
2024-03-27 06:52:03 +00:00
rillig 16198ed8df tools/Makefile: clean up TOOLDIR validation
At the point where tools/Makefile is loaded, TOOLDIR doesn't have to
exist yet, it will be created later.  Remove the redundant quotes from
the .error messages.
2024-03-27 05:43:38 +00:00
riastradh 4d24788653 exports(5): Substantially rewrite for clarity.
Hope this is an improvement over the turgid paragraphs all about
first/second/third cases of everything.

PR misc/58063
2024-03-27 01:43:26 +00:00
riastradh 4c0b782a41 exports(5): Revert warning about `-ro' on read/write file systems.
Looks like the nfs server does enforce that after all, in spite of
the rather oblique commentary in the BUGS section about export
options being tied to local mount point options with which they must
be noncontradictory.

And there's no reason in principle it shouldn't enforce this -- it
just need to block various file system _operations_, rather than the
subtree issue where the criteria for evaluating whether operations
are allowed on particular _file handles_ are too painful to
contemplate.

PR misc/58063
2024-03-27 00:46:17 +00:00
riastradh 205c5a0017 exports(5), mountd(8): First pass at clarifying export semantics.
The exports(5) man page is full of walls of turgid prose that should
be itemized lists with syntax templates, and I'm itching to rewrite
it, but let's get the security-relevant warnings out of the way
first.

PR misc/58063
2024-03-26 23:32:43 +00:00
rillig d798fee87d apei: fix typos in comments and snprintb bitfmt 2024-03-26 22:16:12 +00:00