Try this diff on sys/arch/amd64/amd64/machdep.c, diffed against the
4.6 release version (I believe you would be using an amd64 kernel).

--- machdep.c.orig      Mon Nov 23 09:18:11 2009
+++ machdep.c   Wed Nov 18 22:47:15 2009
@@ -1731,6 +1731,9 @@

        /* Memory is otherwise reserved */
        for (bmp = bios_memmap; bmp->type != BIOS_MAP_END; bmp++) {
+               if (bmp->addr + bmp->size >= physmem)
+                       break;
+
                if (addr > bmp->addr && addr < (bmp->addr + bmp->size) &&
                        bmp->type != BIOS_MAP_FREE)
                        return 1;


The in-memory copy of the BIOS memory map seems to yield addresses
that extend past the end of physical memory -- it seems the check for
BIOS_MAP_END is insufficient -- and thus yields strange values; X
wants to mmap an address and amd64_pa_used says it can't because it's
reserved, when it in fact isn't.

This is only really a workaround patch, I don't have the time and
resources yet to verify whether there's a bug in the code that
retrieves the BIOS memory map, or whether the BIOS is being iffy in
giving us the memory map, but it has solved the "Cannot map MMIO
range" problem I had earlier with my x200.

Thanks,
Dana

On Thu, Aug 13, 2009 at 6:58 PM, Didier Wiroth <[email protected]> wrote:
> Hello,
> Thanks a lot, but this is not the problem, dual-graphics is disabled.
>
> Here are the settings I'm using in the bios, under CONFIG - DISPLAY:
> Default Primary Video Device: Internal (alternative is PCI-Express)
> Boot Display Device: ThinkPad LCD (alternative is Analog VGA)
> Graphics Device: Integrated Graphics = intel (alternatives are 1.
> "Discrete Graphics" = ati radeon, 2. "Switchable Mode")
> OS Detection for Switchable Graphics: Disabled (alternative is "Enabled")
>
> Using the ati radeon card crashes too, here is a snip of the output:
> (II) Setting vga for screen 0.
> (II) RADEON(0): MMIO registers at 0x00000000cfff0000: size 64KB
> (EE) RADEON(0): Unable to map MMIO aperture. Invalid argument (22)
> (EE) RADEON(0): Memory map the MMIO region failed
> (II) UnloadModule: "radeon"
> (EE) Screen(s) found, but none have a usable configuration.
>
> Any help is greatly appreciated!
>
> Kind regards,
> Didier
>
>
> 2009/8/12 STeve Andre' <[email protected]>:
>> On Wednesday 12 August 2009 17:33:57 Didier Wiroth wrote:
>>> Hello,
>>>
>>> I'm not able to run x on a thinkpad w500 (model 4063-34g), B I don't
>>> use any custom xorg.conf.
>>> below is my dmesg and xorg.log
>>>
>>>
>>> thanks for your help!
>>> didier
>>
>> I don't have time to go digging now, but I have a W500 as well and am very
>> happy with it and its happy with OpenBSD.
>>
>> There are two video cards, and I'm using the Radeon 3650. B I remember
>> having to tell the bios to just use that video device, else it would switch
>> back to the Intel video.
>>
>> Do that, and I think you'll be OK. B But I haven't read your dmesg data
>> and hopefully do you not have a different species of w500.
>>
>> -STeve Andre'
>>
>
>
>
> --
> - -
> Didier Wiroth

Reply via email to