mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-07-04 08:32:15 +02:00
fusee: Add 1.0.0 kernel patch definitions and add remaining missing hashes/offset
Also correct 1.0.0 free_code_space_offset
This commit is contained in:
parent
f1c326aec3
commit
de70a535ed
@ -27,6 +27,42 @@ typedef struct {
|
||||
} kernel_info_t;
|
||||
|
||||
/* Patch definitions. */
|
||||
/*
|
||||
mov w10, w14
|
||||
lsl x10, x10, #2
|
||||
ldr x10, [x28, x10]
|
||||
mov x9, #0x0000ffffffffffff
|
||||
and x8, x10, x9
|
||||
mov x9, #0xffff000000000000
|
||||
and x10, x10, x9
|
||||
mov x9, #0xfffe000000000000
|
||||
cmp x10, x9
|
||||
beq #12
|
||||
ldr x10, [sp,#0x88]
|
||||
ldr x8, [x10,#0x250]
|
||||
ldr x10, [sp,#0x88]
|
||||
*/
|
||||
static const uint8_t MAKE_KERNEL_PATTERN_NAME(100, proc_id_send)[] = {0xEA, 0x47, 0x40, 0xF9, 0x48, 0x29, 0x41, 0xF9, 0xC9, 0xF5, 0x7E, 0xD3, 0xCE, 0x09, 0x00, 0x11};
|
||||
static const instruction_t MAKE_KERNEL_HOOK_NAME(100, proc_id_send)[] = {0x2A0E03EA, 0xD37EF54A, 0xF86A6B8A, 0x92FFFFE9, 0x8A090148, 0xD2FFFFE9, 0x8A09014A, 0xD2FFFFC9, 0xEB09015F, 0x54FFFF40, 0xF94047EA, 0xF9412948, 0xF94047EA};
|
||||
|
||||
/*
|
||||
mov w10, w28
|
||||
lsl x10, x10, #2
|
||||
ldr x10, [x13, x10]
|
||||
mov x9, #0x0000ffffffffffff
|
||||
and x8, x10, x9
|
||||
mov x9, #0xffff000000000000
|
||||
and x10, x10, x9
|
||||
mov x9, #0xfffe000000000000
|
||||
cmp x10, x9
|
||||
beq #8
|
||||
ldr x8, [x11,#0x250]
|
||||
mov x10, x26
|
||||
*/
|
||||
static const uint8_t MAKE_KERNEL_PATTERN_NAME(100, proc_id_recv)[] = {0x68, 0x29, 0x41, 0xF9, 0x89, 0xF7, 0x7E, 0xD3, 0x9C, 0x0B, 0x00, 0x11, 0x48, 0x69, 0x29, 0xF8};
|
||||
static const instruction_t MAKE_KERNEL_HOOK_NAME(100, proc_id_recv)[] = {0x2A1C03EA, 0xD37EF54A, 0xF86A69AA, 0x92FFFFE9, 0x8A090148, 0xD2FFFFE9, 0x8A09014A, 0xD2FFFFC9, 0xEB09015F, 0x54000040, 0xF9412968, 0xAA1A03EA};
|
||||
|
||||
|
||||
/*
|
||||
mov w10, w23
|
||||
lsl x10, x10, #2
|
||||
@ -98,7 +134,22 @@ static const instruction_t MAKE_KERNEL_HOOK_NAME(500, proc_id_recv)[] = {0xF9403
|
||||
|
||||
/* Hook Definitions. */
|
||||
static const kernel_hook_t g_kernel_hooks_100[] = {
|
||||
/* TODO */
|
||||
{ /* Send Message Process ID Patch. */
|
||||
.pattern_size = 0x10,
|
||||
.pattern = MAKE_KERNEL_PATTERN_NAME(100, proc_id_send),
|
||||
.pattern_hook_offset = 0x0,
|
||||
.payload_num_instructions = 13,
|
||||
.branch_back_offset = 0x8,
|
||||
.payload = MAKE_KERNEL_HOOK_NAME(100, proc_id_send)
|
||||
},
|
||||
{ /* Receive Message Process ID Patch. */
|
||||
.pattern_size = 0x10,
|
||||
.pattern = MAKE_KERNEL_PATTERN_NAME(100, proc_id_recv),
|
||||
.pattern_hook_offset = 0x0,
|
||||
.payload_num_instructions = 12,
|
||||
.branch_back_offset = 0x4,
|
||||
.payload = MAKE_KERNEL_HOOK_NAME(100, proc_id_recv)
|
||||
}
|
||||
};
|
||||
static const kernel_hook_t g_kernel_hooks_200[] = {
|
||||
/* TODO */
|
||||
@ -151,12 +202,13 @@ static const kernel_hook_t g_kernel_hooks_500[] = {
|
||||
/* Kernel Infos. */
|
||||
static const kernel_info_t g_kernel_infos[] = {
|
||||
{ /* 1.0.0. */
|
||||
.free_code_space_offset = 0x4597C,
|
||||
.hash = {0xB8, 0xC5, 0x0C, 0x68, 0x25, 0xA9, 0xB9, 0x5B, 0xD2, 0x4D, 0x2C, 0x7C, 0x81, 0x7F, 0xE6, 0x96, 0xF2, 0x42, 0x4E, 0x1D, 0x78, 0xDF, 0x3B, 0xCA, 0x3D, 0x6B, 0x68, 0x12, 0xDD, 0xA9, 0xCB, 0x9C},
|
||||
.free_code_space_offset = 0x4797C,
|
||||
KERNEL_HOOKS(100)
|
||||
},
|
||||
{ /* 2.0.0. */
|
||||
/* TODO */
|
||||
.free_code_space_offset = 0,
|
||||
.hash = {0x64, 0x0B, 0x51, 0xFF, 0x28, 0x01, 0xB8, 0x30, 0xA7, 0xA3, 0x60, 0x47, 0x86, 0x0D, 0x68, 0xAA, 0x9A, 0x92, 0x10, 0x0D, 0xB9, 0xCC, 0xEC, 0x8B, 0x05, 0x80, 0x73, 0xBD, 0x33, 0xB4, 0x2C, 0x6C},
|
||||
.free_code_space_offset = 0x6486C,
|
||||
KERNEL_HOOKS(200)
|
||||
},
|
||||
{ /* 3.0.0. */
|
||||
@ -165,8 +217,8 @@ static const kernel_info_t g_kernel_infos[] = {
|
||||
KERNEL_HOOKS(300)
|
||||
},
|
||||
{ /* 3.0.2. */
|
||||
/* TODO */
|
||||
.free_code_space_offset = 0,
|
||||
.hash = {0x81, 0x9D, 0x08, 0xBE, 0xE4, 0x5E, 0x1F, 0xBB, 0x45, 0x5A, 0x6D, 0x70, 0x4B, 0xB2, 0x17, 0xA6, 0x12, 0x69, 0xF8, 0xB8, 0x75, 0x1C, 0x71, 0x16, 0xF0, 0xE9, 0x79, 0x7F, 0xB0, 0xD1, 0x78, 0xB2},
|
||||
.free_code_space_offset = 0x494BC,
|
||||
KERNEL_HOOKS(302)
|
||||
},
|
||||
{ /* 4.0.0. */
|
||||
|
Loading…
Reference in New Issue
Block a user