Skip to content

Commit 196785f

Browse files
authored
Add Shellcode and Config For Xiaomi Pad 6 (Pipa) (#4)
Added pipa Shellcode & sm8250 config. Magnetic Case closed= Android Magnetic Case Open= UEFI
1 parent 2037990 commit 196785f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Config/DualBoot.Sm8250.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
StackBase=0x9FC00000
2+
StackSize=0x00300000

ShellCode/ShellCode.Pipa.S

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

0 commit comments

Comments
 (0)