Re: Display distortion while booting in native UEFI mode

2019-06-27 Thread dmitry.sensei
Workaroung on OpenBSD 6.5-current
in first booting issue machine gop then choice mode with 1024x768 and
againg machine gop 
after this enter boot

ср, 15 авг. 2018 г. в 14:03, dmitry.sensei :

> Hi Mark! Can You applicate Commit:If we keep the BIOS framebuffer, stick
> to the desired framebuffer size
> to
> efiboot?
>
> ср, 23 авг. 2017 г. в 22:26, Lukasz Jendrysik :
>
>> Would it be possible to commit this change?
>>
>> Probably there is no chance it could be included in 6.2.
>>
>>
>> On 08/19/2017 06:39 PM, Lukasz Jendrysik wrote:
>> > Hi,
>> >
>> >
>> > On 08/14/2017 03:59 PM, YASUOKA Masahiko wrote:
>> >> Please try the diff or
>> >>
>> >>   http://yasuoka.net/~yasuoka/BOOTX64.EFI
>> >>   http://yasuoka.net/~yasuoka/BOOTIA32.EFI
>> >>
>> >> ?
>> >>
>> >> Index: sys/arch/amd64/stand/efiboot/efiboot.c
>> >> ===
>> >> RCS file: /var/cvs/openbsd/src/sys/arch/amd64/stand/efiboot/efiboot.c,v
>> >> retrieving revision 1.23
>> >> diff -u -p -r1.23 efiboot.c
>> >> --- sys/arch/amd64/stand/efiboot/efiboot.c   7 Aug 2017 19:34:53
>> -   1.23
>> >> +++ sys/arch/amd64/stand/efiboot/efiboot.c   14 Aug 2017 13:52:52 -
>> >> @@ -738,6 +738,8 @@ efi_makebootargs(void)
>> >>  status = EFI_CALL(gop->QueryMode, gop, i, &sz,
>> &info);
>> >>  if (EFI_ERROR(status))
>> >>  continue;
>> >> +if (info->HorizontalResolution == 1366)
>> >> +continue;
>> >>  gopsiz = info->HorizontalResolution *
>> >>  info->VerticalResolution;
>> >>  if (gopsiz > bestsiz) {
>> >>
>> >>
>> >> --yasuoka
>> > I confirm that this diff fixes the issue.
>> >
>> > Regards,
>> > Lukasz
>> >
>>
>>
>
> --
> Dmitry Orlov
>


-- 
Dmitry Orlov


Re: Display distortion while booting in native UEFI mode

2018-08-15 Thread dmitry.sensei
Hi Mark! Can You applicate Commit:If we keep the BIOS framebuffer, stick to
the desired framebuffer size
to
efiboot?

ср, 23 авг. 2017 г. в 22:26, Lukasz Jendrysik :

> Would it be possible to commit this change?
>
> Probably there is no chance it could be included in 6.2.
>
>
> On 08/19/2017 06:39 PM, Lukasz Jendrysik wrote:
> > Hi,
> >
> >
> > On 08/14/2017 03:59 PM, YASUOKA Masahiko wrote:
> >> Please try the diff or
> >>
> >>   http://yasuoka.net/~yasuoka/BOOTX64.EFI
> >>   http://yasuoka.net/~yasuoka/BOOTIA32.EFI
> >>
> >> ?
> >>
> >> Index: sys/arch/amd64/stand/efiboot/efiboot.c
> >> ===
> >> RCS file: /var/cvs/openbsd/src/sys/arch/amd64/stand/efiboot/efiboot.c,v
> >> retrieving revision 1.23
> >> diff -u -p -r1.23 efiboot.c
> >> --- sys/arch/amd64/stand/efiboot/efiboot.c   7 Aug 2017 19:34:53 -
>  1.23
> >> +++ sys/arch/amd64/stand/efiboot/efiboot.c   14 Aug 2017 13:52:52 -
> >> @@ -738,6 +738,8 @@ efi_makebootargs(void)
> >>  status = EFI_CALL(gop->QueryMode, gop, i, &sz,
> &info);
> >>  if (EFI_ERROR(status))
> >>  continue;
> >> +if (info->HorizontalResolution == 1366)
> >> +continue;
> >>  gopsiz = info->HorizontalResolution *
> >>  info->VerticalResolution;
> >>  if (gopsiz > bestsiz) {
> >>
> >>
> >> --yasuoka
> > I confirm that this diff fixes the issue.
> >
> > Regards,
> > Lukasz
> >
>
>

-- 
Dmitry Orlov


Re: Display distortion while booting in native UEFI mode

2017-08-23 Thread Lukasz Jendrysik
Would it be possible to commit this change?

Probably there is no chance it could be included in 6.2.


On 08/19/2017 06:39 PM, Lukasz Jendrysik wrote:
> Hi,
>
>
> On 08/14/2017 03:59 PM, YASUOKA Masahiko wrote:
>> Please try the diff or
>>
>>   http://yasuoka.net/~yasuoka/BOOTX64.EFI
>>   http://yasuoka.net/~yasuoka/BOOTIA32.EFI   
>>
>> ?
>>
>> Index: sys/arch/amd64/stand/efiboot/efiboot.c
>> ===
>> RCS file: /var/cvs/openbsd/src/sys/arch/amd64/stand/efiboot/efiboot.c,v
>> retrieving revision 1.23
>> diff -u -p -r1.23 efiboot.c
>> --- sys/arch/amd64/stand/efiboot/efiboot.c   7 Aug 2017 19:34:53 -   
>> 1.23
>> +++ sys/arch/amd64/stand/efiboot/efiboot.c   14 Aug 2017 13:52:52 -
>> @@ -738,6 +738,8 @@ efi_makebootargs(void)
>>  status = EFI_CALL(gop->QueryMode, gop, i, &sz, &info);
>>  if (EFI_ERROR(status))
>>  continue;
>> +if (info->HorizontalResolution == 1366)
>> +continue;
>>  gopsiz = info->HorizontalResolution *
>>  info->VerticalResolution;
>>  if (gopsiz > bestsiz) {
>>
>>
>> --yasuoka
> I confirm that this diff fixes the issue.
>
> Regards,
> Lukasz
>



Re: Display distortion while booting in native UEFI mode

2017-08-19 Thread Lukasz Jendrysik
Hi,


On 08/14/2017 03:59 PM, YASUOKA Masahiko wrote:
> Please try the diff or
>
>   http://yasuoka.net/~yasuoka/BOOTX64.EFI 
>   http://yasuoka.net/~yasuoka/BOOTIA32.EFI
>
> ?
>
> Index: sys/arch/amd64/stand/efiboot/efiboot.c
> ===
> RCS file: /var/cvs/openbsd/src/sys/arch/amd64/stand/efiboot/efiboot.c,v
> retrieving revision 1.23
> diff -u -p -r1.23 efiboot.c
> --- sys/arch/amd64/stand/efiboot/efiboot.c7 Aug 2017 19:34:53 -   
> 1.23
> +++ sys/arch/amd64/stand/efiboot/efiboot.c14 Aug 2017 13:52:52 -
> @@ -738,6 +738,8 @@ efi_makebootargs(void)
>   status = EFI_CALL(gop->QueryMode, gop, i, &sz, &info);
>   if (EFI_ERROR(status))
>   continue;
> + if (info->HorizontalResolution == 1366)
> + continue;
>   gopsiz = info->HorizontalResolution *
>   info->VerticalResolution;
>   if (gopsiz > bestsiz) {
>
>
> --yasuoka
I confirm that this diff fixes the issue.

Regards,
Lukasz



Re: Display distortion while booting in native UEFI mode

2017-08-14 Thread dmitry.sensei
Thanks. It works for me.
1366 - Evil intrigues of Microsoft 👹👹👹

On Mon, Aug 14, 2017 at 6:59 PM, YASUOKA Masahiko 
wrote:

> Hello,
>
> On Mon, 14 Aug 2017 17:01:20 +0500
> "dmitry.sensei"  wrote:
> > In https://lists.freebsd.org/pipermail/freebsd-bugs/2016-
> September/069781.html
> > they advise to force the screen resolution to 1024x768.
> > My be this woraround will be work?
>
> Thank you for the info.  That workaround seems to be work.
>
> Please try the diff or
>
>   http://yasuoka.net/~yasuoka/BOOTX64.EFI
>   http://yasuoka.net/~yasuoka/BOOTIA32.EFI
>
> ?
>
> Index: sys/arch/amd64/stand/efiboot/efiboot.c
> ===
> RCS file: /var/cvs/openbsd/src/sys/arch/amd64/stand/efiboot/efiboot.c,v
> retrieving revision 1.23
> diff -u -p -r1.23 efiboot.c
> --- sys/arch/amd64/stand/efiboot/efiboot.c  7 Aug 2017 19:34:53
> -   1.23
> +++ sys/arch/amd64/stand/efiboot/efiboot.c  14 Aug 2017 13:52:52 -
> @@ -738,6 +738,8 @@ efi_makebootargs(void)
> status = EFI_CALL(gop->QueryMode, gop, i, &sz,
> &info);
> if (EFI_ERROR(status))
> continue;
> +   if (info->HorizontalResolution == 1366)
> +   continue;
> gopsiz = info->HorizontalResolution *
> info->VerticalResolution;
> if (gopsiz > bestsiz) {
>
>
> --yasuoka
>



-- 
Dmitry Orlov


Re: Display distortion while booting in native UEFI mode

2017-08-14 Thread YASUOKA Masahiko
Hello,

On Mon, 14 Aug 2017 17:01:20 +0500
"dmitry.sensei"  wrote:
> In https://lists.freebsd.org/pipermail/freebsd-bugs/2016-September/069781.html
> they advise to force the screen resolution to 1024x768.
> My be this woraround will be work?

Thank you for the info.  That workaround seems to be work.

Please try the diff or

  http://yasuoka.net/~yasuoka/BOOTX64.EFI   
  http://yasuoka.net/~yasuoka/BOOTIA32.EFI  

?

Index: sys/arch/amd64/stand/efiboot/efiboot.c
===
RCS file: /var/cvs/openbsd/src/sys/arch/amd64/stand/efiboot/efiboot.c,v
retrieving revision 1.23
diff -u -p -r1.23 efiboot.c
--- sys/arch/amd64/stand/efiboot/efiboot.c  7 Aug 2017 19:34:53 -   
1.23
+++ sys/arch/amd64/stand/efiboot/efiboot.c  14 Aug 2017 13:52:52 -
@@ -738,6 +738,8 @@ efi_makebootargs(void)
status = EFI_CALL(gop->QueryMode, gop, i, &sz, &info);
if (EFI_ERROR(status))
continue;
+   if (info->HorizontalResolution == 1366)
+   continue;
gopsiz = info->HorizontalResolution *
info->VerticalResolution;
if (gopsiz > bestsiz) {


--yasuoka



Re: Display distortion while booting in native UEFI mode

2017-08-14 Thread dmitry.sensei
Hi!
In https://lists.freebsd.org/pipermail/freebsd-bugs/2016-September/069781.html
they advise to force the screen resolution to 1024x768.
My be this woraround will be work?

On Mon, Aug 7, 2017 at 10:15 AM, dmitry.sensei  wrote:
> Sorry. I can't find the settings.
> I did test on my laptop (1366x768). dmesg shows efifb0 at mainbus0
> 2048x2048 32bpp.
> It was an incorrect proposal on my part :(
>
> On Sun, Aug 6, 2017 at 6:59 PM, dmitry.sensei  wrote:
>> Sorry. I'll check it.
>>
>> On Sun, Aug 6, 2017 at 11:38 AM, YASUOKA Masahiko  
>> wrote:
>>> Hi,
>>>
>>> I'm using OVMF and qemu.  I don't know how to configure it to use 1366
>>> for the video.  Do know the config?
>>>
>>> On Thu, 3 Aug 2017 10:03:14 +0500
>>> "dmitry.sensei"  wrote:
 Dear, Masahiko Yasuoka
 You can try to repeat this problem using qemu-kvm with OVMF (UEFI)
 bios (https://www.linux-kvm.org/page/OVMF)

 On Sat, Jul 1, 2017 at 12:31 PM, dmitry.sensei  
 wrote:
> 96 = 06 :D
>
> On Sat, Jul 1, 2017 at 12:30 PM, dmitry.sensei  
> wrote:
>> In build from 20179629 is not fixed yet
>>
>> On Sun, Jun 25, 2017 at 12:45 AM, Lukasz Jendrysik  
>> wrote:
>>> I have to admit that 1366 is not the best power of two sum.
>>> Unfortunately I'm not able to help you with the fix, but please let me
>>> know if there is any information I could provide you with.
>>>
>>> On 06/23/2017 01:07 AM, YASUOKA Masahiko wrote:
 I think horizontal resolution 1366 is the key of the problem and efifb
 need a workaround for it.
>>>
>>
>>
>>
>> --
>> Dmitry Orlov
>
>
>
> --
> Dmitry Orlov



 --
 Dmitry Orlov
>>
>>
>>
>> --
>> Dmitry Orlov
>
>
>
> --
> Dmitry Orlov



-- 
Dmitry Orlov



Re: Display distortion while booting in native UEFI mode

2017-08-06 Thread dmitry.sensei
Sorry. I can't find the settings.
I did test on my laptop (1366x768). dmesg shows efifb0 at mainbus0
2048x2048 32bpp.
It was an incorrect proposal on my part :(

On Sun, Aug 6, 2017 at 6:59 PM, dmitry.sensei  wrote:
> Sorry. I'll check it.
>
> On Sun, Aug 6, 2017 at 11:38 AM, YASUOKA Masahiko  wrote:
>> Hi,
>>
>> I'm using OVMF and qemu.  I don't know how to configure it to use 1366
>> for the video.  Do know the config?
>>
>> On Thu, 3 Aug 2017 10:03:14 +0500
>> "dmitry.sensei"  wrote:
>>> Dear, Masahiko Yasuoka
>>> You can try to repeat this problem using qemu-kvm with OVMF (UEFI)
>>> bios (https://www.linux-kvm.org/page/OVMF)
>>>
>>> On Sat, Jul 1, 2017 at 12:31 PM, dmitry.sensei  
>>> wrote:
 96 = 06 :D

 On Sat, Jul 1, 2017 at 12:30 PM, dmitry.sensei  
 wrote:
> In build from 20179629 is not fixed yet
>
> On Sun, Jun 25, 2017 at 12:45 AM, Lukasz Jendrysik  
> wrote:
>> I have to admit that 1366 is not the best power of two sum.
>> Unfortunately I'm not able to help you with the fix, but please let me
>> know if there is any information I could provide you with.
>>
>> On 06/23/2017 01:07 AM, YASUOKA Masahiko wrote:
>>> I think horizontal resolution 1366 is the key of the problem and efifb
>>> need a workaround for it.
>>
>
>
>
> --
> Dmitry Orlov



 --
 Dmitry Orlov
>>>
>>>
>>>
>>> --
>>> Dmitry Orlov
>
>
>
> --
> Dmitry Orlov



-- 
Dmitry Orlov



Re: Display distortion while booting in native UEFI mode

2017-08-06 Thread dmitry.sensei
Sorry. I'll check it.

On Sun, Aug 6, 2017 at 11:38 AM, YASUOKA Masahiko  wrote:
> Hi,
>
> I'm using OVMF and qemu.  I don't know how to configure it to use 1366
> for the video.  Do know the config?
>
> On Thu, 3 Aug 2017 10:03:14 +0500
> "dmitry.sensei"  wrote:
>> Dear, Masahiko Yasuoka
>> You can try to repeat this problem using qemu-kvm with OVMF (UEFI)
>> bios (https://www.linux-kvm.org/page/OVMF)
>>
>> On Sat, Jul 1, 2017 at 12:31 PM, dmitry.sensei  
>> wrote:
>>> 96 = 06 :D
>>>
>>> On Sat, Jul 1, 2017 at 12:30 PM, dmitry.sensei  
>>> wrote:
 In build from 20179629 is not fixed yet

 On Sun, Jun 25, 2017 at 12:45 AM, Lukasz Jendrysik  
 wrote:
> I have to admit that 1366 is not the best power of two sum.
> Unfortunately I'm not able to help you with the fix, but please let me
> know if there is any information I could provide you with.
>
> On 06/23/2017 01:07 AM, YASUOKA Masahiko wrote:
>> I think horizontal resolution 1366 is the key of the problem and efifb
>> need a workaround for it.
>



 --
 Dmitry Orlov
>>>
>>>
>>>
>>> --
>>> Dmitry Orlov
>>
>>
>>
>> --
>> Dmitry Orlov



-- 
Dmitry Orlov



Re: Display distortion while booting in native UEFI mode

2017-08-05 Thread YASUOKA Masahiko
Hi,

I'm using OVMF and qemu.  I don't know how to configure it to use 1366
for the video.  Do know the config?

On Thu, 3 Aug 2017 10:03:14 +0500
"dmitry.sensei"  wrote:
> Dear, Masahiko Yasuoka
> You can try to repeat this problem using qemu-kvm with OVMF (UEFI)
> bios (https://www.linux-kvm.org/page/OVMF)
> 
> On Sat, Jul 1, 2017 at 12:31 PM, dmitry.sensei  
> wrote:
>> 96 = 06 :D
>>
>> On Sat, Jul 1, 2017 at 12:30 PM, dmitry.sensei  
>> wrote:
>>> In build from 20179629 is not fixed yet
>>>
>>> On Sun, Jun 25, 2017 at 12:45 AM, Lukasz Jendrysik  wrote:
 I have to admit that 1366 is not the best power of two sum.
 Unfortunately I'm not able to help you with the fix, but please let me
 know if there is any information I could provide you with.

 On 06/23/2017 01:07 AM, YASUOKA Masahiko wrote:
> I think horizontal resolution 1366 is the key of the problem and efifb
> need a workaround for it.

>>>
>>>
>>>
>>> --
>>> Dmitry Orlov
>>
>>
>>
>> --
>> Dmitry Orlov
> 
> 
> 
> -- 
> Dmitry Orlov



Re: Display distortion while booting in native UEFI mode

2017-08-02 Thread dmitry.sensei
Dear, Masahiko Yasuoka
You can try to repeat this problem using qemu-kvm with OVMF (UEFI)
bios (https://www.linux-kvm.org/page/OVMF)

On Sat, Jul 1, 2017 at 12:31 PM, dmitry.sensei  wrote:
> 96 = 06 :D
>
> On Sat, Jul 1, 2017 at 12:30 PM, dmitry.sensei  
> wrote:
>> In build from 20179629 is not fixed yet
>>
>> On Sun, Jun 25, 2017 at 12:45 AM, Lukasz Jendrysik  wrote:
>>> I have to admit that 1366 is not the best power of two sum.
>>> Unfortunately I'm not able to help you with the fix, but please let me
>>> know if there is any information I could provide you with.
>>>
>>> On 06/23/2017 01:07 AM, YASUOKA Masahiko wrote:
 I think horizontal resolution 1366 is the key of the problem and efifb
 need a workaround for it.
>>>
>>
>>
>>
>> --
>> Dmitry Orlov
>
>
>
> --
> Dmitry Orlov



-- 
Dmitry Orlov



Re: Display distortion while booting in native UEFI mode

2017-07-01 Thread dmitry.sensei
96 = 06 :D

On Sat, Jul 1, 2017 at 12:30 PM, dmitry.sensei  wrote:
> In build from 20179629 is not fixed yet
>
> On Sun, Jun 25, 2017 at 12:45 AM, Lukasz Jendrysik  wrote:
>> I have to admit that 1366 is not the best power of two sum.
>> Unfortunately I'm not able to help you with the fix, but please let me
>> know if there is any information I could provide you with.
>>
>> On 06/23/2017 01:07 AM, YASUOKA Masahiko wrote:
>>> I think horizontal resolution 1366 is the key of the problem and efifb
>>> need a workaround for it.
>>
>
>
>
> --
> Dmitry Orlov



-- 
Dmitry Orlov



Re: Display distortion while booting in native UEFI mode

2017-07-01 Thread dmitry.sensei
In build from 20179629 is not fixed yet

On Sun, Jun 25, 2017 at 12:45 AM, Lukasz Jendrysik  wrote:
> I have to admit that 1366 is not the best power of two sum.
> Unfortunately I'm not able to help you with the fix, but please let me
> know if there is any information I could provide you with.
>
> On 06/23/2017 01:07 AM, YASUOKA Masahiko wrote:
>> I think horizontal resolution 1366 is the key of the problem and efifb
>> need a workaround for it.
>



-- 
Dmitry Orlov



Re: Display distortion while booting in native UEFI mode

2017-06-24 Thread Lukasz Jendrysik
I have to admit that 1366 is not the best power of two sum.
Unfortunately I'm not able to help you with the fix, but please let me
know if there is any information I could provide you with.

On 06/23/2017 01:07 AM, YASUOKA Masahiko wrote:
> I think horizontal resolution 1366 is the key of the problem and efifb
> need a workaround for it.



Re: Display distortion while booting in native UEFI mode

2017-06-22 Thread Lukasz Jendrysik
Okay, so I finally have a while to test your diff.
Unfortunately the issue still persists, but dmesg output is different
now especially when it comes to efifb.

dmesgNative:efifb0 at mainbus0: 1366x768, 32bpp
dmesgNative:wsdisplay0 at efifb0 mux 1: console (std, vt100 emulation),
using wskbd0
dmesgNativePatched:efifb at mainbus0 not configured

Full dmesg output attached.

Please let me know if I can provide you with any other information
required for further analysis.

Thanks.

> On 06/22/2017 08:27 AM, YASUOKA Masahiko wrote:
>
>> Can you test the diff for the kernel?
OpenBSD 6.1-current (GENERIC) #0: Thu Jun 22 22:19:04 CEST 2017
l...@obsd.lan:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 12726038528 (12136MB)
avail mem = 12334563328 (11763MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xb9c3f000 (34 entries)
bios0: vendor Hewlett-Packard version "68ISB Ver. F.64" date 08/11/2016
bios0: Hewlett-Packard HP EliteBook 2570p
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC MCFG TCPA SSDT SSDT SLIC FPDT BGRT SSDT SSDT 
DMAR ASF!
acpi0: wakeup devices LANC(S0) EHC1(S0) EHC2(S0) XHC_(S0) PCIB(S5) RP02(S4) 
ECF0(S4) RP03(S4) RP04(S5) WNIC(S5) NIC_(S0)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz, 2893.87 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 2893867120 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 0 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpiprt0 at acpi0: bus -1 (PEGP)
acpiprt1 at acpi0: bus -1 (PCIB)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus 2 (RP02)
acpiprt4 at acpi0: bus 35 (RP03)
acpiprt5 at acpi0: bus 36 (RP04)
acpiprt6 at acpi0: bus 0 (PCI0)
acpiec0 at acpi0
acpicpu0 at acpi0: C2(350@80 mwait.1@0x20), C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: APPR, resource for HDEF
acpipwrres1 at acpi0: COMP, resource for COM1
acpipwrres2 at acpi0: LPP_, resource for LPT0
acpitz0 at acpi0: critical temperature is 128 degC
acpitz1 at acpi0: critical temperature is 128 degC
acpitz2 at acpi0: critical temperature is 128 degC
acpitz3 at acpi0: critical temperature is 128 degC
acpitz4 at acpi0: critical temperature is 128 degC
acpitz5 at acpi0: critical temperature is 128 degC
acpitz6 at acpi0: critical temperature is 128 degC
acpitz7 at acpi0: critical temperature is 128 degC
"HPQ6001" at acpi0 not configured
tpm0 at acpi0: GTPM addr 0xfed4/0x5000: Infineon SLB9635 1.2 rev 0x10
"PNP0A06" at acpi0 not configured
"HPQ8001" at acpi0 not configured
"SYN0198" at acpi0 not configured
"HPQ6000" at acpi0 not configured
acpibat0 at acpi0: BAT0 model "Primary" serial 24346 2012/09/21 type LIon oem 
"Hewlett-Packard"
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: LID_
"PNP0C14" at acpi0 not configured
"INT340E" at acpi0 not configured
acpivideo0 at acpi0: DGFX
acpivideo1 at acpi0: GFX0
acpivout0 at acpivideo1: DD02
cpu0: Enhanced SpeedStep 2893 MHz: speeds: 2901, 2900, 2800, 2700, 2500, 2400, 
2300, 2200, 2000, 1900, 1800, 1700, 1600, 1400, 1300, 1200 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 3G Host" rev 0x09
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 4000" rev 0x09
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1366x768, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
xhci0 at pci0 dev 20 function 0 "Intel 7 Series xHCI" rev 0x04: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 
addr 1
"Intel 7 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
puc0 at pci0 dev 22 function 3 "Intel 7 Series KT" rev 0x04: ports: 1 com
com4 at puc0 port 0 apic 0 int 17: ns16550a, 16 byte fifo
com4: probed fifo depth: 0 bytes
em0 at pci0 dev 25 function 0 "Intel 82579LM" rev 0x04: msi, address 
a4:5d:36:5b:77:bb
ehci0 at pci0 dev 26 function 0 "Intel 7 Series USB" rev 0x04: apic 0 int 16
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 
addr 1
azalia0 at pci0 dev 27 function 0 "Intel 7 Series HD Audio" rev 0x04: msi
azalia0: codecs: IDT 92HD81B1X, Intel/0x2806, using IDT 92HD81B1X
audio0 at azalia0
ppb0 at pci0 dev 28 f

Re: Display distortion while booting in native UEFI mode

2017-06-22 Thread YASUOKA Masahiko
Thanks,

The diff doesn't seem to fix the problem.

I think horizontal resolution 1366 is the key of the problem and efifb
need a workaround for it.

On Thu, 22 Jun 2017 23:14:47 +0200
Lukasz Jendrysik  wrote:
> Okay, so I finally have a while to test your diff.
> Unfortunately the issue still persists, but dmesg output is different
> now especially when it comes to efifb.
> 
> dmesgNative:efifb0 at mainbus0: 1366x768, 32bpp
> dmesgNative:wsdisplay0 at efifb0 mux 1: console (std, vt100 emulation),
> using wskbd0
> dmesgNativePatched:efifb at mainbus0 not configured
> 
> Full dmesg output attached.
> 
> Please let me know if I can provide you with any other information
> required for further analysis.
> 
> Thanks.
> 
>> On 06/22/2017 08:27 AM, YASUOKA Masahiko wrote:
>>
>>> Can you test the diff for the kernel?



Re: Display distortion while booting in native UEFI mode

2017-06-22 Thread Lukasz Jendrysik
Hi,


I will try to get it done tonight (CEST).

I will let you know once it's done.

On 06/22/2017 08:27 AM, YASUOKA Masahiko wrote:

> Can you test the diff for the kernel?



Re: Display distortion while booting in native UEFI mode

2017-06-22 Thread Dmitry Orlov
Yes. If You send link to binary 

On June 22, 2017 11:27:21 AM GMT+05:00, YASUOKA Masahiko  
wrote:
>Hi,
>
>On Fri, 16 Jun 2017 09:29:50 +0500
>"dmitry.sensei"  wrote:
>> FrameBufferBase = 0xc000
>> FrameBufferSize = 0x4000
>> VerticalResolution = 768
>> HorizontalResolution = 1366
>> PixelsPerScanLine = 1366
>> PixelFormat = 1
>> RedMask = 0x0
>> GreenMask = 0x0
>> BlueMask = 0x0
>> ReservedMask = 0x0
>
>Thanks,
>
>Can you test the diff for the kernel?
>
>diff --git a/sys/arch/amd64/amd64/efifb.c
>b/sys/arch/amd64/amd64/efifb.c
>index 2418354beaf..3e73fe5fafe 100644
>--- a/sys/arch/amd64/amd64/efifb.c
>+++ b/sys/arch/amd64/amd64/efifb.c
>@@ -361,6 +361,7 @@ int
> efifb_cnattach(void)
> {
>   struct efifb*fb = &efifb_console;
>+  int  pixpsl;
> 
>   if (bios_efiinfo == NULL || bios_efiinfo->fb_addr == 0)
>   return (-1);
>@@ -373,8 +374,8 @@ efifb_cnattach(void)
>   fb->depth = max(fb->depth, fls(bios_efiinfo->fb_green_mask));
>   fb->depth = max(fb->depth, fls(bios_efiinfo->fb_blue_mask));
>   fb->depth = max(fb->depth, fls(bios_efiinfo->fb_reserved_mask));
>-  fb->psize = bios_efiinfo->fb_height *
>-  bios_efiinfo->fb_pixpsl * (fb->depth / 8);
>+  pixpsl = (bios_efiinfo->fb_pixpsl + 7) & 7; /* align 8 bytes */
>+  fb->psize = bios_efiinfo->fb_height * pixpsl * (fb->depth / 8);
> 
>   efifb_rasops_init();
> 

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: Display distortion while booting in native UEFI mode

2017-06-21 Thread YASUOKA Masahiko
Hi,

On Fri, 16 Jun 2017 09:29:50 +0500
"dmitry.sensei"  wrote:
> FrameBufferBase = 0xc000
> FrameBufferSize = 0x4000
> VerticalResolution = 768
> HorizontalResolution = 1366
> PixelsPerScanLine = 1366
> PixelFormat = 1
> RedMask = 0x0
> GreenMask = 0x0
> BlueMask = 0x0
> ReservedMask = 0x0

Thanks,

Can you test the diff for the kernel?

diff --git a/sys/arch/amd64/amd64/efifb.c b/sys/arch/amd64/amd64/efifb.c
index 2418354beaf..3e73fe5fafe 100644
--- a/sys/arch/amd64/amd64/efifb.c
+++ b/sys/arch/amd64/amd64/efifb.c
@@ -361,6 +361,7 @@ int
 efifb_cnattach(void)
 {
struct efifb*fb = &efifb_console;
+   int  pixpsl;
 
if (bios_efiinfo == NULL || bios_efiinfo->fb_addr == 0)
return (-1);
@@ -373,8 +374,8 @@ efifb_cnattach(void)
fb->depth = max(fb->depth, fls(bios_efiinfo->fb_green_mask));
fb->depth = max(fb->depth, fls(bios_efiinfo->fb_blue_mask));
fb->depth = max(fb->depth, fls(bios_efiinfo->fb_reserved_mask));
-   fb->psize = bios_efiinfo->fb_height *
-   bios_efiinfo->fb_pixpsl * (fb->depth / 8);
+   pixpsl = (bios_efiinfo->fb_pixpsl + 7) & 7; /* align 8 bytes */
+   fb->psize = bios_efiinfo->fb_height * pixpsl * (fb->depth / 8);
 
efifb_rasops_init();
 



Re: Display distortion while booting in native UEFI mode

2017-06-15 Thread dmitry.sensei
FrameBufferBase = 0xc000
FrameBufferSize = 0x4000
VerticalResolution = 768
HorizontalResolution = 1366
PixelsPerScanLine = 1366
PixelFormat = 1
RedMask = 0x0
GreenMask = 0x0
BlueMask = 0x0
ReservedMask = 0x0

On Fri, Jun 16, 2017 at 12:42 AM, Lukasz Jendrysik  wrote:
> Hello,
>
>
> Please accept my apologies for this delay.
>
> Picture attached since it seems that's not possible to save the output
> on EFI System Partition.
>
>
> On 06/15/2017 07:53 AM, YASUOKA Masahiko wrote:
>> Can you test the diff attached at last or
>>
>>   http://yasuoka.net/~yasuoka/BOOTX64.EFI
>>
>> The boot program is launched, please type "machine test" and
>> show me the result?



-- 
Dmitry Orlov



Re: Display distortion while booting in native UEFI mode

2017-06-15 Thread Lukasz Jendrysik
Hello,


Please accept my apologies for this delay.

Picture attached since it seems that's not possible to save the output
on EFI System Partition.


On 06/15/2017 07:53 AM, YASUOKA Masahiko wrote:
> Can you test the diff attached at last or
>
>   http://yasuoka.net/~yasuoka/BOOTX64.EFI
>
> The boot program is launched, please type "machine test" and
> show me the result?


Re: Display distortion while booting in native UEFI mode

2017-06-15 Thread Dmitry Orlov
Hi.
Thanks. I'll test it asap

On June 15, 2017 10:53:21 AM GMT+05:00, YASUOKA Masahiko  
wrote:
>Hi,
>
>On Sun, 11 Jun 2017 19:24:45 +0200
>Łukasz Jendrysik  wrote:
>> Today I tried for first time installing openBSD on a physical
>machine.
>> You probably figured out that I'm new to openBSD and I hope for your
>> understanding.
>> 
>> Now to the point: when I boot in UEFI native mode (without CSM), my
>> display gets crazy producing fancy glitch art, see attached
>glitch.png.
>> 
>> I also attach dmesg from both boot modes -- UEFI Hybrid (with CSM)
>and
>> UEFI Native (without CSM). Didn't notice any meaningful differences
>though.
>> 
>> Tested on HP EliteBook 2570p and openBSD 6.1 amd64. Unfortunately I
>> didn't test -current yet.
>> Please let me know if I can provide you with any details regarding
>this
>> issue.
>
>Can you test the diff attached at last or
>
>  http://yasuoka.net/~yasuoka/BOOTX64.EFI
>
>The boot program is launched, please type "machine test" and
>show me the result?
>
>diff --git a/sys/arch/amd64/stand/efiboot/efiboot.c
>b/sys/arch/amd64/stand/efiboot/efiboot.c
>index 9b6d5fc00fd..0f2613a2a15 100644
>--- a/sys/arch/amd64/stand/efiboot/efiboot.c
>+++ b/sys/arch/amd64/stand/efiboot/efiboot.c
>@@ -855,3 +855,59 @@ Xpoweroff_efi(void)
>   EFI_CALL(RS->ResetSystem, EfiResetShutdown, EFI_SUCCESS, 0, NULL);
>   return (0);
> }
>+
>+
>+int
>+Xtest(void)
>+{
>+  int  i, bestmode = -1;
>+  EFI_STATUS   status;
>+  EFI_GRAPHICS_OUTPUT *gop;
>+  EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
>+  *gopi = NULL;
>+  UINTNsz, gopsiz, bestsiz = 0;
>+
>+  status = EFI_CALL(BS->LocateProtocol, &gop_guid, NULL, (void
>**)&gop);
>+  if (!EFI_ERROR(status)) {
>+  for (i = 0; i < gop->Mode->MaxMode; i++) {
>+  status = EFI_CALL(gop->QueryMode, gop, i, &sz, &gopi);
>+  if (EFI_ERROR(status))
>+  continue;
>+  gopsiz = gopi->HorizontalResolution *
>+  gopi->VerticalResolution;
>+  if (gopsiz > bestsiz) {
>+  bestmode = i;
>+  bestsiz = gopsiz;
>+  }
>+  }
>+  if (bestmode >= 0) {
>+  status = EFI_CALL(gop->SetMode, gop, bestmode);
>+  if (EFI_ERROR(status) && gop->Mode->Mode != bestmode)
>+  printf("GOP setmode failed(%d)\n", status);
>+  }
>+  gopi = gop->Mode->Info;
>+  printf(
>+  "FrameBufferBase = 0x%lx\n"
>+  "FrameBufferSize = 0x%x\n"
>+  "VerticalResolution = %u\n"
>+  "HorizontalResolution = %u\n"
>+  "PixelsPerScanLine = %u\n"
>+  "PixelFormat = %d\n"
>+  "RedMask = 0x%lx\n"
>+  "GreenMask = 0x%lx\n"
>+  "BlueMask = 0x%lx\n"
>+  "ReservedMask = 0x%lx\n",
>+  gop->Mode->FrameBufferBase,
>+  gop->Mode->FrameBufferSize,
>+  gopi->VerticalResolution,
>+  gopi->HorizontalResolution,
>+  gopi->PixelsPerScanLine,
>+  gopi->PixelFormat,
>+  gopi->PixelInformation.RedMask,
>+  gopi->PixelInformation.GreenMask,
>+  gopi->PixelInformation.BlueMask,
>+  gopi->PixelInformation.ReservedMask);
>+  }
>+
>+  return (0);
>+}
>diff --git a/sys/arch/amd64/stand/libsa/cmd_i386.c
>b/sys/arch/amd64/stand/libsa/cmd_i386.c
>index 592cca49547..d5c014ad31b 100644
>--- a/sys/arch/amd64/stand/libsa/cmd_i386.c
>+++ b/sys/arch/amd64/stand/libsa/cmd_i386.c
>@@ -40,6 +40,7 @@
> #ifdef EFIBOOT
> #include "efiboot.h"
> #include "efidev.h"
>+int Xtest(void);
> #endif
> 
> extern const char version[];
>@@ -64,6 +65,7 @@ const struct cmd_table cmd_machine[] = {
>   { "video",  CMDT_CMD, Xvideo_efi },
>   { "exit",   CMDT_CMD, Xexit_efi },
>   { "poweroff",   CMDT_CMD, Xpoweroff_efi },
>+  { "test",   CMDT_CMD, Xtest },
> #endif
> #ifdef DEBUG
>   { "regs",   CMDT_CMD, Xregs },

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: Display distortion while booting in native UEFI mode

2017-06-14 Thread YASUOKA Masahiko
Hi,

On Sun, 11 Jun 2017 19:24:45 +0200
Łukasz Jendrysik  wrote:
> Today I tried for first time installing openBSD on a physical machine.
> You probably figured out that I'm new to openBSD and I hope for your
> understanding.
> 
> Now to the point: when I boot in UEFI native mode (without CSM), my
> display gets crazy producing fancy glitch art, see attached glitch.png.
> 
> I also attach dmesg from both boot modes -- UEFI Hybrid (with CSM) and
> UEFI Native (without CSM). Didn't notice any meaningful differences though.
> 
> Tested on HP EliteBook 2570p and openBSD 6.1 amd64. Unfortunately I
> didn't test -current yet.
> Please let me know if I can provide you with any details regarding this
> issue.

Can you test the diff attached at last or

  http://yasuoka.net/~yasuoka/BOOTX64.EFI

The boot program is launched, please type "machine test" and
show me the result?

diff --git a/sys/arch/amd64/stand/efiboot/efiboot.c 
b/sys/arch/amd64/stand/efiboot/efiboot.c
index 9b6d5fc00fd..0f2613a2a15 100644
--- a/sys/arch/amd64/stand/efiboot/efiboot.c
+++ b/sys/arch/amd64/stand/efiboot/efiboot.c
@@ -855,3 +855,59 @@ Xpoweroff_efi(void)
EFI_CALL(RS->ResetSystem, EfiResetShutdown, EFI_SUCCESS, 0, NULL);
return (0);
 }
+
+
+int
+Xtest(void)
+{
+   int  i, bestmode = -1;
+   EFI_STATUS   status;
+   EFI_GRAPHICS_OUTPUT *gop;
+   EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
+   *gopi = NULL;
+   UINTNsz, gopsiz, bestsiz = 0;
+
+   status = EFI_CALL(BS->LocateProtocol, &gop_guid, NULL, (void **)&gop);
+   if (!EFI_ERROR(status)) {
+   for (i = 0; i < gop->Mode->MaxMode; i++) {
+   status = EFI_CALL(gop->QueryMode, gop, i, &sz, &gopi);
+   if (EFI_ERROR(status))
+   continue;
+   gopsiz = gopi->HorizontalResolution *
+   gopi->VerticalResolution;
+   if (gopsiz > bestsiz) {
+   bestmode = i;
+   bestsiz = gopsiz;
+   }
+   }
+   if (bestmode >= 0) {
+   status = EFI_CALL(gop->SetMode, gop, bestmode);
+   if (EFI_ERROR(status) && gop->Mode->Mode != bestmode)
+   printf("GOP setmode failed(%d)\n", status);
+   }
+   gopi = gop->Mode->Info;
+   printf(
+   "FrameBufferBase = 0x%lx\n"
+   "FrameBufferSize = 0x%x\n"
+   "VerticalResolution = %u\n"
+   "HorizontalResolution = %u\n"
+   "PixelsPerScanLine = %u\n"
+   "PixelFormat = %d\n"
+   "RedMask = 0x%lx\n"
+   "GreenMask = 0x%lx\n"
+   "BlueMask = 0x%lx\n"
+   "ReservedMask = 0x%lx\n",
+   gop->Mode->FrameBufferBase,
+   gop->Mode->FrameBufferSize,
+   gopi->VerticalResolution,
+   gopi->HorizontalResolution,
+   gopi->PixelsPerScanLine,
+   gopi->PixelFormat,
+   gopi->PixelInformation.RedMask,
+   gopi->PixelInformation.GreenMask,
+   gopi->PixelInformation.BlueMask,
+   gopi->PixelInformation.ReservedMask);
+   }
+
+   return (0);
+}
diff --git a/sys/arch/amd64/stand/libsa/cmd_i386.c 
b/sys/arch/amd64/stand/libsa/cmd_i386.c
index 592cca49547..d5c014ad31b 100644
--- a/sys/arch/amd64/stand/libsa/cmd_i386.c
+++ b/sys/arch/amd64/stand/libsa/cmd_i386.c
@@ -40,6 +40,7 @@
 #ifdef EFIBOOT
 #include "efiboot.h"
 #include "efidev.h"
+int Xtest(void);
 #endif
 
 extern const char version[];
@@ -64,6 +65,7 @@ const struct cmd_table cmd_machine[] = {
{ "video",  CMDT_CMD, Xvideo_efi },
{ "exit",   CMDT_CMD, Xexit_efi },
{ "poweroff",   CMDT_CMD, Xpoweroff_efi },
+   { "test",   CMDT_CMD, Xtest },
 #endif
 #ifdef DEBUG
{ "regs",   CMDT_CMD, Xregs },



Re: Display distortion while booting in native UEFI mode

2017-06-13 Thread Lukasz Jendrysik
On 06/13/2017 08:11 PM, dmitry.sensei wrote:
> I have the same problem.
> diff for Your files:
> < efifb0 at mainbus0: 1024x768, 32bpp -> Hybrid
> ---
>> efifb0 at mainbus0: 1366x768, 32bpp -> Native
> "Didn't notice any meaningful differences though" too :)
>
> On Tue, Jun 13, 2017 at 9:24 PM, Lukasz Jendrysik  wrote:
>> On 06/11/2017 07:24 PM, Łukasz Jendrysik wrote:
>>
>>> Hello,
>>>
>>> Today I tried for first time installing openBSD on a physical machine.
>>> You probably figured out that I'm new to openBSD and I hope for your
>>> understanding.
>>>
>>> Now to the point: when I boot in UEFI native mode (without CSM), my
>>> display gets crazy producing fancy glitch art, see attached glitch.png.
>>>
>>> I also attach dmesg from both boot modes -- UEFI Hybrid (with CSM) and
>>> UEFI Native (without CSM). Didn't notice any meaningful differences though.
>>>
>>> Tested on HP EliteBook 2570p and openBSD 6.1 amd64. Unfortunately I
>>> didn't test -current yet.
>>> Please let me know if I can provide you with any details regarding this
>>> issue.
>>>
>>> Regards,
>>> Lukasz Jendrysik
>> Hi,
>>
>> I confirm that this issue also occurs on the latest snapshot from 12th June.
>>
>> Regards,
>> Lukasz Jendrysik
>>
>
>
Hello,


Yes, that's the one thing. 1366 isn't the best power of two sum, so it
might be that something failed to account for alignment.

Maybe in native UEFI mode it does not detect the inteldrm or just locks
somewhere.


Have you debug it further?


Regards,

Lukasz Jendrysik



Re: Display distortion while booting in native UEFI mode

2017-06-13 Thread Lukasz Jendrysik
On 06/11/2017 07:24 PM, Łukasz Jendrysik wrote:

> Hello,
>
> Today I tried for first time installing openBSD on a physical machine.
> You probably figured out that I'm new to openBSD and I hope for your
> understanding.
>
> Now to the point: when I boot in UEFI native mode (without CSM), my
> display gets crazy producing fancy glitch art, see attached glitch.png.
>
> I also attach dmesg from both boot modes -- UEFI Hybrid (with CSM) and
> UEFI Native (without CSM). Didn't notice any meaningful differences though.
>
> Tested on HP EliteBook 2570p and openBSD 6.1 amd64. Unfortunately I
> didn't test -current yet.
> Please let me know if I can provide you with any details regarding this
> issue.
>
> Regards,
> Lukasz Jendrysik

Hi,

I confirm that this issue also occurs on the latest snapshot from 12th June.

Regards,
Lukasz Jendrysik



Re: Display distortion while booting in native UEFI mode

2017-06-13 Thread dmitry.sensei
I have the same problem.
diff for Your files:
< efifb0 at mainbus0: 1024x768, 32bpp -> Hybrid
---
> efifb0 at mainbus0: 1366x768, 32bpp -> Native
"Didn't notice any meaningful differences though" too :)

On Tue, Jun 13, 2017 at 9:24 PM, Lukasz Jendrysik  wrote:
> On 06/11/2017 07:24 PM, Łukasz Jendrysik wrote:
>
>> Hello,
>>
>> Today I tried for first time installing openBSD on a physical machine.
>> You probably figured out that I'm new to openBSD and I hope for your
>> understanding.
>>
>> Now to the point: when I boot in UEFI native mode (without CSM), my
>> display gets crazy producing fancy glitch art, see attached glitch.png.
>>
>> I also attach dmesg from both boot modes -- UEFI Hybrid (with CSM) and
>> UEFI Native (without CSM). Didn't notice any meaningful differences though.
>>
>> Tested on HP EliteBook 2570p and openBSD 6.1 amd64. Unfortunately I
>> didn't test -current yet.
>> Please let me know if I can provide you with any details regarding this
>> issue.
>>
>> Regards,
>> Lukasz Jendrysik
>
> Hi,
>
> I confirm that this issue also occurs on the latest snapshot from 12th June.
>
> Regards,
> Lukasz Jendrysik
>



-- 
Dmitry Orlov