OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
Eg2Info.c File Reference
#include "OcConsoleLibInternal.h"
#include <Guid/AppleVariable.h>
#include <Protocol/AppleEg2Info.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/OcConsoleLib.h>
#include <Library/OcMiscLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>

Go to the source code of this file.

Functions

STATIC EFI_STATUS EFIAPI AppleEg2Unknown1 (IN APPLE_EG2_INFO_PROTOCOL *This, IN EFI_HANDLE GpuHandle)
 
STATIC EFI_STATUS EFIAPI AppleEg2GetPlatformInfo (IN APPLE_EG2_INFO_PROTOCOL *This, IN EFI_HANDLE GpuHandle, OUT VOID *Data, OUT UINTN *Size)
 
STATIC EFI_STATUS EFIAPI AppleEg2StartupDisplay (IN APPLE_EG2_INFO_PROTOCOL *This, IN EFI_HANDLE GpuHandle, OUT VOID *Unk1, OUT VOID *Unk2, OUT VOID *Unk3)
 
STATIC EFI_STATUS EFIAPI AppleEg2GetHibernation (IN APPLE_EG2_INFO_PROTOCOL *This, OUT BOOLEAN *Hibernated)
 
STATIC EFI_STATUS EFIAPI AppleEg2GetRotation (IN APPLE_EG2_INFO_PROTOCOL *This, OUT UINT32 *Rotation)
 
APPLE_EG2_INFO_PROTOCOLOcAppleEg2InfoInstallProtocol (IN BOOLEAN Reinstall)
 

Variables

STATIC UINT32 mRotation = AppleDisplayRotate0
 
STATIC APPLE_EG2_INFO_PROTOCOL mAppleEg2Info
 

Detailed Description

Copyright (C) 2021, vit9696. All rights reserved.

All rights reserved.

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.

Definition in file Eg2Info.c.

Function Documentation

◆ AppleEg2GetHibernation()

STATIC EFI_STATUS EFIAPI AppleEg2GetHibernation ( IN APPLE_EG2_INFO_PROTOCOL * This,
OUT BOOLEAN * Hibernated )

Definition at line 71 of file Eg2Info.c.

◆ AppleEg2GetPlatformInfo()

STATIC EFI_STATUS EFIAPI AppleEg2GetPlatformInfo ( IN APPLE_EG2_INFO_PROTOCOL * This,
IN EFI_HANDLE GpuHandle,
OUT VOID * Data,
OUT UINTN * Size )

Definition at line 44 of file Eg2Info.c.

◆ AppleEg2GetRotation()

STATIC EFI_STATUS EFIAPI AppleEg2GetRotation ( IN APPLE_EG2_INFO_PROTOCOL * This,
OUT UINT32 * Rotation )

Definition at line 82 of file Eg2Info.c.

◆ AppleEg2StartupDisplay()

STATIC EFI_STATUS EFIAPI AppleEg2StartupDisplay ( IN APPLE_EG2_INFO_PROTOCOL * This,
IN EFI_HANDLE GpuHandle,
OUT VOID * Unk1,
OUT VOID * Unk2,
OUT VOID * Unk3 )

Definition at line 57 of file Eg2Info.c.

◆ AppleEg2Unknown1()

STATIC EFI_STATUS EFIAPI AppleEg2Unknown1 ( IN APPLE_EG2_INFO_PROTOCOL * This,
IN EFI_HANDLE GpuHandle )

Definition at line 33 of file Eg2Info.c.

◆ OcAppleEg2InfoInstallProtocol()

APPLE_EG2_INFO_PROTOCOL * OcAppleEg2InfoInstallProtocol ( IN BOOLEAN Reinstall)

Install and initialise Apple EG2 Info protocol on top of GOP protocol. For newer EfiBoot this is the way to obtain screen rotation angle.

Parameters
[in]ReinstallOverwrite installed protocol.
Return values
installedor located protocol or NULL.

Definition at line 108 of file Eg2Info.c.

Variable Documentation

◆ mAppleEg2Info

STATIC APPLE_EG2_INFO_PROTOCOL mAppleEg2Info
Initial value:
= {
NULL,
}
#define APPLE_EG2_INFO_PROTOCOL_REVISION
STATIC EFI_STATUS EFIAPI AppleEg2GetHibernation(IN APPLE_EG2_INFO_PROTOCOL *This, OUT BOOLEAN *Hibernated)
Definition Eg2Info.c:71
STATIC EFI_STATUS EFIAPI AppleEg2GetRotation(IN APPLE_EG2_INFO_PROTOCOL *This, OUT UINT32 *Rotation)
Definition Eg2Info.c:82
STATIC EFI_STATUS EFIAPI AppleEg2GetPlatformInfo(IN APPLE_EG2_INFO_PROTOCOL *This, IN EFI_HANDLE GpuHandle, OUT VOID *Data, OUT UINTN *Size)
Definition Eg2Info.c:44
STATIC EFI_STATUS EFIAPI AppleEg2Unknown1(IN APPLE_EG2_INFO_PROTOCOL *This, IN EFI_HANDLE GpuHandle)
Definition Eg2Info.c:33
STATIC EFI_STATUS EFIAPI AppleEg2StartupDisplay(IN APPLE_EG2_INFO_PROTOCOL *This, IN EFI_HANDLE GpuHandle, OUT VOID *Unk1, OUT VOID *Unk2, OUT VOID *Unk3)
Definition Eg2Info.c:57

Definition at line 97 of file Eg2Info.c.

◆ mRotation

STATIC UINT32 mRotation = AppleDisplayRotate0

Definition at line 28 of file Eg2Info.c.