summaryrefslogtreecommitdiff
path: root/DuetPkg/BiosVideoThunkDxe
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-03-03 02:16:24 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-03-03 02:16:24 +0000
commit49de9dd497d233b8c377daa845feef848f3ae59c (patch)
tree19aea07dd8599ed639571fd70d77faf63f160170 /DuetPkg/BiosVideoThunkDxe
parent237bb9d0be75978a773a084fe739df261742b913 (diff)
downloadedk2-platforms-49de9dd497d233b8c377daa845feef848f3ae59c.tar.xz
Fix ICC building issue.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7772 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg/BiosVideoThunkDxe')
-rw-r--r--DuetPkg/BiosVideoThunkDxe/BiosVideo.c35
-rw-r--r--DuetPkg/BiosVideoThunkDxe/VesaBiosExtensions.h2
2 files changed, 23 insertions, 14 deletions
diff --git a/DuetPkg/BiosVideoThunkDxe/BiosVideo.c b/DuetPkg/BiosVideoThunkDxe/BiosVideo.c
index 7053a0002c..567f4d00bc 100644
--- a/DuetPkg/BiosVideoThunkDxe/BiosVideo.c
+++ b/DuetPkg/BiosVideoThunkDxe/BiosVideo.c
@@ -493,7 +493,9 @@ BiosVideoChildHandleInstall (
// for the standard 640x480 16 color VGA mode
//
if (BiosVideoPrivate->VgaCompatible) {
+ DEBUG ((EFI_D_INFO, "Before BiosVideoCheckForVga()\n"));
Status = BiosVideoCheckForVga (BiosVideoPrivate);
+ DEBUG ((EFI_D_INFO, "Status BiosVideoCheckForVga(): %r\n", Status));
}
if (EFI_ERROR (Status)) {
@@ -854,7 +856,7 @@ ParseEdidData (
//
CheckSum = 0;
for (Index = 0; Index < VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE; Index ++) {
- CheckSum = CheckSum + EdidBuffer[Index];
+ CheckSum = (UINT8)(CheckSum + EdidBuffer[Index]);
}
if (CheckSum != 0) {
return FALSE;
@@ -890,26 +892,26 @@ ParseEdidData (
//
// A valid Standard Timing
//
- HorizontalResolution = BufferIndex[0] * 8 + 248;
- AspectRatio = BufferIndex[1] >> 6;
+ HorizontalResolution = (UINT8) (BufferIndex[0] * 8 + 248);
+ AspectRatio = (UINT8) (BufferIndex[1] >> 6);
switch (AspectRatio) {
case 0:
- VerticalResolution = HorizontalResolution / 16 * 10;
+ VerticalResolution = (UINT8) (HorizontalResolution / 16 * 10);
break;
case 1:
- VerticalResolution = HorizontalResolution / 4 * 3;
+ VerticalResolution = (UINT8) (HorizontalResolution / 4 * 3);
break;
case 2:
- VerticalResolution = HorizontalResolution / 5 * 4;
+ VerticalResolution = (UINT8) (HorizontalResolution / 5 * 4);
break;
case 3:
- VerticalResolution = HorizontalResolution / 16 * 9;
+ VerticalResolution = (UINT8) (HorizontalResolution / 16 * 9);
break;
default:
- VerticalResolution = HorizontalResolution / 4 * 3;
+ VerticalResolution = (UINT8) (HorizontalResolution / 4 * 3);
break;
}
- RefreshRate = (BufferIndex[1] & 0x1f) + 60;
+ RefreshRate = (UINT8) ((BufferIndex[1] & 0x1f) + 60);
TempTiming.HorizontalResolution = HorizontalResolution;
TempTiming.VerticalResolution = VerticalResolution;
TempTiming.RefreshRate = RefreshRate;
@@ -1524,7 +1526,9 @@ BiosVideoCheckForVga (
// Test to see if the Video Adapter support the 640x480 16 color mode
//
BiosVideoPrivate->GraphicsOutput.Mode->Mode = GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER;
+ DEBUG ((EFI_D_INFO, "BiosVideoCheckForVga: before BiosVideoGraphicsOutputSetMode"));
Status = BiosVideoGraphicsOutputSetMode (&BiosVideoPrivate->GraphicsOutput, 0);
+ DEBUG ((EFI_D_INFO, "BiosVideoCheckForVga: after BiosVideoGraphicsOutputSetMode, %r", Status));
Done:
//
@@ -1691,7 +1695,10 @@ BiosVideoGraphicsOutputSetMode (
//
// Set VGA Mode
//
- Regs.X.AX = ModeData->VbeModeNumber;
+ //Regs.X.AX = ModeData->VbeModeNumber;
+ Regs.H.AH = 0x0;
+ Regs.H.AL = 0x1;
+ DEBUG ((EFI_D_INFO, "Set VGA Mode, VbeModeNumber AX=0x%X!\n", Regs.X.AX));
LegacyBiosInt86 (BiosVideoPrivate, 0x10, &Regs);
} else {
@@ -1715,6 +1722,8 @@ BiosVideoGraphicsOutputSetMode (
gBS->SetMem (BiosVideoPrivate->VbeCrtcInformationBlock, sizeof (VESA_BIOS_EXTENSIONS_CRTC_INFORMATION_BLOCK), 0);
Regs.X.ES = EFI_SEGMENT ((UINTN) BiosVideoPrivate->VbeCrtcInformationBlock);
Regs.X.DI = EFI_OFFSET ((UINTN) BiosVideoPrivate->VbeCrtcInformationBlock);
+
+ DEBUG ((EFI_D_INFO, "Set VBE Mode!\n"));
LegacyBiosInt86 (BiosVideoPrivate, 0x10, &Regs);
//
@@ -2336,7 +2345,7 @@ BiosVideoGraphicsOutputVgaBlt (
EFI_TPL OriginalTPL;
UINT8 *MemAddress;
UINTN BytesPerScanLine;
- UINTN BytesPerBitPlane;
+ //UINTN BytesPerBitPlane;
UINTN Bit;
UINTN Index;
UINTN Index1;
@@ -2368,7 +2377,7 @@ BiosVideoGraphicsOutputVgaBlt (
PciIo = BiosVideoPrivate->PciIo;
MemAddress = BiosVideoPrivate->ModeData[CurrentMode].LinearFrameBuffer;
BytesPerScanLine = BiosVideoPrivate->ModeData[CurrentMode].BytesPerScanLine >> 3;
- BytesPerBitPlane = BytesPerScanLine * BiosVideoPrivate->ModeData[CurrentMode].VerticalResolution;
+ //BytesPerBitPlane = BytesPerScanLine * BiosVideoPrivate->ModeData[CurrentMode].VerticalResolution;
VgaFrameBuffer = BiosVideoPrivate->VgaFrameBuffer;
if (This == NULL || ((UINTN) BltOperation) >= EfiGraphicsOutputBltOperationMax) {
@@ -2507,7 +2516,7 @@ BiosVideoGraphicsOutputVgaBlt (
LeftMask = mVgaLeftMaskTable[DestinationX & 0x07];
RightMask = mVgaRightMaskTable[(DestinationX + Width - 1) & 0x07];
if (Bytes == 0) {
- LeftMask &= RightMask;
+ LeftMask = (UINT8) (LeftMask & RightMask);
RightMask = 0;
}
diff --git a/DuetPkg/BiosVideoThunkDxe/VesaBiosExtensions.h b/DuetPkg/BiosVideoThunkDxe/VesaBiosExtensions.h
index 7f128ad633..abcddafbac 100644
--- a/DuetPkg/BiosVideoThunkDxe/VesaBiosExtensions.h
+++ b/DuetPkg/BiosVideoThunkDxe/VesaBiosExtensions.h
@@ -419,7 +419,7 @@ typedef enum {
memPL = 3, // Planar memory model
memPK = 4, // Packed pixel memory model
memRGB= 6, // Direct color RGB memory model
- memYUV= 7, // Direct color YUV memory model
+ memYUV= 7 // Direct color YUV memory model
} VESA_BIOS_EXTENSIONS_MEMORY_MODELS;
//