Skip to content

Commit 3e5b038

Browse files
committed
Let protocol notifications use current UEFI context
1 parent b060607 commit 3e5b038

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

qiling/os/uefi/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def execute_protocol_notifications(ql: Qiling, from_hook: bool = False) -> bool:
2626
if not ql.loader.notify_list:
2727
return False
2828

29-
next_hook = ql.loader.smm_context.heap.alloc(ql.pointersize)
29+
next_hook = ql.loader.context.heap.alloc(ql.pointersize)
3030

3131
def __notify_next(ql: Qiling):
3232
if ql.loader.notify_list:
@@ -38,7 +38,7 @@ def __notify_next(ql: Qiling):
3838
ql.log.info(f'Notify event: done')
3939

4040
# the last item on the list has been notified; tear down this hook
41-
ql.loader.smm_context.heap.free(next_hook)
41+
ql.loader.context.heap.free(next_hook)
4242
hret.remove()
4343

4444
ql.reg.rax = EFI_SUCCESS
@@ -56,7 +56,7 @@ def __notify_next(ql: Qiling):
5656
if from_hook:
5757
ql.stack_push(next_hook)
5858
else:
59-
ql.stack_push(ql.loader.smm_context.end_of_execution_ptr)
59+
ql.stack_push(ql.loader.context.end_of_execution_ptr)
6060
ql.reg.arch_pc = next_hook
6161

6262
return True

0 commit comments

Comments
 (0)