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.
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).
This quirk is needed to boot macOS 10.7 and older when using a 32-bit kernel on a 64-bit UEFI firmware that makes uses of FPU or SSE instructions in runtime services (such as Hyper-V).
- Avoid potentially leaving one boot where BOOTSERVICE_ACCESS variable
can be written by OS
- Remove incorrect implication that OpenCore's NVRAM reset will clear
static4 settings
Normally only useful for our HttpBootDxe, which supports HTTP
boot from static IP address as long as URI is also pre-specified.
The NVRAM setting should affect normal EDK II derived network stacks
and will configure a static IP on the card, but this will later be
ignored and overridden by DHCP when PXE or HTTP boot is started in the
standard network stack.
Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
Fix operation of `sign.command` when printable characters occur
immediately before `=BEGIN OC VAULT=`. `strings` finds the location of
the first printable character in such a sequence. `hexdump` automatically
works on 16 byte boundaries, so still finds the correct offset.
Use `BASE_ALIGNAS` to enforce the required alignment, which will not be
correct on all builds unless enforced (note alignment is required purely
for locating the structure correctly from external script as above, not
for reading in C).
Remove struct packing, since structs had better be naturally packed anyway
(if not, reading from them without arbitrary-alignment-safe code, as we
do, would be undefined behaviour). Add static asserts to confirm expected
size as required by `sign.command`.
Update the docs to refer to `sign.command` rather than to include the
signing commands explicitly - otherwise we have two places that need to
be kept in sync for signing commands, and note that the commands in the
two places were already out of sync.
Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
In GRUB2+blscfg mode:
- Allow grub vars in 'initrd' as well as in 'options'
- Allow multiple initrd files on one 'initrd' line
- Initialise empty $tuned_params and $tuned_initrd grub vars if no
values present, on an optional flag enabled by default (since
we want to make booting major distros easy)
In GRUB2+blscfg mode (seem to be allowed now, not required for fix):
- Allow multiple 'initrd' lines
- Allow multiple 'options' lines
Add variant of OcParseVars which can parse as value-only tokens.
Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
While FixupAppleEfiImages is generally not needed, OpenDuet, VMs,
and some other firmware need it for proper macOS booting.
Given that the quirk is generally harmless, enable it in the samples.