Revision: 14066
http://edk2.svn.sourceforge.net/edk2/?rev=14066&view=rev
Author: vanjeff
Date: 2013-01-18 02:21:33 +0000 (Fri, 18 Jan 2013)
Log Message:
-----------
Sync patches r13959 and r13960 from main trunk.
Update FrameBufferSize aligned with UEFI spec.
Revision Links:
--------------
http://edk2.svn.sourceforge.net/edk2/?rev=13959&view=rev
http://edk2.svn.sourceforge.net/edk2/?rev=13960&view=rev
Modified Paths:
--------------
branches/UDK2010.SR1/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
Modified:
branches/UDK2010.SR1/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
===================================================================
---
branches/UDK2010.SR1/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
2013-01-18 01:12:32 UTC (rev 14065)
+++
branches/UDK2010.SR1/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
2013-01-18 02:21:33 UTC (rev 14066)
@@ -1662,14 +1662,18 @@
CurrentModeData->PixelBitMask.GreenMask = ((UINT32)
CurrentModeData->Green.Mask) << CurrentModeData->Green.Position;
CurrentModeData->PixelBitMask.BlueMask = ((UINT32)
CurrentModeData->Blue.Mask) << CurrentModeData->Blue.Position;
CurrentModeData->PixelBitMask.ReservedMask = ((UINT32)
CurrentModeData->Reserved.Mask) << CurrentModeData->Reserved.Position;
- CurrentModeData->FrameBufferSize =
BiosVideoPrivate->VbeInformationBlock->TotalMemory * 64 * 1024;
CurrentModeData->LinearFrameBuffer = (VOID *)
(UINTN)BiosVideoPrivate->VbeModeInformationBlock->PhysBasePtr;
CurrentModeData->HorizontalResolution =
BiosVideoPrivate->VbeModeInformationBlock->XResolution;
CurrentModeData->VerticalResolution =
BiosVideoPrivate->VbeModeInformationBlock->YResolution;
CurrentModeData->BitsPerPixel =
BiosVideoPrivate->VbeModeInformationBlock->BitsPerPixel;
-
+ CurrentModeData->FrameBufferSize = CurrentModeData->BytesPerScanLine *
CurrentModeData->VerticalResolution;
+ //
+ // Make sure the FrameBufferSize does not exceed the max available frame
buffer size reported by VEB.
+ //
+ ASSERT (CurrentModeData->FrameBufferSize <=
(UINTN)(BiosVideoPrivate->VbeInformationBlock->TotalMemory * 64 * 1024));
+
BiosVideoPrivate->ModeData = ModeBuffer;
}
//
@@ -2067,12 +2071,8 @@
CopyMem (&(This->Mode->Info->PixelInformation), &(ModeData->PixelBitMask),
sizeof (ModeData->PixelBitMask));
This->Mode->Info->PixelsPerScanLine = (ModeData->BytesPerScanLine * 8) /
ModeData->BitsPerPixel;
This->Mode->SizeOfInfo = sizeof(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
-
- //
- // Frame BufferSize remain unchanged
- //
+ This->Mode->FrameBufferSize = ModeData->FrameBufferSize;
This->Mode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) (UINTN)
ModeData->LinearFrameBuffer;
- This->Mode->FrameBufferSize = ModeData->FrameBufferSize;
BiosVideoPrivate->HardwareNeedsStarting = FALSE;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits