Skip to content

Commit 811312a

Browse files
committed
Signal protocol notify events while processing calls to InstallProtocolInterface.
1 parent 0b70591 commit 811312a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

qiling/os/uefi/protocols/common.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55

66
from qiling.os.uefi.const import EFI_SUCCESS, EFI_NOT_FOUND, EFI_UNSUPPORTED, EFI_BUFFER_TOO_SMALL, EFI_INVALID_PARAMETER
7-
from qiling.os.uefi.utils import read_int64, write_int64, check_and_notify_protocols
7+
from qiling.os.uefi.utils import read_int64, write_int64, check_and_notify_protocols, signal_event
88
from qiling.os.uefi.UefiSpec import EFI_LOCATE_SEARCH_TYPE
99

1010
# TODO: get rid of this
@@ -37,6 +37,12 @@ def InstallProtocolInterface(context, params):
3737

3838
dic[params["Protocol"]] = params["Interface"]
3939
context.protocols[handle] = dic
40+
41+
for (event_id, event_dic) in context.ql.loader.events.items():
42+
if event_dic['Guid'] == params['Protocol']:
43+
# The event was previously registered by 'RegisterProtocolNotify'.
44+
signal_event(context.ql, event_id)
45+
4046
check_and_notify_protocols(context.ql)
4147
write_int64(context.ql, params["Handle"], handle)
4248

0 commit comments

Comments
 (0)