Skip to content

Commit 08bd587

Browse files
committed
Use -1 in native size
1 parent 93fcba1 commit 08bd587

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qiling/os/uefi/protocols/EfiSmmSwDispatch2Protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def hook_Register(ql: Qiling, address: int, params):
6161

6262
# a value of -1 indicates that the swsmi index for this handler is flexible and
6363
# should be assigned by the protocol
64-
if idx == 0xffffffff:
64+
if idx == ((1 << ql.archbit) - 1):
6565
idx = next((i for i in range(1, MAXIMUM_SWI_VALUE) if i not in handlers), None)
6666

6767
if idx is None:

0 commit comments

Comments
 (0)