Hi.
Thanks. I'll test it asap

On June 15, 2017 10:53:21 AM GMT+05:00, YASUOKA Masahiko <[email protected]> 
wrote:
>Hi,
>
>On Sun, 11 Jun 2017 19:24:45 +0200
>Ɓukasz Jendrysik <[email protected]> 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<Enter>" 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;
>+      UINTN                    sz, 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.

Reply via email to