Re: [edk2] [PATCH 0/3] OvmfPkg/QemuVideoDxe/VbeShim: handle PAM1 register on Q35 correctly

2017-09-20 Thread Laszlo Ersek
On 09/20/17 20:11, Jordan Justen wrote:
> Series Reviewed-by: Jordan Justen 

Much appreciated! :)


Aleksei, thank you for the LaunchPad bug report (complete with
bisection) and the testing.

Pushed: b68c793144e8..947f3737abf6.

Cheers,
Laszlo

> On 2017-09-19 12:18:12, Laszlo Ersek wrote:
>> Repo:   https://github.com/lersek/edk2.git
>> Branch: vbe_shim_q35_pam
>>
>> Fix the long-standing OVMF/Q35 bug recently exposed by a QEMU change,
>> and reported under .
>>
>> Aleksei, can you please fetch the branch, build it, and report back with
>> your Tested-by if it works for you?
>>
>> I performed my own tests as well; I'll include those in a separate
>> email.
>>
>> Cc: Aleksei Kovura 
>> Cc: Gerd Hoffmann 
>> Cc: Igor Mammedov 
>> Cc: Jordan Justen 
>> Cc: Ruiyu Ni 
>>
>> Thank you,
>> Laszlo
>>
>> Laszlo Ersek (3):
>>   OvmfPkg/CsmSupportLib: move PAM register addresses to IndustryStandard
>>   OvmfPkg/QemuVideoDxe/VbeShim: rename Status to
>> Segment0AllocationStatus
>>   OvmfPkg/QemuVideoDxe/VbeShim: handle PAM1 register on Q35 correctly
>>
>>  OvmfPkg/Csm/CsmSupportLib/LegacyRegion.c   | 62 ++--
>>  OvmfPkg/Csm/CsmSupportLib/LegacyRegion.h   | 22 +--
>>  OvmfPkg/Include/IndustryStandard/I440FxPiix4.h | 13 
>>  OvmfPkg/Include/IndustryStandard/Q35MchIch9.h  |  8 +++
>>  OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf  |  3 +-
>>  OvmfPkg/QemuVideoDxe/VbeShim.c | 47 ---
>>  6 files changed, 95 insertions(+), 60 deletions(-)
>>
>> -- 
>> 2.14.1.3.gb7cf6e02401b
>>

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/3] OvmfPkg/QemuVideoDxe/VbeShim: handle PAM1 register on Q35 correctly

2017-09-20 Thread Jordan Justen
Series Reviewed-by: Jordan Justen 

On 2017-09-19 12:18:12, Laszlo Ersek wrote:
> Repo:   https://github.com/lersek/edk2.git
> Branch: vbe_shim_q35_pam
> 
> Fix the long-standing OVMF/Q35 bug recently exposed by a QEMU change,
> and reported under .
> 
> Aleksei, can you please fetch the branch, build it, and report back with
> your Tested-by if it works for you?
> 
> I performed my own tests as well; I'll include those in a separate
> email.
> 
> Cc: Aleksei Kovura 
> Cc: Gerd Hoffmann 
> Cc: Igor Mammedov 
> Cc: Jordan Justen 
> Cc: Ruiyu Ni 
> 
> Thank you,
> Laszlo
> 
> Laszlo Ersek (3):
>   OvmfPkg/CsmSupportLib: move PAM register addresses to IndustryStandard
>   OvmfPkg/QemuVideoDxe/VbeShim: rename Status to
> Segment0AllocationStatus
>   OvmfPkg/QemuVideoDxe/VbeShim: handle PAM1 register on Q35 correctly
> 
>  OvmfPkg/Csm/CsmSupportLib/LegacyRegion.c   | 62 ++--
>  OvmfPkg/Csm/CsmSupportLib/LegacyRegion.h   | 22 +--
>  OvmfPkg/Include/IndustryStandard/I440FxPiix4.h | 13 
>  OvmfPkg/Include/IndustryStandard/Q35MchIch9.h  |  8 +++
>  OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf  |  3 +-
>  OvmfPkg/QemuVideoDxe/VbeShim.c | 47 ---
>  6 files changed, 95 insertions(+), 60 deletions(-)
> 
> -- 
> 2.14.1.3.gb7cf6e02401b
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/3] OvmfPkg/QemuVideoDxe/VbeShim: handle PAM1 register on Q35 correctly

2017-09-20 Thread Aleksei

Tested-by: Aleksei Kovura

Works for me with Qemu 2.10.0.


On 19/09/17 22:18, Laszlo Ersek wrote:

