33 OUT EFI_PHYSICAL_ADDRESS *FramebufferBase,
34 OUT UINT32 *FramebufferSize,
35 OUT UINT32 *ScreenRowBytes,
36 OUT UINT32 *ScreenWidth,
37 OUT UINT32 *ScreenHeight,
38 OUT UINT32 *ScreenDepth
42 EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
43 EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode;
44 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
48 || (FramebufferBase == NULL)
49 || (FramebufferSize == NULL)
50 || (ScreenRowBytes == NULL)
51 || (ScreenWidth == NULL)
52 || (ScreenHeight == NULL)
53 || (ScreenDepth == NULL))
55 return EFI_INVALID_PARAMETER;
59 if (DirectConsole != NULL) {
60 *FramebufferBase = DirectConsole->OriginalFrameBufferBase;
61 *FramebufferSize = (UINT32)DirectConsole->OriginalFrameBufferSize;
62 *ScreenRowBytes = (UINT32)(DirectConsole->OriginalModeInfo.PixelsPerScanLine * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
63 *ScreenWidth = DirectConsole->CustomModeInfo.HorizontalResolution;
64 *ScreenHeight = DirectConsole->CustomModeInfo.VerticalResolution;
69 Status =
gBS->HandleProtocol (
70 gST->ConsoleOutHandle,
72 (VOID **)&GraphicsOutput
75 if (EFI_ERROR (Status)) {
76 return EFI_UNSUPPORTED;
79 Mode = GraphicsOutput->Mode;
83 return EFI_UNSUPPORTED;
89 *FramebufferBase = Mode->FrameBufferBase;
90 *FramebufferSize = (UINT32)Mode->FrameBufferSize;
91 *ScreenRowBytes = (UINT32)(Info->PixelsPerScanLine * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
92 *ScreenWidth = Info->HorizontalResolution;
93 *ScreenHeight = Info->VerticalResolution;
STATIC EFI_STATUS EFIAPI AppleFramebufferGetInfo(IN APPLE_FRAMEBUFFER_INFO_PROTOCOL *This, OUT EFI_PHYSICAL_ADDRESS *FramebufferBase, OUT UINT32 *FramebufferSize, OUT UINT32 *ScreenRowBytes, OUT UINT32 *ScreenWidth, OUT UINT32 *ScreenHeight, OUT UINT32 *ScreenDepth)