]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c
Fix a bug about the iSCSI DHCP dependency issue.
[mirror_edk2.git] / IntelFrameworkModulePkg / Csm / LegacyBiosDxe / LegacyBootSupport.c
index 397295bcf1c3808be2d749c20e6cd96a078f6189..dfdac356cfb89039e77108d261e04bdc831a84d4 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -1160,8 +1160,8 @@ GenericLegacyBoot (
   //\r
   // Pass in handoff data\r
   //\r
-  Regs.X.ES = EFI_SEGMENT ((UINTN)EfiToLegacy16BootTable);\r
-  Regs.X.BX = EFI_OFFSET ((UINTN)EfiToLegacy16BootTable);\r
+  Regs.X.ES = NORMALIZE_EFI_SEGMENT ((UINTN)EfiToLegacy16BootTable);\r
+  Regs.X.BX = NORMALIZE_EFI_OFFSET ((UINTN)EfiToLegacy16BootTable);\r
 \r
   Private->LegacyBios.FarCall86 (\r
     This,\r
@@ -1199,15 +1199,30 @@ GenericLegacyBoot (
   //\r
   EnableAllControllers (Private);\r
   if ((mBootMode == BOOT_LEGACY_OS) || (mBootMode == BOOT_UNCONVENTIONAL_DEVICE)) {\r
+    //\r
+    // Report Status Code to indicate legacy boot event will be signalled\r
+    //\r
+    REPORT_STATUS_CODE (\r
+      EFI_PROGRESS_CODE,\r
+      (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_PC_LEGACY_BOOT_EVENT)\r
+      );\r
+\r
     //\r
     // Signal all the events that are waiting on EVT_SIGNAL_LEGACY_BOOT\r
     //\r
     EfiSignalEventLegacyBoot ();\r
     DEBUG ((EFI_D_INFO, "Legacy INT19 Boot...\n"));\r
+\r
+    //\r
+    // Disable DXE Timer while executing in real mode\r
     //\r
-    // Raise TPL to high level to disable CPU interrupts\r
+    Private->Timer->SetTimerPeriod (Private->Timer, 0);\r
+    \r
     //\r
-    gBS->RaiseTPL (TPL_HIGH_LEVEL);\r
+    // Save and disable interrupt of debug timer\r
+    //\r
+    SaveAndSetDebugTimerInterrupt (FALSE);\r
+\r
 \r
     //\r
     // Put the 8259 into its legacy mode by reprogramming the vector bases\r