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.
* 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.
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.
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.
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).
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.
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.
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.
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
- 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.
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.