[RFC] xserver: use LRMI for real-mode calls (v2)

Adam Jackson ajax at nwnk.net
Mon Nov 30 14:09:37 PST 2009


On Fri, 2009-11-27 at 21:54 +0200, Tiago Vignatti wrote:

>     git://people.freedesktop.org/~vignatti/xserver libx86-take2

 41 files changed, 314 insertions(+), 27161 deletions(-)

That just warms my heart.  xf86int10.c is also all of 303 lines now!
Well done.

> 1. vm86 code on libx86 is slightly different from the one we current have on
>   the server.
> 
>   I found several implementations on the web (some old kdrive, our current
>   Xorg, coreboot, libx86, etc) and I'm not sure which is more desireble for
>   us. For instance, libx86's has support for {Free, Net, Open}BSD and Xorg's
>   not. On the other hand, we could simply forget forever vm86 backend, given
>   x86emu encompass it - ajax has hard arguments to simply remove vm86 either.

We could reasonably add vm86 support for more platforms to libx86, but
the emulator should be the default.

> 2. right now lrmi doesn't let us to pass different functions to the x86
>   emulator.
> 
>   If you need specialised functions to handle access to different types of
>   memory, then you would need to pass them. That's a feature that we had on
>   the internal int10 code but no driver was using. Given I'm lazy to change
>   lrmi, so I vote to not bother with this now.

Yeah, I'm hard pressed to care.

Assorted notes:

- pci_device_read_rom() almost certainly does not need the vgaarb lock.
I suppose it _might_ if it's trying to grab the rom from 0xc0000, but
that should really be handled internal to libpciaccess if true.

- xf86Int10{Alloc,Free}Pages should probably be calls to
LRMI_{alloc,free}_real() instead, except...

- LRMI_init() still doesn't take a device argument, so it's not clear
what LRMI context you're in.

- xf86InitInt10() can not possibly work when more than two non-primary
cards do int10, because the second mmap(MAP_FIXED) at 0xc0000 will fail.
All of which you just would not have to do if LRMI_init() took a device
argument, because then _it_ would be responsible for map setup.

- This is probably not directly your fault, but x86emu_do_int() in
libx86 looks much stupider than int_handler() in old int10.  I suspect
at least the int1A handler should be ported over.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.x.org/archives/xorg-devel/attachments/20091130/c2562203/attachment.pgp 


More information about the xorg-devel mailing list