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;
|
BOOLEAN Initialized;
|
||||||
EFI_GRAPHICS_PROTOCOL Protocol;
|
EFI_GRAPHICS_PROTOCOL Protocol;
|
||||||
PVOID Address;
|
PVOID Address;
|
||||||
UINT BufferSize;
|
ULONG_PTR BufferSize;
|
||||||
UINT Width;
|
UINT Width;
|
||||||
UINT Height;
|
UINT Height;
|
||||||
UINT PixelsPerScanLine;
|
UINT PixelsPerScanLine;
|
||||||
UINT BitsPerPixel;
|
UINT BitsPerPixel;
|
||||||
|
UINT Pitch;
|
||||||
} LOADER_GRAPHICS_INFORMATION_BLOCK, *PLOADER_GRAPHICS_INFORMATION_BLOCK;
|
} LOADER_GRAPHICS_INFORMATION_BLOCK, *PLOADER_GRAPHICS_INFORMATION_BLOCK;
|
||||||
|
|
||||||
/* Boot Loader information block */
|
/* Boot Loader information block */
|
||||||
|
@ -70,14 +70,15 @@ typedef struct _XT_FRAMEBUFFER_INFORMATION
|
|||||||
PEFI_GRAPHICS_OUTPUT_PROTOCOL GOP;
|
PEFI_GRAPHICS_OUTPUT_PROTOCOL GOP;
|
||||||
PEFI_UNIVERSAL_GRAPHICS_ADAPTER_PROTOCOL UGA;
|
PEFI_UNIVERSAL_GRAPHICS_ADAPTER_PROTOCOL UGA;
|
||||||
} Adapter;
|
} Adapter;
|
||||||
UINT32 HorizontalResolution;
|
UINT HorizontalResolution;
|
||||||
UINT32 VerticalResolution;
|
UINT VerticalResolution;
|
||||||
UINT32 BitsPerPixel;
|
UINT BitsPerPixel;
|
||||||
UINT32 BytesPerPixel;
|
UINT BytesPerPixel;
|
||||||
UINT32 PixelsPerScanLine;
|
UINT PixelsPerScanLine;
|
||||||
|
UINT Pitch;
|
||||||
EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;
|
EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;
|
||||||
EFI_PHYSICAL_ADDRESS FrameBufferBase;
|
EFI_PHYSICAL_ADDRESS FrameBufferBase;
|
||||||
UINT_PTR FrameBufferSize;
|
ULONG_PTR FrameBufferSize;
|
||||||
} XT_FRAMEBUFFER_INFORMATION, *PXT_FRAMEBUFFER_INFORMATION;
|
} XT_FRAMEBUFFER_INFORMATION, *PXT_FRAMEBUFFER_INFORMATION;
|
||||||
|
|
||||||
/* EFI XT PE/COFF Image Protocol */
|
/* EFI XT PE/COFF Image Protocol */
|
||||||
|
@ -68,12 +68,13 @@ FbGetDisplayInformation(OUT PLOADER_GRAPHICS_INFORMATION_BLOCK InformationBlock)
|
|||||||
{
|
{
|
||||||
InformationBlock->Initialized = FrameBufferInfo.Initialized;
|
InformationBlock->Initialized = FrameBufferInfo.Initialized;
|
||||||
InformationBlock->Protocol = FrameBufferInfo.Protocol;
|
InformationBlock->Protocol = FrameBufferInfo.Protocol;
|
||||||
InformationBlock->Address = (PVOID)(UINT_PTR)FrameBufferInfo.FrameBufferBase;
|
InformationBlock->Address = (PVOID)(ULONG_PTR)FrameBufferInfo.FrameBufferBase;
|
||||||
InformationBlock->BufferSize = FrameBufferInfo.FrameBufferSize;
|
InformationBlock->BufferSize = FrameBufferInfo.FrameBufferSize;
|
||||||
InformationBlock->Width = FrameBufferInfo.HorizontalResolution;
|
InformationBlock->Width = FrameBufferInfo.HorizontalResolution;
|
||||||
InformationBlock->Height = FrameBufferInfo.VerticalResolution;
|
InformationBlock->Height = FrameBufferInfo.VerticalResolution;
|
||||||
InformationBlock->BitsPerPixel = FrameBufferInfo.BitsPerPixel;
|
InformationBlock->BitsPerPixel = FrameBufferInfo.BitsPerPixel;
|
||||||
InformationBlock->PixelsPerScanLine = FrameBufferInfo.PixelsPerScanLine;
|
InformationBlock->PixelsPerScanLine = FrameBufferInfo.PixelsPerScanLine;
|
||||||
|
InformationBlock->Pitch = FrameBufferInfo.Pitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -122,6 +123,7 @@ FbInitializeDisplay()
|
|||||||
FrameBufferInfo.BytesPerPixel = FrameBufferInfo.BitsPerPixel >> 3;
|
FrameBufferInfo.BytesPerPixel = FrameBufferInfo.BitsPerPixel >> 3;
|
||||||
FrameBufferInfo.PixelsPerScanLine = FrameBufferInfo.Adapter.GOP->Mode->Info->PixelsPerScanLine;
|
FrameBufferInfo.PixelsPerScanLine = FrameBufferInfo.Adapter.GOP->Mode->Info->PixelsPerScanLine;
|
||||||
FrameBufferInfo.PixelFormat = FrameBufferInfo.Adapter.GOP->Mode->Info->PixelFormat;
|
FrameBufferInfo.PixelFormat = FrameBufferInfo.Adapter.GOP->Mode->Info->PixelFormat;
|
||||||
|
FrameBufferInfo.Pitch = FrameBufferInfo.PixelsPerScanLine * (FrameBufferInfo.BitsPerPixel / 8);
|
||||||
FrameBufferInfo.FrameBufferBase = FrameBufferInfo.Adapter.GOP->Mode->FrameBufferBase;
|
FrameBufferInfo.FrameBufferBase = FrameBufferInfo.Adapter.GOP->Mode->FrameBufferBase;
|
||||||
FrameBufferInfo.FrameBufferSize = FrameBufferInfo.Adapter.GOP->Mode->FrameBufferSize;
|
FrameBufferInfo.FrameBufferSize = FrameBufferInfo.Adapter.GOP->Mode->FrameBufferSize;
|
||||||
FrameBufferInfo.Protocol = GOP;
|
FrameBufferInfo.Protocol = GOP;
|
||||||
@ -166,6 +168,7 @@ FbInitializeDisplay()
|
|||||||
FrameBufferInfo.BytesPerPixel = 4;
|
FrameBufferInfo.BytesPerPixel = 4;
|
||||||
FrameBufferInfo.PixelsPerScanLine = FrameBufferInfo.HorizontalResolution;
|
FrameBufferInfo.PixelsPerScanLine = FrameBufferInfo.HorizontalResolution;
|
||||||
FrameBufferInfo.PixelFormat = PixelBlueGreenRedReserved8BitPerColor;
|
FrameBufferInfo.PixelFormat = PixelBlueGreenRedReserved8BitPerColor;
|
||||||
|
FrameBufferInfo.Pitch = FrameBufferInfo.PixelsPerScanLine * (FrameBufferInfo.BitsPerPixel / 8);
|
||||||
FrameBufferInfo.FrameBufferBase = 0;
|
FrameBufferInfo.FrameBufferBase = 0;
|
||||||
FrameBufferInfo.FrameBufferSize = FrameBufferInfo.HorizontalResolution *
|
FrameBufferInfo.FrameBufferSize = FrameBufferInfo.HorizontalResolution *
|
||||||
FrameBufferInfo.VerticalResolution *
|
FrameBufferInfo.VerticalResolution *
|
||||||
|
Loading…
Reference in New Issue
Block a user