Subject: Re: Fwd: drm on amd64 (drmMap failed)
To: Jared D. McNeill <jmcneill@invisible.ca>
From: Xning Lee <xning@soforge.com>
List: tech-kern
Date: 04/06/2007 23:52:55
"Jared D. McNeill" <jmcneill@invisible.ca> writes:

> Heyas folks --
>
> I don't have any UVM experience, so I ask -- is there any reason to
> not make the change outlined below?
>
> Cheers,
> Jared
>
> Begin forwarded message:
>
>> From: Xning Lee <xning@soforge.com>
>> Date: April 5, 2007 9:08:13 AM EDT (CA)
>> To: "Blair Sadewitz" <blair.sadewitz@gmail.com>
>> Cc: port-amd64@netbsd.org,  tech-x11@netbsd.org
>> Subject: Re: drm on amd64 (drmMap failed)
>>
>> "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 4GB: (the type of 'voff_t' is int64)
                ^^^^^^^^^^^^^
correct: more than 0x7fffffffffffffff

>>
>> struct uvm_object *
>> udv_attach(void *arg, vm_prot_t accessprot,
>>     voff_t off,	        /* used only for access check */
>>     vsize_t size	/* used only for access check */)
>> {
>>         ...
>>
>> 	if (off < 0)
>> 		return(NULL);
>>         ...
>> }
>>
>> When I changed the type of parameter 'off' from 'voff_t' to
>> 'vsize_t'(u_long), 'drm on amd64' can work now.
>>
>