mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 12:21:18 +00:00
emummc: fix nintendo path redir on 4.1.0
This commit is contained in:
parent
2c46ec9638
commit
0bf7df0426
25 changed files with 111 additions and 111 deletions
|
@ -24,6 +24,7 @@
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int opcode_reg;
|
int opcode_reg;
|
||||||
uint32_t adrp_offset;
|
uint32_t adrp_offset;
|
||||||
|
uint32_t add_rel_offset;
|
||||||
} fs_offsets_nintendo_path_t;
|
} fs_offsets_nintendo_path_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -47,11 +47,11 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_100_NINTENDO_PATHS \
|
#define FS_OFFSET_100_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 9, .adrp_offset = 0x00032C58}, \
|
{.opcode_reg = 9, .adrp_offset = 0x00032C58, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 8, .adrp_offset = 0x00032C60}, \
|
{.opcode_reg = 8, .adrp_offset = 0x00032C60, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 9, .adrp_offset = 0x00032F3C}, \
|
{.opcode_reg = 9, .adrp_offset = 0x00032F3C, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 8, .adrp_offset = 0x00032F44}, \
|
{.opcode_reg = 8, .adrp_offset = 0x00032F44, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_100_H__
|
#endif // __FS_100_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_200_NINTENDO_PATHS \
|
#define FS_OFFSET_200_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00033F08}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00033F08, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00035084}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00035084, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0003537C}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0003537C, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_200_H__
|
#endif // __FS_200_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_200_EXFAT_NINTENDO_PATHS \
|
#define FS_OFFSET_200_EXFAT_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00033F08}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00033F08, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00035084}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00035084, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0003537C}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0003537C, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_200_EXFAT_H__
|
#endif // __FS_200_EXFAT_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_210_NINTENDO_PATHS \
|
#define FS_OFFSET_210_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x000342E0}, \
|
{.opcode_reg = 3, .adrp_offset = 0x000342E0, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0003545C}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0003545C, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00035754}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00035754, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_210_H__
|
#endif // __FS_210_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_210_EXFAT_NINTENDO_PATHS \
|
#define FS_OFFSET_210_EXFAT_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x000342E0}, \
|
{.opcode_reg = 3, .adrp_offset = 0x000342E0, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0003545C}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0003545C, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00035754}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00035754, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_210_EXFAT_H__
|
#endif // __FS_210_EXFAT_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_300_NINTENDO_PATHS \
|
#define FS_OFFSET_300_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x000391F4}, \
|
{.opcode_reg = 3, .adrp_offset = 0x000391F4, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0003A480}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0003A480, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0003A778}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0003A778, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_300_H__
|
#endif // __FS_300_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_300_EXFAT_NINTENDO_PATHS \
|
#define FS_OFFSET_300_EXFAT_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x000391F4}, \
|
{.opcode_reg = 3, .adrp_offset = 0x000391F4, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0003A480}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0003A480, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0003A778}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0003A778, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_300_EXFAT_H__
|
#endif // __FS_300_EXFAT_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_301_NINTENDO_PATHS \
|
#define FS_OFFSET_301_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00039260}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00039260, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0003A4EC}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0003A4EC, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0003A7E4}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0003A7E4, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_301_H__
|
#endif // __FS_301_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_301_EXFAT_NINTENDO_PATHS \
|
#define FS_OFFSET_301_EXFAT_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00039260}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00039260, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0003A4EC}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0003A4EC, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0003A7E4}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0003A7E4, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_301_EXFAT_H__
|
#endif // __FS_301_EXFAT_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_400_NINTENDO_PATHS \
|
#define FS_OFFSET_400_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0002023C}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0002023C, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00021BE8}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00021BE8, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00021EC4}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00021EC4, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_400_H__
|
#endif // __FS_400_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_400_EXFAT_NINTENDO_PATHS \
|
#define FS_OFFSET_400_EXFAT_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0002023C}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0002023C, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00021BE8}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00021BE8, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00021EC4}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00021EC4, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_400_EXFAT_H__
|
#endif // __FS_400_EXFAT_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_410_NINTENDO_PATHS \
|
#define FS_OFFSET_410_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0002023C}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0002023C, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00021BE8}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00021BE8, .add_rel_offset = 12}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00021EC4}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00021EC4, .add_rel_offset = 12}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_410_H__
|
#endif // __FS_410_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_410_EXFAT_NINTENDO_PATHS \
|
#define FS_OFFSET_410_EXFAT_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0002023C}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0002023C, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00021BE8}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00021BE8, .add_rel_offset = 12}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00021EC4}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00021EC4, .add_rel_offset = 12}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_410_EXFAT_H__
|
#endif // __FS_410_EXFAT_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_500_NINTENDO_PATHS \
|
#define FS_OFFSET_500_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00028980}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00028980, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0002ACE4}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0002ACE4, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0002B220}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0002B220, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_500_H__
|
#endif // __FS_500_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_500_EXFAT_NINTENDO_PATHS \
|
#define FS_OFFSET_500_EXFAT_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00028980}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00028980, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0002ACE4}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0002ACE4, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0002B220}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0002B220, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_500_EXFAT_H__
|
#endif // __FS_500_EXFAT_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_510_NINTENDO_PATHS \
|
#define FS_OFFSET_510_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x000289B0}, \
|
{.opcode_reg = 3, .adrp_offset = 0x000289B0, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0002AD14}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0002AD14, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0002B250}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0002B250, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_510_H__
|
#endif // __FS_510_H__
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_510_EXFAT_NINTENDO_PATHS \
|
#define FS_OFFSET_510_EXFAT_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x000289B0}, \
|
{.opcode_reg = 3, .adrp_offset = 0x000289B0, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0002AD14}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0002AD14, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0002B250}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0002B250, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_510_EXFAT_H__
|
#endif // __FS_510_EXFAT_H__
|
||||||
|
|
|
@ -47,11 +47,11 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_600_NINTENDO_PATHS \
|
#define FS_OFFSET_600_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x000790DC}, \
|
{.opcode_reg = 3, .adrp_offset = 0x000790DC, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0007A924}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0007A924, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0007AB18}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0007AB18, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0007AEF4}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0007AEF4, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0} \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_600_H__
|
#endif // __FS_600_H__
|
||||||
|
|
|
@ -47,11 +47,11 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_600_EXFAT_NINTENDO_PATHS \
|
#define FS_OFFSET_600_EXFAT_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x000847DC}, \
|
{.opcode_reg = 3, .adrp_offset = 0x000847DC, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00086024}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00086024, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00086218}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00086218, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x000865F4}, \
|
{.opcode_reg = 3, .adrp_offset = 0x000865F4, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0} \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_600_EXFAT_H__
|
#endif // __FS_600_EXFAT_H__
|
||||||
|
|
|
@ -47,12 +47,12 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_700_NINTENDO_PATHS \
|
#define FS_OFFSET_700_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0007DA90}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0007DA90, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0007F344}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0007F344, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0007F538}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0007F538, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0007F914}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0007F914, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 4, .adrp_offset = 0x0007FAD8}, \
|
{.opcode_reg = 4, .adrp_offset = 0x0007FAD8, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_700_H__
|
#endif // __FS_700_H__
|
||||||
|
|
|
@ -47,12 +47,12 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_700_EXFAT_NINTENDO_PATHS \
|
#define FS_OFFSET_700_EXFAT_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00089040}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00089040, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0008A8F4}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0008A8F4, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0008AAE8}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0008AAE8, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0008AEC4}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0008AEC4, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 4, .adrp_offset = 0x0008B088}, \
|
{.opcode_reg = 4, .adrp_offset = 0x0008B088, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0}, \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_700_EXFAT_H__
|
#endif // __FS_700_EXFAT_H__
|
||||||
|
|
|
@ -47,12 +47,12 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_800_NINTENDO_PATHS \
|
#define FS_OFFSET_800_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0007F5F0}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0007F5F0, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00081084}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00081084, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00081278}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00081278, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x00081654}, \
|
{.opcode_reg = 3, .adrp_offset = 0x00081654, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 4, .adrp_offset = 0x00081818}, \
|
{.opcode_reg = 4, .adrp_offset = 0x00081818, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0} \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_800_H__
|
#endif // __FS_800_H__
|
||||||
|
|
|
@ -47,12 +47,12 @@
|
||||||
// Nintendo Paths
|
// Nintendo Paths
|
||||||
#define FS_OFFSET_800_EXFAT_NINTENDO_PATHS \
|
#define FS_OFFSET_800_EXFAT_NINTENDO_PATHS \
|
||||||
{ \
|
{ \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0008ABA0}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0008ABA0, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0008C634}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0008C634, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0008C828}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0008C828, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 3, .adrp_offset = 0x0008CC04}, \
|
{.opcode_reg = 3, .adrp_offset = 0x0008CC04, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 4, .adrp_offset = 0x0008CDC8}, \
|
{.opcode_reg = 4, .adrp_offset = 0x0008CDC8, .add_rel_offset = 4}, \
|
||||||
{.opcode_reg = 0, .adrp_offset = 0} \
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FS_800_EXFAT_H__
|
#endif // __FS_800_EXFAT_H__
|
||||||
|
|
|
@ -154,15 +154,14 @@ void write_nop(uintptr_t source)
|
||||||
smcWriteAddress32((void *)source, GENERATE_NOP());
|
smcWriteAddress32((void *)source, GENERATE_NOP());
|
||||||
}
|
}
|
||||||
|
|
||||||
void write_adrp_add(int reg, uintptr_t pc, intptr_t destination)
|
void write_adrp_add(int reg, uintptr_t pc, uintptr_t add_rel_offset, intptr_t destination)
|
||||||
{
|
{
|
||||||
uintptr_t add_opcode_location = pc + sizeof(uint32_t);
|
uintptr_t add_opcode_location = pc + add_rel_offset;
|
||||||
|
|
||||||
intptr_t offset = (destination & 0xFFFFF000) - (pc & 0xFFFFF000);
|
intptr_t offset = (destination & 0xFFFFF000) - (pc & 0xFFFFF000);
|
||||||
uint32_t opcode_adrp = GENERATE_ADRP(reg, offset);
|
uint32_t opcode_adrp = GENERATE_ADRP(reg, offset);
|
||||||
uint32_t opcode_add = GENERATE_ADD(reg, reg, (destination & 0x00000FFF));
|
uint32_t opcode_add = GENERATE_ADD(reg, reg, (destination & 0x00000FFF));
|
||||||
|
|
||||||
// TODO: use 64 write?
|
|
||||||
smcWriteAddress32((void *)pc, opcode_adrp);
|
smcWriteAddress32((void *)pc, opcode_adrp);
|
||||||
smcWriteAddress32((void *)add_opcode_location, opcode_add);
|
smcWriteAddress32((void *)add_opcode_location, opcode_add);
|
||||||
}
|
}
|
||||||
|
@ -268,7 +267,7 @@ void setup_nintendo_paths(void)
|
||||||
{
|
{
|
||||||
intptr_t nintendo_path_location = (intptr_t)&nintendo_path;
|
intptr_t nintendo_path_location = (intptr_t)&nintendo_path;
|
||||||
uintptr_t fs_adrp_opcode_location = INJECT_OFFSET(uintptr_t, fs_offsets->nintendo_paths[i].adrp_offset);
|
uintptr_t fs_adrp_opcode_location = INJECT_OFFSET(uintptr_t, fs_offsets->nintendo_paths[i].adrp_offset);
|
||||||
write_adrp_add(fs_offsets->nintendo_paths[i].opcode_reg, fs_adrp_opcode_location, nintendo_path_location);
|
write_adrp_add(fs_offsets->nintendo_paths[i].opcode_reg, fs_adrp_opcode_location, fs_offsets->nintendo_paths[i].add_rel_offset, nintendo_path_location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -281,8 +280,8 @@ void setup_nintendo_paths(void)
|
||||||
intptr_t album_path_location = nintendo_album_path_location + path_len - 6; // "/Album"
|
intptr_t album_path_location = nintendo_album_path_location + path_len - 6; // "/Album"
|
||||||
uintptr_t fs_n_adrp_opcode_location = INJECT_OFFSET(uintptr_t, fs_offsets->nintendo_paths[0].adrp_offset);
|
uintptr_t fs_n_adrp_opcode_location = INJECT_OFFSET(uintptr_t, fs_offsets->nintendo_paths[0].adrp_offset);
|
||||||
uintptr_t fs_adrp_opcode_location = INJECT_OFFSET(uintptr_t, fs_offsets->nintendo_paths[1].adrp_offset);
|
uintptr_t fs_adrp_opcode_location = INJECT_OFFSET(uintptr_t, fs_offsets->nintendo_paths[1].adrp_offset);
|
||||||
write_adrp_add(fs_offsets->nintendo_paths[0].opcode_reg, fs_n_adrp_opcode_location, nintendo_album_path_location);
|
write_adrp_add(fs_offsets->nintendo_paths[0].opcode_reg, fs_n_adrp_opcode_location, fs_offsets->nintendo_paths[0].add_rel_offset, nintendo_album_path_location);
|
||||||
write_adrp_add(fs_offsets->nintendo_paths[1].opcode_reg, fs_adrp_opcode_location, album_path_location);
|
write_adrp_add(fs_offsets->nintendo_paths[1].opcode_reg, fs_adrp_opcode_location, fs_offsets->nintendo_paths[1].add_rel_offset, album_path_location);
|
||||||
}
|
}
|
||||||
// Do contents path
|
// Do contents path
|
||||||
{
|
{
|
||||||
|
@ -291,8 +290,8 @@ void setup_nintendo_paths(void)
|
||||||
intptr_t contents_path_location = nintendo_contents_path_location + path_len - 9; // "/Contents"
|
intptr_t contents_path_location = nintendo_contents_path_location + path_len - 9; // "/Contents"
|
||||||
uintptr_t fs_n_adrp_opcode_location = INJECT_OFFSET(uintptr_t, fs_offsets->nintendo_paths[2].adrp_offset);
|
uintptr_t fs_n_adrp_opcode_location = INJECT_OFFSET(uintptr_t, fs_offsets->nintendo_paths[2].adrp_offset);
|
||||||
uintptr_t fs_adrp_opcode_location = INJECT_OFFSET(uintptr_t, fs_offsets->nintendo_paths[3].adrp_offset);
|
uintptr_t fs_adrp_opcode_location = INJECT_OFFSET(uintptr_t, fs_offsets->nintendo_paths[3].adrp_offset);
|
||||||
write_adrp_add(fs_offsets->nintendo_paths[2].opcode_reg, fs_n_adrp_opcode_location, nintendo_contents_path_location);
|
write_adrp_add(fs_offsets->nintendo_paths[2].opcode_reg, fs_n_adrp_opcode_location, fs_offsets->nintendo_paths[2].add_rel_offset, nintendo_contents_path_location);
|
||||||
write_adrp_add(fs_offsets->nintendo_paths[3].opcode_reg, fs_adrp_opcode_location, contents_path_location);
|
write_adrp_add(fs_offsets->nintendo_paths[3].opcode_reg, fs_adrp_opcode_location, fs_offsets->nintendo_paths[3].add_rel_offset, contents_path_location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue