OvmfPkg/PvScsiDxe: Install stubbed EXT_SCSI_PASS_THRU

Support dynamic insertion and removal of the protocol.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2567
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Message-Id: <20200328200100.60786-6-liran.alon@oracle.com>
Reviewed-by: Nikita Leshenko <nikita.leshchenko@oracle.com>
This commit is contained in:
Liran Alon
2020-03-28 23:00:48 +03:00
committed by mergify[bot]
parent a9f9d5cf56
commit e497432c2c
3 changed files with 241 additions and 3 deletions

View File

@@ -0,0 +1,29 @@
/** @file
Internal definitions for the PVSCSI driver, which produces Extended SCSI
Pass Thru Protocol instances for pvscsi devices.
Copyright (C) 2020, Oracle and/or its affiliates.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef __PVSCSI_DXE_H_
#define __PVSCSI_DXE_H_
#include <Library/DebugLib.h>
#include <Protocol/ScsiPassThruExt.h>
#define PVSCSI_SIG SIGNATURE_32 ('P', 'S', 'C', 'S')
typedef struct {
UINT32 Signature;
EFI_EXT_SCSI_PASS_THRU_PROTOCOL PassThru;
EFI_EXT_SCSI_PASS_THRU_MODE PassThruMode;
} PVSCSI_DEV;
#define PVSCSI_FROM_PASS_THRU(PassThruPointer) \
CR (PassThruPointer, PVSCSI_DEV, PassThru, PVSCSI_SIG)
#endif // __PVSCSI_DXE_H_