MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / getCurrentEdid

Function getCurrentEdid

rEFIt_UEFI/Platform/Edid.cpp:61–79  ·  view source on GitHub ↗

used only if VBiosPatchNeeded and if no CustomEDID

Source from the content-addressed store, hash-verified

59
60//used only if VBiosPatchNeeded and if no CustomEDID
61UINT8* getCurrentEdid (VOID)
62{
63 EFI_STATUS Status;
64 EFI_EDID_ACTIVE_PROTOCOL *EdidProtocol;
65 UINT8 *Edid;
66
67 DBG("EdidActive:");
68 Edid = NULL;
69 Status = gBS->LocateProtocol (&gEfiEdidActiveProtocolGuid, NULL, (VOID**)&EdidProtocol);
70 if (!EFI_ERROR(Status)) {
71 DBG(" size=%d", EdidProtocol->SizeOfEdid);
72 if (EdidProtocol->SizeOfEdid > 0) {
73 Edid = (__typeof__(Edid))AllocateCopyPool(EdidProtocol->SizeOfEdid, EdidProtocol->Edid);
74 }
75 }
76 DBG(" %s\n", Edid != NULL ? "found" : "not found");
77
78 return Edid;
79}
80
81VOID DebugDumpEDID(CONST CHAR8 *Message, INTN N)
82{

Callers 1

LoadDriversFunction · 0.85

Calls 1

AllocateCopyPoolFunction · 0.85

Tested by

no test coverage detected