Commit Graph

305572 Commits

Author SHA1 Message Date
charlotte 53b28be123 dk(4): Add support for discovering Atari TOS partitions as wedges
Any partitioning scheme which conforms to the Atari AHDI 3.00 spec should be
recognized by the new DKWEDGE_METHOD_TOS.
2024-04-02 22:30:03 +00:00
riastradh d0ccdab6f4 sljit: Pacify -Wsign-compare.
If these sizes are negative, we're probably in trouble anyway, so
assert nonnegative here.

Needed to resolve PR 58103.
2024-04-02 22:29:57 +00:00
riastradh 717c76abf5 MAKEDEV: Tidy some entries on x86 and Arm.
While here, reduce some diffs arising from ordering and formatting
between these architectures.

Only difference between evbarm and aarch64 now is /dev/vchiq.  Not
sure offhand if it makes sense on aarch64 or only 32-bit Arm.

PR port-amd64/58093: /dev/efi missing on x86
PR port-arm/58100: /dev/ttyVI* missing on aarch64
PR port-arm/58101: /dev/nvme* missing on aarch64
PR port-arm/58102: /dev/raid* missing on aarch64
2024-04-02 22:29:35 +00:00
rillig d5bb47fbc4 sparc/fpsetround: fix the nearby signed integer overflow as well
Same as for sparc64 a few days ago.
2024-04-02 20:42:12 +00:00
christos a7add5bb79 fix lint 2024-04-02 20:27:44 +00:00
christos b9343ab6d9 fix llvm build 2024-04-02 20:04:16 +00:00
christos 16095d554f undo accidental commit. 2024-04-02 18:40:50 +00:00
christos 8f219a4edd PR/58054: Martin Husemann: fix bug in expsign extraction and only use the
code for the floating point formats where it works (does not work for 112
bit mantisa in sparc64)
2024-04-02 18:39:51 +00:00
christos 1718c36352 Back-out unintented commit. 2024-04-02 16:18:23 +00:00
christos 403fd67d9a PR/58104: Kouichi Hashikawa: Use ${TOOL_AWK} 2024-04-02 16:17:29 +00:00
rillig 3b221c13be tests/make: pass PATH onto child processes
This fixes the tests on some Cygwin variant where the shell does not
initialize the PATH environment variable when it's missing.
2024-04-02 15:05:15 +00:00
christos 9cee694b9b Fix DEBUG build. 2024-04-02 14:24:26 +00:00
christos 8e77060493 harmonize with the rest of MD limits files. 2024-04-02 14:21:29 +00:00
christos 3a91ec0ace use ${MKREPRO_TIMESTAMP} for baking in the date and time. 2024-04-02 14:19:02 +00:00
christos 268230053d Use ${TOOL_DATE} (Jan-Benedict Glaw) 2024-04-02 14:15:19 +00:00
christos 01d7b23489 oops the #endif was too far down. 2024-04-02 12:42:35 +00:00
rillig fac77563b5 tests/make: remove test for overly long chdir argument
On Cygwin, the path '/././..././' is normalized before being passed to
the child 'make' process. Since overly long pathnames are not required
to be supported on all platforms, remove the test.
2024-04-02 11:11:00 +00:00
andvar b20c24302f s/Doucments/Documents/ in comment. 2024-04-01 22:56:55 +00:00
christos 7b80984d1c Use the TOOL_GZIP we built as part of tools if available. 2024-04-01 22:23:14 +00:00
christos d3697da1f3 Handle not having SIGINFO (Jan-Benedict Glaw) 2024-04-01 22:20:58 +00:00
riastradh ad49149131 elftoolchain: Be consistent about which ELF header files we use.
1. For tools that use elftoolchain: always use elftoolchain's
   elfdefinitions.h.  Don't even think about looking at the host's
   sys/exec_elf.h, which makes no sense and should never happen.

   (ELF tools that don't use elftoolchain, like m68k-elf2coff,
   continue to use nbincludes/sys/exec_elf.h.  But no more nbincludes
   hacks in elftoolchain.)

2. For kernel components (solaris, zfs, dtrace): always use
   sys/exec_elf.h, even in Solaris components via sys/elf.h.
   elfdefinitions.h is not wired up in the kernel build at all.

