51 EFI_GRAPHICS_OUTPUT_PROTOCOL *Gop;
62 BOOLEAN HasInterrupts;
65 gST->ConsoleOutHandle,
69 if (EFI_ERROR (Status)) {
70 DEBUG ((DEBUG_WARN,
"GPF: No GOP - %r\n", Status));
74 if ((Gop->Mode == NULL) || (Gop->Mode->Info == NULL)) {
75 DEBUG ((DEBUG_WARN,
"GPF: Invalid GOP\n"));
76 return EFI_INVALID_PARAMETER;
79 if ( (Gop->Mode->Info->HorizontalResolution == 0)
80 || (Gop->Mode->Info->VerticalResolution == 0))
82 DEBUG ((DEBUG_WARN,
"GPF: Empty resolution on GOP\n"));
83 return EFI_UNSUPPORTED;
87 Pools[Index] = AllocatePool (
88 Gop->Mode->Info->HorizontalResolution * Gop->Mode->Info->VerticalResolution * sizeof (UINT32)
90 ASSERT (Pools[Index] != NULL);
93 Gop->Mode->Info->HorizontalResolution * Gop->Mode->Info->VerticalResolution * sizeof (UINT32),
98 OldTpl =
gBS->RaiseTPL (TPL_NOTIFY);
99 HasInterrupts = SaveAndDisableInterrupts ();
103 for (Index = 0; Index <
NUM_BLITS; ++Index) {
104 for (Index2 = 0; Index2 <
NUM_COLORS; ++Index2) {
113 Gop->Mode->Info->HorizontalResolution,
114 Gop->Mode->Info->VerticalResolution,
126 gBS->RestoreTPL (OldTpl);
140 "GPF: Total blits %Lu on %ux%u over %Lu ms, about %Lu.%03Lu FPS, %Lu ms TPF\n",
142 Gop->Mode->Info->HorizontalResolution,
143 Gop->Mode->Info->VerticalResolution,
150 DEBUG ((DEBUG_WARN,
"GPF: Unable to measure time\n"));
153 for (Index = 0; Index <
NUM_COLORS; ++Index) {
154 FreePool (Pools[Index]);