imxclock: Fix timekeeping errors.
The following two warnings appeared in dmesg on every NetWalker boot.
Before this change, they appeared every time about 21 seconds after
boot:
WARNING: lwp 29 (system sdmmc0) ...: timecounter went backwards
... in netbsd:mi_switch+0xf0
WARNING: pid ... (devpubd): negative runtime; monotonic clock has
gone backwards
The time difference in the warnings was about 0.576 s, which matches
the value computed in cause 1 below.
Cause 1: the value goes back right after a reload (a 0.576 s step).
imx_epit_get_timecount() returned base - CNT. When the value goes
back, the difference in kern_tc.c (tc_delta) wraps to nearly 2^32, the
multiplication overflows, and the time jumps forward by
frac((2^32 - LR) / f). On a NetWalker (66.5 MHz, LR = 664999), this
[17 lines not shown]
inet: do not treat reject/blackhole routes as error
Reject/blackhole routes can have a loopback interface. Don't return
an ICMP error for a packet being forwarding on such routes.
Patch from oohashi at IIJ
hxtool(1) embryo page (not hooked into the build)
Hopefully, this provides enough mdoc boilerplate for someone with an
actual clue to add the rest of the commands.
PR bin/61120
Include the ad.arm entries in ad.earmv7 and ad.earmv7hf
This will hopefully finally fix the evbarm-earmv7hf build failures.
Note: I did not copy the obsolete entries, based upon the assumption
that no earmv7 or earmv7hf systems would have existed when those
old files were part of the build. If that is incorrect, by all means,
add them back (that won't affect the daily autobuilds, or any other
fully clean build, as those never experience files from a previous generation).
PR/61113: Edmund: Apply Sun's BSD relicensing, like FreeBSD did in 2013:
"Replace Sun RPC license in TI-RPC library with a 3-clause BSD license,
with the explicit permission of Sun Microsystems in 2009"
PR/61113: Edmund: Apply Sun's BSD relicensing, like FreeBSD did in 2013:
"Replace Sun RPC license in TI-RPC library with a 3-clause BSD license,
with the explicit permission of Sun Microsystems in 2009"
ntxec, kobo: add reboot and power off support
Use the embedded controller (ntxec) to reset and power off the Kobo.
Write a single byte to the reset register. Writing two bytes resets
the system but reports a spurious I2C error.
Wait 5 seconds after requesting power off, since the EC takes some
time to cut the power.
Tested on Kobo Glo: reboot restarts from U-Boot and poweroff turns the
power off, both without warnings. Built KOBO.
ntxec: make RTC read and write robust
Order the RTC register reads and writes so that a carry from seconds
into minutes, hours and so on during the access is handled.
Tested on Kobo Glo: the time is read correctly at boot, and a time set
with date(1) is kept across a power cycle. Built KOBO.
imxuart: fix IMXUART_RBUF_SPACE
It computed the free space in the receive ring buffer incorrectly.
With one character left in the buffer, the receive interrupt handler
read nothing from the FIFO and disabled receive interrupts until the
soft interrupt drained the buffer. When the buffer was more than half
full, it could overwrite data that had not been read yet.
Tested on Kobo Glo: boots to the login prompt. Built KOBO,
NETWALKER, and GENERIC.
kobo: Fix detection of the non-removable SD card.
The SD card was not recognized as a non-removable card.
Tested: KOBO and NETWALKER kernels build with no warnings.
On a Kobo Glo (N613), ld0 did not attach before this change. With
this change, "ld0 at sdmmc0" appears and the card is read in 4-bit
mode at 50 MHz. NETWALKER is build-tested only.
Add ntxec, a driver for the Netronix MSP430 EC.
This fixes the problem that the system stops after about 13 seconds.
imx51reg.h: The value of I2C3_BASE was incorrect.
Tested: KOBO and NETWALKER kernels build with no warnings.
On a Kobo Glo (N613), imxi2c2 attaches at 0x53fec000 and
"ntxec0 at iic2 addr 0x43: PMIC/RTC VER 0xC851" is printed.
Before this change, the system stopped about 13 seconds after
power-on. With this change, the console still responds 100 seconds
after power-on. The RTC is not tested. NETWALKER is build-tested
only.
aarch64: Eliminate LX_BLKPAG_OS_{READ,WRITE,RWMASK}.
- They are no longer used except for debugging purposes
in pmap.c r1.127. LX_BLKPAG_OS_0 will be used to distinguish
stage1/stage2 flag of pte.
- improve comment about RW permission and referenced/modified bit.
Taken from Ryo's github repo
https://github.com/ryo/netbsd-src/tree/wip/aarch64_el2
imx51: Fix boot failure on i.MX50.
imx51_intr.h: PIC_MAXMAXSOURCES, the limit on PIC interrupt sources,
was too small for the six GPIO banks of i.MX50.
imx51_gpio.c: The bank numbers of GPIO5 and GPIO6 were computed
incorrectly.
Tested: KOBO and NETWALKER kernels build with no warnings.
On a Kobo Glo (N613), the kernel panicked at imxgpio4 before this
change. With this change, imxgpio0-5 attach and the boot reaches
root device selection. NETWALKER is build-tested only.
yp_unbind(3): Avoid null pointer deref after a yp operation.
Not a thread-safety issue -- this happens deterministically in a
single-threaded program if you do, e.g.:
yp_bind(domain);
yp_all(domain, ...);
yp_unbind(domain);
PR lib/61064: libc dumps core because yp nis not thread safe
libc/yp: Paranoia: avoid arithmetic overflow in allocation sizing.
Not sure if these paths are possible to hit, but let's make sure they
don't lead to disaster downstream.
Followup prompted by:
PR lib/61064: libc dumps core because yp nis not thread safe