]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/QemuVideoDxe/VbeShim.c
IntelFsp2Pkg: Removing FSP Data Table
[mirror_edk2.git] / OvmfPkg / QemuVideoDxe / VbeShim.c
index 81c11664f4938a514375ff6a94657dadf69629f3..4c4517e9da27556c8dde6612a2aa39904ae79ba0 100644 (file)
@@ -100,7 +100,7 @@ InstallVbeShim (
     //\r
     Handler = (Int0x10->Segment << 4) + Int0x10->Offset;\r
     if (Handler >= SegmentC && Handler < SegmentF) {\r
-      DEBUG ((EFI_D_VERBOSE, "%a: Video BIOS handler found at %04x:%04x\n",\r
+      DEBUG ((EFI_D_INFO, "%a: Video BIOS handler found at %04x:%04x\n",\r
         __FUNCTION__, Int0x10->Segment, Int0x10->Offset));\r
       return;\r
     }\r
@@ -109,7 +109,7 @@ InstallVbeShim (
     // Otherwise we'll overwrite the Int10h vector, even though we may not own\r
     // the page at zero.\r
     //\r
-    DEBUG ((EFI_D_VERBOSE, "%a: failed to allocate page at zero: %r\n",\r
+    DEBUG ((EFI_D_INFO, "%a: failed to allocate page at zero: %r\n",\r
       __FUNCTION__, Status));\r
   } else {\r
     //\r
@@ -134,7 +134,7 @@ InstallVbeShim (
   PciWrite8 (Pam1Address, Pam1 | (BIT1 | BIT0));\r
 \r
   //\r
-  // We never added memory space durig PEI or DXE for the C segment, so we\r
+  // We never added memory space during PEI or DXE for the C segment, so we\r
   // don't need to (and can't) allocate from there. Also, guest operating\r
   // systems will see a hole in the UEFI memory map there.\r
   //\r
@@ -153,13 +153,13 @@ InstallVbeShim (
   CopyMem (VbeInfo->Signature, "VESA", 4);\r
   VbeInfo->VesaVersion = 0x0300;\r
 \r
-  VbeInfo->OemNameAddress = (UINT32)(SegmentC << 12 | (UINT16)(UINTN)Ptr);\r
+  VbeInfo->OemNameAddress = (UINT32)SegmentC << 12 | (UINT16)(UINTN)Ptr;\r
   CopyMem (Ptr, "QEMU", 5);\r
   Ptr += 5;\r
 \r
   VbeInfo->Capabilities = BIT0; // DAC can be switched into 8-bit mode\r
 \r
-  VbeInfo->ModeListAddress = (UINT32)(SegmentC << 12 | (UINT16)(UINTN)Ptr);\r
+  VbeInfo->ModeListAddress = (UINT32)SegmentC << 12 | (UINT16)(UINTN)Ptr;\r
   *(UINT16*)Ptr = 0x00f1; // mode number\r
   Ptr += 2;\r
   *(UINT16*)Ptr = 0xFFFF; // mode list terminator\r
@@ -168,17 +168,17 @@ InstallVbeShim (
   VbeInfo->VideoMem64K = (UINT16)((1024 * 768 * 4 + 65535) / 65536);\r
   VbeInfo->OemSoftwareVersion = 0x0000;\r
 \r
-  VbeInfo->VendorNameAddress = (UINT32)(SegmentC << 12 | (UINT16)(UINTN)Ptr);\r
+  VbeInfo->VendorNameAddress = (UINT32)SegmentC << 12 | (UINT16)(UINTN)Ptr;\r
   CopyMem (Ptr, "OVMF", 5);\r
   Ptr += 5;\r
 \r
-  VbeInfo->ProductNameAddress = (UINT32)(SegmentC << 12 | (UINT16)(UINTN)Ptr);\r
+  VbeInfo->ProductNameAddress = (UINT32)SegmentC << 12 | (UINT16)(UINTN)Ptr;\r
   Printed = AsciiSPrint ((CHAR8 *)Ptr,\r
               sizeof VbeInfoFull->Buffer - (Ptr - VbeInfoFull->Buffer), "%s",\r
               CardName);\r
   Ptr += Printed + 1;\r
 \r
-  VbeInfo->ProductRevAddress = (UINT32)(SegmentC << 12 | (UINT16)(UINTN)Ptr);\r
+  VbeInfo->ProductRevAddress = (UINT32)SegmentC << 12 | (UINT16)(UINTN)Ptr;\r
   CopyMem (Ptr, mProductRevision, sizeof mProductRevision);\r
   Ptr += sizeof mProductRevision;\r
 \r
@@ -268,7 +268,7 @@ InstallVbeShim (
   //\r
   // Second, point the Int10h vector at the shim.\r
   //\r
-  Int0x10->Segment = (UINT16) (SegmentC >> 4);\r
+  Int0x10->Segment = (UINT16) ((UINT32)SegmentC >> 4);\r
   Int0x10->Offset  = (UINT16) ((UINTN) (VbeModeInfo + 1) - SegmentC);\r
 \r
   DEBUG ((EFI_D_INFO, "%a: VBE shim installed\n", __FUNCTION__));\r