Repo:   https://github.com/lersek/edk2.git
Branch: vbe_shim_q35_pam

Fix the long-standing OVMF/Q35 bug recently exposed by a QEMU change,
and reported under .

Aleksei, can you please fetch the branch, build it, and report back with
your Tested-by if it works for you?

I performed my own tests as well; I'll include those in a separate
email.

Cc: Aleksei Kovura 
Cc: Gerd Hoffmann 
Cc: Igor Mammedov 
Cc: Jordan Justen 
Cc: Ruiyu Ni 

Thank you,
Laszlo

Laszlo Ersek (3):
   OvmfPkg/CsmSupportLib: move PAM register addresses to IndustryStandard
   OvmfPkg/QemuVideoDxe/VbeShim: rename Status to
 Segment0AllocationStatus
   OvmfPkg/QemuVideoDxe/VbeShim: handle PAM1 register on Q35 correctly

  OvmfPkg/Csm/CsmSupportLib/LegacyRegion.c   | 62 ++--
  OvmfPkg/Csm/CsmSupportLib/LegacyRegion.h   | 22 +--
  OvmfPkg/Include/IndustryStandard/I440FxPiix4.h | 13 
  OvmfPkg/Include/IndustryStandard/Q35MchIch9.h  |  8 +++
  OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf  |  3 +-
  OvmfPkg/QemuVideoDxe/VbeShim.c | 47 ---
  6 files changed, 95 insertions(+), 60 deletions(-)



--
/--Regards, Aleksei/
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/3] OvmfPkg/QemuVideoDxe/VbeShim: handle PAM1 register on Q35 correctly

2017-09-20 Thread Laszlo Ersek
On 09/20/17 09:05, Aleksei wrote:
> Hi Laszlo,
> 
> I've built it (despite edk2/ovmf build process being as convoluted as
> ever)

Criticism well deserved :) , but at least we have excuses
(multi-platform, multi-compiler build system, and freestanding (i.e.,
not hosted) codebase).

> and am trying to run it with qemu 2.10.0 - it's not booting at
> all, stuck at "Guest has not initialized the display (yet)."
> 
> Maybe the problem is gcc version? I have 7.2.0 while edk2 instructions
> mention gcc5.

Hm, my prime suspect isn't gcc-7.2 (it should work with the GCC5
toolchain, but just to be sure you can try the GCC49 toolchain as well
with it).

My prime suspect is that you've been using a 2MB firmware image
(speaking in unified image terms) from Gerd's firmware repo, but the
upstream default is now 4MB.

You can't mix and match (a) firmware binary and (b) variable store
between different unified sizes; that is, if your previous firmware was
2MB in size (unified), you have to pass the following switch to your new
build too:

  -D FD_SIZE_2MB

Are you on IRC? I'll hop on #edk2 on OFTC for a while now (nick is
"lersek").

Thanks,
Laszlo

> 
> On 19/09/17 22:18, Laszlo Ersek wrote:
>> Repo:   https://github.com/lersek/edk2.git
>> Branch: vbe_shim_q35_pam
>>
>> Fix the long-standing OVMF/Q35 bug recently exposed by a QEMU change,
>> and reported under .
>>
>> Aleksei, can you please fetch the branch, build it, and report back with
>> your Tested-by if it works for you?
>>
>> I performed my own tests as well; I'll include those in a separate
>> email.
>>
>> Cc: Aleksei Kovura 
>> Cc: Gerd Hoffmann 
>> Cc: Igor Mammedov 
>> Cc: Jordan Justen 
>> Cc: Ruiyu Ni 
>>
>> Thank you,
>> Laszlo
>>
>> Laszlo Ersek (3):
>>    OvmfPkg/CsmSupportLib: move PAM register addresses to IndustryStandard
>>    OvmfPkg/QemuVideoDxe/VbeShim: rename Status to
>>  Segment0AllocationStatus
>>    OvmfPkg/QemuVideoDxe/VbeShim: handle PAM1 register on Q35 correctly
>>
>>   OvmfPkg/Csm/CsmSupportLib/LegacyRegion.c   | 62
>> ++--
>>   OvmfPkg/Csm/CsmSupportLib/LegacyRegion.h   | 22 +--
>>   OvmfPkg/Include/IndustryStandard/I440FxPiix4.h | 13 
>>   OvmfPkg/Include/IndustryStandard/Q35MchIch9.h  |  8 +++
>>   OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf  |  3 +-
>>   OvmfPkg/QemuVideoDxe/VbeShim.c | 47 ---
>>   6 files changed, 95 insertions(+), 60 deletions(-)
>>
> 

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/3] OvmfPkg/QemuVideoDxe/VbeShim: handle PAM1 register on Q35 correctly

2017-09-20 Thread Aleksei

Hi Laszlo,

I've built it (despite edk2/ovmf build process being as convoluted as 
ever) and am trying to run it with qemu 2.10.0 - it's not booting at 
all, stuck at "Guest has not initialized the display (yet)."


Maybe the problem is gcc version? I have 7.2.0 while edk2 instructions 
mention gcc5.


On 19/09/17 22:18, Laszlo Ersek wrote:

Repo:   https://github.com/lersek/edk2.git
Branch: vbe_shim_q35_pam

Fix the long-standing OVMF/Q35 bug recently exposed by a QEMU change,
and reported under .

Aleksei, can you please fetch the branch, build it, and report back with
your Tested-by if it works for you?

I performed my own tests as well; I'll include those in a separate
email.

Cc: Aleksei Kovura 
Cc: Gerd Hoffmann 
Cc: Igor Mammedov 
Cc: Jordan Justen 
Cc: Ruiyu Ni 

Thank you,
Laszlo

Laszlo Ersek (3):
   OvmfPkg/CsmSupportLib: move PAM register addresses to IndustryStandard
   OvmfPkg/QemuVideoDxe/VbeShim: rename Status to
 Segment0AllocationStatus
   OvmfPkg/QemuVideoDxe/VbeShim: handle PAM1 register on Q35 correctly

  OvmfPkg/Csm/CsmSupportLib/LegacyRegion.c   | 62 ++--
  OvmfPkg/Csm/CsmSupportLib/LegacyRegion.h   | 22 +--
  OvmfPkg/Include/IndustryStandard/I440FxPiix4.h | 13 
  OvmfPkg/Include/IndustryStandard/Q35MchIch9.h  |  8 +++
  OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf  |  3 +-
  OvmfPkg/QemuVideoDxe/VbeShim.c | 47 ---
  6 files changed, 95 insertions(+), 60 deletions(-)



--
/--Regards, Aleksei/
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/3] OvmfPkg/QemuVideoDxe/VbeShim: handle PAM1 register on Q35 correctly

2017-09-19 Thread Laszlo Ersek
On 09/19/17 21:18, Laszlo Ersek wrote:
> Repo:   https://github.com/lersek/edk2.git
> Branch: vbe_shim_q35_pam
>
> Fix the long-standing OVMF/Q35 bug recently exposed by a QEMU change,
> and reported under .
>
> Aleksei, can you please fetch the branch, build it, and report back
> with your Tested-by if it works for you?
>
> I performed my own tests as well; I'll include those in a separate
> email.

Testing:

- QEMU version: v2.10.0-611-g11e06ce1ed28.

- Edk2 basis: a3a473705101.

- ISO image used for testing:
  en_windows_server_2008_r2_with_sp1_x64_dvd_617601.iso

Test  CSM included  Machine type (2.10)  Boot Mode  Patch applied  Result
    ---  -  -  --
  01  noi440fx   UEFI   no pass
  03  noi440fx   UEFI   yespass

  02  noq35  UEFI   no fail
  04  noq35  UEFI   yespass

  05  yes   i440fx   UEFI   no pass
  09  yes   i440fx   UEFI   yespass

  06  yes   i440fx   legacy no fail
  10  yes   i440fx   legacy yesn/a

  07  yes   q35  UEFI   no pass
  11  yes   q35  UEFI   yespass

  08  yes   q35  legacy no n/a
  12  yes   q35  legacy yesn/a

(Please excuse the strange ordering of the test numbers; the reason is
that testing all the cases is much faster in a different order, while
presenting the results is best in this order. The test case numbering
reflects the order in which I performed the tests.)

Test cases 01 and 03 explain that there is no regression due to the
patches, on i440fx and in UEFI boot mode.

Test cases 02 and 04 show that the patches fix the bug reported by
Aleksei.

The remaining cases cover a build when the SeaBIOS CSM is included in
OVMF. For this I used current SeaBIOS master (at commit ec6cb17f8949),
plus a minimal patch that removes the runningOnQEMU() requirement from
qemu_debug_putc() -- because this check used to fail when running
SeaBIOS as an OVMF CSM, preventing SeaBIOS debug messages from reaching
the QEMU debug port. Furthermore, I built the SeaBIOS QXL option ROM
from the same SeaBIOS tree.

Test cases 05 and 09 explain that there is no regression due to the
patches, on i440fx and in UEFI boot mode.

