Commit Graph

6723 Commits

Author SHA1 Message Date
Gustavo dos Santos Cardoso 32840a9cad MdeModulePkg/DxeCapsuleLibFmp: Use CapsuleTransformation protocol
Optionally transforming a capsule via the protocol permits tweaking
capsule format and/or adding additional layers of verification without
embedding any specific details into DxeCapsuleLibFmp.  The protocol must
be part of the running firmware so drivers embedded into capsules can't
affect processing of other capsules in this way.

A failure to transform a capsule results in it being skipped.  A
successful transformation leads to its re-validation before further
processing.

Signed-off-by: Gustavo dos Santos Cardoso <gustavo_16a@hotmail.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-07 20:40:18 +03:00
Sergii Dmytruk 0d95d4168c MdeModulePkg: Improve warning about the test key
Explain what it means such that a reader unfamiliar with subject can
understand the warning.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-03 01:03:15 +03:00
Filip Lewiński 7e3528169a MdeModulePkg: serial mode as fallback in graphical CUPD
Improve the Capsule Update flow, so that if the
`CONFIG_EDK2_GRAPHICAL_CAPSULE_PROGRESS` is set but no monitor is
detected, the update doesn't fail but rather falls back to serial
mode.

Signed-off-by: Filip Lewinski <filip.lewinski@3mdeb.com>
2026-05-03 01:03:15 +03:00
Sergii Dmytruk 852acbcdd2 MdeModulePkg/DxeCapsuleLibFmp: save FMP's payload's abort reason to report
Before this change, it was only printed to the log and then discarded.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-03 01:03:15 +03:00
Sergii Dmytruk d8187dd04c MdeModulePkg/DxeCapsuleLibFmp: support optional payload update message
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-03 01:03:15 +03:00
Filip Lewiński db7722a0fb SdMmcPciHcDxe/BayhubHost.c: add
Apply https://edk2.groups.io/g/devel/message/100548 in order to fix SD
cards not listing as bootable devices/mountable volumes.

Signed-off-by: Filip Lewinski <filip.lewinski@3mdeb.com>
2026-05-03 01:03:14 +03:00
Sergii Dmytruk 10a21545de MdeModulePkg/DxeCapsuleLibFmp: display capsule's FwClass GUID
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-03 01:03:14 +03:00
Sergii Dmytruk ce2f131cde MdeModulePkg/DxeCapsuleLibFmp: be less alarming if BIOS should be fine
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-03 01:03:14 +03:00
Sergii Dmytruk da2a0e8c66 MdeModulePkg/DxeCapsuleLibFmp: display firmware versions
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-03 01:03:14 +03:00
Sergii Dmytruk ebd3473374 DasharoPayloadPkg,MdeModulePkg: guard capsule report by a PCD
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-03 01:03:14 +03:00
Sergii Dmytruk 1333380865 MdeModulePkg/DxeCapsuleLibFmp: collect and report update information
Trace various branches of capsule processing to report how handling of
a capsule or its payload went.  The report is displayed at the end of
the second round of capsule processing or after the first one if it ends
with a reboot.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-03 01:03:14 +03:00
Sergii Dmytruk 1033835d70 MdeModulePkg/DxeCapsuleLibFmp: add update report
Unused at this point.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-03 01:03:14 +03:00
Sergii Dmytruk 3ff20205cc DasharoPayloadPkg: enable "immediate" on-disk capsules
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-03 01:03:13 +03:00
Sergii Dmytruk 8a9357729c MdeModulePkg: support "immediate" on-disk capsules
That is loading and processing on-disk capsules during the same boot
without relocating the capsules to a dedicated non-volatile storage on
ESP or loading them as in-RAM capsules and then rebooting.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-03 01:03:13 +03:00
Sergii Dmytruk 4cdf9ca60e MdeModulePkg/DxeCapsuleLibFmp/CapsuleOnDisk.c: fix leaks in RelocateCapsuleToRam()
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-03 01:03:13 +03:00
Sergii Dmytruk 13d0fb822f MdeModulePkg/DxeCapsuleLibFmp/CapsuleOnDisk.c: extract functions for freeing file info
For deduplication and to make adding future code that needs to do the
same easier.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-03 01:03:13 +03:00
Sergii Dmytruk 328b35d0f9 MdeModulePkg/DxeCapsuleLibFmp/CapsuleOnDisk.c: fix typos/wording/formats
The typos got in the way of grepping for output lines and reporting
errors as numbers is not very helpful.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-05-03 01:03:13 +03:00
Michał Żygowski ecdbd5b8e3 MdeModulePkg/Library/FileExplorerLib: Change text field to subtitle
The text field between the list of files and option to create files or
directories was a selectable empty string with no functionality. When
moving through the menu one had to press the arrow one extra time to
navigate to the files. As it is confusing, change the text field to
subtitle so it is not selectable anymore.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2026-05-03 01:03:11 +03:00
Michał Żygowski 3e03150aba MdeModulePkg/Universal/DisplayEngineDxe: Do not highlight empty strings
Highlighting empty strings or strings containing a single SPACE character
resulted in drawing a confusing single-character-wide black rectangle.

Skip highlighting those empty strings. It may be useful in forms where
no entry should be highlighted by default. It can be done by defining
a text field with empty prompt and help string as first menu entry.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2026-05-03 01:03:11 +03:00
Michał Żygowski 5f06e567f5 Add PCDs to control quiet and fast boot in the project
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2026-05-03 01:03:09 +03:00
Michał Żygowski 2fa08c7ff7 MdeModulePkg/Bus/Isa/Ps2KeyboardDxe: Reduce PS/2 KBD init to minimum
For NVC laptops it is required to issue KBEN command only to get
the keyboard working on coldboot paths with Windows. This commmit
will be squashed with previous commits once it is verified to work
on MSI desktops.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2026-05-03 01:03:08 +03:00
Michał Żygowski 00966563df MdeModulePkg/Bus/Isa/Ps2KeyboardDxe: Issue KBEN command after KBC init
After the minimal KBC initialization is	done on	fast boot path,	we still
need to	issue KBEN command. This is a workaround for NVC EC implementation
of KBC which enables keyboard scanning on KBEN command. It has been
verified that Windows does not issue this command, os it is required to get
the keyboard working on	cold boot paths	on NovaCustom laptops. Verfied that
this command did not need to be issued on MSI desktops.

TEST=Boot NovaCustom V560TNX after shutdown from Windows without AC
connected and confirm the internal keyboard still works.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2026-05-03 01:03:08 +03:00
Michał Żygowski 493ea8b23c MdeModulePkg/Bus/Isa/Ps2KeyboardDxe: Lower the PS/2 KBD detection timeout
One seconds seems a bit too excessive to detect the keyboard. Lower the
detection timeout to half a second.

TEST=Verify PS/2 keyboard is initialized properly on MSI Z690-A DDR4 with
Media-Tech MT122K PS/2 keyboard and NovaCustom V540TND.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2026-05-03 01:03:08 +03:00
Michał Żygowski b5e1f9a2e5 MdeModulePkg/Bus/Isa/Ps2KeyboardDxe: Perform minimal i8042 controller init
On fast boot path the i8042 controller was not being initialized at all if
Windows was being booted. This resulted in the keyboard not working after
shutdown and even after reset from Windows. It only worked when the keyboard
was initialized earlier properly and no shutdown occurred. On Linux boot
path, GRUB was calling ReadKeyStroke which triggered connecting consoles and
performing a full PS/2 initialization.

On fast boot path, add minimal i8042 controller initialization without
actual keyboard initialization and extended verification. It is sufficient
for both Linux and Windows to set up the PS/2 keyboard properly.

Also move setting the FastPs2Detection PCD to the Ps2KeyboardDxe, as it
caused most of the i8042 controller initialization to be skipped. Once the
controller is initialized on module start, the extra initialization may be
skipped later on fast boot path.

TEST=PS/2 keyboard works in both Ubuntu Linux and Windows after shutdown and
restart on NovaCustom V540TND.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2026-05-03 01:03:08 +03:00
Michał Żygowski 87628c73ef MdeModulePkg/Bus/Isa/Ps2KeyboardDxe: Don't do extended verification on fast boot
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2026-05-03 01:03:07 +03:00