3. For most userland components that involve libelf: use
   elfdefinitions.h via libelf header files (libelf.h, gelf.h).

   libdtrace in particular requires _all_ R_* reloc type definitions,
   but sys/exec_elf.h brings in only the _current machine's_ R_*
   reloc type definitions.  (While here: Use uintptr_t instead of
   Elf_Addr for pointer-to-integer cast, since Elf_Addr is MD and
   provided only by sys/exec_elf.h, not by elfdefinitions.h.)

   And most userland components using libelf don't rely on any
   properties of the current machine from sys/exec_elf.h, so they can
   use libelf's elfdefinition.h.

   Exceptions:

   - dtrace drti.c relies on link.h -> link_elf.h -> sys/exec_elf.h,
     but it also relies on sys/dtrace.h -> sys/elf.h ->
     elfdefinitions.h like other userland components using sys/elf.h.

   - kdump-ioctl.c uses sys/exec_elf.h directly and sys/dtrace.h ->
     sys/elf.h -> elfdefinitions like other userland components using
     sys/elf.h.

   - t_ptrace_wait.c (via t_ptrace_core_wait.h) uses libelf to parse
     core files, but relies on sys/exec_elf.h for struct
     netbsd_elfcore_procinfo.

   None of these exceptions needs all R_* reloc type definitions, so
   as a workaround, we can just suppress libelf's elfdefinitions.h by
   defining _SYS_ELFDEFINITIONS_H_ and use sys/exec_elf.h in these
   exceptions.

And undo the whole BUILTIN_ELF_HEADERS mistake.  This was:

- half bogus workarounds for missing build_install dependencies in
  tools/Makefile, which are no longer missing now, and
- half futile attempt to use src/sys/sys/exec_elf.h via nbincludes in
  tools involving libelf instead of libelf's elfdefinitions.h, which
  collides.

Longer-term, we may wish to unify sys/exec_elf.h and libelf's
elfdefinitions.h, so we don't have to play these games.

But at least now the games are limited to three .c files (one of
which is generated by Makefile.ioctl-c), rather than haphazardly
applied tree-wide by monstrous kludges in widely used .h files with
broken hackarounds to get the tools build lurching to completion.
2024-04-01 18:33:22 +00:00
skrll 9dafaafcc9 Return the correct error from {fetch,store}_user_data and fix
futex_wake_op_op: [0.273033s] Failed: /usr/src/tests/lib/libc/sys/t_futex_ops.c:942: Expected errno 14, got 1, in __futex(&futex_word, FUTEX_WAKE_OP | flags, 0, NULL, NULL, 0, op) == -1
2024-04-01 16:24:01 +00:00
jakllsch 7406ef8d73 ti_gpio: add gpio(4) interrupt support
tested with gpiopps(4) on Beagle Bone Black
2024-04-01 15:52:08 +00:00
rillig 9b0e4f6f67 make: remove unreachable code in handling .for loops 2024-04-01 12:33:27 +00:00
rillig 311476f316 make: exit immediately after reading a null byte from a makefile
The chance of other garbage bytes in such a file is just too high.
2024-04-01 12:26:02 +00:00
macallan a78c8d274c make gftfb_restore_palette() grab the default colour map from rasops instead
of just writing the driver's map into the hardware ( which may have been
modified by the likes of wsfb )
With this we get a readable console even when exiting X in a less than
graceful manner.
2024-04-01 09:48:58 +00:00
rillig 99770e084d tests/snprintb_m: test null-terminated output in error case
While here, clean up the buffer handling for the visualized array
content in case of a failed test.
2024-04-01 09:15:51 +00:00
rillig 24a52b6ecd snprintb: remove redundant memset in kernel mode
The provided buffer is already null-terminated by finish_buffer, even in
error cases, there is no need to repeat the same work.
2024-04-01 08:53:42 +00:00
christos a7487e8acc hook gzip to the build so that we can test it in other OS's. Not used yet. 2024-04-01 02:22:38 +00:00
christos ce9d65703d make it work as a tool 2024-04-01 02:21:39 +00:00
christos d8b33778ce - -n is the default on SMALL, so accept the flag silently.
- conditionalize TIMESPEC_TO_TIMEVAL
- add nbtool_config.h
2024-04-01 02:20:52 +00:00
christos 7ba93f1a9b Start for a TOOL_GZIP 2024-04-01 02:19:41 +00:00
christos 878fdbc71b revert previous, riastradh fixed it correctly and this is not needed. 2024-04-01 02:18:30 +00:00
rillig 05808a2230 lint: merge function call operators 'CALL' and 'ICALL' 2024-03-31 20:28:45 +00:00
thorpej 33e1df375d In dec_6600_device_register(): If we're running on a DS10, set the
"pciide-disable-dma" property on the on-board "aceride" to true.  This
is intended to be a temporary measure until the issue that makes it not
work correctly is found and fixed.
2024-03-31 19:11:21 +00:00
thorpej 296121ed99 Always call platform.device_register(), even if bootdev_data is NULL. 2024-03-31 19:06:30 +00:00
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