Skip to content

Commit

Permalink
Merge branch 'acidanthera:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
CrisHotpatch authored Aug 23, 2024
2 parents 4d051ff + a41b9a7 commit 1e8ef7b
Show file tree
Hide file tree
Showing 25 changed files with 1,952 additions and 18 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
OpenCore Changelog
==================
#### v1.0.2
- Fixed error in macrecovery when running headless, thx @mkorje

#### v1.0.1
- Updated code and added progress bar to macrecovery, thx @soyeonswife63
- Bundled fat binary i386/x64 10.6+ compatible `nvramdump` with LogoutHook release
- Added support for manual build of i386/x64 10.6+ versions of userspace tools via `FATBIN32=1 make`
- Disabled `XcpmExtraMsrs MSR_MISC_PWR_MGMT` patch on macOS 12+ due to non-existence
- Fixed `ThirdPartyDrives` quirk on macOS 14.4 and above
- Resolved issue booting recovery for OS X 10.8 and earlier since 0.9.7
- Migrated to edk2-stable202405

#### v1.0.0
- Updated builtin firmware versions for SMBIOS and the rest
Expand Down
2 changes: 1 addition & 1 deletion Docs/Configuration.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b6d1384b2c506501f6c1c41f77aa7473
b793988590c9e9ddd71ce9318abe5369
Binary file modified Docs/Configuration.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion Docs/Configuration.tex
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@

\vspace{0.2in}

Reference Manual (1.0.1)
Reference Manual (1.0.2)

\vspace{0.2in}

Expand Down
Binary file modified Docs/Differences/Differences.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions Docs/Differences/Differences.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
\documentclass[]{article}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL PreviousConfiguration.tex Fri May 10 15:27:32 2024
%DIF ADD ../Configuration.tex Fri May 10 15:27:32 2024
%DIF DEL PreviousConfiguration.tex Fri Aug 16 15:32:06 2024
%DIF ADD ../Configuration.tex Fri Aug 16 15:32:06 2024

