summaryrefslogtreecommitdiff
path: root/OptionRomPkg
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2007-11-22 07:15:08 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2007-11-22 07:15:08 +0000
commit4cc9af6c58a912e781fefe173953db531d3eff8d (patch)
tree837d0350c4e3d374bfcf3a2cc18b40a4cb1db638 /OptionRomPkg
parente89b6bfc0126b17098ae1a3f043a70844f6396aa (diff)
downloadedk2-platforms-4cc9af6c58a912e781fefe173953db531d3eff8d.tar.xz
Update AtapiPassThru driver in Option ROM package to support to produce EFI Driver supported EFI version protocol, which is required for EFI drivers that are on PCI and other plug in cards.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4320 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OptionRomPkg')
-rw-r--r--OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c13
-rw-r--r--OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.h8
-rw-r--r--OptionRomPkg/AtapiPassThruDxe/AtapiPassThruDxe.inf6
-rw-r--r--OptionRomPkg/AtapiPassThruDxe/DriverSupportedEfiVersion.c20
-rw-r--r--OptionRomPkg/OptionRomPkg.dec5
-rw-r--r--OptionRomPkg/OptionRomPkg.dsc1
6 files changed, 50 insertions, 3 deletions
diff --git a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c
index b15f292e93..482933dc1b 100644
--- a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c
+++ b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c
@@ -3390,5 +3390,18 @@ InitializeAtapiPassThru(
);
ASSERT_EFI_ERROR (Status);
+ //
+ // Install EFI Driver Supported EFI Version Protocol required for
+ // EFI drivers that are on PCI and other plug in cards.
+ //
+ gAtapiScsiPassThruDriverSupportedEfiVersion.FirmwareVersion = PcdGet32 (PcdDriverSupportedEfiVersion);
+ Status = gBS->InstallMultipleProtocolInterfaces (
+ &ImageHandle,
+ &gEfiDriverSupportedEfiVersionProtocolGuid,
+ &gAtapiScsiPassThruDriverSupportedEfiVersion,
+ NULL
+ );
+ ASSERT_EFI_ERROR (Status);
+
return Status;
}
diff --git a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.h b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.h
index 2187580bb6..8e0125684e 100644
--- a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.h
+++ b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.h
@@ -22,6 +22,7 @@
#include <Protocol/ScsiPassThru.h>
#include <Protocol/ScsiPassThruExt.h>
#include <Protocol/PciIo.h>
+#include <Protocol/DriverSupportedEfiVersion.h>
#include <Library/DebugLib.h>
#include <Library/UefiDriverEntryPoint.h>
@@ -139,9 +140,10 @@ typedef struct {
//
// Global Variables
//
-extern EFI_DRIVER_BINDING_PROTOCOL gAtapiScsiPassThruDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gAtapiScsiPassThruComponentName;
-extern EFI_COMPONENT_NAME2_PROTOCOL gAtapiScsiPassThruComponentName2;
+extern EFI_DRIVER_BINDING_PROTOCOL gAtapiScsiPassThruDriverBinding;
+extern EFI_COMPONENT_NAME_PROTOCOL gAtapiScsiPassThruComponentName;
+extern EFI_COMPONENT_NAME2_PROTOCOL gAtapiScsiPassThruComponentName2;
+extern EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL gAtapiScsiPassThruDriverSupportedEfiVersion;
//
// ATAPI Command op code
diff --git a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThruDxe.inf b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThruDxe.inf
index 378624e381..9fe6f5459a 100644
--- a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThruDxe.inf
+++ b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThruDxe.inf
@@ -36,6 +36,7 @@
#
[Sources.common]
+ DriverSupportedEfiVersion.c
ComponentName.c
AtapiPassThru.c
AtapiPassThru.h
@@ -59,7 +60,12 @@
gEfiScsiPassThruProtocolGuid # PROTOCOL BY_START
gEfiExtScsiPassThruProtocolGuid # PROTOCOL BY_START
gEfiPciIoProtocolGuid # PROTOCOL TO_START
+ gEfiDriverSupportedEfiVersionProtocolGuid # PROTOCOL ALWAYS_PRODUCED
[FeaturePcd]
gOptionRomPkgTokenSpaceGuid.PcdSupportScsiPassThru
gOptionRomPkgTokenSpaceGuid.PcdSupportExtScsiPassThru
+
+[Pcd]
+ gOptionRomPkgTokenSpaceGuid.PcdDriverSupportedEfiVersion
+
diff --git a/OptionRomPkg/AtapiPassThruDxe/DriverSupportedEfiVersion.c b/OptionRomPkg/AtapiPassThruDxe/DriverSupportedEfiVersion.c
new file mode 100644
index 0000000000..5496d7a847
--- /dev/null
+++ b/OptionRomPkg/AtapiPassThruDxe/DriverSupportedEfiVersion.c
@@ -0,0 +1,20 @@
+/** @file
+ Copyright (c) 2007, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+ Module Name: DriverSupportEfiVersion.c
+
+**/
+#include "AtapiPassThru.h"
+
+EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL gAtapiScsiPassThruDriverSupportedEfiVersion = {
+ sizeof (EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL), // Size of Protocol structure.
+ 0 // Version number to be filled at start up.
+};
+
diff --git a/OptionRomPkg/OptionRomPkg.dec b/OptionRomPkg/OptionRomPkg.dec
index 7ada9ece96..b6993d7d36 100644
--- a/OptionRomPkg/OptionRomPkg.dec
+++ b/OptionRomPkg/OptionRomPkg.dec
@@ -28,4 +28,9 @@
gOptionRomPkgTokenSpaceGuid.PcdSupportScsiPassThru|TRUE|BOOLEAN|0x00010001
gOptionRomPkgTokenSpaceGuid.PcdSupportExtScsiPassThru|TRUE|BOOLEAN|0x00010002
+[PcdsFixedAtBuild.common]
+ gOptionRomPkgTokenSpaceGuid.PcdDriverSupportedEfiVersion|0x0002000a|UINT32|0x00010003
+
+[PcdsPatchableInModule.common]
+ gOptionRomPkgTokenSpaceGuid.PcdDriverSupportedEfiVersion|0x0002000a|UINT32|0x00010003
diff --git a/OptionRomPkg/OptionRomPkg.dsc b/OptionRomPkg/OptionRomPkg.dsc
index ed53dbe832..a65e5ce91b 100644
--- a/OptionRomPkg/OptionRomPkg.dsc
+++ b/OptionRomPkg/OptionRomPkg.dsc
@@ -80,6 +80,7 @@
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000042
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x06
gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue|0x0
+ gOptionRomPkgTokenSpaceGuid.PcdDriverSupportedEfiVersion|0x0002000a # EFI_2_10_SYSTEM_TABLE_REVISION
################################################################################
#