<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-openbsd/sys/dev/fdt, branch master</title>
<subtitle>WireGuard implementation for the OpenBSD kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-openbsd/atom/sys/dev/fdt?h=master</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-openbsd/atom/sys/dev/fdt?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/'/>
<updated>2021-04-01T12:06:00Z</updated>
<entry>
<title>Clean up nonexistent/unused properties handling</title>
<updated>2021-04-01T12:06:00Z</updated>
<author>
<name>kn</name>
<email>kn@openbsd.org</email>
</author>
<published>2021-04-01T12:06:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=e3984b72ded6257b54cce4c5ab9b83e0cc80fcf9'/>
<id>urn:sha1:e3984b72ded6257b54cce4c5ab9b83e0cc80fcf9</id>
<content type='text'>
Never used since import and probably just ported over from NetBSD as-is;
"design-capacity" does not exist in the device tree binding.
"monitor-interval-ms" defaults to 250ms as per binding and could be used
in the sensor_task_register() call, but our framework only supports whole
seconds and there's no advantage over our current fixed poll interval of 5s.

OK patrick
</content>
</entry>
<entry>
<title>Hardcode meaningful alert level, track apm's battery state better</title>
<updated>2021-04-01T10:34:21Z</updated>
<author>
<name>kn</name>
<email>kn@openbsd.org</email>
</author>
<published>2021-04-01T10:34:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=8706e35857510b21082a2e044b430d55f3cca478'/>
<id>urn:sha1:8706e35857510b21082a2e044b430d55f3cca478</id>
<content type='text'>
The current code looks for the nonexistent "cellwise,alert-level" property
and falls back to zero as threshold (like the original NetBSD code).
It also updates the CONFIG register with that very threshold to let the
hardware set a bit and thus alert us when it has been reached.

Since our sensor framework is designed to poll every N seconds and this
driver does not actually look at whether the hardware alerted, neither
using a default threshold of zero nor updating the hardware with it makes
sense.

Remove the alert level code and simply map &gt;50%, &gt;25% and &lt;=25% of
remaining battery life to apm(4)'s "high", "low" and "critical" battery
state respectively;  this matches exactly what acpibat(4) does and provides
more meaningful sensor readings without relying on nonexistent device tree
bindings.

Feedback OK patrick
</content>
</entry>
<entry>
<title>Flag sensors as invalid on bogus reads</title>
<updated>2021-03-26T22:54:41Z</updated>
<author>
<name>kn</name>
<email>kn@openbsd.org</email>
</author>
<published>2021-03-26T22:54:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=4b78f41ac76a6cabd33b927b0f8faedb21c7197f'/>
<id>urn:sha1:4b78f41ac76a6cabd33b927b0f8faedb21c7197f</id>
<content type='text'>
Follow-up to the previous commit:

This driver continues to report stale hw.sensors values when reading
them fails, which can easily be observed on a Pinebook Pro after
plugging in the AC cable, causing the hw.sensors.cwfg0.raw0 (battery
remaining minutes) value to jump considerably one or two times before
stalling and becoming incoherent with the rest.

Flag sensors invalid upfront in apm's fashion and mark them OK iff they
yield valid values;   this is what other drivers such as rktemp(4) do,
but the consequence/intention of SENSOR_FINVALID is sysctl(8) and systat(8)
skipping such sensors (until AC gets plugged off again).

OK patrick
</content>
</entry>
<entry>
<title>Provide apm(4/arm64) with battery information</title>
<updated>2021-03-25T12:18:27Z</updated>
<author>
<name>kn</name>
<email>kn@openbsd.org</email>
</author>
<published>2021-03-25T12:18:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=8de5ec0a5e056d7e00e6507516ae0f40330eb178'/>
<id>urn:sha1:8de5ec0a5e056d7e00e6507516ae0f40330eb178</id>
<content type='text'>
apm merely provides an all zero/unknown stub for those values, e.g. apm(8)
output is useless.

Hardware sensors however provide this information:

hw.sensors.cwfg0.volt0=3.76 VDC (battery voltage)
hw.sensors.cwfg0.raw0=259 (battery remaining minutes)
hw.sensors.cwfg0.percent0=58.00% (battery percent)

Make cwfg(4) copy those over using apm_setinfohook() for apm to show it:

Battery state: high, 58% remaining, 259 minutes life estimate
A/C adapter state: not known
Performance adjustment mode: auto (408 MHz)

In cwfg's update routine, to keep values coherent, always reset them to
zero/unknown and only set those that came from a valid reading.

