]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/QemuVideoDxe/VbeShim.c
OvmfPkg: replace old EFI_D_ debug levels with new DEBUG_ ones
[mirror_edk2.git] / OvmfPkg / QemuVideoDxe / VbeShim.c
index 8ba5522cde3ceca0d78e331c01ebdae29623a4fe..048ffa7058caceecf49c5ecb41b40955f6ef790a 100644 (file)
   Copyright (C) 2014, Red Hat, Inc.\r
   Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
 \r
-  This program and the accompanying materials are licensed and made available\r
-  under the terms and conditions of the BSD License which accompanies this\r
-  distribution. The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
-  WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 **/\r
 \r
 #include <IndustryStandard/LegacyVgaBios.h>\r
@@ -102,7 +96,7 @@ InstallVbeShim (
   // The allocation request may fail, eg. if LegacyBiosDxe has already run.\r
   //\r
   Segment0Pages = 1;\r
-  Int0x10       = (IVT_ENTRY *)(UINTN)Segment0 + 0x10;\r
+  Int0x10       = (IVT_ENTRY *)(UINTN)(Segment0 + 0x10 * sizeof (IVT_ENTRY));\r
   Segment0AllocationStatus = gBS->AllocatePages (\r
                                     AllocateAddress,\r
                                     EfiBootServicesCode,\r
@@ -120,7 +114,7 @@ InstallVbeShim (
     //\r
     Handler = (Int0x10->Segment << 4) + Int0x10->Offset;\r
     if (Handler >= SegmentC && Handler < SegmentF) {\r
-      DEBUG ((EFI_D_INFO, "%a: Video BIOS handler found at %04x:%04x\n",\r
+      DEBUG ((DEBUG_INFO, "%a: Video BIOS handler found at %04x:%04x\n",\r
         __FUNCTION__, Int0x10->Segment, Int0x10->Offset));\r
       return;\r
     }\r
@@ -318,5 +312,5 @@ InstallVbeShim (
   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
+  DEBUG ((DEBUG_INFO, "%a: VBE shim installed\n", __FUNCTION__));\r
 }\r