Test case 06 shows that legacy boot stopped working at an unspecified
point in the past. I emphasize that this boot failure was *without* the
present patch set. I'm going to attach the OVMF debug logs for all
cases, which include the SeaBIOS and VGABIOS output as well. If someone
is interested in getting the CSM build to work again (for legacy OS
boot), please feel free to go ahead. (Personally I'd suggest to stick
with pure SeaBIOS if you have a legacy guest OS.)

Due to the failure of test case 06, I didn't check the behavior with the
current series applied on top (that is, in case 10).

Test cases 07 and 11 demonstrate that there is no regression due to the
patches, on q35 and in UEFI boot mode.

As a side note, test case 07 also demonstrates that the bug reported by
Aleksei is specific to the VBE Shim; it does not hit when the VBE Shim
is unused due to CSM presence. This is consistent with Gerd's result in
.

Test cases 08 and 12 are not possible to test (i.e., the current series
makes no difference). This is because Q35 has an AHCI/SATA controller
(with six ports), not a traditional IDE controller (with
primary/secondary and master/slave), therefore edk2's UefiBootManagerLib
and/or BdsDxe do not generate BBS (= legacy BIOS) boot options for the
CD-ROM. (I used an "ide-cd" device in all cases.)

Given my earlier experience that the edk2-devel list software does not
reflect attachments, and does not include them in the mailing list
archive, I'm manually including a base-64 encoded tarball below, with
the debug logs. The SHA256 sum is
ad196c202cf300e2028ac67256c6966b1ce7a13042e47351d19d8408bb0b32ab.

Thanks,
Laszlo

begin-base64 600 vbe_shim_q35_pam_results.tar.xz
/Td6WFoAAATm1rRGAgAhARwQz1jM8I//YDJdADsYiOHoiSZP6UBkHq3m
LIs35M7ja6B1SFm+o1y3elPl/iBZGUi0m0mP+uxrv0LVvq7zmdF0dsJ6QANV
QkqQSnThPv9HYNUFV8GdAOhuLzQIyFltWhNA3YbX5phtfiIjwdUY7RK5YdcO
iAqu2WXW0HqPzardN9e+WmC+Kub2xPrNU/6MIEv6XE6HRxKFj+afu+wFsDes
kWB23DrvbjGyeLs8YaxMmL/mmOnLdvERvL5hhzDsJ4gDv+BYCoAVTacsuJCl
nTWYjwVk7gJUK98pKK9TKq3xtVDoZ9Yy0j3I26PZv+cLBHgWbbd8ILwQSuDd
Xri++rCWQ1pBEeIn+MSKC13/VU9Ls5RZLVajFxRX/TcQ42EfpFvuFv144q40
0sn03yH0W8thJkv8rrtfJIKRR3je7QJfEg/LNa0LtwlvJnlqoeyO50UACrWA
AS01GbXFE9pJEx7M8iTFPAU/0B88dDWkeLhbOAUq0zoDKJpZG8Kavhtee+VA

[edk2] [PATCH 0/3] OvmfPkg/QemuVideoDxe/VbeShim: handle PAM1 register on Q35 correctly

2017-09-19 Thread Laszlo Ersek
Repo:   https://github.com/lersek/edk2.git
Branch: vbe_shim_q35_pam

Fix the long-standing OVMF/Q35 bug recently exposed by a QEMU change,
and reported under .

Aleksei, can you please fetch the branch, build it, and report back with
your Tested-by if it works for you?

I performed my own tests as well; I'll include those in a separate
email.

Cc: Aleksei Kovura 
Cc: Gerd Hoffmann 
Cc: Igor Mammedov 
Cc: Jordan Justen 
Cc: Ruiyu Ni 

Thank you,
Laszlo

Laszlo Ersek (3):
  OvmfPkg/CsmSupportLib: move PAM register addresses to IndustryStandard
  OvmfPkg/QemuVideoDxe/VbeShim: rename Status to
Segment0AllocationStatus
  OvmfPkg/QemuVideoDxe/VbeShim: handle PAM1 register on Q35 correctly

 OvmfPkg/Csm/CsmSupportLib/LegacyRegion.c   | 62 ++--
 OvmfPkg/Csm/CsmSupportLib/LegacyRegion.h   | 22 +--
 OvmfPkg/Include/IndustryStandard/I440FxPiix4.h | 13 
 OvmfPkg/Include/IndustryStandard/Q35MchIch9.h  |  8 +++
 OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf  |  3 +-
 OvmfPkg/QemuVideoDxe/VbeShim.c | 47 ---
 6 files changed, 95 insertions(+), 60 deletions(-)

-- 
2.14.1.3.gb7cf6e02401b

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel