RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1808845 - RFE: write "Auto Boot Time-out" DEBUG messages for the GetFrontPageTimeoutFromQemu() function
Summary: RFE: write "Auto Boot Time-out" DEBUG messages for the GetFrontPageTimeoutFro...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: edk2
Version: 8.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Laszlo Ersek
QA Contact: leidwang@redhat.com
URL:
Whiteboard:
Depends On: edk2-rebase-rhel-8.3
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-01 14:41 UTC by Xueqiang Wei
Modified: 2020-11-04 04:01 UTC (History)
11 users (show)

Fixed In Version: edk2-20200602gitca407c7246bf-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 04:01:20 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot1 (2.95 KB, image/png)
2020-06-18 09:42 UTC, leidwang@redhat.com
no flags Details
screenshot2 (1.87 KB, image/png)
2020-06-18 09:42 UTC, leidwang@redhat.com
no flags Details
fast_tarin_test_result (20.00 KB, application/x-tar)
2020-06-19 06:52 UTC, leidwang@redhat.com
no flags Details

Description Xueqiang Wei 2020-03-01 14:41:52 UTC
Description of problem:

In order to check "Auto Boot Time-out" in debug log, request to add this function.
 
Discussed with Laszlo, he will write DEBUG messages for the
GetFrontPageTimeoutFromQemu() function. Then the OVMF debug log (on the
host side) would report the value, and I can grep for it.



Version-Release number of selected component (if applicable):

kernel-4.18.0-175.el8.x86_64
qemu-kvm-4.2.0-10.module+el8.2.0+5740+c3dff59e
edk2-ovmf-20190829git37eef91017ad-8.el8.noarch



How reproducible:


Steps to Reproduce:
1. boot a guest with -boot menu=on,splash-time=12000
2. Check "Boot Maintenance Manage"->"Auto Boot Time-out".



Actual results:
after step 2, can't grep for it in debug log


Expected results:
get it in debug log


Additional info:

Comment 1 Laszlo Ersek 2020-03-01 23:16:10 UTC
sent question:

[edk2-devel] setting PcdPlatformBootTimeOut in PlatformBootManagerLib
https://edk2.groups.io/g/devel/message/55128
http://mid.mail-archive.com/fef62d68-37c8-b2ea-5587-32532f1f2479@redhat.com

Comment 3 Laszlo Ersek 2020-03-04 09:11:19 UTC
Xueqiang Wei,

I have some patches to post to the upstream list. Here's the behavior to
expect from OVMF:


(1) When "-boot menu=(on|off)" is not specified at all (equivalently,
    when the libvirt domain XML has no <bootmenu/> element),

    *or* when "-boot menu=off" is specified on the QEMU command line
    (equivalently, when the libvirt domain XML says <bootmenu
    enable='no'/>),

    then

   - there is no progress bar shown at the TianoCore splash screen: the
     boot is immediate,

   - the OVMF debug log will contain:

> PlatformBootManagerBeforeConsole: SetVariable(Timeout, 0): Success

    - in the UEFI shell, the "setvar Timeout" command will output

> 8BE4DF61-93CA-11D2-AA0D-00E098032B8C - Timeout - 0002 Bytes
> 00 00

    - in a Linux guest, the "efibootmgr" command will output

> Timeout: 0 seconds


(2) When "-boot menu=on" is specified on the QEMU command line, but
    "splash-time=N" is not (equivalently, when the domain XML says
    <bootmenu enable='yes'/> but there is no timeout='N' attribute),
    then:

    - the progress bar takes 3 seconds,
    - the OVMF debug log and the "efibootmgr" output will report 3
      seconds,
    - the "setvar" UEFI shell command will report:

> 8BE4DF61-93CA-11D2-AA0D-00E098032B8C - Timeout - 0002 Bytes
> 03 00

      (2-byte little endian representation printed in hex).


(3) When "-boot menu=on,splash-time=NNNN" is specified on the QEMU
    command line (equivalently, when the domain XML says <bootmenu
    enable='yes' timeout='N'/>), and N is a positive number of
    milliseconds, then

    - the number of seconds taken by the progress bar, and
    - reported in the OVMF debug log, in the UEFI shell, and by
      efibootmgr,

    is calculated by rounding up N to whole seconds.

Comment 4 Laszlo Ersek 2020-03-04 09:46:08 UTC
Posted upstream series:

* [edk2-devel] [PATCH 0/2]
  OvmfPkg, ArmVirtPkg: sync Timeout with PcdPlatformBootTimeOut

http://mid.mail-archive.com/20200304094413.19462-1-lersek@redhat.com
https://edk2.groups.io/g/devel/message/55379

Comment 5 Laszlo Ersek 2020-03-05 08:56:26 UTC
(In reply to Laszlo Ersek from comment #4)
> Posted upstream series:
> 
> * [edk2-devel] [PATCH 0/2]
>   OvmfPkg, ArmVirtPkg: sync Timeout with PcdPlatformBootTimeOut
> 
> http://mid.mail-archive.com/20200304094413.19462-1-lersek@redhat.com
> https://edk2.groups.io/g/devel/message/55379

Merged as commit range 3b9cd714542a..7288ff4095cf, via <https://github.com/tianocore/edk2/pull/422>.

Comment 8 leidwang@redhat.com 2020-06-18 09:38:53 UTC
(1) When "-boot menu=(on|off)" is not specified at all

-there is no progress bar shown at the TianoCore splash screen: the boot is immediate,

-ovmf log check result:
[root@dell-per440-09 home]# cat win-OVMF.log | grep "PlatformBootManagerBeforeConsole: SetVariable"
PlatformBootManagerBeforeConsole: SetVariable(Timeout, 0): Success


-UEFI shell check result:
added screenshot to attachment(comment9)


-guest check result:
[root@localhost ~]# efibootmgr
BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 0006,0000,0001,0002,0003,0004,0005
Boot0000* UiApp
Boot0001* UEFI QEMU QEMU HARDDISK 
Boot0002* UEFI PXEv4 (MAC:6C0B34A3513C)
Boot0003* UEFI PXEv6 (MAC:6C0B34A3513C)
Boot0004* UEFI HTTPv4 (MAC:6C0B34A3513C)
Boot0005* UEFI HTTPv6 (MAC:6C0B34A3513C)
Boot0006* Red Hat Enterprise Linux


(2) When "-boot menu=on" is specified on the QEMU command line, but
    "splash-time=N" is not (equivalently, when the domain XML says
    <bootmenu enable='yes'/> but there is no timeout='N' attribute),
    then:

-process bar is split 10 seconds

-ovmf log check result 
[root@dell-per440-09 home]# cat win-OVMF.log | grep "PlatformBootManagerBeforeConsole: SetVariable"
PlatformBootManagerBeforeConsole: SetVariable(Timeout, 3): Success

-UEFI shell check result
added screenshot to attachment(comment10)

-guest check result:
[root@localhost ~]# efibootmgr 
BootCurrent: 0006
Timeout: 3 seconds
BootOrder: 0006,0000,0001,0002,0003,0004,0005
Boot0000* UiApp
Boot0001* UEFI QEMU QEMU HARDDISK 
Boot0002* UEFI PXEv4 (MAC:6C0B34A3513C)
Boot0003* UEFI PXEv6 (MAC:6C0B34A3513C)
Boot0004* UEFI HTTPv4 (MAC:6C0B34A3513C)
Boot0005* UEFI HTTPv6 (MAC:6C0B34A3513C)
Boot0006* Red Hat Enterprise Linux

(3) When "-boot menu=on,splash-time=NNNN" is specified on the QEMU
    command line (equivalently, when the domain XML says <bootmenu
    enable='yes' timeout='N'/>), and N is a positive number of
    milliseconds, then

-process bar is split 10 seconds

-ovmf log check result:
[root@dell-per440-09 home]# cat win-OVMF.log | grep "PlatformBootManagerBeforeConsole: SetVariable"
PlatformBootManagerBeforeConsole: SetVariable(Timeout, 10): Success

-guest check result:
[root@vm-115-149 ~]# efibootmgr 
BootCurrent: 0006
Timeout: 10 seconds
BootOrder: 0006,0000,0002,0001,0003,0004,0005,0007
Boot0000* UiApp
Boot0001* UEFI QEMU DVD-ROM QM00023 
Boot0002* UEFI QEMU QEMU HARDDISK 
Boot0003* UEFI PXEv4 (MAC:24BE1515D191)
Boot0004* UEFI PXEv6 (MAC:24BE1515D191)
Boot0005* UEFI HTTPv4 (MAC:24BE1515D191)
Boot0006* Red Hat Enterprise Linux
Boot0007* UEFI HTTPv6 (MAC:24BE1515D191)

Comment 9 leidwang@redhat.com 2020-06-18 09:42:13 UTC
Created attachment 1697930 [details]
screenshot1

Comment 10 leidwang@redhat.com 2020-06-18 09:42:48 UTC
Created attachment 1697931 [details]
screenshot2

Comment 11 leidwang@redhat.com 2020-06-18 10:44:05 UTC
Host info:

kernel-4.18.0-213.el8.x86_64
qemu-img-4.2.0-25.module+el8.3.0+6986+29a4dcd7.x86_64
edk2-ovmf-20200602gitca407c7246bf-1.el8.noarch

Comment 12 leidwang@redhat.com 2020-06-19 06:52:03 UTC
host info:
kernel-4.18.0-213.el8.x86_64
qemu-kvm-4.2.0-25.module+el8.2.1+6985+9fd9d514.x86_64
edk2-ovmf-20200602gitca407c7246bf-1.el8.noarch

1 When "-boot menu=(on|off)" is not specified at all

-there is no progress bar shown at the TianoCore splash screen: the boot is immediate,

-ovmf log check result:
[root@dell-per440-09 home]# cat win-OVMF.log | grep "PlatformBootManagerBeforeConsole: SetVariable"
PlatformBootManagerBeforeConsole: SetVariable(Timeout, 0): Success


-UEFI shell check result:
added screenshot to attachment(screenshot.tar)



-guest check result:
[root@vm-115-149 ~]# efibootmgr 
BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 0006,0000,0002,0001,0003,0004,0005,0007
Boot0000* UiApp
Boot0001* UEFI QEMU DVD-ROM QM00023 
Boot0002* UEFI QEMU QEMU HARDDISK 
Boot0003* UEFI PXEv4 (MAC:6C0B34A3513C)
Boot0004* UEFI PXEv6 (MAC:6C0B34A3513C)
Boot0005* UEFI HTTPv4 (MAC:6C0B34A3513C)
Boot0006* Red Hat Enterprise Linux
Boot0007* UEFI HTTPv6 (MAC:6C0B34A3513C)


2 When "-boot menu=on" is specified on the QEMU command line, but"splash-time=N" is not specified.

 
-process bar is split 3 seconds

-ovmf log check result 
[root@dell-per440-09 home]# cat win-OVMF.log | grep "PlatformBootManagerBeforeConsole: SetVariable"
PlatformBootManagerBeforeConsole: SetVariable(Timeout, 3): Success

-UEFI shell check result
added screenshot to attachment(screenshot.tar)

-guest check result:
[root@vm-115-149 ~]# efibootmgr
BootCurrent: 0006
Timeout: 3 seconds
BootOrder: 0006,0000,0002,0001,0003,0004,0005,0007
Boot0000* UiApp
Boot0001* UEFI QEMU DVD-ROM QM00023 
Boot0002* UEFI QEMU QEMU HARDDISK 
Boot0003* UEFI PXEv4 (MAC:6C0B34A3513C)
Boot0004* UEFI PXEv6 (MAC:6C0B34A3513C)
Boot0005* UEFI HTTPv4 (MAC:6C0B34A3513C)
Boot0006* Red Hat Enterprise Linux
Boot0007* UEFI HTTPv6 (MAC:6C0B34A3513C)

3 When "-boot menu=on,splash-time=10000"

-process bar is split 10 seconds

-ovmf log check result:
[root@dell-per440-09 home]# cat win-OVMF.log | grep "PlatformBootManagerBeforeConsole: SetVariable"
PlatformBootManagerBeforeConsole: SetVariable(Timeout, 10): Success

-UEFI shell check result
added screenshot to attachment(screenshot.tar)

-guest check result:
[root@vm-115-149 ~]# efibootmgr 
BootCurrent: 0006
Timeout: 10 seconds
BootOrder: 0006,0000,0002,0001,0003,0004,0005,0007
Boot0000* UiApp
Boot0001* UEFI QEMU DVD-ROM QM00023 
Boot0002* UEFI QEMU QEMU HARDDISK 
Boot0003* UEFI PXEv4 (MAC:6C0B34A3513C)
Boot0004* UEFI PXEv6 (MAC:6C0B34A3513C)
Boot0005* UEFI HTTPv4 (MAC:6C0B34A3513C)
Boot0006* Red Hat Enterprise Linux
Boot0007* UEFI HTTPv6 (MAC:6C0B34A3513C)

Comment 13 leidwang@redhat.com 2020-06-19 06:52:52 UTC
Created attachment 1698048 [details]
fast_tarin_test_result

Comment 14 leidwang@redhat.com 2020-06-19 09:59:46 UTC
Sorry for my mistake,the host info I provided in comment 12 is wrong,the correct host info is as follows:

host info:
kernel-4.18.0-213.el8.x86_64
qemu-kvm-5.0.0-0.module+el8.3.0+6620+5d5e1420
edk2-ovmf-20200602gitca407c7246bf-1.el8.noarch

Comment 17 errata-xmlrpc 2020-11-04 04:01:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: edk2 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4805


Note You need to log in before you can comment on or make changes to this bug.