Early Mac EFI returns EFI_INVALID_PARAMETER if storage for any single
NVRAM variable exceeds a certain size (leaves 2006 bytes for the value,
if the variable has a 4 character name). Since all of fsXX:\efi\tools\,
fsXX:\efi\boot\ and fsXX:\ are added to a CHAR16 shell `path` variable
for each file system found, the variable exceeds this limit when there
are greater than 25 file systems.
In the RELEASE shell this causes the `path` variable to get set to a
strange value. Unfortunately in the DEBUG shell it causes an ASSERT
and the shell does not start.
With this patch the DEBUG shell behaves like RELEASE shell: due to the
implementation of ShellProtocol SetEnv, when there is an error the
variable gets deleted and not recreated, thus the final path variable
only contains paths for file systems after the one which caused the
error. While this patch is not an ideal fix for the underlying problem,
it does simply recreate the longstanding behaviour of the RELEASE shell
on the same systems, and is preferable to the DEBUG shell being unusable.
Addresses https://github.com/acidanthera/bugtracker/issues/2005
This feature adds support for UEFI Event in userspace. The
following has been implemented:
- The number of events if fixed
- Event dispatching occurs through an explicit call to
the dispatcher from UEFI Event functions
- Event groups are not supported
Signed-off-by: Pavel Naberezhnev <pavelnaberezhnev@gmail.com>
Newly added example demonstrates patching RTC device supporting 2 I/O
ports which are reported as 8 I/O ports in ACPI. The patch fixes
PowerManagement crashes in e.g. 10.6 and newer in OVMF.
OcLoadConsoleFont currently loads the specified console path from
Resources\Font\\, which can cause vault failures if vault.plist doesn't
include the duplicate path separator. Remove it to match other paths.
Prior to macOS 10.5 the logic used to interpret PHY status was wrong.
AppleIntel8254XEthernet checks PHY Specific Status register for bit 3
(Transmit Pause Enabled) presence instead of bit 10 (Link).
This patch forces PHY Specific Status register 0xac08, which means
always up.
This is needed to Force inject longer kexts, e.g. networking:
System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/
AppleIntel8254XEthernet.kext/Contents/MacOS/AppleIntel8254XEthernet
OpenDuet includes unmodified VariableRuntimeDxe. OpenVariableRuntimeDxe
is a slightly modified variant of that (see comments in header of VariableDxe.c).
Mach-O uses "indirect symbol" ambiguously. The first kind are "indirect
symbols" indicated by their type. They are located in the regular symbol
table, possibly outside the local, external and undefined ranges. Their
value is an index into the string table, which indicates the name of
another symbol they alias. We assume these to only be used by KPIs,
mostly as symbol aliases for deprecated symbol names.
The second kind is the "indirect symbol table", which is merely a flat
list of 32-bit indices into the symbol table.
When the handling code was written, the incorrect assumption was made
that the "indirect symbol table" is a range of "indirect symbols", much
like how local, external and undefined symbols are explicitly indexed.
However, this is not true and causes bugs in handling indirect symbols.
This patch drops this incorrect (and dangerous) assumption and strictly
separates the two concepts. As OpenCore does not inject KPIs, ignore
indirect symbols entirely.
Prevent unsigned integer overflow in messages shown for ExecutablePath and PlistPath, if BundlePath has already exceeded safe length.
Fix off-by-one error in displayed "should not exceed" value.
Note: Neither change affects which inputs are errors, they rather fix the displayed messages when errors are found.