Pass framebuffer pitch information to the kernel
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
41a0a2b37c
commit
145fc17271
@ -88,11 +88,12 @@ typedef struct _LOADER_GRAPHICS_INFORMATION_BLOCK
|
||||
BOOLEAN Initialized;
|
||||
EFI_GRAPHICS_PROTOCOL Protocol;
|
||||
PVOID Address;
|
||||
UINT BufferSize;
|
||||
ULONG_PTR BufferSize;
|
||||
UINT Width;
|
||||
UINT Height;
|
||||
UINT PixelsPerScanLine;
|
||||
UINT BitsPerPixel;
|
||||
UINT Pitch;
|
||||
} LOADER_GRAPHICS_INFORMATION_BLOCK, *PLOADER_GRAPHICS_INFORMATION_BLOCK;
|
||||
|
||||
/* Boot Loader information block */
|
||||
|
@ -70,14 +70,15 @@ typedef struct _XT_FRAMEBUFFER_INFORMATION
|
||||
PEFI_GRAPHICS_OUTPUT_PROTOCOL GOP;
|
||||
PEFI_UNIVERSAL_GRAPHICS_ADAPTER_PROTOCOL UGA;
|
||||
} Adapter;
|
||||
UINT32 HorizontalResolution;
|
||||
UINT32 VerticalResolution;
|
||||
UINT32 BitsPerPixel;
|
||||
UINT32 BytesPerPixel;
|
||||
UINT32 PixelsPerScanLine;
|
||||
UINT HorizontalResolution;
|
||||
UINT VerticalResolution;
|
||||
UINT BitsPerPixel;
|
||||
UINT BytesPerPixel;
|
||||
UINT PixelsPerScanLine;
|
||||
UINT Pitch;
|
||||
EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;
|
||||
EFI_PHYSICAL_ADDRESS FrameBufferBase;
|
||||
UINT_PTR FrameBufferSize;
|
||||
ULONG_PTR FrameBufferSize;
|
||||
} XT_FRAMEBUFFER_INFORMATION, *PXT_FRAMEBUFFER_INFORMATION;
|
||||
|
||||
/* EFI XT PE/COFF Image Protocol */
|
||||
|
@ -68,12 +68,13 @@ FbGetDisplayInformation(OUT PLOADER_GRAPHICS_INFORMATION_BLOCK InformationBlock)
|
||||
{
|
||||
InformationBlock->Initialized = FrameBufferInfo.Initialized;
|
||||
InformationBlock->Protocol = FrameBufferInfo.Protocol;
|
||||
InformationBlock->Address = (PVOID)(UINT_PTR)FrameBufferInfo.FrameBufferBase;
|
||||
InformationBlock->Address = (PVOID)(ULONG_PTR)FrameBufferInfo.FrameBufferBase;
|
||||
InformationBlock->BufferSize = FrameBufferInfo.FrameBufferSize;
|
||||
InformationBlock->Width = FrameBufferInfo.HorizontalResolution;
|
||||
InformationBlock->Height = FrameBufferInfo.VerticalResolution;
|
||||
InformationBlock->BitsPerPixel = FrameBufferInfo.BitsPerPixel;
|
||||
InformationBlock->PixelsPerScanLine = FrameBufferInfo.PixelsPerScanLine;
|
||||
InformationBlock->Pitch = FrameBufferInfo.Pitch;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -122,6 +123,7 @@ FbInitializeDisplay()
|
||||
FrameBufferInfo.BytesPerPixel = FrameBufferInfo.BitsPerPixel >> 3;
|
||||
FrameBufferInfo.PixelsPerScanLine = FrameBufferInfo.Adapter.GOP->Mode->Info->PixelsPerScanLine;
|
||||
FrameBufferInfo.PixelFormat = FrameBufferInfo.Adapter.GOP->Mode->Info->PixelFormat;
|
||||
FrameBufferInfo.Pitch = FrameBufferInfo.PixelsPerScanLine * (FrameBufferInfo.BitsPerPixel / 8);
|
||||
FrameBufferInfo.FrameBufferBase = FrameBufferInfo.Adapter.GOP->Mode->FrameBufferBase;
|
||||
FrameBufferInfo.FrameBufferSize = FrameBufferInfo.Adapter.GOP->Mode->FrameBufferSize;
|
||||
FrameBufferInfo.Protocol = GOP;
|
||||
@ -166,6 +168,7 @@ FbInitializeDisplay()
|
||||
FrameBufferInfo.BytesPerPixel = 4;
|
||||
FrameBufferInfo.PixelsPerScanLine = FrameBufferInfo.HorizontalResolution;
|
||||
FrameBufferInfo.PixelFormat = PixelBlueGreenRedReserved8BitPerColor;
|
||||
FrameBufferInfo.Pitch = FrameBufferInfo.PixelsPerScanLine * (FrameBufferInfo.BitsPerPixel / 8);
|
||||
FrameBufferInfo.FrameBufferBase = 0;
|
||||
FrameBufferInfo.FrameBufferSize = FrameBufferInfo.HorizontalResolution *
|
||||
FrameBufferInfo.VerticalResolution *
|
||||
|
Loading…
Reference in New Issue
Block a user