+/**\r
+ Disable the device (especially Bus Master DMA) when exiting the boot\r
+ services.\r
+\r
+ @param[in] Event Event for which this notification function is being\r
+ called.\r
+ @param[in] Context Pointer to the ATA_ATAPI_PASS_THRU_INSTANCE that\r
+ represents the HBA.\r
+**/\r
+VOID\r
+EFIAPI\r
+AtaPassThruExitBootServices (\r
+ IN EFI_EVENT Event,\r
+ IN VOID *Context\r
+ )\r
+{\r
+ ATA_ATAPI_PASS_THRU_INSTANCE *Instance;\r
+ EFI_PCI_IO_PROTOCOL *PciIo;\r
+\r
+ DEBUG ((DEBUG_VERBOSE, "%a: Context=0x%p\n", __FUNCTION__, Context));\r
+\r
+ Instance = Context;\r
+ PciIo = Instance->PciIo;\r
+\r
+ PciIo->Attributes (\r
+ PciIo,\r
+ EfiPciIoAttributeOperationDisable,\r
+ Instance->EnabledPciAttributes,\r
+ NULL\r
+ );\r
+}\r
+\r