Commit graph

26 commits

Author SHA1 Message Date
Matthijs Lavrijsen
5bfa808faa
Fix build with current EDK2 master
Re-add the missing headers for EFI_LEGACY_BIOS_PROTOCOL and gEfiLegacyBiosGuid which were removed from OvmfPkg in 9d4becddba.

Neither OVMF nor EfiGuard actually *needs* the CSM for anything, but being able to check for the presence of the legacy BIOS protocol is still important in order to determine if we are actually booting a legacy BIOS boot option. This allows us to then inform the user that what they are doing is not suppported and most likely a mistake.

Fixes #119
2025-01-17 04:46:34 +01:00
Matthijs Lavrijsen
b55a50a414
Fix build with current EDK2 master
Override the unwanted /GS flag addition (MSVC) and -fno-stack-protector removal (GCC) introduced in f53f029122

Additionally remove some other (less harmful but still unwanted) build flags that have been made the default in MSVC in the .vcxproj/.props files as well.

Fixes #134
2025-01-17 04:46:34 +01:00
Matthijs Lavrijsen
f3cf9d1c6b
Misc. minor warning fixes 2025-01-17 04:46:34 +01:00
Matthijs Lavrijsen
b8d787c347
Loader: do not pass load options to auto-generated boot entries 2024-01-21 07:27:42 +01:00
Matthijs Lavrijsen
620defa398
Use case-insensitive string comparison when checking file names 2024-01-21 07:25:48 +01:00
Matthijs Lavrijsen
a1c33c4ae6
Loader: close root volume handle in LocateFile() 2024-01-21 06:07:36 +01:00
Matthijs Lavrijsen
529537f027
Loader: make driver configuration a runtime option
The interactive driver configuration now requires the HOME key to be pressed when the loader is started. If it is not pressed, the default configuration will be used as before.
The CONFIGURE_DRIVER compile time define is no longer useful due to this change and has been removed.
2023-10-12 12:15:45 +02:00
Matthijs Lavrijsen
d9eafb77f8
Use EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL if available 2023-10-12 09:01:55 +02:00
Matthijs Lavrijsen
1eeb31ac49
Loader: report POST codes when booting 2023-10-12 03:10:56 +02:00
Matthijs Lavrijsen
bb77cca1a7
Loader: continue booting if the driver is already loaded 2023-09-25 21:17:57 +02:00
Matthijs Lavrijsen
e588a7d948
Loader: check entry descriptions to determine whether they are Windows 2023-03-26 19:10:14 +02:00
Matthijs Lavrijsen
9c35789cf8
Loader: remove BdsLibConnectAllDriversToAllControllers
EfiBootManagerConnectAll provides this functionality now.
2023-03-26 18:04:41 +02:00
Matthijs Lavrijsen
3e9c9868b0
Loader: minor SetHighestAvailableMode improvements
- Add primitive aspect ratio weighting when determining which text mode is best
- Move all uses of gST->ConOut to SetHighestAvailableTextMode and exit early if it is NULL
2023-03-26 18:04:00 +02:00
Matthijs Lavrijsen
83bb58f2f4
Loader: handle EFI_SECURITY_VIOLATION from LoadImage
This behaviour matches that of edk2's UefiBootManagerLib since edk2 commit f7fdd620e8
2023-03-26 16:36:44 +02:00
Matthijs Lavrijsen
dea33fff9f
Misc. warning fixes 2023-03-13 00:11:08 +01:00
Matthijs Lavrijsen
f7f83efed4
Misc. warning fixes 2022-08-17 08:00:41 +02:00
Matthijs Lavrijsen
5c649201bb
Fix MSVC 2019 and GCC 10 warnings 2021-01-07 16:09:25 +01:00
Mattiwatti
0256353e45
Loader: call BmSetMemoryTypeInformationVariable
Note that BmSetMemoryTypeInformationVariable() is told by the loader that the image being loaded is *not* a boot application, which is a blatant lie. The reason for doing this is to prevent BmSetMemoryTypeInformationVariable() from performing a warm reset of the system due to a change in the memory type info. (Again, and again, and again...)

This is an attempt to fix S4 (hibernate) entry/resume issues; see #12.
2020-05-28 18:53:20 +02:00
Mattiwatti
9947a9fbc2
Loader: support legacy BIOS boot entries in the fallback path
Fixes #9
2020-04-25 06:33:56 +02:00
Mattiwatti
00159446da
Compile as UTF-8 2019-12-04 08:07:26 +01:00
Mattiwatti
e084160727
Disable Spectre mitigation crap 2019-10-07 07:09:16 +02:00
Mattiwatti
22cd8379cd
Update README.md 2019-10-07 06:18:45 +02:00
Mattiwatti
f9270cfb38
Fix potential recursive self-boot by Loader.efi
The EFI variable "BootCurrent" corresponds to XXXX in some variable "BootXXXX", and this value was being used to guard against recursive self-booting. However, EfiBootManagerGetLoadOptions() already returns the options sorted by the contents of the "BootOrder" variable, which means that XXXX does not necessarily correspond to the linear index in a for loop. Instead use BootOptions[Index].OptionNumber to retrieve and compare the original value of XXXX

Fixes #5
2019-07-09 22:02:57 +02:00
Mattiwatti
21828acd65
Update to VS2019 2019-04-08 23:25:10 +02:00
Mattiwatti
fafb739ebe
Minor fixes 2019-03-28 20:29:12 +01:00
Mattiwatti
0be8f445b6
Initial commit 2019-03-25 20:56:43 +01:00