Commit Graph

305964 Commits

Author SHA1 Message Date
mlelstv c2c241e6a6 Bail if increment is too small for the precision to avoid an infinite loop. 2024-05-04 13:29:41 +00:00
christos 5b4135cd6f PR/58233: RVP: Fix lzip dictionary size calculation 2024-05-04 13:18:06 +00:00
christos f57e938466 PR/58223: RVP: Don't write to stdout when testing. 2024-05-04 13:17:03 +00:00
christos 8a0c0d837a Document environment variable use. 2024-05-04 13:11:41 +00:00
mlelstv 00e4c256d5 Use device_printf instead of autoconf messages for errors. 2024-05-04 12:49:15 +00:00
mlelstv eafb40ae80 Make usb address and hub topology available to drvctl. 2024-05-04 12:45:13 +00:00
skrll be2d38de58 makecontext: correct the type to setup register based arguments.
Use __greg_t rather than int for register based arguments. This fixes
various atf tests.
2024-05-04 12:43:36 +00:00
skrll b06455d348 Fix the __greg_t typedef for riscv32 2024-05-04 12:42:09 +00:00
mlelstv 4ccc274e71 Use device_printf instead of autoconf messages for errors. 2024-05-04 12:41:03 +00:00
nia b61903b372 recent changes 2024-05-04 09:37:39 +00:00
skrll 8bcee0b70a Whitespace 2024-05-04 07:04:24 +00:00
rillig 1772ff8ac7 lint: increase debug logging for declarations
All changes to the global variable 'dcs' are tracked now, to help
identify the cause of the failing tests in expr_sizeof and
gcc_attribute_aligned.

While here, test more invalid type combinations in typedefs.
2024-05-04 06:52:16 +00:00
rillig b108f9c1fe mktemp.3: mkdtemp is no longer nonstandard
Reported by Aleksey Cheusov on tech-userlevel.
2024-05-04 05:50:49 +00:00
mlelstv 6d4f51a741 From genfs_rename.c:
* XXX Want a better equality test.  `tcnp->cn_cred == cred'
         * hoses p2k because puffs transmits the creds separately and
         * allocates distinct but equivalent structures for them.

Fixes rename crash in rump_msdos.
2024-05-04 05:49:39 +00:00
dyoung 7c4812b990 Add a device tree for the Red Pitaya SDRlab 122-16.
To boot NetBSD on the 122-16, copy the .dtb built from
zynq-red-pitays-122-16.dts, the first-stage bootloader (called
boot.bin) and U-Boot that came with the 122-16 and a kernel image,
netbsd.ub, built for earmv7hf to an MS-DOS partition on an
MBR-partitioned SD card.  At the U-Boot prompt, "Zynq> ", type these
commands:

i2c dev 0
eeprom read 0 0x50 0 0x1804 0x400
env import -b 0 0x400 hw_rev serial ethaddr
setenv bootargs "root=ld0a"
fatload mmc 0 0x01f00000 device~1.dtb
fatload mmc 0 0x02000000 netbsd.ub
fdt addr 0x01f00000
fdt set /axi/ethernet@e000b000 local-mac-address $ethaddr
bootm 0x02000000 - 0x01f00000

Note that the ethernet PHY will not attach unless you have applied
the patches from Lloyd Parkes in kern/58083.
2024-05-04 02:21:48 +00:00
dyoung 5fb492e854 Initialize `struct consdev` members cn_dev and cn_pri like other
UART drivers do.  If cn_dev is 0 instead of NODEV, then the kernel
may redirect console writes to major 0, minor 0, which is /dev/mem.
On my Zynq board the kernel overwrote the page free list with a
console message in this way.
2024-05-04 02:04:54 +00:00
gutteridge 7db2523dea Add dhcpcd to riscv ramdisk, etc.
Be consistent with configs for pretty much every other (modern) arch
and provide dhcpcd, lest someone end up using this image and then be
surprised (as happened relatively recently with evbmips images). This
means of course we also need bpf.

While here, add a few wedge devices, too. This aligns us with the
device definitions evbmips uses (that appears to be where the riscv
Makefile was copied from back in 2015).
2024-05-04 00:41:06 +00:00
riastradh af8e7fd7d9 tests/lib/libm/t_fe_round.c: Expand nearbyint/rint tests.
PR lib/58054
2024-05-03 21:40:51 +00:00
andvar deeff75000 s/inerttupts/interrupts/ in comments. 2024-05-03 21:38:15 +00:00
nakayama f13fcfc711 Allow DHCPv6 so that dhcpcd(8) does not complain at boot when using
ia_pd option.
2024-05-03 20:48:58 +00:00
rillig cbe2532061 tests/lint: fix supposedly platform-independent type definitions
No idea where I got the previous type definitions from.  The typedef
names looked just too convincing to actually check the underlying types.
2024-05-03 19:16:13 +00:00
christos 9c1705ca7b add an environment variable to override the number ot threads. 2024-05-03 15:50:42 +00:00
christos 8b4f8baa5f Fix build as a tool (Jan-Benedict Glaw) 2024-05-03 15:39:50 +00:00
rillig 0b487d0915 tests/lint: skip test for sizeof struct on 32-bit platforms
Even though the test only uses fixed-size types, lint's computed size of
the resulting struct differs between i386 (80) and x86_64 (112).  Both
are wrong, probably due to the unrelated struct declaration above, as
already mentioned in the comments.
2024-05-03 15:32:37 +00:00
nia 4e8c872233 update ports roadmap 2024-05-03 09:00:59 +00:00
skrll 1b3eb2cf34 Small simplification. NFCI. 2024-05-03 07:24:31 +00:00
skrll 451e18ef56 Use the _X_FOO register macros instead of magic numbers. 2024-05-03 07:11:14 +00:00
skrll 0697ad2e67 KNF 2024-05-03 07:09:20 +00:00
skrll 97e917b2d3 More debug. 2024-05-03 07:06:18 +00:00
skrll d3780b8625 Remove references to RISC-V. 2024-05-03 07:00:14 +00:00
rillig 3e0eea9ed1 lint: measure the alignment in bytes, not bits
While measuring the alignment in bits makes sense when building a struct
type with bit-fields, in all other places it is more confusing than
helpful.

The only visible change is that in debug mode, the format of type sizes
and alignment changed.  Since the size of all complete types is a
multiple of a byte (as defined in the C standard), sizes and alignments
are reported in bytes as well.  Only while a struct is being built, the
type size may include an additional '+x' for the bits of a bit-field.
2024-05-03 04:04:17 +00:00
rillig 2e8fec16de tests/lint: demonstrate wrong struct size calculation 2024-05-02 20:03:33 +00:00
rillig 29027db22b parsedate.3: resolve contradictory values for 'next' 2024-05-02 18:34:01 +00:00
skrll d3587104ce risc-v: fix the error code when uvm_fault fails with cpu_set_onfault
Return the error from uvm_fault instead of EFAULT unconditionally when
faulting with cpu_set_onfault to fix several atf tests.
2024-05-02 18:18:17 +00:00
riastradh 9fbbf75c78 tests/lib/libm/t_fe_round: Fix a missed cast.
Need long long or intmax_t, not long, on LP32.

PR lib/58054
2024-05-02 16:52:08 +00:00
riastradh 2bd651d959 tests/lib/libm/t_fe_round: Tidy up nearbyintl, sync nearbyint test.
PR lib/58054
2024-05-02 16:51:55 +00:00
christos 35564cfd71 comment out strict boolean lint check because isspace() returns int and lint
complains.
2024-05-02 15:45:36 +00:00
christos 81769fc7f9 revert previous. 2024-05-02 14:19:56 +00:00
riastradh 38aebf98e7 tests/lib/libm/t_fe_round.c: Simplify previous.
There is never any need to write casts to type T in integer constant
initializers for type T.

PR lib/58054
2024-05-02 11:55:49 +00:00
kre 483439ec0a Use intmax_t instead of long int when trying to represent very large
integers (10^50 or so), so we don't exceed the capacity of systems where
long int is only 32 bits.

Hopefully will unbreak the i386 build, perhaps others.
2024-05-02 03:30:07 +00:00
riastradh 247fbbb163 tests/lib/libm/t_fe_round: Test nearbyintl.
This uses inputs that can't be distinguished with only 53 bits of
precision, so it should work in essentially all long double formats
to detect when nearbyintl is incorrectly implemented in terms of
nearbyint.

PR lib/58054
2024-05-02 00:01:48 +00:00
riastradh 02e4b613e1 tests/lib/libm/t_fe_round: Tidy up nearbyint test.
Prompted by PR lib/58054.
2024-05-02 00:00:47 +00:00
christos 79cacd8776 Allow c99 array designators 2024-05-01 21:34:48 +00:00
christos b509c1ea3b next should increement by 1 not 2. 2024-05-01 19:59:07 +00:00
tsutsui 2c8ccd9ea5 Add 98542 and 98543 framebuffers to supported "Graphics Devices" section.
I hope someone will sync a list of supported devices in port wiki pages
with one in this installation notes.
2024-05-01 19:40:56 +00:00
tsutsui 7e4f30d6cd Note that 98542 and 98543 variants are also supported by topcat(4). 2024-05-01 19:34:19 +00:00
tsutsui f4485e648f Fix topcat(4) problems on some models that cause garbages on screen.
- Make sure that windowmove (hardware BITBLT) ops complete by checking
  tc_busywait() before calling putchar functions by MI rasops(9).
  It looks CPU accesses against VRAM during windowmove (copy, erase,
  and cursor) ops causes unexpected garbages at least on 98543 on HP360,
  98547 on HP370, and also on 98543 on 040 HP380 (but not on 98549).

- Handle 'sparse VRAM' on 98543 (and probably 98542) properly:
 - Prepare and use own topcat_putchar1_4() function for sparse VRAM.
 - Pass proper 'VRAM width' rather than actuall font width to all
   windowmove (copycols, erasecols, copyrows, eraserows, and do_cursor)
   operation functions.

Now all topcat(4) consoles on 98543 on HP360/HP380 and 98547 on HP370
work fine, and no visible regression on 98549 on HP380 and 98544 on HP360.

Worth to pullup netbsd-10.
2024-05-01 19:28:33 +00:00
andvar 9cc6f62bd5 s/Diffrential/Differential/ in comment. 2024-05-01 19:11:45 +00:00
christos 9818b366f5 fix clang lint build. 2024-05-01 18:38:15 +00:00
rillig 571b49008c lint: make 'offsetof(t, array-member)' a constant expression
The macro 'offsetof(t, m)' already expanded to a constant expression for
scalar members but not for arrays.  This was because the macro expanded
to '(size_t)(((t *)0)->m)', which lint internally represents as
'addr(indir(ptr(0) + offset(m)))', and build_address simplifies
'addr(indir(x))' to 'x' if the types match.  The types only match for
scalar types though, but not for arrays.

When build_address happens, the type information is incomplete,
therefore 'offsetof(t, array)' has to be simplified at a later point.
2024-05-01 17:42:57 +00:00