32bit Linux dri apps on FreeBSD/amd64?
flynn at energyhq.es.eu.org
Mon Aug 15 16:54:36 GMT 2005
On Sun, 14 Aug 2005 13:48:44 +0200
Roland Smith <rsmith at xs4all.nl> wrote:
Thanks Markus and Roland for the interesting info. I wanted to rule out
the 'pilot error' case before starting to read code. I'm going to keep
running the amd64 version of the operating system but nevertheless this
problem is pretty interesting.
> 0xc0000000 = copy parameters in and out
> 0x00080000 = argument length <<16
> 0x00006400 = ioctl group <<8
> 0x00000001 = ioctl number 0x01 = DRM_IOCTL_GET_UNIQUE
> The definition of getunique is:
> int DRM(getunique)( DRM_IOCTL_ARGS )
[...] code snippet
> } drm_unique_t;
> On amd64, both size_t and char* are 8 bytes. So sizeof(drm_unique_t) is
> 16 bytes on amd64.
> To fix this, the drm driver would have to know if ioctls were being made
> by a 32-bit program, and adjust the parameter size tests accordingly. I
> do not know if that is possible.
Besides the work the DRI people are doing I wonder if it could be
possible to write some sort of 'proxy' that would sit between linux_dri and
the kernel's drm module, doing the necessary translations. Considering
that Linux apps try to open /compat/linux/dev first it might actually
be doable. I'll have to investigate that. In the meantime I'll play
bzflag and crack-attack, both excellent games btw :)
Miguel Mendez <flynn at energyhq.es.eu.org>
PGP Key: 0xDC8514F1
More information about the freebsd-amd64