From cae022d6e4b66daa9a7037bdab953b202f7b13bc Mon Sep 17 00:00:00 2001 From: Nigel Croxon Date: Fri, 8 Jul 2016 10:56:31 -0400 Subject: [PATCH] This patch adds definitions to efiprot.h for EFI_EDID_ACTIVE_PROTOCOL EFI_EDID_DISCOVERED_PROTOCOL EFI_EDID_OVERRIDE_PROTOCOL It also adds the matching global variables to libefi. Signed-off-by: Nathan Blythe Signed-off-by: Nigel Croxon --- inc/efilib.h | 4 ++++ inc/efiprot.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ lib/data.c | 3 +++ 3 files changed, 60 insertions(+) diff --git a/inc/efilib.h b/inc/efilib.h index 9181400..e60f0e4 100644 --- a/inc/efilib.h +++ b/inc/efilib.h @@ -40,6 +40,10 @@ extern EFI_GUID DevicePathProtocol; extern EFI_GUID LoadedImageProtocol; extern EFI_GUID TextInProtocol; extern EFI_GUID TextOutProtocol; +extern EFI_GUID GraphicsOutputProtocol; +extern EFI_GUID EdidDiscoveredProtocol; +extern EFI_GUID EdidActiveProtocol; +extern EFI_GUID EdidOverrideProtocol; extern EFI_GUID BlockIoProtocol; extern EFI_GUID DiskIoProtocol; extern EFI_GUID FileSystemProtocol; diff --git a/inc/efiprot.h b/inc/efiprot.h index 90b690a..c9c6b77 100644 --- a/inc/efiprot.h +++ b/inc/efiprot.h @@ -803,6 +803,59 @@ struct _EFI_GRAPHICS_OUTPUT_PROTOCOL { }; + +/* + * EFI EDID Discovered Protocol + * UEFI Specification Version 2.5 Section 11.9 + */ +#define EFI_EDID_DISCOVERED_PROTOCOL_GUID \ + { 0x1C0C34F6, 0xD380, 0x41FA, { 0xA0, 0x49, 0x8a, 0xD0, 0x6C, 0x1A, 0x66, 0xAA} } + +typedef struct _EFI_EDID_DISCOVERED_PROTOCOL { + UINT32 SizeOfEdid; + UINT8 *Edid; +} EFI_EDID_DISCOVERED_PROTOCOL; + + + +/* + * EFI EDID Active Protocol + * UEFI Specification Version 2.5 Section 11.9 + */ +#define EFI_EDID_ACTIVE_PROTOCOL_GUID \ + { 0xBD8C1056, 0x9F36, 0x44EC, { 0x92, 0xA8, 0xA6, 0x33, 0x7F, 0x81, 0x79, 0x86} } + +typedef struct _EFI_EDID_ACTIVE_PROTOCOL { + UINT32 SizeOfEdid; + UINT8 *Edid; +} EFI_EDID_ACTIVE_PROTOCOL; + + + +/* + * EFI EDID Override Protocol + * UEFI Specification Version 2.5 Section 11.9 + */ +#define EFI_EDID_OVERRIDE_PROTOCOL_GUID \ + { 0x48ECB431, 0xFB72, 0x45C0, { 0xA9, 0x22, 0xF4, 0x58, 0xFE, 0x04, 0x0B, 0xD5} } + +INTERFACE_DECL(_EFI_EDID_OVERRIDE_PROTOCOL); + +typedef +EFI_STATUS +(EFIAPI *EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID) ( + IN struct _EFI_EDID_OVERRIDE_PROTOCOL *This, + IN EFI_HANDLE *ChildHandle, + OUT UINT32 *Attributes, + IN OUT UINTN *EdidSize, + IN OUT UINT8 **Edid); + +typedef struct _EFI_EDID_OVERRIDE_PROTOCOL { + EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID GetEdid; +} EFI_EDID_OVERRIDE_PROTOCOL; + + + INTERFACE_DECL(_EFI_SERVICE_BINDING); typedef diff --git a/lib/data.c b/lib/data.c index c618ad9..445b8dc 100644 --- a/lib/data.c +++ b/lib/data.c @@ -134,6 +134,9 @@ EFI_GUID ErrorOutSpliterProtocol = ERROR_OUT_SPLITER_PROTOCOL; EFI_GUID TextInSpliterProtocol = TEXT_IN_SPLITER_PROTOCOL; /* Added for GOP support */ EFI_GUID GraphicsOutputProtocol = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; +EFI_GUID EdidDiscoveredProtocol = EFI_EDID_DISCOVERED_PROTOCOL_GUID; +EFI_GUID EdidActiveProtocol = EFI_EDID_ACTIVE_PROTOCOL_GUID; +EFI_GUID EdidOverrideProtocol = EFI_EDID_OVERRIDE_PROTOCOL_GUID; EFI_GUID AdapterDebugProtocol = ADAPTER_DEBUG_PROTOCOL;