]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c
Add some definitions for efi event in Uefi/UefiSpec.h to follow spec.
[mirror_edk2.git] / EdkModulePkg / Bus / Pci / IdeBus / Dxe / idebus.c
index c1c14052f1826621e14af9a88fb1d9c8f6fb0879..c45238cf8e21de355b5226d5e1c150d866bb2ec7 100644 (file)
@@ -1,12 +1,12 @@
 /** @file\r
   Copyright (c) 2006 - 2007 Intel Corporation. <BR>\r
-  All rights reserved. This program and the accompanying materials                          \r
-  are licensed and made available under the terms and conditions of the BSD License         \r
-  which accompanies this distribution.  The full text of the license may be found at        \r
-  http://opensource.org/licenses/bsd-license.php                                            \r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this 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,                     \r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
   @par Revision Reference:\r
   This module is modified from DXE\IDE module for Ide Contriller Init support\r
@@ -89,7 +89,7 @@ IDEBusDriverBindingSupported (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
\r
+\r
   //\r
   // Close protocol, don't use device path protocol in the .Support() function\r
   //\r
@@ -140,7 +140,7 @@ IDEBusDriverBindingSupported (
 // ***********************************************************************************\r
 //\r
 /**\r
-  Start this driver on Controller by detecting all disks and installing \r
+  Start this driver on Controller by detecting all disks and installing\r
   BlockIo protocol on them.\r
 \r
   @param  This Protocol instance pointer.\r
@@ -210,7 +210,7 @@ IDEBusDriverBindingStart (
   if ((EFI_ERROR (Status)) && (Status != EFI_ALREADY_STARTED)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Now open the IDE_CONTROLLER_INIT protocol. Step7.1\r
   //\r
@@ -429,7 +429,7 @@ IDEBusDriverBindingStart (
       if (!(ConfigurationOptions & (1 << (IdeChannel * 2 + IdeDevice)))) {\r
         continue;\r
       }\r
-      \r
+\r
       //\r
       // The device has been scanned in another Start(), No need to scan it again\r
       // for perf optimization.\r
@@ -437,7 +437,7 @@ IDEBusDriverBindingStart (
       if (IdeBusDriverPrivateData->HaveScannedDevice[IdeChannel * 2 + IdeDevice]) {\r
         continue;\r
       }\r
-      \r
+\r
       //\r
       // create child handle for the detected device.\r
       //\r
@@ -664,7 +664,7 @@ IDEBusDriverBindingStart (
       if ((IdeBlkIoDevicePtr->Type == IdeHardDisk) || (IdeBlkIoDevicePtr->Type == Ide48bitAddressingHardDisk)) {\r
         Status = SetDriveParameters (IdeBlkIoDevicePtr, &DriveParameters);\r
       }\r
-      \r
+\r
       //\r
       // Record PIO mode used in private data\r
       //\r
@@ -715,13 +715,13 @@ IDEBusDriverBindingStart (
         (EFI_IO_BUS_ATA_ATAPI | EFI_P_PC_ENABLE),\r
         IdeBlkIoDevicePtr->DevicePath\r
         );\r
-      \r
+\r
       //\r
       // Create event to clear pending IDE interrupt\r
       //\r
       Status = gBS->CreateEvent (\r
-                      EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,\r
-                      EFI_TPL_NOTIFY,\r
+                      EVT_SIGNAL_EXIT_BOOT_SERVICES,\r
+                      TPL_NOTIFY,\r
                       ClearInterrupt,\r
                       IdeBlkIoDevicePtr,\r
                       &IdeBlkIoDevicePtr->ExitBootServiceEvent\r
@@ -735,7 +735,7 @@ IDEBusDriverBindingStart (
     // end of 2nd outer loop ==========\r
     //\r
   }\r
-  \r
+\r
   //\r
   // All configurations done! Notify IdeController to do post initialization\r
   // work such as saving IDE controller PCI settings for S3 resume\r
@@ -808,7 +808,7 @@ ErrorExit:
 // ***********************************************************************************\r
 //\r
 /**\r
-  Stop this driver on Controller Handle. \r
+  Stop this driver on Controller Handle.\r
 \r
   @param  This Protocol instance pointer.\r
   @param  DeviceHandle Handle of device to stop driver on\r
@@ -1003,7 +1003,7 @@ DeRegisterIdeDevice (
           );\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Release allocated resources\r
   //\r
@@ -1037,7 +1037,7 @@ IDEBlkIoReset (
   EFI_STATUS      Status;\r
   EFI_TPL         OldTpl;\r
 \r
-  OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);\r
+  OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
 \r
   IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);\r
   //\r
@@ -1058,7 +1058,7 @@ IDEBlkIoReset (
     Status = EFI_DEVICE_ERROR;\r
     goto Done;\r
   }\r
-  \r
+\r
   //\r
   // for ATAPI device, using ATAPI reset method\r
   //\r
@@ -1099,7 +1099,7 @@ IDEBlkIoReadBlocks (
   EFI_STATUS      Status;\r
   EFI_TPL         OldTpl;\r
 \r
-  OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);\r
+  OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
 \r
   IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);\r
 \r
@@ -1127,7 +1127,7 @@ IDEBlkIoReadBlocks (
     Status = EFI_DEVICE_ERROR;\r
     goto Done;\r
   }\r
-  \r
+\r
   //\r
   // for ATAPI device, using ATAPI read block's mechanism\r
   //\r
@@ -1172,8 +1172,8 @@ IDEBlkIoWriteBlocks (
   EFI_STATUS      Status;\r
   EFI_TPL         OldTpl;\r
 \r
-  OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);\r
-  \r
+  OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
+\r
   IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);\r
   //\r
   // Requery IDE IO resources in case of the switch of native and legacy modes\r
@@ -1184,7 +1184,7 @@ IDEBlkIoWriteBlocks (
   // for ATA device, using ATA write block's mechanism\r
   //\r
   if (IdeBlkIoDevice->Type == IdeHardDisk ||\r
-      IdeBlkIoDevice->Type == Ide48bitAddressingHardDisk) {        \r
+      IdeBlkIoDevice->Type == Ide48bitAddressingHardDisk) {\r
 \r
     Status = AtaBlkIoWriteBlocks (\r
             IdeBlkIoDevice,\r
@@ -1200,7 +1200,7 @@ IDEBlkIoWriteBlocks (
     Status = EFI_DEVICE_ERROR;\r
     goto Done;\r
   }\r
-  \r
+\r
   //\r
   // for ATAPI device, using ATAPI write block's mechanism\r
   //\r
@@ -1211,7 +1211,7 @@ IDEBlkIoWriteBlocks (
           BufferSize,\r
           Buffer\r
           );\r
-  \r
+\r
 Done:\r
   gBS->RestoreTPL (OldTpl);\r
   return Status;\r