Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OvmfPkg: include serial redirection opt by default #91

Merged
merged 15 commits into from
Oct 12, 2023
Merged

Conversation

macpijan
Copy link
Contributor

@macpijan macpijan commented Oct 9, 2023

No description provided.

Signed-off-by: Maciej Pijanowski <[email protected]>
@macpijan macpijan changed the base branch from github-actions to dasharo October 9, 2023 09:30
@macpijan
Copy link
Contributor Author

macpijan commented Oct 9, 2023

This MR depends on: #90
I wanted the CI build action to be already included here.

OvmfPkg/OvmfPkgX64.dsc Outdated Show resolved Hide resolved
@macpijan
Copy link
Contributor Author

macpijan commented Oct 10, 2023

@miczyg1 Another problem when trying to execute our tests was that the BootManagerMenuApp was not registered (the same Setup Menu was registered on both ESC and F2 keys).

This commit registers the BootManagerMenuApp, so F2 allows to enter it. But it only works when using QEMU in graphical mode. When pressing F2 over serial, it still enters Setup Menu, not Boot Manager App (one time boot).

@miczyg1
Copy link
Contributor

miczyg1 commented Oct 11, 2023

@miczyg1 Another problem when trying to execute our tests was that the BootManagerMenuApp was not registered (the same Setup Menu was registered on both ESC and F2 keys).

F2 was EDK2 default for the setup, so BootManagerMenuApp should rather be ESC.

This commit registers the BootManagerMenuApp, so F2 allows to enter it. But it only works when using QEMU in graphical mode. When pressing F2 over serial, it still enters Setup Menu, not Boot Manager App (one time boot).

It might be a problem of terminal type and how it parses the escape codes. For UEFIPayload we also had problem with certain Fx keys. The solution was to set the gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType to 4.

@macpijan
Copy link
Contributor Author

macpijan commented Oct 11, 2023

F2 was EDK2 default for the setup, so BootManagerMenuApp should rather be ESC.

@miczyg1 Default where? Any reference? Both upstream and mrchromebox just registers Setup Menu on both ESC and F2 AFAIK: https://github.com/MrChromebox/edk2/blob/uefipayload_202309/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c#L245

We use ESC as setup menu on platforms such as MSI, so it felt natural here as well.

It might be a problem of terminal type and how it parses the escape codes. For UEFIPayload we also had problem with certain Fx keys. The solution was to set the gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType to 4.

Changed in: 3fd08d4

Now F2 enters one time boot menu properly over serial (telnet).

@miczyg1
Copy link
Contributor

miczyg1 commented Oct 11, 2023

F2 was EDK2 default for the setup, so BootManagerMenuApp should rather be ESC.

@miczyg1 Default where? Any reference? Both upstream and mrchromebox just registers Setup Menu on both ESC and F2 AFAIK: https://github.com/MrChromebox/edk2/blob/uefipayload_202309/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c#L245

Ahh that was very long time ago, like in the beginning of usage of EDK2 by us. It was F2 and arrow down IIRC so even more different from what is now: 9dd88d8

MrChromebox has it modified as well.

We use ESC as setup menu on platforms such as MSI, so it felt natural here as well.

All platforms that are based on AMI (Protectli, MSI) use DEL for setup and F11 for boot manager menu.

@macpijan
Copy link
Contributor Author

@miczyg1 So what bindings shall be used here so we can proceed with this MR?

Esc- one time boot
F2 - setup

?

@miczyg1
Copy link
Contributor

miczyg1 commented Oct 11, 2023

@miczyg1 So what bindings shall be used here so we can proceed with this MR?

Esc- one time boot F2 - setup

?

@macpijan exactly as above would be great. it will also somewhat match the Insyde/NovaCustom setup hotkey.

macpijan added a commit that referenced this pull request Oct 11, 2023
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
It is generally useful for testing, to be able to build
QEMU firmware which will have serial enabled by default.

Signed-off-by: Maciej Pijanowski <[email protected]>
This script can be useful for testing in OSFV.
The serial port can be accessed with:

telnet 127.0.0.1 1234

This way, we can control the edk2 menus in tests.

Signed-off-by: Maciej Pijanowski <[email protected]>
Our tests expect these strings to be there, as they are for the
UefiPayloadPkg as well.

Signed-off-by: Maciej Pijanowski <[email protected]>
Ported from EmulatorPkg

Signed-off-by: Maciej Pijanowski <[email protected]>
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
@macpijan
Copy link
Contributor Author

@miczyg1 Changed keys mapping in: 5316967

And rebased on top of the recent github-actions branch, which should be merged first.

OvmfPkg/OvmfPkgX64.fdf Outdated Show resolved Hide resolved
@macpijan macpijan merged commit eaa39ee into dasharo Oct 12, 2023
2 checks passed
@macpijan macpijan deleted the ovmf-serial branch October 12, 2023 09:54
SergiiDmytruk pushed a commit that referenced this pull request Apr 15, 2024
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
SergiiDmytruk pushed a commit that referenced this pull request Apr 15, 2024
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
SergiiDmytruk pushed a commit that referenced this pull request Apr 21, 2024
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
SergiiDmytruk pushed a commit that referenced this pull request Apr 22, 2024
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
SergiiDmytruk pushed a commit that referenced this pull request Apr 22, 2024
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
SergiiDmytruk pushed a commit that referenced this pull request Apr 22, 2024
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
SergiiDmytruk pushed a commit that referenced this pull request Apr 22, 2024
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
SergiiDmytruk pushed a commit that referenced this pull request Apr 22, 2024
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
SergiiDmytruk pushed a commit that referenced this pull request Apr 23, 2024
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
SergiiDmytruk pushed a commit that referenced this pull request Apr 25, 2024
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
SergiiDmytruk pushed a commit that referenced this pull request Jun 2, 2024
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
SergiiDmytruk pushed a commit that referenced this pull request Jun 9, 2024
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
SergiiDmytruk pushed a commit that referenced this pull request Jun 15, 2024
We want the following:
- ESC - one time boot menu
- F2 - setup menu

See the discussion in Github:
#91 (comment)

Signed-off-by: Maciej Pijanowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants