Commit Graph

32691 Commits

Author SHA1 Message Date
Michał Kopeć a47bcc9cd5 CrScreenshotDxe: add submodule
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
edk2-protectli-vp32xx-fix-subhook
2026-06-01 10:33:05 +02:00
Michael D Kinney de3319835c UnitTestFrameworkPkg: Use TianoCore mirror of subhook submodule
Change subhook url from https://github.com/Zeex/subhook to
https://github.com/tianocore/edk2-subhook because old url is
no longer available.

Also align .gitmodules file to use consistent LF line endings.

Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2026-06-01 09:40:10 +02:00
Michał Żygowski c2de870a67 MdePkg/MdePkg.dec: Default the fast and quiet boot PCDs to false
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-03-03 12:26:26 +01:00
Michał Żygowski 8d06fe48bd Add PCDs to control quiet and fast boot in the project
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-28 16:06:11 +01:00
Michał Żygowski 5556f91962 OvmfPkg/OvmfPkgX64.dsc: Fix build with fast boot
Fast Boot feature added a few PCDs to common Dasharo modules. These
PCDs have to be defined as DynamicDefault in the platform DSC file.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-26 15:16:56 +01:00
Michał Żygowski ee0bb1bb61 DasharoPayloadPkg: Reduce FV boot option registering redundancy
The RegisterFvBootOption and UnregisterFvBootOption functions shared
a lot of code. Merge those two functions into a new SyncFvBootOption
which checks for file presence and registers the option accordingly or
removes it if the file does not exist or should be removed explicitly.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-26 15:16:56 +01:00
Michał Żygowski b33fd05d83 DasharoPayloadPkg/DasharoPayloadPkg.dsc: Clean up libraries
The UefiDevicePathLib from MdePkg is used everywhere, so no need
to define the same library three times in different places. Removed
redunant entries with UefiDevicePathLib.

Also the FileHandleLib seems to be used by QEMU Q35 target and is not
compiled when Shell is removed. Move it to common section with libraries.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-26 15:16:56 +01:00
Michał Żygowski c292d6e3dd DasharoPayloadPkg/PlatformBootManagerLib: Register only existing FV boot options
When updating firmware to a build without UEFI Shell, the settings may be preserved,
including the boot options from previous firmware, which results in the non-existent
UEFI Shell still being presented as an active boot option. To avoid confusion, check
the existence of a file before registering a boot option.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-26 15:16:55 +01:00
Michał Żygowski 146557bf93 DasharoPayloadPkg/DasharoPayloadPkg.dsc: Guard net defines with NETWORK_ENABLE
When trying to build without EFI Shell, a build issue appears saying that
PcdAllowHttpConnections is not declared in DEC files referenced in INF files
in FDF. It occurred that NetworkPcds.dsc.inc initializes a that PCD, but
modules that use this PCD are only built and included into the image if
NETWORK_ENABLE is TRUE. As a result a PCD was defined, but not a single
module actually existed in the image to use it, i.e. use the NetworkPkg.dec
file. This bug lived silently until EFI Shell was removed, because one of the
EFI Shell module INF files included NetworkPkg.dec.

To solve this, guard the network defines with NETWORK_ENABLE, so that the
PCD is only initialized in case where network is actually enabled.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-26 15:16:55 +01:00
mkopec 5f2e437e0a [automated change] Update DBX 2025-02-24 2025-02-26 15:15:30 +01:00
Michał Kopeć 9c75490727 .github/workflows/dbx.yml: Autoupdate DBX
Update the DBX workflow to automatically submit PR if DBX is outdated.
2025-02-26 12:25:38 +01:00
Michał Żygowski 99440b2176 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>
2025-02-25 18:38:34 +01:00
Michał Żygowski 9cdeb7686a 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>
2025-02-25 18:38:34 +01:00
Michał Żygowski fbaba4ea9a DasharoPayloadPKg/PlatformBootManagerLib: Improve PS/2 KBD detection
Previously the PS/2 keyboard was attempted to be detected when the i8042
controller was not initialized yet. Ps2KeyboardDxe module requires the
keyboard to be added to the ConIn and the real i8042 controller and keyboard
initialization happens when the console is connected (using DriverBindingStart).
That is why checking for keyboard presence in PlatformBootManagerBeforeConsole
is too early, because the controller is not yet ready to issue commands to the
keyboard. When all consoles are connected on non-fastboot path, we can
check the keyboard presence and remove it from ConIn if it is not detected.
That way we avoid the huge delay when booting Ventoy
(https://github.com/Dasharo/dasharo-issues/issues/160), which called the
ConIn->Reset multiple times. The console reset on PS/2 keyboard is very
time-consuming.

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>
2025-02-25 18:38:34 +01:00
Michał Żygowski c6ba0d9b19 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>
2025-02-25 18:38:34 +01:00
Michał Żygowski f6d695799e 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>
2025-02-25 18:38:33 +01:00
Michał Żygowski 270ac9f3a7 DasharoPayloadPkg/DasharoPayloadPkg.fdf: Do not load LAN ROM on fast boot
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-25 18:38:33 +01:00
Michał Żygowski 33d754d1f9 Dasharo: Treat FUM boot as non-fast boot
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-25 18:38:33 +01:00
Michał Żygowski 40bbebb515 DasharoPayloadPkg/PlatformBootManagerLib: Skip PS/2 detection of fast boot
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-25 18:38:33 +01:00
Michał Żygowski 43f945c9c0 PlatformBootManagerLib: Connect drivers to mass storage only on fast boot
Recursively connect drivers to storage devices, so that all protocols
will be installed on the storage handles.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-25 18:38:33 +01:00
Michał Żygowski 0c81dd25eb MdePkg/Include/IndustryStandard/Pci22.h: Add macro for mass storage check
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-25 18:38:32 +01:00
Michał Żygowski ed11781097 FSDrivers: Do not load FS drivers on fast boot path
Use a depex file containing a NOT gDasharoFastBootPolicyGuid to
prevent loading the module if fast boot is enabled.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-25 18:38:32 +01:00
Michał Żygowski 1eb9f32341 DasharoPayloadPkg/PciPlatformDxe: Load VGA ROMs only on fast boot
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-25 18:38:32 +01:00
Michał Żygowski a28970836e DasharoPayloadPkg/PlatformBootManagerLib: Do not register iPXE boot on fast boot
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-25 18:38:32 +01:00
Michał Żygowski ef7c0b3032 DasharoModulePkg/DasharoBootPolicies: Use fast PS/2 detection on fast boot
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-02-25 18:38:32 +01:00