\usepackage{lmodern}
\usepackage{amssymb,amsmath}
Expand Down Expand Up @@ -118,7 +118,7 @@
%DIF HYPERREF PREAMBLE %DIF PREAMBLE
\providecommand{\DIFadd}[1]{\texorpdfstring{\DIFaddtex{#1}}{#1}} %DIF PREAMBLE
\providecommand{\DIFdel}[1]{\texorpdfstring{\DIFdeltex{#1}}{}} %DIF PREAMBLE
%DIF COLORLISTINGS PREAMBLE %DIF PREAMBLE
%DIF LISTINGS PREAMBLE %DIF PREAMBLE
\RequirePackage{listings} %DIF PREAMBLE
\RequirePackage{color} %DIF PREAMBLE
\lstdefinelanguage{DIFcode}{ %DIF PREAMBLE
Expand Down Expand Up @@ -154,7 +154,7 @@

\vspace{0.2in}

Reference Manual (1.0\DIFdelbegin \DIFdel{.0}\DIFdelend \DIFaddbegin \DIFadd{.1}\DIFaddend )
Reference Manual (1.0\DIFdelbegin \DIFdel{.1}\DIFdelend \DIFaddbegin \DIFadd{.2}\DIFaddend )

\vspace{0.2in}

Expand Down
2 changes: 1 addition & 1 deletion Docs/Differences/PreviousConfiguration.tex
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@

\vspace{0.2in}

Reference Manual (1.0.0)
Reference Manual (1.0.1)

\vspace{0.2in}

Expand Down
Binary file modified Docs/Errata/Errata.pdf
Binary file not shown.
29 changes: 29 additions & 0 deletions Include/Acidanthera/Guid/LegacyBios.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/** @file
Defines a Tag GUID used to mark a UEFI legacy BIOS thunk driver based
on legacy BIOS services and legacy option ROM. This Tag GUID must be installed on
the ImageHandle of any module that follows the EFI Driver Model and uses
the Int86() or FarCall() services of the Legacy Bios Protocol to produce
a standard UEFI I/O Protocol.
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/

#ifndef _LEGACY_BIOS_H_
#define _LEGACY_BIOS_H_

///
/// The Global ID for the Legacy BIOS GUID that must be installed onto the ImageHandle
/// of any module follows the EFI Driver Model and uses the Int86() or FarCall()
/// services of the Legacy BIOS Protocol to produce a standard UEFI I/O Protocol.
///
#define EFI_LEGACY_BIOS_GUID \
{ \
0x2e3044ac, 0x879f, 0x490f, {0x97, 0x60, 0xbb, 0xdf, 0xaf, 0x69, 0x5f, 0x50 } \
}

extern EFI_GUID gEfiLegacyBiosGuid;

#endif
2 changes: 1 addition & 1 deletion Include/Acidanthera/Library/OcMainLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
OpenCore version reported to log and NVRAM.
OPEN_CORE_VERSION must follow X.Y.Z format, where X.Y.Z are single digits.
**/
#define OPEN_CORE_VERSION "1.0.1"
#define OPEN_CORE_VERSION "1.0.2"

/**
OpenCore build type reported to log and NVRAM.
Expand Down
290 changes: 290 additions & 0 deletions Include/Acidanthera/Protocol/Legacy8259.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,290 @@
/** @file
This protocol abstracts the 8259 interrupt controller. This includes
PCI IRQ routing needed to program the PCI Interrupt Line register.
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
This protocol is defined in Framework for EFI Compatibility Support Module spec
Version 0.97.
**/

#ifndef _EFI_LEGACY_8259_H_
#define _EFI_LEGACY_8259_H_

#define EFI_LEGACY_8259_PROTOCOL_GUID \
{ \
0x38321dba, 0x4fe0, 0x4e17, {0x8a, 0xec, 0x41, 0x30, 0x55, 0xea, 0xed, 0xc1 } \
}

typedef struct _EFI_LEGACY_8259_PROTOCOL EFI_LEGACY_8259_PROTOCOL;

typedef enum {
Efi8259Irq0,
Efi8259Irq1,
Efi8259Irq2,
Efi8259Irq3,
Efi8259Irq4,
Efi8259Irq5,
Efi8259Irq6,
Efi8259Irq7,
Efi8259Irq8,
Efi8259Irq9,
Efi8259Irq10,
Efi8259Irq11,
Efi8259Irq12,
Efi8259Irq13,
Efi8259Irq14,
Efi8259Irq15,
Efi8259IrqMax
} EFI_8259_IRQ;

typedef enum {
Efi8259LegacyMode,
Efi8259ProtectedMode,
Efi8259MaxMode
} EFI_8259_MODE;

/**
Get the 8259 interrupt masks for Irq0 - Irq15. A different mask exists for
the legacy mode mask and the protected mode mask. The base address for the 8259
is different for legacy and protected mode, so two masks are required.
@param This The protocol instance pointer.
@param MasterBase The base vector for the Master PIC in the 8259 controller.
@param SlaveBase The base vector for the Slave PIC in the 8259 controller.
@retval EFI_SUCCESS The new bases were programmed.
@retval EFI_DEVICE_ERROR A device error occurred programming the vector bases.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_SET_VECTOR_BASE)(
IN EFI_LEGACY_8259_PROTOCOL *This,
IN UINT8 MasterBase,
IN UINT8 SlaveBase
);

/**
Get the 8259 interrupt masks for Irq0 - Irq15. A different mask exists for
the legacy mode mask and the protected mode mask. The base address for the 8259
is different for legacy and protected mode, so two masks are required.
@param This The protocol instance pointer.
@param LegacyMask Bit 0 is Irq0 - Bit 15 is Irq15.
@param LegacyEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15.
@param ProtectedMask Bit 0 is Irq0 - Bit 15 is Irq15.
@param ProtectedEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15.
@retval EFI_SUCCESS 8259 status returned.
@retval EFI_DEVICE_ERROR Error reading 8259.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_GET_MASK)(
IN EFI_LEGACY_8259_PROTOCOL *This,
OUT UINT16 *LegacyMask OPTIONAL,
OUT UINT16 *LegacyEdgeLevel OPTIONAL,
OUT UINT16 *ProtectedMask OPTIONAL,
OUT UINT16 *ProtectedEdgeLevel OPTIONAL
);

/**
Set the 8259 interrupt masks for Irq0 - Irq15. A different mask exists for
the legacy mode mask and the protected mode mask. The base address for the 8259
is different for legacy and protected mode, so two masks are required.
Also set the edge/level masks.
@param This The protocol instance pointer.
@param LegacyMask Bit 0 is Irq0 - Bit 15 is Irq15.
@param LegacyEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15.
@param ProtectedMask Bit 0 is Irq0 - Bit 15 is Irq15.
@param ProtectedEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15.
@retval EFI_SUCCESS 8259 status returned.
@retval EFI_DEVICE_ERROR Error writing 8259.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_SET_MASK)(
IN EFI_LEGACY_8259_PROTOCOL *This,
IN UINT16 *LegacyMask OPTIONAL,
IN UINT16 *LegacyEdgeLevel OPTIONAL,
IN UINT16 *ProtectedMask OPTIONAL,
IN UINT16 *ProtectedEdgeLevel OPTIONAL
);

/**
Set the 8259 mode of operation. The base address for the 8259 is different for
legacy and protected mode. The legacy mode requires the master 8259 to have a
master base of 0x08 and the slave base of 0x70. The protected mode base locations
are not defined. Interrupts must be masked by the caller before this function
is called. The interrupt mask from the current mode is saved. The interrupt
mask for the new mode is Mask, or if Mask does not exist the previously saved
mask is used.
@param This The protocol instance pointer.
@param Mode The mode of operation. i.e. the real mode or protected mode.
@param Mask Optional interupt mask for the new mode.
@param EdgeLevel Optional trigger mask for the new mode.
@retval EFI_SUCCESS 8259 programmed.
@retval EFI_DEVICE_ERROR Error writing to 8259.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_SET_MODE)(
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_8259_MODE Mode,
IN UINT16 *Mask OPTIONAL,
IN UINT16 *EdgeLevel OPTIONAL
);

/**
Convert from IRQ to processor interrupt vector number.
@param This The protocol instance pointer.
@param Irq 8259 IRQ0 - IRQ15.
@param Vector The processor vector number that matches an Irq.
@retval EFI_SUCCESS The Vector matching Irq is returned.
@retval EFI_INVALID_PARAMETER The Irq not valid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_GET_VECTOR)(
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_8259_IRQ Irq,
OUT UINT8 *Vector
);

/**
Enable Irq by unmasking interrupt in 8259
@param This The protocol instance pointer.
@param Irq 8259 IRQ0 - IRQ15.
@param LevelTriggered TRUE if level triggered. FALSE if edge triggered.
@retval EFI_SUCCESS The Irq was enabled on 8259.
@retval EFI_INVALID_PARAMETER The Irq is not valid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_ENABLE_IRQ)(
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_8259_IRQ Irq,
IN BOOLEAN LevelTriggered
);

/**
Disable Irq by masking interrupt in 8259
@param This The protocol instance pointer.
@param Irq 8259 IRQ0 - IRQ15.
@retval EFI_SUCCESS The Irq was disabled on 8259.
@retval EFI_INVALID_PARAMETER The Irq is not valid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_DISABLE_IRQ)(
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_8259_IRQ Irq
);

/**
PciHandle represents a PCI config space of a PCI function. Vector
represents Interrupt Pin (from PCI config space) and it is the data
that is programmed into the Interrupt Line (from the PCI config space)
register.
@param This The protocol instance pointer.
@param PciHandle The PCI function to return the vector for.
@param Vector The vector for the function it matches.
@retval EFI_SUCCESS A valid Vector was returned.
@retval EFI_INVALID_PARAMETER PciHandle not valid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_GET_INTERRUPT_LINE)(
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_HANDLE PciHandle,
OUT UINT8 *Vector
);

/**
Send an EOI to 8259
@param This The protocol instance pointer.
@param Irq 8259 IRQ0 - IRQ15.
@retval EFI_SUCCESS EOI was successfully sent to 8259.
@retval EFI_INVALID_PARAMETER The Irq isnot valid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_END_OF_INTERRUPT)(
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_8259_IRQ Irq
);

/**
@par Protocol Description:
Abstracts the 8259 and APIC hardware control between EFI usage and
Compatibility16 usage.
@param SetVectorBase
Sets the vector bases for master and slave PICs.
@param GetMask
Gets IRQ and edge/level masks for 16-bit real mode and 32-bit protected mode.
@param SetMask
Sets the IRQ and edge\level masks for 16-bit real mode and 32-bit protected mode.
@param SetMode
Sets PIC mode to 16-bit real mode or 32-bit protected mode.
@param GetVector
Gets the base vector assigned to an IRQ.
@param EnableIrq
Enables an IRQ.
@param DisableIrq
Disables an IRQ.
@param GetInterruptLine
Gets an IRQ that is assigned to a PCI device.
@param EndOfInterrupt
Issues the end of interrupt command.
**/
struct _EFI_LEGACY_8259_PROTOCOL {
EFI_LEGACY_8259_SET_VECTOR_BASE SetVectorBase;
EFI_LEGACY_8259_GET_MASK GetMask;
EFI_LEGACY_8259_SET_MASK SetMask;
EFI_LEGACY_8259_SET_MODE SetMode;
EFI_LEGACY_8259_GET_VECTOR GetVector;
EFI_LEGACY_8259_ENABLE_IRQ EnableIrq;
EFI_LEGACY_8259_DISABLE_IRQ DisableIrq;
EFI_LEGACY_8259_GET_INTERRUPT_LINE GetInterruptLine;
EFI_LEGACY_8259_END_OF_INTERRUPT EndOfInterrupt;
};

extern EFI_GUID gEfiLegacy8259ProtocolGuid;

#endif
Loading

0 comments on commit 1e8ef7b

Please sign in to comment.