Date: Mon, 15 Aug 2005 18:54:25 +0200 From: Miguel Mendez <flynn@energyhq.es.eu.org> To: Roland Smith <rsmith@xs4all.nl> Cc: freebsd-amd64@freebsd.org Subject: Re: 32bit Linux dri apps on FreeBSD/amd64? Message-ID: <20050815185425.5740ac11.flynn@energyhq.es.eu.org> In-Reply-To: <20050814114844.GA58288@slackbox.xs4all.nl> References: <20050814113127.7d69af2b.flynn@energyhq.es.eu.org> <20050814114844.GA58288@slackbox.xs4all.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 14 Aug 2005 13:48:44 +0200 Roland Smith <rsmith@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 :) Cheers, -- Miguel Mendez <flynn@energyhq.es.eu.org> http://www.energyhq.es.eu.org PGP Key: 0xDC8514F1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050815185425.5740ac11.flynn>