mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
Revert "MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol"
This reverts commit 45cfcd8dccf84b8abbc1d6f587fedb5d2037ec79 since it is breaking OVMF platform and also real platforms. REF: https://www.mail-archive.com/edk2-devel@lists.01.org/msg26882.html https://www.mail-archive.com/edk2-devel@lists.01.org/msg26820.html Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
061ead7a2d
commit
fd220166c4
@ -1006,8 +1006,12 @@ CoreOpenProtocol (
|
||||
//
|
||||
// Check for invalid Interface
|
||||
//
|
||||
if ((Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) && (Interface == NULL)) {
|
||||
if (Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) {
|
||||
if (Interface == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
} else {
|
||||
*Interface = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@ -1071,13 +1075,15 @@ CoreOpenProtocol (
|
||||
Prot = CoreGetProtocolInterface (UserHandle, Protocol);
|
||||
if (Prot == NULL) {
|
||||
Status = EFI_UNSUPPORTED;
|
||||
if (Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL){
|
||||
//Return NULL Interface if Unsupported Protocol
|
||||
*Interface = NULL;
|
||||
}
|
||||
goto Done;
|
||||
}
|
||||
|
||||
//
|
||||
// This is the protocol interface entry for this protocol
|
||||
//
|
||||
if (Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) {
|
||||
*Interface = Prot->Interface;
|
||||
}
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
ByDriver = FALSE;
|
||||
@ -1171,14 +1177,6 @@ CoreOpenProtocol (
|
||||
}
|
||||
|
||||
Done:
|
||||
|
||||
//
|
||||
// This is the protocol interface entry for this protocol.
|
||||
// In case of any Error, Interface should not be updated as per spec.
|
||||
//
|
||||
if (!EFI_ERROR (Status) && (Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL)) {
|
||||
*Interface = Prot->Interface;
|
||||
}
|
||||
//
|
||||
// Done. Release the database lock are return
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user