Input OK jca
</content>
</entry>
<entry>
<title>Load MSI pages through bus_dma(9).  Our interrupt controllers for MSIs</title>
<updated>2021-03-22T20:30:21Z</updated>
<author>
<name>patrick</name>
<email>patrick@openbsd.org</email>
</author>
<published>2021-03-22T20:30:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=cc0ede0677b0110958241fb25b9e05031b91a387'/>
<id>urn:sha1:cc0ede0677b0110958241fb25b9e05031b91a387</id>
<content type='text'>
typically pass the physical address, however retrieved, to our PCIe
controller code.  This physical address can in practise be directly
given to the PCIe, but it is not a given that the CPU and the PCIe
controller are able to use the same physical addresses.

This is even more obvious with an smmu(4) inbetween, which can change
the world view by introducing I/O virtual addresses.  Hence for this
it is indeed necessary to map those pages, which thanks to integration
with bus_dma(9) works easily.

For this we remember the PCI devices' DMA tag in the interrupt handle
during the MSI map, so that we can use the smmu(4)-hooked DMA tag to
load the physical address.

While some systems might prefer to implement "trapping" pages for MSIs,
to make sure devices cannot trigger other devices' interrupts, we only
make sure the whole page is mapped.

Having the IOMMU create a mapping for each MSI is a bit wasteful, but
for now it's the simplest way to implement it.

Discussed with and ok kettenis@
</content>
</entry>
<entry>
<title>Update device-tree bindings</title>
<updated>2021-03-22T18:37:26Z</updated>
<author>
<name>kn</name>
<email>kn@openbsd.org</email>
</author>
<published>2021-03-22T18:37:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=f58f2541ac97ff106a94656ea5315f23f64eea5e'/>
<id>urn:sha1:f58f2541ac97ff106a94656ea5315f23f64eea5e</id>
<content type='text'>
Using the DTB from our dtb package this driver no longer attaches
(on a Pinebook Pro)due to renamed bindings:
https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/power/supply/cw2015_battery.yaml

Thanks to kettenis and patrick for pointing this out.

Follow upstream's rename and acccount for the monitor interval now being
milliseconds not seconds anymore.

This makes cwfg(4) export values under hw.sensors as expected when using
/usr/local/share/dtb/arm64/rockchip/rk3399-pinebook-pro.dtb .

Input patrick kettenis
OK kettenis
</content>
</entry>
<entry>
<title>Advertise 30-bit color support.</title>
<updated>2021-03-13T14:02:02Z</updated>
<author>
<name>kettenis</name>
<email>kettenis@openbsd.org</email>
</author>
<published>2021-03-13T14:02:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=5e550f1845bcef33653438d2985ccda82f2f48c9'/>
<id>urn:sha1:5e550f1845bcef33653438d2985ccda82f2f48c9</id>
<content type='text'>
ok matthieu@, jsg@
</content>
</entry>
<entry>
<title>Make sure to skip attaching disabled I2C devices.  This can happen on</title>
<updated>2021-03-11T09:15:25Z</updated>
<author>
<name>patrick</name>
<email>patrick@openbsd.org</email>
</author>
<published>2021-03-11T09:15:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=c1762c82da9178fd3dbb9673d7b4a6a76a5da816'/>
<id>urn:sha1:c1762c82da9178fd3dbb9673d7b4a6a76a5da816</id>
<content type='text'>
hardware which include a common parent block in their device trees and
only enable the components that were actually implemented, as seen on
e.g. the NanoPi R4S.
</content>
</entry>
<entry>
<title>Make sure to skip attaching disabled I2C devices.  This can happen on</title>
<updated>2021-03-11T08:55:59Z</updated>
<author>
<name>patrick</name>
<email>patrick@openbsd.org</email>
</author>
<published>2021-03-11T08:55:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=69575cce025f4fd12957b33fe8eed59c4ad7f5f2'/>
<id>urn:sha1:69575cce025f4fd12957b33fe8eed59c4ad7f5f2</id>
<content type='text'>
hardware which include a common parent block in their device trees and
only enable the components that were actually implemented, as seen on
e.g. the NanoPi R4S.

ok kettenis@
</content>
</entry>
<entry>
<title>Add support for 30-bit color modes.</title>
<updated>2021-03-09T19:02:44Z</updated>
<author>
<name>kettenis</name>
<email>kettenis@openbsd.org</email>
</author>
<published>2021-03-09T19:02:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=0af672a9c39a88f9bba1bede430126d1bff42acb'/>
<id>urn:sha1:0af672a9c39a88f9bba1bede430126d1bff42acb</id>
<content type='text'>
</content>
</entry>
</feed>
