-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathsend_eth_res.h.S
60 lines (48 loc) · 1.07 KB
/
send_eth_res.h.S
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* send_eth_res.h.s -- PS3 Jailbreak payload - Resident area for send_eth
*
* Copyright (C) Youness Alaoui (KaKaRoTo)
*
* This software is distributed under the terms of the GNU General Public
* License ("GPL") version 3, as published by the Free Software Foundation.
*
*/
#ifndef __SEND_ETH_RES_H_S__
#define __SEND_ETH_RES_H_S__
send_eth_dma_region:
.quad 0
send_eth_ptr:
.quad 0
send_eth_mutex:
.long 0
send_eth:
mflr %r0
stdu %r1, -0x80(%r1)
std %r30, 0x70(%r1)
std %r31, 0x78(%r1)
std %r0, 0x90(%r1)
MEM_BASE (%r31)
LOAD_LABEL2 (%r31, %r31, send_eth_mutex)
lwz %r30, 0(%r31)
cmpwi %r30, 0
bne l_send_eth_locked
li %r30, -1
stw %r30, 0(%r31)
mr %r5, %r4
mr %r4, %r3
MEM_BASE (%r31)
LOAD_LABEL2 (%r31, %r31, send_eth_dma_region)
ld %r3, 0(%r31)
BRANCH_FUNC_PTR(%r31, send_eth)
MEM_BASE (%r31)
LOAD_LABEL2 (%r31, %r31, send_eth_mutex)
li %r30, 0
stw %r30, 0(%r31)
l_send_eth_locked:
ld %r30, 0x70(%r1)
ld %r31, 0x78(%r1)
ld %r0, 0x90(%r1)
addi %r1, %r1, 0x80
mtlr %r0
blr
#endif /* __SEND_ETH_RES_H_S */