Skip to content

Commit ef4df04

Browse files
committed
ShellCode: Add shell code for Xiaomi Pad 5(Nabu).
- No Cover -> UEFI - With Cover -> Android
1 parent a729914 commit ef4df04

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

ShellCode/ShellCode.Nabu.S

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.include "DummyHead.S"
2+
3+
/* Shell Code for Xiaomi Pad 5 Pro */
4+
_ShellCodeStart:
5+
movz x4, #0x9004
6+
movk x4, #0x390, lsl #16 // Store 0x3909004 to x4, which is io status reg of gpio 9.
7+
movz x5, #0x3004
8+
movk x5, #0x395, lsl #16 // Store 0x3953004 to x5, which is io status reg of gpio 83.
9+
ldr w6, [x4] // Get status value from address stored in x4 and store it to w6.
10+
ldr w7, [x5] // Get status value from address stored in x5 and store it to w7.
11+
nop
12+
nop
13+
and w6, w6, w7 // w6 & w7 and store in w6.
14+
and w6, w6, #1 // w6 & 1 and stored in w6.
15+
cbnz w6, _UEFI // Compare w6 with 0, if w6 == 0 goto _UEFI, else execute next instruction(jmp Linux).
16+
17+
.include "CommonTail.S"
18+
/* Do not remove the last line */

0 commit comments

Comments
 (0)