Commit Graph

18 Commits

Author SHA1 Message Date
Andrew Turner
2abd4f8581 Add a way to map arm64 non-posted device memory
On arm64 we currently use a non-posted write for device memory, however
we should move to use posted writes. This is expected to work on most
hardware, however we will need to support a non-posted option for some
broken hardware.

Reviewed by:	imp, manu, bcr (manpage)
Differential Revision:	https://reviews.freebsd.org/D29722
2021-05-01 06:01:20 +00:00
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
Warner Losh
a339dcccb0 Regularize copyright notices for me.
Remove stray All Rights Reserved and other non-license stuff. Make sure all
copyrights have year.
2019-12-03 15:48:28 +00:00
Warner Losh
8590b14e9d Remove a few stray "All Rights Reserved." declarations on stuff I've
written.
2019-02-05 21:28:29 +00:00
Warner Losh
86d99b6884 Remove EISA bus support for add-in cards. Remove related kernel and
compile options. Remove doxygen pointers to now deleted files. Remove
EISA and VME as examples in bus_space.9.

Retained EISA mode code for IO PIC and MPTABLES because that's not
EISA bus, per se, and some people have abused EISA to mean "EISA-like
behavior as opposed to ISA" rather than using it for EISA add-in
cards.

Relnotes: yes
2017-02-16 21:57:35 +00:00
Conrad Meyer
db4fcadf52 "Buses" is the preferred plural of "bus"
Replace archaic "busses" with modern form "buses."

Intentionally excluded:
* Old/random drivers I didn't recognize
  * Old hardware in general
* Use of "busses" in code as identifiers

No functional change.

http://grammarist.com/spelling/buses-busses/

PR:		216099
Reported by:	bltsrc at mail.ru
Sponsored by:	Dell EMC Isilon
2017-01-15 17:54:01 +00:00
Ed Maste
0fcefb433d Update NetBSD Foundation copyrights to 2-clause BSD
The NetBSD Foundation states "Third parties are encouraged to change the
license on any files which have a 4-clause license contributed to the
NetBSD Foundation to a 2-clause license."

This change removes clauses 3 and 4 from copyright / license blocks that
list The NetBSD Foundation as the only copyright holder.

Sponsored by:	The FreeBSD Foundation
2014-03-18 01:40:25 +00:00
Glen Barber
73bbeaa529 Typo and mdoc(7) style fixes.
PR:		168117
Submitted by:	Nobuyuki Koganemaru (kogane&jp!freebsd!org)
MFC after:	3 days
2012-05-20 16:43:47 +00:00
Glen Barber
437f059811 Fix an mdoc(7) nit. 2012-05-12 20:06:17 +00:00
Ed Schouten
6b99842ada Globally replace u_int*_t from (non-contributed) man pages.
The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.

I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.

MFC after:	1 month
2012-02-12 18:29:56 +00:00
Rebecca Cran
01688065e7 Document the fact that passing in a count of zero to the bus_space functions
will result in undefined behaviour.
Taken from NetBSD's bus_space(9).
2010-12-03 18:30:55 +00:00
Rebecca Cran
c90f7d9b44 Revert r216134. This checkin broke platforms where bus_space are macros:
they need to be a single statement, and do { } while (0) doesn't work in this
situation so revert until a solution can be devised.
2010-12-03 07:09:23 +00:00
Rebecca Cran
15b4888a24 Disallow passing in a count of zero bytes to the bus_space(9) functions.
Passing a count of zero on i386 and amd64 for [I386|AMD64]_BUS_SPACE_MEM
causes a crash/hang since the 'loop' instruction decrements the counter
before checking if it's zero.

PR:	kern/80980
Discussed with:	jhb
2010-12-02 22:19:30 +00:00
Robert Watson
226bb60e94 Minor spelling/grammer fixes.
MFC after:	3 days
2008-03-07 17:02:34 +00:00
Ruslan Ermilov
a3a57e81b3 Correct the list of bus_space_*_stream_[1248] functions in the
STREAM FUNCTIONS section:

- Really list only and all *_stream_* functions.
- Don't list their arguments (it's pointless).
2006-09-18 14:31:03 +00:00
John-Mark Gurney
af3b868186 document the various bus_space_*_stream_? functions... 2006-04-22 03:58:41 +00:00
Ruslan Ermilov
05c89c23e9 Overhaul the markup.
OK'ed by:	imp
Approved by:	re (blanket)
2005-06-25 08:59:05 +00:00
Warner Losh
751c35718a Don a flack jacket and start to document the FreeBSD bus_space
implementation.  I took the NetBSD man page, and hacked it to, I hope,
to reflect the preliminary version of the bus space that Justin Gibbs
committed as part of the CAM integration in FreeBSD 3.0.

This isn't perfect, but it is better than we have now (which is, ahem,
nothing).  Please coordinate changes to the file through me through
the 6.0 release.

Approved by: re (blanket for this one file)
2005-06-14 03:40:01 +00:00