Subject: Re: drm on amd64 (drmMap failed)
To: Matt Thomas <matt@3am-software.com>
From: Xning Lee <xning@soforge.com>
List: tech-x11
Date: 04/06/2007 14:17:23
Matt Thomas <matt@3am-software.com> writes:
> Xning Lee wrote:
>> "Blair Sadewitz" <blair.sadewitz@gmail.com> writes:
>>
>>> This is exactly the same problem I had on amd64; I've since switched
>>> to i386 (for reasons other than drm; linux compatability on amd64 for
>>> EMT64 processors is broken). Could you file a PR for this, please?
>>>
>>> Thanks,
>>>
>>
>> The issue of 'drmMap failed' on amd64 because the function
>> 'udv_attach' of /usr/src/sys/uvm/uvm_device.c can't accept address
>> offset value more than 0x7fffffffffffffff: (the type of 'voff_t' is int64)
>
> This is going to be, ultimately, a sign extension problem. I'm guessing
> that line 176 in drm_ioctl.c would show that the address being passed in
> has already been sign-extended.
>
that because at line 190 in drm_bufs.c, the address
value('map->handle') that retured by 'malloc' has been more than
0x7fffffffffffffff, then at line 197 in drm_bufs.c:
map->offset = (unsigned long)map->handle;