]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update AtapiPassThru driver in Option ROM package to support to produce EFI Driver...
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 Nov 2007 07:15:08 +0000 (07:15 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 Nov 2007 07:15:08 +0000 (07:15 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4320 6f19259b-4bc3-4df7-8a09-765794883524

OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c
OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.h
OptionRomPkg/AtapiPassThruDxe/AtapiPassThruDxe.inf
OptionRomPkg/AtapiPassThruDxe/DriverSupportedEfiVersion.c [new file with mode: 0644]
OptionRomPkg/OptionRomPkg.dec
OptionRomPkg/OptionRomPkg.dsc

index b15f292e93b2eab89a72258bf5977eaee2709352..482933dc1b94cf1fb23d90ab75ab5ca659def370 100644 (file)
@@ -3390,5 +3390,18 @@ InitializeAtapiPassThru(
              );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
              );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
+  //\r
+  // Install EFI Driver Supported EFI Version Protocol required for \r
+  // EFI drivers that are on PCI and other plug in cards.\r
+  //\r
+  gAtapiScsiPassThruDriverSupportedEfiVersion.FirmwareVersion = PcdGet32 (PcdDriverSupportedEfiVersion);\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
+                  &ImageHandle,\r
+                  &gEfiDriverSupportedEfiVersionProtocolGuid,\r
+                  &gAtapiScsiPassThruDriverSupportedEfiVersion,\r
+                  NULL\r
+                  );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
   return Status;\r
 }\r
   return Status;\r
 }\r
index 2187580bb6e59ea1d5c16aabcf2cb1ab2baf8c02..8e0125684e913be1eba0c7b25418a5ba4b4db6c8 100644 (file)
@@ -22,6 +22,7 @@
 #include <Protocol/ScsiPassThru.h>\r
 #include <Protocol/ScsiPassThruExt.h>\r
 #include <Protocol/PciIo.h>\r
 #include <Protocol/ScsiPassThru.h>\r
 #include <Protocol/ScsiPassThruExt.h>\r
 #include <Protocol/PciIo.h>\r
+#include <Protocol/DriverSupportedEfiVersion.h>\r
 \r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
 \r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
@@ -139,9 +140,10 @@ typedef struct {
 //\r
 // Global Variables\r
 //\r
 //\r
 // Global Variables\r
 //\r
-extern EFI_DRIVER_BINDING_PROTOCOL   gAtapiScsiPassThruDriverBinding;\r
-extern EFI_COMPONENT_NAME_PROTOCOL   gAtapiScsiPassThruComponentName;\r
-extern EFI_COMPONENT_NAME2_PROTOCOL  gAtapiScsiPassThruComponentName2;\r
+extern EFI_DRIVER_BINDING_PROTOCOL                gAtapiScsiPassThruDriverBinding;\r
+extern EFI_COMPONENT_NAME_PROTOCOL                gAtapiScsiPassThruComponentName;\r
+extern EFI_COMPONENT_NAME2_PROTOCOL               gAtapiScsiPassThruComponentName2;\r
+extern EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL  gAtapiScsiPassThruDriverSupportedEfiVersion;\r
 \r
 //\r
 // ATAPI Command op code\r
 \r
 //\r
 // ATAPI Command op code\r
index 378624e381288d83359a2b677f720007eecf7331..9fe6f5459ae1e6e3151b08abc05a241f42c90eff 100644 (file)
@@ -36,6 +36,7 @@
 #\r
 \r
 [Sources.common]\r
 #\r
 \r
 [Sources.common]\r
+  DriverSupportedEfiVersion.c\r
   ComponentName.c\r
   AtapiPassThru.c\r
   AtapiPassThru.h\r
   ComponentName.c\r
   AtapiPassThru.c\r
   AtapiPassThru.h\r
   gEfiScsiPassThruProtocolGuid                  # PROTOCOL BY_START\r
   gEfiExtScsiPassThruProtocolGuid               # PROTOCOL BY_START\r
   gEfiPciIoProtocolGuid                         # PROTOCOL TO_START\r
   gEfiScsiPassThruProtocolGuid                  # PROTOCOL BY_START\r
   gEfiExtScsiPassThruProtocolGuid               # PROTOCOL BY_START\r
   gEfiPciIoProtocolGuid                         # PROTOCOL TO_START\r
+  gEfiDriverSupportedEfiVersionProtocolGuid     # PROTOCOL ALWAYS_PRODUCED\r
 \r
 [FeaturePcd]\r
   gOptionRomPkgTokenSpaceGuid.PcdSupportScsiPassThru\r
   gOptionRomPkgTokenSpaceGuid.PcdSupportExtScsiPassThru\r
 \r
 [FeaturePcd]\r
   gOptionRomPkgTokenSpaceGuid.PcdSupportScsiPassThru\r
   gOptionRomPkgTokenSpaceGuid.PcdSupportExtScsiPassThru\r
+\r
+[Pcd]\r
+  gOptionRomPkgTokenSpaceGuid.PcdDriverSupportedEfiVersion\r
+\r
diff --git a/OptionRomPkg/AtapiPassThruDxe/DriverSupportedEfiVersion.c b/OptionRomPkg/AtapiPassThruDxe/DriverSupportedEfiVersion.c
new file mode 100644 (file)
index 0000000..5496d7a
--- /dev/null
@@ -0,0 +1,20 @@
+/** @file\r
+  Copyright (c) 2007, Intel Corporation                                                         \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
+\r
+  Module Name:  DriverSupportEfiVersion.c\r
+\r
+**/\r
+#include "AtapiPassThru.h"\r
+\r
+EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL gAtapiScsiPassThruDriverSupportedEfiVersion = {\r
+  sizeof (EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL), // Size of Protocol structure.\r
+  0                                                   // Version number to be filled at start up.\r
+};\r
+\r
index 7ada9ece96f1957682409cdc746025568890be91..b6993d7d368b61e87027514a2f2a33939abd6b7b 100644 (file)
@@ -28,4 +28,9 @@
   gOptionRomPkgTokenSpaceGuid.PcdSupportScsiPassThru|TRUE|BOOLEAN|0x00010001\r
   gOptionRomPkgTokenSpaceGuid.PcdSupportExtScsiPassThru|TRUE|BOOLEAN|0x00010002\r
 \r
   gOptionRomPkgTokenSpaceGuid.PcdSupportScsiPassThru|TRUE|BOOLEAN|0x00010001\r
   gOptionRomPkgTokenSpaceGuid.PcdSupportExtScsiPassThru|TRUE|BOOLEAN|0x00010002\r
 \r
+[PcdsFixedAtBuild.common]\r
+  gOptionRomPkgTokenSpaceGuid.PcdDriverSupportedEfiVersion|0x0002000a|UINT32|0x00010003\r
+\r
+[PcdsPatchableInModule.common]\r
+  gOptionRomPkgTokenSpaceGuid.PcdDriverSupportedEfiVersion|0x0002000a|UINT32|0x00010003\r
 \r
 \r
index ed53dbe83269a4d28371fd1d064b8911568e89d3..a65e5ce91bcd9d382ba9c83b323e2f162dee7967 100644 (file)
@@ -80,6 +80,7 @@
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000042\r
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x06\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue|0x0\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000042\r
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x06\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue|0x0\r
+  gOptionRomPkgTokenSpaceGuid.PcdDriverSupportedEfiVersion|0x0002000a # EFI_2_10_SYSTEM_TABLE_REVISION\r
 \r
 ################################################################################\r
 #\r
 \r
 ################################################################################\r
 #\r