Skip to content

Commit

Permalink
OcConsoleLib: Fix installing Apple FB Info protocol when no GOP exists
Browse files Browse the repository at this point in the history
vit9696 committed Feb 20, 2021
1 parent 5e9f948 commit 39605d0
Showing 4 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ OpenCore Changelog
- Added support for R/O page tables in `SetupVirtualMap` quirk
- Added OEM preservation for certain Apple SMBIOS tables
- Fixed switching to graphics mode when entering OpenCanopy
- Fixed installing Apple FB Info protocol when no GOP exists

#### v0.6.6
- Added keyboard and pointer entry scroll support in OpenCanopy
24 changes: 24 additions & 0 deletions Include/Apple/Protocol/AppleDiagLed.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/** @file
Apple Diag Led protocol.
Copyright (C) 2021, vit9696. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/

#ifndef APPLE_DIAG_LED_PROTOCOL_H
#define APPLE_DIAG_LED_PROTOCOL_H

#define APPLE_DIAG_LED_PROTOCOL_GUID \
{ 0xA9FBF34B, 0xE2A2, 0x41D1, \
{ 0xBA, 0x00, 0xA2, 0x74, 0xA5, 0x5C, 0xD1, 0x64 } }

extern EFI_GUID gAppleDiagLedProtocolGuid;

#endif // APPLE_DIAG_LED_PROTOCOL_H
5 changes: 5 additions & 0 deletions Library/OcConsoleLib/FramebufferInfo.c
Original file line number Diff line number Diff line change
@@ -117,6 +117,11 @@ OcAppleFbInfoInstallProtocol (
}
}

if (OcCountProtocolInstances (&gEfiGraphicsOutputProtocolGuid) == 0) {
DEBUG ((DEBUG_ERROR, "OCOS: No GOP protocols for FB info\n"));
return NULL;
}

NewHandle = NULL;
Status = gBS->InstallMultipleProtocolInterfaces (
&NewHandle,
3 changes: 3 additions & 0 deletions OpenCorePkg.dec
Original file line number Diff line number Diff line change
@@ -633,6 +633,9 @@
## Include/Apple/Protocol/AppleDiag.h
gAppleDiagVaultProtocolGuid = { 0xF76761DC, 0xFF89, 0x44E4, { 0x9C, 0x0C, 0xCD, 0x0A, 0xDA, 0x4E, 0xF9, 0x83 }}

## Include/Apple/Protocol/AppleDiagLed.h
gAppleDiagLedProtocolGuid = { 0xA9FBF34B, 0xE2A2, 0x41D1, { 0xBA, 0x00, 0xA2, 0x74, 0xA5, 0x5C, 0xD1, 0x64 }}

## Include/Apple/Protocol/AppleRemovableMedia.h
gAppleRemovableMediaProtocolGuid = { 0x2EA9743A, 0x23D9, 0x425E, { 0x87, 0x2C, 0xF6, 0x15, 0xAA, 0x19, 0x57, 0x88 }}

0 comments on commit 39605d0

Please sign in to comment.