freebsd-dev/sys/tools
Michal Meloun 95a85c125d Add NetBSD compatible bus_space_peek_N() and bus_space_poke_N() functions.
One problem with the bus_space_read_N() and bus_space_write_N() family of
functions is that they provide no protection against exceptions which can
occur when no physical hardware or device responds to the read or write
cycles. In such a situation, the system typically would panic due to a
kernel-mode bus error. The bus_space_peek_N() and bus_space_poke_N() family
of functions provide a mechanism to handle these exceptions gracefully
without the risk of crashing the system.

Typical example is access to PCI(e) configuration space in bus enumeration
function on badly implemented PCI(e) root complexes (RK3399 or Neoverse
N1 N1SDP and/or access to PCI(e) register when device is in deep sleep state.

This commit adds a real implementation for arm64 only. The remaining
architectures have bus_space_peek()/bus_space_poke() emulated by using
bus_space_read()/bus_space_write() (without exception handling).

MFC after:	1 month
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D25371
2020-09-19 11:06:41 +00:00
..
fdt make_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH 2018-12-14 23:53:28 +00:00
sound sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
acpi_quirks2h.awk sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
bus_macro.sh Add NetBSD compatible bus_space_peek_N() and bus_space_poke_N() functions. 2020-09-19 11:06:41 +00:00
embed_mfs.sh embed_mfs.sh: replace some compound statements with conventional ifs 2018-11-02 21:07:06 +00:00
fw_stub.awk fw_stub.awk: use @generated tag in generated files 2019-09-11 13:35:22 +00:00
makeobjops.awk Add a 'SINGLETON' directive to kobj interface definition 2020-01-18 02:39:38 +00:00
makesyscalls.lua makesyscalls.lua: improve syscall ordering validation 2020-08-04 21:49:13 +00:00
miidevs2h.awk sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
pccarddevs2h.awk sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
sdiodevs2h.awk Add SDIO support. 2019-06-08 16:26:56 +00:00
usbdevs2h.awk Avoid using \$. It's an unknown escape sequence. Some awks warn about 2018-01-28 05:13:08 +00:00
vnode_if.awk vfs: inline vops if there are no pre/post associated calls 2020-07-30 15:50:51 +00:00