xfree86 & linux: xf86EnableIO / hwEnableIO still needed ?

Enrico Weigelt, metux IT consult lkml at metux.net
Tue Mar 12 21:05:18 UTC 2024


Hello folks,

I'm currently trying to understand whether xf86EnableIO / hwEnableIO()
on Linux (hw/xfree86/os-support/linux/lnx_video.c) is still needed.

Still struggling with clearly understanding what it's /actually/
supposed to mean - even what's the exact definition of "IO" here.

On PPC, it just checks whether it can mmap() a piece of /dev/mem, but
not doing anything else (it's retval is stored in xorgHWAccess ...
strange: vmmouse driver calls xf86EnableIO() if xorgHWAccess==0 and
then unconditionally sets it to one - is that really correct ?)

On a bunch of other archs (i386, x86-64, ia64, alpha) it calls ioperm()
in order to enable IO ports. On alpha, it has another special logic
looking for the IO port ranges of keyboard and timer (from
/proc/ioports) and calls ioperm() on these ranges, too.

Haven't looked at on other OS'es yet ...


That's raising a bunch of questions:

Are semantics of xf86EnableIO() really portable or does caller need
extra knowledge what it means in specific context (OS, arch, ...) ?

Do we stil need that special logic for keyboard IO - more precisely
should even try to directly access some specific keyboard device
directly, while Linux already has generic subsys for that ?
Is this really still used ? Does that even still work ?

Do we even need that ioperm() calls at all ? And if so, wouldn't it
be better off in individual drivers ?


thanks,
--mtx


--
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info at metux.net -- +49-151-27565287


More information about the xorg-devel mailing list