Hi,

Thank you for your test and feedback.

On Fri, 6 Mar 2020 16:38:24 -0600
Andrew Daugherity <andrew.daugher...@gmail.com> wrote:
> On Sun, Mar 1, 2020 at 10:41 PM YASUOKA Masahiko <yasu...@openbsd.org> wrote:
>>
>> Hi,
>>
>> The problems you are pointing seem to be the same problem.
>>
>> > I'll try to test this diff next week if I can schedule some downtime.
>>
>> Test is appreciated.
>>
>> Also I'd like to know the result of
>>
>>   hexdump -C /var/db/acpi/FACP.1
>>
>> when "Load Legacy Video Option ROM" setting is disabled.
> 
> I just tested a -current kernel built yesterday with that diff (your
> post on Feb. 20), but unfortunately it does not fix the issue on my
> hardware.  As before, if "Load Legacy Video Option ROM" is disabled,
> output is squished to a purple line and when devices are initialized,
> vga1 is the wsdisplay0 device:

I see, first diff didn't fix the problem on your machine.

> vga1 at pci7 dev 0 function 0 "Matrox MGA G200eR" rev 0x01
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> efifb0 at mainbus0: 1280x1024, 32bpp
> wsdisplay at efifb0 not configured
> 
> vs. with the legacy video ROM setting:
> 
> "Matrox MGA G200eR" rev 0x01 at pci7 dev 0 function 0 not configured
> efifb0 at mainbus0: 1024x768, 32bpp
> wsdisplay0 at efifb0 mux 1
> wsdisplay0: screen 0-5 added (std, vt100 emulation)
> 
> I'm using a serial console, if it matters.  Hmm... I just noticed that
> with the legacy ROM setting disabled, both wsdisplay0 at vga1 mux
> 1/wskbd0 at ukbd0 *and* com1 claim to be the console.  With the
> setting enabled (and efifb working), only com1 is listed as console.
> 
> I haven't tried any of the later diffs as I'm not sure which are still
> recommended.

The last diff should fix the problem since it will initialize efifb
before initializing VGA without condition.

https://marc.info/?l=openbsd-tech&m=158280719421562&w=2

> The FACP.1 table does not change when the "Load Legacy Video Option
> ROM" setting is changed.  Here is its hexdump:
> andrew@gsc-lb1:~/acpidump$ hexdump -C legacy-2.8.1/FACP.1
> 00000000  46 41 43 50 0c 01 00 00  05 62 44 45 4c 4c 20 20  |FACP.....bDELL  |
> 00000010  50 45 5f 53 43 33 20 20  00 00 00 00 44 45 4c 4c  |PE_SC3  ....DELL|
> 00000020  01 00 00 00 00 30 f8 8e  00 b0 fc 8e 00 04 09 00  |.....0..........|
> 00000030  b2 00 00 00 f0 f1 f2 00  00 18 00 00 00 00 00 00  |................|
> 00000040  04 18 00 00 00 00 00 00  50 18 00 00 08 18 00 00  |........P.......|
> 00000050  80 18 00 00 00 00 00 00  04 02 01 04 20 00 10 00  |............ ...|
> 00000060  65 00 e9 03 00 00 00 00  01 03 0d 00 32 11 00 00  |e...........2...|
> 00000070  a5 86 00 00 01 08 00 01  f9 0c 00 00 00 00 00 00  |................|
> 00000080  06 00 00 00 00 00 00 00  00 00 00 00 00 b0 fc 8e  |................|
> 00000090  00 00 00 00 01 20 00 02  00 18 00 00 00 00 00 00  |..... ..........|
> 000000a0  01 00 00 02 00 00 00 00  00 00 00 00 01 10 00 02  |................|
> 000000b0  04 18 00 00 00 00 00 00  01 00 00 02 00 00 00 00  |................|
> 000000c0  00 00 00 00 01 08 00 01  50 18 00 00 00 00 00 00  |........P.......|
> 000000d0  01 20 00 03 08 18 00 00  00 00 00 00 01 00 00 01  |. ..............|
> 000000e0  80 18 00 00 00 00 00 00  01 00 00 01 00 00 00 00  |................|
> 000000f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> 00000100  00 00 00 00 00 00 00 00  00 00 00 00              |............|
> 0000010c

This was to check whether using "VGA Not Present" bit is useful on
your machine.  "Boot IA-PC Boot Architecture Flags" is 0x6D:6E =
0x0011, LEGACY_DEVICES bit is set, "VGA Not Present" is cleared.  This
means the bit isn't set as I expected, it isn't useful to know
existance of VGA.

> The only ACPI change made by toggling that option is the DMAR.25
> table.  Here are both versions:
> Legacy Video ROM enabled:
> 00000000  44 4d 41 52 90 00 00 00  01 83 49 4e 54 45 4c 20  |DMAR......INTEL |
> 00000010  47 4e 4c 52 00 00 00 00  01 00 00 00 49 4e 54 4c  |GNLR........INTL|
> 00000020  01 00 00 00 26 01 00 00  00 00 00 00 00 00 00 00  |....&...........|
> 00000030  00 00 20 00 01 00 00 00  00 00 d9 fe 00 00 00 00  |.. .............|
> 00000040  03 08 00 00 02 f0 1f 00  04 08 00 00 00 00 1f 00  |................|
> 00000050  01 00 20 00 00 00 00 00  00 b0 ba 7c 00 00 00 00  |.. ........|....|
> 00000060  ff 2f bb 84 00 00 00 00  01 08 00 00 00 01 00 00  |./..............|
> 00000070  01 00 20 00 00 00 00 00  00 10 31 8e 00 00 00 00  |.. .......1.....|
> 00000080  ff 0f 33 8e 00 00 00 00  01 08 00 00 00 00 14 00  |..3.............|
> 00000090
> and disabled:
> 00000000  44 4d 41 52 90 00 00 00  01 05 49 4e 54 45 4c 20  |DMAR......INTEL |
> 00000010  47 4e 4c 52 00 00 00 00  01 00 00 00 49 4e 54 4c  |GNLR........INTL|
> 00000020  01 00 00 00 26 01 00 00  00 00 00 00 00 00 00 00  |....&...........|
> 00000030  00 00 20 00 01 00 00 00  00 00 d9 fe 00 00 00 00  |.. .............|
> 00000040  03 08 00 00 02 f0 1f 00  04 08 00 00 00 00 1f 00  |................|
> 00000050  01 00 20 00 00 00 00 00  00 c0 e9 7c 00 00 00 00  |.. ........|....|
> 00000060  ff 3f ea 84 00 00 00 00  01 08 00 00 00 01 00 00  |.?..............|
> 00000070  01 00 20 00 00 00 00 00  00 10 31 8e 00 00 00 00  |.. .......1.....|
> 00000080  ff 0f 33 8e 00 00 00 00  01 08 00 00 00 00 14 00  |..3.............|
> 00000090
> 
> I've attached full dmesgs for both legacy video ROM enabled and
> disabled.  The system is currently on 6.5, but the
> efifb/wsdisplay/etc. messages are the same in -current.  Thanks for
> trying to figure this out!
> 
> -Andrew

Reply via email to