Kprof rounded the pc to 8 byte boundaries in order to save memory.
With x86 instruction rounding this can lead to some pretty misleading
results.
With the old rounding kpdata was ~680kb for a pc64 kernel, with this
change we use ~5.4M (8x) and considering we only allocate when we
first attach this seems reasonable.
We used to rely on there being a draw(3) there in order to render the
characters in to, this resulted in flashing the rio window white and
made some documents only buildable under a terminal environment. This
fixes both of those issues.
Subfonts for non ascii characters are offset by some minimum rune,
typically specified within the parent font file. Because libmemdraw
only deals in subfonts, if we want to have it draw non ascii runes we
need some method of providing that base offset.
This function is only used in one place, so update the function
signature and fix the only caller.
cgnarne experienced issues with his xbox controller when
connected to uhci root-port.
doing some experiments, we determined that the delay
between clearing reset and setting enable needed to
be between 5µs and 2.7ms for it to attach successfully.
this timing is close to the 3ms idle time that makes
devices enter suspend mode, so we concluded that the
delay here must be shortend (50ms -> 2ms).
Because isv4() is never true for IPnoaddr,
we can skip the check.
Make validipmask() ensure that the top IPv4off
bytes are all 0xff, then check that the low
4 bytes are a valid mask (must be a power
of two minus one).
This makes the output of git/diff -s plumbable
when the user is not within the root of the git repo.
This is implemented through adding a flag to git/walk
and having git/walk work out how many '..'s are needed.
Also includes a small piece of documentation regarding
the use of $editor in git/commit.
When looking up tftp/bootp information from ndb,
filter out ipv6 addresses. This can happen
when for example the tftp= attribute points to
a domain or sys-name that resolves to both
ipv4 and ipv6 addresses.
Make validip() do the isv4() check, and provide
separate validipmask() function.
preserve the Prtpwr bit in portstatus instead of
unconditionally setting it.
turn off port powert on init. (let usbd will turn it on).
make chanio() halt the channel and error out
when interrupt status is 0 after timout.
this happens when the port is powered off.
Preserve reserved "RsvdP" bits in registers
according to 2019 xhci specification 1.2.
Print the USBSTS register and event-ring stopped flag
on recovery.
Add the controller base address in prints,
so it can be identified what errors belong
to what controller.
Make reset delays more conservative:
The usb spec says root ports need 50ms reset minimum, use 100ms.
The usb spec says hub ports need 20ms minimum, use 50ms.
We used to always provide soa and ns hints when
we where not authoritative.
This changed with the last commit, where we
would instead return refused error.
But this breaks when we want to explicitely
delegate to another nameserver, so add parameter
to inmyarea() to get the delegated soa out,
and provide delegated nameservers when we have one.
the code for skipping directory loops in
walk was taken from du, but the desired
behavior for the two programs is differnt;
while du wants to count the total size used,
and double-counting directories would be a
mistake, walk wants to enumerate all finite
paths in a namespace.
maintaining ->nsub was fragile, and didn't save very many cycles;
instead just compute it every time; it's only going to hurt with
a ton of giant threads.