Fix ICC building issue.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7772 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
237bb9d0be
commit
49de9dd497
@ -493,7 +493,9 @@ BiosVideoChildHandleInstall (
|
|||||||
// for the standard 640x480 16 color VGA mode
|
// for the standard 640x480 16 color VGA mode
|
||||||
//
|
//
|
||||||
if (BiosVideoPrivate->VgaCompatible) {
|
if (BiosVideoPrivate->VgaCompatible) {
|
||||||
|
DEBUG ((EFI_D_INFO, "Before BiosVideoCheckForVga()\n"));
|
||||||
Status = BiosVideoCheckForVga (BiosVideoPrivate);
|
Status = BiosVideoCheckForVga (BiosVideoPrivate);
|
||||||
|
DEBUG ((EFI_D_INFO, "Status BiosVideoCheckForVga(): %r\n", Status));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -854,7 +856,7 @@ ParseEdidData (
|
|||||||
//
|
//
|
||||||
CheckSum = 0;
|
CheckSum = 0;
|
||||||
for (Index = 0; Index < VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE; Index ++) {
|
for (Index = 0; Index < VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE; Index ++) {
|
||||||
CheckSum = CheckSum + EdidBuffer[Index];
|
CheckSum = (UINT8)(CheckSum + EdidBuffer[Index]);
|
||||||
}
|
}
|
||||||
if (CheckSum != 0) {
|
if (CheckSum != 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -890,26 +892,26 @@ ParseEdidData (
|
|||||||
//
|
//
|
||||||
// A valid Standard Timing
|
// A valid Standard Timing
|
||||||
//
|
//
|
||||||
HorizontalResolution = BufferIndex[0] * 8 + 248;
|
HorizontalResolution = (UINT8) (BufferIndex[0] * 8 + 248);
|
||||||
AspectRatio = BufferIndex[1] >> 6;
|
AspectRatio = (UINT8) (BufferIndex[1] >> 6);
|
||||||
switch (AspectRatio) {
|
switch (AspectRatio) {
|
||||||
case 0:
|
case 0:
|
||||||
VerticalResolution = HorizontalResolution / 16 * 10;
|
VerticalResolution = (UINT8) (HorizontalResolution / 16 * 10);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
VerticalResolution = HorizontalResolution / 4 * 3;
|
VerticalResolution = (UINT8) (HorizontalResolution / 4 * 3);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
VerticalResolution = HorizontalResolution / 5 * 4;
|
VerticalResolution = (UINT8) (HorizontalResolution / 5 * 4);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
VerticalResolution = HorizontalResolution / 16 * 9;
|
VerticalResolution = (UINT8) (HorizontalResolution / 16 * 9);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
VerticalResolution = HorizontalResolution / 4 * 3;
|
VerticalResolution = (UINT8) (HorizontalResolution / 4 * 3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
RefreshRate = (BufferIndex[1] & 0x1f) + 60;
|
RefreshRate = (UINT8) ((BufferIndex[1] & 0x1f) + 60);
|
||||||
TempTiming.HorizontalResolution = HorizontalResolution;
|
TempTiming.HorizontalResolution = HorizontalResolution;
|
||||||
TempTiming.VerticalResolution = VerticalResolution;
|
TempTiming.VerticalResolution = VerticalResolution;
|
||||||
TempTiming.RefreshRate = RefreshRate;
|
TempTiming.RefreshRate = RefreshRate;
|
||||||
@ -1524,7 +1526,9 @@ BiosVideoCheckForVga (
|
|||||||
// Test to see if the Video Adapter support the 640x480 16 color mode
|
// Test to see if the Video Adapter support the 640x480 16 color mode
|
||||||
//
|
//
|
||||||
BiosVideoPrivate->GraphicsOutput.Mode->Mode = GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER;
|
BiosVideoPrivate->GraphicsOutput.Mode->Mode = GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER;
|
||||||
|
DEBUG ((EFI_D_INFO, "BiosVideoCheckForVga: before BiosVideoGraphicsOutputSetMode"));
|
||||||
Status = BiosVideoGraphicsOutputSetMode (&BiosVideoPrivate->GraphicsOutput, 0);
|
Status = BiosVideoGraphicsOutputSetMode (&BiosVideoPrivate->GraphicsOutput, 0);
|
||||||
|
DEBUG ((EFI_D_INFO, "BiosVideoCheckForVga: after BiosVideoGraphicsOutputSetMode, %r", Status));
|
||||||
|
|
||||||
Done:
|
Done:
|
||||||
//
|
//
|
||||||
@ -1691,7 +1695,10 @@ BiosVideoGraphicsOutputSetMode (
|
|||||||
//
|
//
|
||||||
// Set VGA Mode
|
// 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);
|
LegacyBiosInt86 (BiosVideoPrivate, 0x10, &Regs);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -1715,6 +1722,8 @@ BiosVideoGraphicsOutputSetMode (
|
|||||||
gBS->SetMem (BiosVideoPrivate->VbeCrtcInformationBlock, sizeof (VESA_BIOS_EXTENSIONS_CRTC_INFORMATION_BLOCK), 0);
|
gBS->SetMem (BiosVideoPrivate->VbeCrtcInformationBlock, sizeof (VESA_BIOS_EXTENSIONS_CRTC_INFORMATION_BLOCK), 0);
|
||||||
Regs.X.ES = EFI_SEGMENT ((UINTN) BiosVideoPrivate->VbeCrtcInformationBlock);
|
Regs.X.ES = EFI_SEGMENT ((UINTN) BiosVideoPrivate->VbeCrtcInformationBlock);
|
||||||
Regs.X.DI = EFI_OFFSET ((UINTN) BiosVideoPrivate->VbeCrtcInformationBlock);
|
Regs.X.DI = EFI_OFFSET ((UINTN) BiosVideoPrivate->VbeCrtcInformationBlock);
|
||||||
|
|
||||||
|
DEBUG ((EFI_D_INFO, "Set VBE Mode!\n"));
|
||||||
LegacyBiosInt86 (BiosVideoPrivate, 0x10, &Regs);
|
LegacyBiosInt86 (BiosVideoPrivate, 0x10, &Regs);
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -2336,7 +2345,7 @@ BiosVideoGraphicsOutputVgaBlt (
|
|||||||
EFI_TPL OriginalTPL;
|
EFI_TPL OriginalTPL;
|
||||||
UINT8 *MemAddress;
|
UINT8 *MemAddress;
|
||||||
UINTN BytesPerScanLine;
|
UINTN BytesPerScanLine;
|
||||||
UINTN BytesPerBitPlane;
|
//UINTN BytesPerBitPlane;
|
||||||
UINTN Bit;
|
UINTN Bit;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
UINTN Index1;
|
UINTN Index1;
|
||||||
@ -2368,7 +2377,7 @@ BiosVideoGraphicsOutputVgaBlt (
|
|||||||
PciIo = BiosVideoPrivate->PciIo;
|
PciIo = BiosVideoPrivate->PciIo;
|
||||||
MemAddress = BiosVideoPrivate->ModeData[CurrentMode].LinearFrameBuffer;
|
MemAddress = BiosVideoPrivate->ModeData[CurrentMode].LinearFrameBuffer;
|
||||||
BytesPerScanLine = BiosVideoPrivate->ModeData[CurrentMode].BytesPerScanLine >> 3;
|
BytesPerScanLine = BiosVideoPrivate->ModeData[CurrentMode].BytesPerScanLine >> 3;
|
||||||
BytesPerBitPlane = BytesPerScanLine * BiosVideoPrivate->ModeData[CurrentMode].VerticalResolution;
|
//BytesPerBitPlane = BytesPerScanLine * BiosVideoPrivate->ModeData[CurrentMode].VerticalResolution;
|
||||||
VgaFrameBuffer = BiosVideoPrivate->VgaFrameBuffer;
|
VgaFrameBuffer = BiosVideoPrivate->VgaFrameBuffer;
|
||||||
|
|
||||||
if (This == NULL || ((UINTN) BltOperation) >= EfiGraphicsOutputBltOperationMax) {
|
if (This == NULL || ((UINTN) BltOperation) >= EfiGraphicsOutputBltOperationMax) {
|
||||||
@ -2507,7 +2516,7 @@ BiosVideoGraphicsOutputVgaBlt (
|
|||||||
LeftMask = mVgaLeftMaskTable[DestinationX & 0x07];
|
LeftMask = mVgaLeftMaskTable[DestinationX & 0x07];
|
||||||
RightMask = mVgaRightMaskTable[(DestinationX + Width - 1) & 0x07];
|
RightMask = mVgaRightMaskTable[(DestinationX + Width - 1) & 0x07];
|
||||||
if (Bytes == 0) {
|
if (Bytes == 0) {
|
||||||
LeftMask &= RightMask;
|
LeftMask = (UINT8) (LeftMask & RightMask);
|
||||||
RightMask = 0;
|
RightMask = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -419,7 +419,7 @@ typedef enum {
|
|||||||
memPL = 3, // Planar memory model
|
memPL = 3, // Planar memory model
|
||||||
memPK = 4, // Packed pixel memory model
|
memPK = 4, // Packed pixel memory model
|
||||||
memRGB= 6, // Direct color RGB 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;
|
} VESA_BIOS_EXTENSIONS_MEMORY_MODELS;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user