Bus space routines
Warner Losh
imp at bsdimp.com
Tue Jun 18 19:17:18 UTC 2013
On Jun 18, 2013, at 12:50 PM, Jung-uk Kim wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 2013-06-18 06:56:15 -0400, Robert Millan wrote:
>> I think the BSD world did the right thing by introducing new
>> semantics. Plus they're also more portable (on the hardware
>> sense), have a look, e.g.:
> ...
>> So why not just use those? It seems very natural to me that if you
>> have something which is unambigous and reliable, you use this
>> instead of something else which is prone to nasty errors.
>
> bus_space(9!) is KPI and it must not be used on userland. Actually,
> it only works on X86 by pure luck, e.g., bus_space_tag_t is an
> integral type, it has very simple instructions to directly access I/O
> space, etc.
There's nothing preventing a bus_space implementation in user space. It's just that we don't have one yet, except on x86 where it works by luck.
On most architectures other than x86, however, it would likely be tricky to implement.
Warner
More information about the freebsd-arch
mailing list