id
int64
0
755k
file_name
stringlengths
3
109
file_path
stringlengths
13
185
content
stringlengths
31
9.38M
size
int64
31
9.38M
language
stringclasses
1 value
extension
stringclasses
11 values
total_lines
int64
1
340k
avg_line_length
float64
2.18
149k
max_line_length
int64
7
2.22M
alphanum_fraction
float64
0
1
repo_name
stringlengths
6
65
repo_stars
int64
100
47.3k
repo_forks
int64
0
12k
repo_open_issues
int64
0
3.4k
repo_license
stringclasses
9 values
repo_extraction_date
stringclasses
92 values
exact_duplicates_redpajama
bool
2 classes
near_duplicates_redpajama
bool
2 classes
exact_duplicates_githubcode
bool
2 classes
exact_duplicates_stackv2
bool
1 class
exact_duplicates_stackv1
bool
2 classes
near_duplicates_githubcode
bool
2 classes
near_duplicates_stackv1
bool
2 classes
near_duplicates_stackv2
bool
1 class
9,172
1700.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1700.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1700_H__ #define __FS_1700_H__ // Accessor vtable getters #define FS_OFFSET_1700_SDMMC_ACCESSOR_GC 0x18AD00 #define FS_OFFSET_1700_SDMMC_ACCESSOR_SD 0x18C9D0 #define FS_OFFSET_1700_SDMMC_ACCESSOR_NAND 0x18B1D0 // Hooks #define FS_OFFSET_1700_SDMMC_WRAPPER_READ 0x186BC0 #define FS_OFFSET_1700_SDMMC_WRAPPER_WRITE 0x186C20 #define FS_OFFSET_1700_RTLD 0x29D10 #define FS_OFFSET_1700_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1700_CLKRST_SET_MIN_V_CLK_RATE 0x1A7B60 // Misc funcs #define FS_OFFSET_1700_LOCK_MUTEX 0x17FEA0 #define FS_OFFSET_1700_UNLOCK_MUTEX 0x17FEF0 #define FS_OFFSET_1700_SDMMC_WRAPPER_CONTROLLER_OPEN 0x186B80 #define FS_OFFSET_1700_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x186BA0 // Misc Data #define FS_OFFSET_1700_SD_MUTEX 0xFCE3F0 #define FS_OFFSET_1700_NAND_MUTEX 0xFC9B78 #define FS_OFFSET_1700_ACTIVE_PARTITION 0xFC9BB8 #define FS_OFFSET_1700_SDMMC_DAS_HANDLE 0xFAF840 // NOPs #define FS_OFFSET_1700_SD_DAS_INIT 0x28C64 // Nintendo Paths #define FS_OFFSET_1700_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00068068, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007510C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0007BEAC, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0008F674, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1700_H__
2,201
C++
.h
50
42.44
78
0.732493
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,173
1203.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1203.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * Copyright (c) 2021 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1203_H__ #define __FS_1203_H__ // Accessor vtable getters #define FS_OFFSET_1203_SDMMC_ACCESSOR_GC 0x1550E0 #define FS_OFFSET_1203_SDMMC_ACCESSOR_SD 0x156EF0 #define FS_OFFSET_1203_SDMMC_ACCESSOR_NAND 0x155610 // Hooks #define FS_OFFSET_1203_SDMMC_WRAPPER_READ 0x150A80 #define FS_OFFSET_1203_SDMMC_WRAPPER_WRITE 0x150B40 #define FS_OFFSET_1203_RTLD 0x688 #define FS_OFFSET_1203_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1203_CLKRST_SET_MIN_V_CLK_RATE 0x14FDD0 // Misc funcs #define FS_OFFSET_1203_LOCK_MUTEX 0x29350 #define FS_OFFSET_1203_UNLOCK_MUTEX 0x293A0 #define FS_OFFSET_1203_SDMMC_WRAPPER_CONTROLLER_OPEN 0x150960 #define FS_OFFSET_1203_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1509F0 // Misc Data #define FS_OFFSET_1203_SD_MUTEX 0xE3D3E8 #define FS_OFFSET_1203_NAND_MUTEX 0xE38768 #define FS_OFFSET_1203_ACTIVE_PARTITION 0xE387A8 #define FS_OFFSET_1203_SDMMC_DAS_HANDLE 0xE20DB0 // NOPs #define FS_OFFSET_1203_SD_DAS_INIT 0x27244 // Nintendo Paths #define FS_OFFSET_1203_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006E920, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007AFD0, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00081364, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00092960, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1203_H__
2,226
C++
.h
51
42.058824
78
0.731764
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,174
1400.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1400.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1400_H__ #define __FS_1400_H__ // Accessor vtable getters #define FS_OFFSET_1400_SDMMC_ACCESSOR_GC 0x189F50 #define FS_OFFSET_1400_SDMMC_ACCESSOR_SD 0x18BD60 #define FS_OFFSET_1400_SDMMC_ACCESSOR_NAND 0x18A480 // Hooks #define FS_OFFSET_1400_SDMMC_WRAPPER_READ 0x185AF0 #define FS_OFFSET_1400_SDMMC_WRAPPER_WRITE 0x185B50 #define FS_OFFSET_1400_RTLD 0x282B8 #define FS_OFFSET_1400_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1400_CLKRST_SET_MIN_V_CLK_RATE 0x1A5D90 // Misc funcs #define FS_OFFSET_1400_LOCK_MUTEX 0x17E9F0 #define FS_OFFSET_1400_UNLOCK_MUTEX 0x17EA40 #define FS_OFFSET_1400_SDMMC_WRAPPER_CONTROLLER_OPEN 0x185AA0 #define FS_OFFSET_1400_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x185AD0 // Misc Data #define FS_OFFSET_1400_SD_MUTEX 0xF2E3F0 #define FS_OFFSET_1400_NAND_MUTEX 0xF292F8 #define FS_OFFSET_1400_ACTIVE_PARTITION 0xF29338 #define FS_OFFSET_1400_SDMMC_DAS_HANDLE 0xDFE9C8 // NOPs #define FS_OFFSET_1400_SD_DAS_INIT 0x27004 // Nintendo Paths #define FS_OFFSET_1400_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006D9C0, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007AC24, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x000813E8, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0009387C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1400_H__
2,201
C++
.h
50
42.44
78
0.732493
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,175
1800.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1800.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1800_H__ #define __FS_1800_H__ // Accessor vtable getters #define FS_OFFSET_1800_SDMMC_ACCESSOR_GC 0x18AB00 #define FS_OFFSET_1800_SDMMC_ACCESSOR_SD 0x18C800 #define FS_OFFSET_1800_SDMMC_ACCESSOR_NAND 0x18AFE0 // Hooks #define FS_OFFSET_1800_SDMMC_WRAPPER_READ 0x186A50 #define FS_OFFSET_1800_SDMMC_WRAPPER_WRITE 0x186AB0 #define FS_OFFSET_1800_RTLD 0x2A3A4 #define FS_OFFSET_1800_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x44))) #define FS_OFFSET_1800_CLKRST_SET_MIN_V_CLK_RATE 0x1A77D0 // Misc funcs #define FS_OFFSET_1800_LOCK_MUTEX 0x17FCC0 #define FS_OFFSET_1800_UNLOCK_MUTEX 0x17FD10 #define FS_OFFSET_1800_SDMMC_WRAPPER_CONTROLLER_OPEN 0x186A10 #define FS_OFFSET_1800_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x186A30 // Misc Data #define FS_OFFSET_1800_SD_MUTEX 0xFD13F0 #define FS_OFFSET_1800_NAND_MUTEX 0xFCCB28 #define FS_OFFSET_1800_ACTIVE_PARTITION 0xFCCB68 #define FS_OFFSET_1800_SDMMC_DAS_HANDLE 0xFB1950 // NOPs #define FS_OFFSET_1800_SD_DAS_INIT 0x28F24 // Nintendo Paths #define FS_OFFSET_1800_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00068B08, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x000758DC, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0007C77C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x000905C4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1800_H__
2,201
C++
.h
50
42.44
78
0.732493
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,176
700_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/700_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_700_EXFAT_H__ #define __FS_700_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_700_EXFAT_SDMMC_ACCESSOR_GC 0x167340 #define FS_OFFSET_700_EXFAT_SDMMC_ACCESSOR_SD 0x1670B0 #define FS_OFFSET_700_EXFAT_SDMMC_ACCESSOR_NAND 0x1635A0 // Hooks #define FS_OFFSET_700_EXFAT_SDMMC_WRAPPER_READ 0x15B3A0 #define FS_OFFSET_700_EXFAT_SDMMC_WRAPPER_WRITE 0x15B480 #define FS_OFFSET_700_EXFAT_RTLD 0x5B4 #define FS_OFFSET_700_EXFAT_RTLD_DESTINATION 0x9C #define FS_OFFSET_700_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_700_EXFAT_LOCK_MUTEX 0x154040 #define FS_OFFSET_700_EXFAT_UNLOCK_MUTEX 0x154090 #define FS_OFFSET_700_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_700_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x15B300 // Misc Data #define FS_OFFSET_700_EXFAT_SD_MUTEX 0xFF73E8 #define FS_OFFSET_700_EXFAT_NAND_MUTEX 0xFF2BE8 #define FS_OFFSET_700_EXFAT_ACTIVE_PARTITION 0xFF2C28 #define FS_OFFSET_700_EXFAT_SDMMC_DAS_HANDLE 0xEF3A00 // NOPs #define FS_OFFSET_700_EXFAT_SD_DAS_INIT 0x91598 // Nintendo Paths #define FS_OFFSET_700_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00089040, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0008A8F4, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0008AAE8, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0008AEC4, .add_rel_offset = 4}, \ {.opcode_reg = 4, .adrp_offset = 0x0008B088, .add_rel_offset = 4}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_700_EXFAT_H__
2,319
C++
.h
51
43.529412
76
0.722444
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,177
210_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/210_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_210_EXFAT_H__ #define __FS_210_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_210_EXFAT_SDMMC_ACCESSOR_GC 0x78F8C #define FS_OFFSET_210_EXFAT_SDMMC_ACCESSOR_SD 0x78D2C #define FS_OFFSET_210_EXFAT_SDMMC_ACCESSOR_NAND 0x7889C // Hooks #define FS_OFFSET_210_EXFAT_SDMMC_WRAPPER_READ 0x73858 #define FS_OFFSET_210_EXFAT_SDMMC_WRAPPER_WRITE 0x73918 #define FS_OFFSET_210_EXFAT_RTLD 0x500 #define FS_OFFSET_210_EXFAT_RTLD_DESTINATION 0x98 #define FS_OFFSET_210_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_210_EXFAT_LOCK_MUTEX 0x3264 #define FS_OFFSET_210_EXFAT_UNLOCK_MUTEX 0x32D0 #define FS_OFFSET_210_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_210_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x737D4 // Misc Data #define FS_OFFSET_210_EXFAT_SD_MUTEX 0xF22268 #define FS_OFFSET_210_EXFAT_NAND_MUTEX 0xF1CED0 #define FS_OFFSET_210_EXFAT_ACTIVE_PARTITION 0xF1CF10 #define FS_OFFSET_210_EXFAT_SDMMC_DAS_HANDLE 0xF1BDD0 // NOPs #define FS_OFFSET_210_EXFAT_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_210_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x000342E0, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0003545C, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 3, .adrp_offset = 0x00035754, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_210_EXFAT_H__
2,174
C++
.h
49
42.795918
78
0.736767
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,178
1020_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1020_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1020_EXFAT_H__ #define __FS_1020_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_1020_EXFAT_SDMMC_ACCESSOR_GC 0x14E0F0 #define FS_OFFSET_1020_EXFAT_SDMMC_ACCESSOR_SD 0x14C200 #define FS_OFFSET_1020_EXFAT_SDMMC_ACCESSOR_NAND 0x147080 // Hooks #define FS_OFFSET_1020_EXFAT_SDMMC_WRAPPER_READ 0x1427E0 #define FS_OFFSET_1020_EXFAT_SDMMC_WRAPPER_WRITE 0x1428C0 #define FS_OFFSET_1020_EXFAT_RTLD 0x634 #define FS_OFFSET_1020_EXFAT_RTLD_DESTINATION 0x9C #define FS_OFFSET_1020_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x141A00 // Misc funcs #define FS_OFFSET_1020_EXFAT_LOCK_MUTEX 0x28910 #define FS_OFFSET_1020_EXFAT_UNLOCK_MUTEX 0x28960 #define FS_OFFSET_1020_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_1020_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x142740 // Misc Data #define FS_OFFSET_1020_EXFAT_SD_MUTEX 0xE353E8 #define FS_OFFSET_1020_EXFAT_NAND_MUTEX 0xE30DA0 #define FS_OFFSET_1020_EXFAT_ACTIVE_PARTITION 0xE30DE0 #define FS_OFFSET_1020_EXFAT_SDMMC_DAS_HANDLE 0xE18B90 // NOPs #define FS_OFFSET_1020_EXFAT_SD_DAS_INIT 0x15214C // Nintendo Paths #define FS_OFFSET_1020_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006BBA4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00078520, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007ED0C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0009115C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1020_EXFAT_H__
2,292
C++
.h
50
44.26
78
0.738916
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,179
1900.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1900.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1900_H__ #define __FS_1900_H__ // Accessor vtable getters #define FS_OFFSET_1900_SDMMC_ACCESSOR_GC 0x195C00 #define FS_OFFSET_1900_SDMMC_ACCESSOR_SD 0x197F80 #define FS_OFFSET_1900_SDMMC_ACCESSOR_NAND 0x1963B0 // Hooks #define FS_OFFSET_1900_SDMMC_WRAPPER_READ 0x191A70 #define FS_OFFSET_1900_SDMMC_WRAPPER_WRITE 0x191AD0 #define FS_OFFSET_1900_RTLD 0x275F0 #define FS_OFFSET_1900_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x50))) #define FS_OFFSET_1900_CLKRST_SET_MIN_V_CLK_RATE 0x1B3880 // Misc funcs #define FS_OFFSET_1900_LOCK_MUTEX 0x18AC20 #define FS_OFFSET_1900_UNLOCK_MUTEX 0x18AC70 #define FS_OFFSET_1900_SDMMC_WRAPPER_CONTROLLER_OPEN 0x191A30 #define FS_OFFSET_1900_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x191A50 // Misc Data #define FS_OFFSET_1900_SD_MUTEX 0xFE1408 #define FS_OFFSET_1900_NAND_MUTEX 0xFDCB60 #define FS_OFFSET_1900_ACTIVE_PARTITION 0xFDCBA0 #define FS_OFFSET_1900_SDMMC_DAS_HANDLE 0xFC1908 // NOPs #define FS_OFFSET_1900_SD_DAS_INIT 0x260C4 // Nintendo Paths #define FS_OFFSET_1900_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00067FC8, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00075D6C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0007D1E8, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00092818, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1900_H__
2,201
C++
.h
50
42.44
78
0.732493
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,180
1203_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1203_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * Copyright (c) 2021 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1203_EXFAT_H__ #define __FS_1203_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_1203_EXFAT_SDMMC_ACCESSOR_GC 0x1550E0 #define FS_OFFSET_1203_EXFAT_SDMMC_ACCESSOR_SD 0x156EF0 #define FS_OFFSET_1203_EXFAT_SDMMC_ACCESSOR_NAND 0x155610 // Hooks #define FS_OFFSET_1203_EXFAT_SDMMC_WRAPPER_READ 0x150A80 #define FS_OFFSET_1203_EXFAT_SDMMC_WRAPPER_WRITE 0x150B40 #define FS_OFFSET_1203_EXFAT_RTLD 0x688 #define FS_OFFSET_1203_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1203_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x14FDD0 // Misc funcs #define FS_OFFSET_1203_EXFAT_LOCK_MUTEX 0x29350 #define FS_OFFSET_1203_EXFAT_UNLOCK_MUTEX 0x293A0 #define FS_OFFSET_1203_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x150960 #define FS_OFFSET_1203_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1509F0 // Misc Data #define FS_OFFSET_1203_EXFAT_SD_MUTEX 0xE4B3E8 #define FS_OFFSET_1203_EXFAT_NAND_MUTEX 0xE46768 #define FS_OFFSET_1203_EXFAT_ACTIVE_PARTITION 0xE467A8 #define FS_OFFSET_1203_EXFAT_SDMMC_DAS_HANDLE 0xE2EDB0 // NOPs #define FS_OFFSET_1203_EXFAT_SD_DAS_INIT 0x27244 // Nintendo Paths #define FS_OFFSET_1203_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006E920, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007AFD0, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00081364, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00092960, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1203_EXFAT_H__
2,352
C++
.h
51
44.529412
78
0.737347
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,181
900.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/900.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_900_H__ #define __FS_900_H__ // Accessor vtable getters #define FS_OFFSET_900_SDMMC_ACCESSOR_GC 0x1430F0 #define FS_OFFSET_900_SDMMC_ACCESSOR_SD 0x141200 #define FS_OFFSET_900_SDMMC_ACCESSOR_NAND 0x13C080 // Hooks #define FS_OFFSET_900_SDMMC_WRAPPER_READ 0x1377E0 #define FS_OFFSET_900_SDMMC_WRAPPER_WRITE 0x1378C0 #define FS_OFFSET_900_RTLD 0x454 #define FS_OFFSET_900_RTLD_DESTINATION 0x9C #define FS_OFFSET_900_CLKRST_SET_MIN_V_CLK_RATE 0x136A00 // Misc funcs #define FS_OFFSET_900_LOCK_MUTEX 0x25280 #define FS_OFFSET_900_UNLOCK_MUTEX 0x252D0 #define FS_OFFSET_900_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_900_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x137740 // Misc Data #define FS_OFFSET_900_SD_MUTEX 0xE1D3E8 #define FS_OFFSET_900_NAND_MUTEX 0xE18258 #define FS_OFFSET_900_ACTIVE_PARTITION 0xE18298 #define FS_OFFSET_900_SDMMC_DAS_HANDLE 0xDFEFA0 // NOPs #define FS_OFFSET_900_SD_DAS_INIT 0x1472BC // Nintendo Paths #define FS_OFFSET_900_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00068A60, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00070A40, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00081CB4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00081EF4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0008211C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_900_H__
2,224
C++
.h
51
42.019608
78
0.728281
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,182
1600.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1600.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1600_H__ #define __FS_1600_H__ // Accessor vtable getters #define FS_OFFSET_1600_SDMMC_ACCESSOR_GC 0x1862A0 #define FS_OFFSET_1600_SDMMC_ACCESSOR_SD 0x187F20 #define FS_OFFSET_1600_SDMMC_ACCESSOR_NAND 0x186760 // Hooks #define FS_OFFSET_1600_SDMMC_WRAPPER_READ 0x1821F0 #define FS_OFFSET_1600_SDMMC_WRAPPER_WRITE 0x182250 #define FS_OFFSET_1600_RTLD 0x269B0 #define FS_OFFSET_1600_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1600_CLKRST_SET_MIN_V_CLK_RATE 0x1A2D30 // Misc funcs #define FS_OFFSET_1600_LOCK_MUTEX 0x17B730 #define FS_OFFSET_1600_UNLOCK_MUTEX 0x17B780 #define FS_OFFSET_1600_SDMMC_WRAPPER_CONTROLLER_OPEN 0x1821B0 #define FS_OFFSET_1600_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1821D0 // Misc Data #define FS_OFFSET_1600_SD_MUTEX 0xFFB3F0 #define FS_OFFSET_1600_NAND_MUTEX 0xFF6B58 #define FS_OFFSET_1600_ACTIVE_PARTITION 0xFF6B98 #define FS_OFFSET_1600_SDMMC_DAS_HANDLE 0xFDC8B0 // NOPs #define FS_OFFSET_1600_SD_DAS_INIT 0x258D4 // Nintendo Paths #define FS_OFFSET_1600_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00063B48, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00070D6C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0007790C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0008A754, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1600_H__
2,201
C++
.h
50
42.44
78
0.732493
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,183
1310.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1310.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1310_H__ #define __FS_1310_H__ // Accessor vtable getters #define FS_OFFSET_1310_SDMMC_ACCESSOR_GC 0x158C20 #define FS_OFFSET_1310_SDMMC_ACCESSOR_SD 0x15AA30 #define FS_OFFSET_1310_SDMMC_ACCESSOR_NAND 0x159150 // Hooks #define FS_OFFSET_1310_SDMMC_WRAPPER_READ 0x1545C0 #define FS_OFFSET_1310_SDMMC_WRAPPER_WRITE 0x154680 #define FS_OFFSET_1310_RTLD 0x688 #define FS_OFFSET_1310_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1310_CLKRST_SET_MIN_V_CLK_RATE 0x1537C0 // Misc funcs #define FS_OFFSET_1310_LOCK_MUTEX 0x29690 #define FS_OFFSET_1310_UNLOCK_MUTEX 0x296E0 #define FS_OFFSET_1310_SDMMC_WRAPPER_CONTROLLER_OPEN 0x1544A0 #define FS_OFFSET_1310_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x154530 // Misc Data #define FS_OFFSET_1310_SD_MUTEX 0xE133E8 #define FS_OFFSET_1310_NAND_MUTEX 0xE0E768 #define FS_OFFSET_1310_ACTIVE_PARTITION 0xE0E7A8 #define FS_OFFSET_1310_SDMMC_DAS_HANDLE 0xDF6E18 // NOPs #define FS_OFFSET_1310_SD_DAS_INIT 0x27744 // Nintendo Paths #define FS_OFFSET_1310_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006EBE0, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007BEEC, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00082294, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0009422C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1310_H__
2,197
C++
.h
50
42.36
78
0.731993
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,184
400.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/400.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_400_H__ #define __FS_400_H__ // Accessor vtable getters #define FS_OFFSET_400_SDMMC_ACCESSOR_GC 0xA3374 #define FS_OFFSET_400_SDMMC_ACCESSOR_SD 0xA3114 #define FS_OFFSET_400_SDMMC_ACCESSOR_NAND 0xA2C80 // Hooks #define FS_OFFSET_400_SDMMC_WRAPPER_READ 0x9DBCC #define FS_OFFSET_400_SDMMC_WRAPPER_WRITE 0x9DC8C #define FS_OFFSET_400_RTLD 0x4DC #define FS_OFFSET_400_RTLD_DESTINATION 0x98 #define FS_OFFSET_400_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_400_LOCK_MUTEX 0x39A0 #define FS_OFFSET_400_UNLOCK_MUTEX 0x3A0C #define FS_OFFSET_400_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_400_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x9DB48 // Misc Data #define FS_OFFSET_400_SD_MUTEX 0xE80268 #define FS_OFFSET_400_NAND_MUTEX 0xE7BC60 #define FS_OFFSET_400_ACTIVE_PARTITION 0xE7BCA0 #define FS_OFFSET_400_SDMMC_DAS_HANDLE 0xE7ABF0 // NOPs #define FS_OFFSET_400_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_400_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0002023C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00021BE8, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 3, .adrp_offset = 0x00021EC4, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_400_H__
2,048
C++
.h
49
40.22449
78
0.730653
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,185
1600_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1600_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1600_EXFAT_H__ #define __FS_1600_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_1600_EXFAT_SDMMC_ACCESSOR_GC 0x190F80 #define FS_OFFSET_1600_EXFAT_SDMMC_ACCESSOR_SD 0x192C00 #define FS_OFFSET_1600_EXFAT_SDMMC_ACCESSOR_NAND 0x191440 // Hooks #define FS_OFFSET_1600_EXFAT_SDMMC_WRAPPER_READ 0x18CED0 #define FS_OFFSET_1600_EXFAT_SDMMC_WRAPPER_WRITE 0x18CF30 #define FS_OFFSET_1600_EXFAT_RTLD 0x269B0 #define FS_OFFSET_1600_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1600_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1ADA10 // Misc funcs #define FS_OFFSET_1600_EXFAT_LOCK_MUTEX 0x186410 #define FS_OFFSET_1600_EXFAT_UNLOCK_MUTEX 0x186460 #define FS_OFFSET_1600_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x18CE90 #define FS_OFFSET_1600_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x18CEB0 // Misc Data #define FS_OFFSET_1600_EXFAT_SD_MUTEX 0x100D3F0 #define FS_OFFSET_1600_EXFAT_NAND_MUTEX 0x1008B58 #define FS_OFFSET_1600_EXFAT_ACTIVE_PARTITION 0x1008B98 #define FS_OFFSET_1600_EXFAT_SDMMC_DAS_HANDLE 0xFE98B0 // NOPs #define FS_OFFSET_1600_EXFAT_SD_DAS_INIT 0x258D4 // Nintendo Paths #define FS_OFFSET_1600_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00063B48, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00070D6C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0007790C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0008A754, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1600_EXFAT_H__
2,330
C++
.h
50
45.02
78
0.738441
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,186
300.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/300.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_300_H__ #define __FS_300_H__ // Accessor vtable getters #define FS_OFFSET_300_SDMMC_ACCESSOR_GC 0x8FAAC #define FS_OFFSET_300_SDMMC_ACCESSOR_SD 0x8F84C #define FS_OFFSET_300_SDMMC_ACCESSOR_NAND 0x8F3B8 // Hooks #define FS_OFFSET_300_SDMMC_WRAPPER_READ 0x8A2F4 #define FS_OFFSET_300_SDMMC_WRAPPER_WRITE 0x8A3B4 #define FS_OFFSET_300_RTLD 0x4E8 #define FS_OFFSET_300_RTLD_DESTINATION 0x8C #define FS_OFFSET_300_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_300_LOCK_MUTEX 0x35CC #define FS_OFFSET_300_UNLOCK_MUTEX 0x3638 #define FS_OFFSET_300_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_300_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x8A270 // Misc Data #define FS_OFFSET_300_SD_MUTEX 0xE69268 #define FS_OFFSET_300_NAND_MUTEX 0xE646F0 #define FS_OFFSET_300_ACTIVE_PARTITION 0xE64730 #define FS_OFFSET_300_SDMMC_DAS_HANDLE 0xE635A0 // NOPs #define FS_OFFSET_300_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_300_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x000391F4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0003A480, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 3, .adrp_offset = 0x0003A778, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_300_H__
2,048
C++
.h
49
40.22449
78
0.730653
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,187
1700_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1700_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1700_EXFAT_H__ #define __FS_1700_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_1700_EXFAT_SDMMC_ACCESSOR_GC 0x195B60 #define FS_OFFSET_1700_EXFAT_SDMMC_ACCESSOR_SD 0x197830 #define FS_OFFSET_1700_EXFAT_SDMMC_ACCESSOR_NAND 0x196030 // Hooks #define FS_OFFSET_1700_EXFAT_SDMMC_WRAPPER_READ 0x191A20 #define FS_OFFSET_1700_EXFAT_SDMMC_WRAPPER_WRITE 0x191A80 #define FS_OFFSET_1700_EXFAT_RTLD 0x29D10 #define FS_OFFSET_1700_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1700_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1B29C0 // Misc funcs #define FS_OFFSET_1700_EXFAT_LOCK_MUTEX 0x18AD00 #define FS_OFFSET_1700_EXFAT_UNLOCK_MUTEX 0x18AD50 #define FS_OFFSET_1700_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x1919E0 #define FS_OFFSET_1700_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x191A00 // Misc Data #define FS_OFFSET_1700_EXFAT_SD_MUTEX 0xFE03F0 #define FS_OFFSET_1700_EXFAT_NAND_MUTEX 0xFDBB78 #define FS_OFFSET_1700_EXFAT_ACTIVE_PARTITION 0xFDBBB8 #define FS_OFFSET_1700_EXFAT_SDMMC_DAS_HANDLE 0xFBC840 // NOPs #define FS_OFFSET_1700_EXFAT_SD_DAS_INIT 0x28C64 // Nintendo Paths #define FS_OFFSET_1700_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00068068, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007510C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0007BEAC, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0008F674, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1700_EXFAT_H__
2,327
C++
.h
50
44.96
78
0.738095
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,188
1200_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1200_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1200_EXFAT_H__ #define __FS_1200_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_1200_EXFAT_SDMMC_ACCESSOR_GC 0x154FD0 #define FS_OFFSET_1200_EXFAT_SDMMC_ACCESSOR_SD 0x156DE0 #define FS_OFFSET_1200_EXFAT_SDMMC_ACCESSOR_NAND 0x155500 // Hooks #define FS_OFFSET_1200_EXFAT_SDMMC_WRAPPER_READ 0x150970 #define FS_OFFSET_1200_EXFAT_SDMMC_WRAPPER_WRITE 0x150A30 #define FS_OFFSET_1200_EXFAT_RTLD 0x688 #define FS_OFFSET_1200_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1200_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x14FCC0 // Misc funcs #define FS_OFFSET_1200_EXFAT_LOCK_MUTEX 0x29350 #define FS_OFFSET_1200_EXFAT_UNLOCK_MUTEX 0x293A0 #define FS_OFFSET_1200_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x150850 #define FS_OFFSET_1200_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1508E0 // Misc Data #define FS_OFFSET_1200_EXFAT_SD_MUTEX 0xE4B3E8 #define FS_OFFSET_1200_EXFAT_NAND_MUTEX 0xE46768 #define FS_OFFSET_1200_EXFAT_ACTIVE_PARTITION 0xE467A8 #define FS_OFFSET_1200_EXFAT_SDMMC_DAS_HANDLE 0xE2EDB0 // NOPs #define FS_OFFSET_1200_EXFAT_SD_DAS_INIT 0x27244 // Nintendo Paths #define FS_OFFSET_1200_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006E810, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007AEC0, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00081254, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00092850, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1200_EXFAT_H__
2,323
C++
.h
50
44.88
78
0.737633
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,189
800.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/800.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_800_H__ #define __FS_800_H__ // Accessor vtable getters #define FS_OFFSET_800_SDMMC_ACCESSOR_GC 0x15EA20 #define FS_OFFSET_800_SDMMC_ACCESSOR_SD 0x15E790 #define FS_OFFSET_800_SDMMC_ACCESSOR_NAND 0x15AC80 // Hooks #define FS_OFFSET_800_SDMMC_WRAPPER_READ 0x152A80 #define FS_OFFSET_800_SDMMC_WRAPPER_WRITE 0x152B60 #define FS_OFFSET_800_RTLD 0x5B4 #define FS_OFFSET_800_RTLD_DESTINATION 0x9C #define FS_OFFSET_800_CLKRST_SET_MIN_V_CLK_RATE 0x16F370 // Misc funcs #define FS_OFFSET_800_LOCK_MUTEX 0x14B6D0 #define FS_OFFSET_800_UNLOCK_MUTEX 0x14B720 #define FS_OFFSET_800_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_800_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1529E0 // Misc Data #define FS_OFFSET_800_SD_MUTEX 0xF1A3E8 #define FS_OFFSET_800_NAND_MUTEX 0xF15BE8 #define FS_OFFSET_800_ACTIVE_PARTITION 0xF15C28 #define FS_OFFSET_800_SDMMC_DAS_HANDLE 0xE167C0 // NOPs #define FS_OFFSET_800_SD_DAS_INIT 0x87D58 // Nintendo Paths #define FS_OFFSET_800_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0007F5F0, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x00081084, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x00081278, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x00081654, .add_rel_offset = 4}, \ {.opcode_reg = 4, .adrp_offset = 0x00081818, .add_rel_offset = 4}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0} \ } #endif // __FS_800_H__
2,197
C++
.h
51
41.137255
76
0.716893
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,190
1603.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1603.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1603_H__ #define __FS_1603_H__ // Accessor vtable getters #define FS_OFFSET_1603_SDMMC_ACCESSOR_GC 0x1862F0 #define FS_OFFSET_1603_SDMMC_ACCESSOR_SD 0x187F70 #define FS_OFFSET_1603_SDMMC_ACCESSOR_NAND 0x1867B0 // Hooks #define FS_OFFSET_1603_SDMMC_WRAPPER_READ 0x182240 #define FS_OFFSET_1603_SDMMC_WRAPPER_WRITE 0x1822A0 #define FS_OFFSET_1603_RTLD 0x269B0 #define FS_OFFSET_1603_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1603_CLKRST_SET_MIN_V_CLK_RATE 0x1A2D80 // Misc funcs #define FS_OFFSET_1603_LOCK_MUTEX 0x17B780 #define FS_OFFSET_1603_UNLOCK_MUTEX 0x17B7D0 #define FS_OFFSET_1603_SDMMC_WRAPPER_CONTROLLER_OPEN 0x182200 #define FS_OFFSET_1603_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x182220 // Misc Data #define FS_OFFSET_1603_SD_MUTEX 0xFFB3F0 #define FS_OFFSET_1603_NAND_MUTEX 0xFF6B58 #define FS_OFFSET_1603_ACTIVE_PARTITION 0xFF6B98 #define FS_OFFSET_1603_SDMMC_DAS_HANDLE 0xFDC8B0 // NOPs #define FS_OFFSET_1603_SD_DAS_INIT 0x258D4 // Nintendo Paths #define FS_OFFSET_1603_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00063B98, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00070DBC, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0007795C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0008A7A4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1603_H__
2,201
C++
.h
50
42.44
78
0.732493
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,191
1400_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1400_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1400_EXFAT_H__ #define __FS_1400_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_1400_EXFAT_SDMMC_ACCESSOR_GC 0x1952D0 #define FS_OFFSET_1400_EXFAT_SDMMC_ACCESSOR_SD 0x1970E0 #define FS_OFFSET_1400_EXFAT_SDMMC_ACCESSOR_NAND 0x195800 // Hooks #define FS_OFFSET_1400_EXFAT_SDMMC_WRAPPER_READ 0x190E70 #define FS_OFFSET_1400_EXFAT_SDMMC_WRAPPER_WRITE 0x190ED0 #define FS_OFFSET_1400_EXFAT_RTLD 0x282B8 #define FS_OFFSET_1400_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1400_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1B1110 // Misc funcs #define FS_OFFSET_1400_EXFAT_LOCK_MUTEX 0x189D70 #define FS_OFFSET_1400_EXFAT_UNLOCK_MUTEX 0x189DC0 #define FS_OFFSET_1400_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x190E20 #define FS_OFFSET_1400_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x190E50 // Misc Data #define FS_OFFSET_1400_EXFAT_SD_MUTEX 0x10123F0 #define FS_OFFSET_1400_EXFAT_NAND_MUTEX 0x100D2F8 #define FS_OFFSET_1400_EXFAT_ACTIVE_PARTITION 0x100D338 #define FS_OFFSET_1400_EXFAT_SDMMC_DAS_HANDLE 0xE0B9C8 // NOPs #define FS_OFFSET_1400_EXFAT_SD_DAS_INIT 0x27004 // Nintendo Paths #define FS_OFFSET_1400_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006D9C0, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007AC24, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x000813E8, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0009387C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1400_EXFAT_H__
2,330
C++
.h
50
45.02
78
0.738441
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,192
1800_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1800_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1800_EXFAT_H__ #define __FS_1800_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_1800_EXFAT_SDMMC_ACCESSOR_GC 0x195B90 #define FS_OFFSET_1800_EXFAT_SDMMC_ACCESSOR_SD 0x197890 #define FS_OFFSET_1800_EXFAT_SDMMC_ACCESSOR_NAND 0x196070 // Hooks #define FS_OFFSET_1800_EXFAT_SDMMC_WRAPPER_READ 0x191AE0 #define FS_OFFSET_1800_EXFAT_SDMMC_WRAPPER_WRITE 0x191B40 #define FS_OFFSET_1800_EXFAT_RTLD 0x2A3A4 #define FS_OFFSET_1800_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x44))) #define FS_OFFSET_1800_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1B2860 // Misc funcs #define FS_OFFSET_1800_EXFAT_LOCK_MUTEX 0x18AD50 #define FS_OFFSET_1800_EXFAT_UNLOCK_MUTEX 0x18ADA0 #define FS_OFFSET_1800_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x191AA0 #define FS_OFFSET_1800_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x191AC0 // Misc Data #define FS_OFFSET_1800_EXFAT_SD_MUTEX 0xFE33F0 #define FS_OFFSET_1800_EXFAT_NAND_MUTEX 0xFDEB28 #define FS_OFFSET_1800_EXFAT_ACTIVE_PARTITION 0xFDEB68 #define FS_OFFSET_1800_EXFAT_SDMMC_DAS_HANDLE 0xFBE950 // NOPs #define FS_OFFSET_1800_EXFAT_SD_DAS_INIT 0x28F24 // Nintendo Paths #define FS_OFFSET_1800_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00068B08, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x000758DC, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0007C77C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x000905C4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1800_EXFAT_H__
2,327
C++
.h
50
44.96
78
0.738095
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,193
1810_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1810_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1810_EXFAT_H__ #define __FS_1810_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_1810_EXFAT_SDMMC_ACCESSOR_GC 0x195B90 #define FS_OFFSET_1810_EXFAT_SDMMC_ACCESSOR_SD 0x197890 #define FS_OFFSET_1810_EXFAT_SDMMC_ACCESSOR_NAND 0x196070 // Hooks #define FS_OFFSET_1810_EXFAT_SDMMC_WRAPPER_READ 0x191AE0 #define FS_OFFSET_1810_EXFAT_SDMMC_WRAPPER_WRITE 0x191B40 #define FS_OFFSET_1810_EXFAT_RTLD 0x2A3A4 #define FS_OFFSET_1810_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x44))) #define FS_OFFSET_1810_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1B2860 // Misc funcs #define FS_OFFSET_1810_EXFAT_LOCK_MUTEX 0x18AD50 #define FS_OFFSET_1810_EXFAT_UNLOCK_MUTEX 0x18ADA0 #define FS_OFFSET_1810_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x191AA0 #define FS_OFFSET_1810_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x191AC0 // Misc Data #define FS_OFFSET_1810_EXFAT_SD_MUTEX 0xFE33F0 #define FS_OFFSET_1810_EXFAT_NAND_MUTEX 0xFDEB28 #define FS_OFFSET_1810_EXFAT_ACTIVE_PARTITION 0xFDEB68 #define FS_OFFSET_1810_EXFAT_SDMMC_DAS_HANDLE 0xFBE950 // NOPs #define FS_OFFSET_1810_EXFAT_SD_DAS_INIT 0x28F24 // Nintendo Paths #define FS_OFFSET_1810_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00068B08, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x000758DC, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0007C77C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x000905C4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1810_EXFAT_H__
2,327
C++
.h
50
44.96
78
0.738095
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,194
1020.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1020.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1020_H__ #define __FS_1020_H__ // Accessor vtable getters #define FS_OFFSET_1020_SDMMC_ACCESSOR_GC 0x14E0F0 #define FS_OFFSET_1020_SDMMC_ACCESSOR_SD 0x14C200 #define FS_OFFSET_1020_SDMMC_ACCESSOR_NAND 0x147080 // Hooks #define FS_OFFSET_1020_SDMMC_WRAPPER_READ 0x1427E0 #define FS_OFFSET_1020_SDMMC_WRAPPER_WRITE 0x1428C0 #define FS_OFFSET_1020_RTLD 0x634 #define FS_OFFSET_1020_RTLD_DESTINATION 0x9C #define FS_OFFSET_1020_CLKRST_SET_MIN_V_CLK_RATE 0x141A00 // Misc funcs #define FS_OFFSET_1020_LOCK_MUTEX 0x28910 #define FS_OFFSET_1020_UNLOCK_MUTEX 0x28960 #define FS_OFFSET_1020_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_1020_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x142740 // Misc Data #define FS_OFFSET_1020_SD_MUTEX 0xE273E8 #define FS_OFFSET_1020_NAND_MUTEX 0xE22DA0 #define FS_OFFSET_1020_ACTIVE_PARTITION 0xE22DE0 #define FS_OFFSET_1020_SDMMC_DAS_HANDLE 0xE0AB90 // NOPs #define FS_OFFSET_1020_SD_DAS_INIT 0x15214C // Nintendo Paths #define FS_OFFSET_1020_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006BBA4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00078520, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007ED0C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0009115C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1020_H__
2,166
C++
.h
50
41.74
78
0.73327
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,195
1310_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1310_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1310_EXFAT_H__ #define __FS_1310_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_1310_EXFAT_SDMMC_ACCESSOR_GC 0x158C20 #define FS_OFFSET_1310_EXFAT_SDMMC_ACCESSOR_SD 0x15AA30 #define FS_OFFSET_1310_EXFAT_SDMMC_ACCESSOR_NAND 0x159150 // Hooks #define FS_OFFSET_1310_EXFAT_SDMMC_WRAPPER_READ 0x1545C0 #define FS_OFFSET_1310_EXFAT_SDMMC_WRAPPER_WRITE 0x154680 #define FS_OFFSET_1310_EXFAT_RTLD 0x688 #define FS_OFFSET_1310_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1310_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1537C0 // Misc funcs #define FS_OFFSET_1310_EXFAT_LOCK_MUTEX 0x29690 #define FS_OFFSET_1310_EXFAT_UNLOCK_MUTEX 0x296E0 #define FS_OFFSET_1310_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x1544A0 #define FS_OFFSET_1310_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x154530 // Misc Data #define FS_OFFSET_1310_EXFAT_SD_MUTEX 0xE203E8 #define FS_OFFSET_1310_EXFAT_NAND_MUTEX 0xE1B768 #define FS_OFFSET_1310_EXFAT_ACTIVE_PARTITION 0xE1B7A8 #define FS_OFFSET_1310_EXFAT_SDMMC_DAS_HANDLE 0xE03E18 // NOPs #define FS_OFFSET_1310_EXFAT_SD_DAS_INIT 0x27744 // Nintendo Paths #define FS_OFFSET_1310_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006EBE0, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007BEEC, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00082294, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0009422C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1310_EXFAT_H__
2,323
C++
.h
50
44.88
78
0.737633
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,196
800_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/800_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_800_EXFAT_H__ #define __FS_800_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_800_EXFAT_SDMMC_ACCESSOR_GC 0x169FD0 #define FS_OFFSET_800_EXFAT_SDMMC_ACCESSOR_SD 0x169D40 #define FS_OFFSET_800_EXFAT_SDMMC_ACCESSOR_NAND 0x166230 // Hooks #define FS_OFFSET_800_EXFAT_SDMMC_WRAPPER_READ 0x15E030 #define FS_OFFSET_800_EXFAT_SDMMC_WRAPPER_WRITE 0x15E110 #define FS_OFFSET_800_EXFAT_RTLD 0x5B4 #define FS_OFFSET_800_EXFAT_RTLD_DESTINATION 0x9C #define FS_OFFSET_800_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x17A920 // Misc funcs #define FS_OFFSET_800_EXFAT_LOCK_MUTEX 0x156C80 #define FS_OFFSET_800_EXFAT_UNLOCK_MUTEX 0x156CD0 #define FS_OFFSET_800_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_800_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x15DF90 // Misc Data #define FS_OFFSET_800_EXFAT_SD_MUTEX 0xFFE3E8 #define FS_OFFSET_800_EXFAT_NAND_MUTEX 0xFF9BE8 #define FS_OFFSET_800_EXFAT_ACTIVE_PARTITION 0xFF9C28 #define FS_OFFSET_800_EXFAT_SDMMC_DAS_HANDLE 0xEFAA20 // NOPs #define FS_OFFSET_800_EXFAT_SD_DAS_INIT 0x93308 // Nintendo Paths #define FS_OFFSET_800_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0008ABA0, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0008C634, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0008C828, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0008CC04, .add_rel_offset = 4}, \ {.opcode_reg = 4, .adrp_offset = 0x0008CDC8, .add_rel_offset = 4}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0} \ } #endif // __FS_800_EXFAT_H__
2,323
C++
.h
51
43.607843
76
0.723376
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,197
100.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/100.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_100_H__ #define __FS_100_H__ // Accessor vtable getters #define FS_OFFSET_100_SDMMC_ACCESSOR_GC 0x6F850 #define FS_OFFSET_100_SDMMC_ACCESSOR_SD 0x6F65C #define FS_OFFSET_100_SDMMC_ACCESSOR_NAND 0x6F230 // Hooks #define FS_OFFSET_100_SDMMC_WRAPPER_READ 0x6A930 #define FS_OFFSET_100_SDMMC_WRAPPER_WRITE 0x6A9F0 #define FS_OFFSET_100_RTLD 0x534 #define FS_OFFSET_100_RTLD_DESTINATION 0xA0 #define FS_OFFSET_100_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_100_LOCK_MUTEX 0x2884 #define FS_OFFSET_100_UNLOCK_MUTEX 0x28F0 #define FS_OFFSET_100_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_100_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x6A8AC // Misc Data #define FS_OFFSET_100_SD_MUTEX 0xE36058 #define FS_OFFSET_100_NAND_MUTEX 0xE30610 #define FS_OFFSET_100_ACTIVE_PARTITION 0xE30650 #define FS_OFFSET_100_SDMMC_DAS_HANDLE 0xE2F730 // NOPs #define FS_OFFSET_100_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_100_NINTENDO_PATHS \ { \ {.opcode_reg = 8, .adrp_offset = 0x00032C58, .add_rel_offset = 8}, \ {.opcode_reg = 9, .adrp_offset = 0x00032F40, .add_rel_offset = 8}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_100_H__
1,960
C++
.h
48
39.083333
76
0.727273
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,198
500_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/500_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_500_EXFAT_H__ #define __FS_500_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_500_EXFAT_SDMMC_ACCESSOR_GC 0xCF250 #define FS_OFFSET_500_EXFAT_SDMMC_ACCESSOR_SD 0xCEFD0 #define FS_OFFSET_500_EXFAT_SDMMC_ACCESSOR_NAND 0xCE990 // Hooks #define FS_OFFSET_500_EXFAT_SDMMC_WRAPPER_READ 0xC9420 #define FS_OFFSET_500_EXFAT_SDMMC_WRAPPER_WRITE 0xC9500 #define FS_OFFSET_500_EXFAT_RTLD 0x584 #define FS_OFFSET_500_EXFAT_RTLD_DESTINATION 0x94 #define FS_OFFSET_500_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_500_EXFAT_LOCK_MUTEX 0x4080 #define FS_OFFSET_500_EXFAT_UNLOCK_MUTEX 0x40D0 #define FS_OFFSET_500_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_500_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0xC9380 // Misc Data #define FS_OFFSET_500_EXFAT_SD_MUTEX 0xFA8268 #define FS_OFFSET_500_EXFAT_NAND_MUTEX 0xFA2E58 #define FS_OFFSET_500_EXFAT_ACTIVE_PARTITION 0xFA2E98 #define FS_OFFSET_500_EXFAT_SDMMC_DAS_HANDLE 0xFA1E30 // NOPs #define FS_OFFSET_500_EXFAT_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_500_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00028980, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0002ACE4, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0002B220, .add_rel_offset = 4}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_500_EXFAT_H__
2,159
C++
.h
49
42.244898
76
0.729177
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,199
1500_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1500_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1500_EXFAT_H__ #define __FS_1500_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_1500_EXFAT_SDMMC_ACCESSOR_GC 0x18EDB0 #define FS_OFFSET_1500_EXFAT_SDMMC_ACCESSOR_SD 0x190A30 #define FS_OFFSET_1500_EXFAT_SDMMC_ACCESSOR_NAND 0x18F270 // Hooks #define FS_OFFSET_1500_EXFAT_SDMMC_WRAPPER_READ 0x18AC80 #define FS_OFFSET_1500_EXFAT_SDMMC_WRAPPER_WRITE 0x18ACE0 #define FS_OFFSET_1500_EXFAT_RTLD 0x26518 #define FS_OFFSET_1500_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1500_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1AB800 // Misc funcs #define FS_OFFSET_1500_EXFAT_LOCK_MUTEX 0x184130 #define FS_OFFSET_1500_EXFAT_UNLOCK_MUTEX 0x184180 #define FS_OFFSET_1500_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x18AC40 #define FS_OFFSET_1500_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x18AC60 // Misc Data #define FS_OFFSET_1500_EXFAT_SD_MUTEX 0x10053F0 #define FS_OFFSET_1500_EXFAT_NAND_MUTEX 0x10002E8 #define FS_OFFSET_1500_EXFAT_ACTIVE_PARTITION 0x1000328 #define FS_OFFSET_1500_EXFAT_SDMMC_DAS_HANDLE 0xFE08D8 // NOPs #define FS_OFFSET_1500_EXFAT_SD_DAS_INIT 0x25454 // Nintendo Paths #define FS_OFFSET_1500_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00063050, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0006FDE8, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x000768D4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00089364, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1500_EXFAT_H__
2,330
C++
.h
50
45.02
78
0.738441
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,200
210.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/210.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_210_H__ #define __FS_210_H__ // Accessor vtable getters #define FS_OFFSET_210_SDMMC_ACCESSOR_GC 0x78F8C #define FS_OFFSET_210_SDMMC_ACCESSOR_SD 0x78D2C #define FS_OFFSET_210_SDMMC_ACCESSOR_NAND 0x7889C // Hooks #define FS_OFFSET_210_SDMMC_WRAPPER_READ 0x73858 #define FS_OFFSET_210_SDMMC_WRAPPER_WRITE 0x73918 #define FS_OFFSET_210_RTLD 0x500 #define FS_OFFSET_210_RTLD_DESTINATION 0x98 #define FS_OFFSET_210_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_210_LOCK_MUTEX 0x3264 #define FS_OFFSET_210_UNLOCK_MUTEX 0x32D0 #define FS_OFFSET_210_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_210_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x737D4 // Misc Data #define FS_OFFSET_210_SD_MUTEX 0xE43268 #define FS_OFFSET_210_NAND_MUTEX 0xE3DED0 #define FS_OFFSET_210_ACTIVE_PARTITION 0xE3DF10 #define FS_OFFSET_210_SDMMC_DAS_HANDLE 0xE3CDD0 // NOPs #define FS_OFFSET_210_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_210_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x000342E0, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0003545C, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 3, .adrp_offset = 0x00035754, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_210_H__
2,048
C++
.h
49
40.22449
78
0.730653
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,201
200_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/200_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_200_EXFAT_H__ #define __FS_200_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_200_EXFAT_SDMMC_ACCESSOR_GC 0x78BAC #define FS_OFFSET_200_EXFAT_SDMMC_ACCESSOR_SD 0x7894C #define FS_OFFSET_200_EXFAT_SDMMC_ACCESSOR_NAND 0x784BC // Hooks #define FS_OFFSET_200_EXFAT_SDMMC_WRAPPER_READ 0x73478 #define FS_OFFSET_200_EXFAT_SDMMC_WRAPPER_WRITE 0x73538 #define FS_OFFSET_200_EXFAT_RTLD 0x500 #define FS_OFFSET_200_EXFAT_RTLD_DESTINATION 0x98 #define FS_OFFSET_200_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_200_EXFAT_LOCK_MUTEX 0x3264 #define FS_OFFSET_200_EXFAT_UNLOCK_MUTEX 0x32D0 #define FS_OFFSET_200_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_200_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x733F4 // Misc Data #define FS_OFFSET_200_EXFAT_SD_MUTEX 0xF22268 #define FS_OFFSET_200_EXFAT_NAND_MUTEX 0xF1CED0 #define FS_OFFSET_200_EXFAT_ACTIVE_PARTITION 0xF1CF10 #define FS_OFFSET_200_EXFAT_SDMMC_DAS_HANDLE 0xF1BDD0 // NOPs #define FS_OFFSET_200_EXFAT_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_200_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00033F08, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00035084, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 3, .adrp_offset = 0x0003537C, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_200_EXFAT_H__
2,174
C++
.h
49
42.795918
78
0.736767
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,202
301.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/301.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_301_H__ #define __FS_301_H__ // Accessor vtable getters #define FS_OFFSET_301_SDMMC_ACCESSOR_GC 0x8FB68 #define FS_OFFSET_301_SDMMC_ACCESSOR_SD 0x8F908 #define FS_OFFSET_301_SDMMC_ACCESSOR_NAND 0x8F474 // Hooks #define FS_OFFSET_301_SDMMC_WRAPPER_READ 0x8A3B0 #define FS_OFFSET_301_SDMMC_WRAPPER_WRITE 0x8A470 #define FS_OFFSET_301_RTLD 0x4E8 #define FS_OFFSET_301_RTLD_DESTINATION 0x8C #define FS_OFFSET_301_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_301_LOCK_MUTEX 0x3638 #define FS_OFFSET_301_UNLOCK_MUTEX 0x36A4 #define FS_OFFSET_301_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_301_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x8A32C // Misc Data #define FS_OFFSET_301_SD_MUTEX 0xE69268 #define FS_OFFSET_301_NAND_MUTEX 0xE646F0 #define FS_OFFSET_301_ACTIVE_PARTITION 0xE64730 #define FS_OFFSET_301_SDMMC_DAS_HANDLE 0xE635A0 // NOPs #define FS_OFFSET_301_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_301_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00039260, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0003A4EC, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 3, .adrp_offset = 0x0003A7E4, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_301_H__
2,048
C++
.h
49
40.22449
78
0.730653
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,203
1100_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1100_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1100_EXFAT_H__ #define __FS_1100_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_1100_EXFAT_SDMMC_ACCESSOR_GC 0x156D90 #define FS_OFFSET_1100_EXFAT_SDMMC_ACCESSOR_SD 0x154F40 #define FS_OFFSET_1100_EXFAT_SDMMC_ACCESSOR_NAND 0x1500F0 // Hooks #define FS_OFFSET_1100_EXFAT_SDMMC_WRAPPER_READ 0x14B990 #define FS_OFFSET_1100_EXFAT_SDMMC_WRAPPER_WRITE 0x14BA70 #define FS_OFFSET_1100_EXFAT_RTLD 0x688 #define FS_OFFSET_1100_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1100_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x14AC40 // Misc funcs #define FS_OFFSET_1100_EXFAT_LOCK_MUTEX 0x28FF0 #define FS_OFFSET_1100_EXFAT_UNLOCK_MUTEX 0x29040 #define FS_OFFSET_1100_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x14B840 #define FS_OFFSET_1100_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x14B8F0 // Misc Data #define FS_OFFSET_1100_EXFAT_SD_MUTEX 0xE403E8 #define FS_OFFSET_1100_EXFAT_NAND_MUTEX 0xE3B338 #define FS_OFFSET_1100_EXFAT_ACTIVE_PARTITION 0xE3B378 #define FS_OFFSET_1100_EXFAT_SDMMC_DAS_HANDLE 0xE23D40 // NOPs #define FS_OFFSET_1100_EXFAT_SD_DAS_INIT 0x273B4 // Nintendo Paths #define FS_OFFSET_1100_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006D944, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007A3C0, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00080708, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00092198, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1100_EXFAT_H__
2,323
C++
.h
50
44.88
78
0.737633
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,204
1000_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1000_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1000_EXFAT_H__ #define __FS_1000_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_1000_EXFAT_SDMMC_ACCESSOR_GC 0x14DC90 #define FS_OFFSET_1000_EXFAT_SDMMC_ACCESSOR_SD 0x14BDA0 #define FS_OFFSET_1000_EXFAT_SDMMC_ACCESSOR_NAND 0x146C20 // Hooks #define FS_OFFSET_1000_EXFAT_SDMMC_WRAPPER_READ 0x142380 #define FS_OFFSET_1000_EXFAT_SDMMC_WRAPPER_WRITE 0x142460 #define FS_OFFSET_1000_EXFAT_RTLD 0x634 #define FS_OFFSET_1000_EXFAT_RTLD_DESTINATION 0x9C #define FS_OFFSET_1000_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1415A0 // Misc funcs #define FS_OFFSET_1000_EXFAT_LOCK_MUTEX 0x28910 #define FS_OFFSET_1000_EXFAT_UNLOCK_MUTEX 0x28960 #define FS_OFFSET_1000_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_1000_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1422E0 // Misc Data #define FS_OFFSET_1000_EXFAT_SD_MUTEX 0xE353E8 #define FS_OFFSET_1000_EXFAT_NAND_MUTEX 0xE30DA0 #define FS_OFFSET_1000_EXFAT_ACTIVE_PARTITION 0xE30DE0 #define FS_OFFSET_1000_EXFAT_SDMMC_DAS_HANDLE 0xE18B90 // NOPs #define FS_OFFSET_1000_EXFAT_SD_DAS_INIT 0x151CEC // Nintendo Paths #define FS_OFFSET_1000_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006BBA4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00078520, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007ED0C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0009115C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1000_EXFAT_H__
2,292
C++
.h
50
44.26
78
0.738916
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,205
300_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/300_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_300_EXFAT_H__ #define __FS_300_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_300_EXFAT_SDMMC_ACCESSOR_GC 0x8FAAC #define FS_OFFSET_300_EXFAT_SDMMC_ACCESSOR_SD 0x8F84C #define FS_OFFSET_300_EXFAT_SDMMC_ACCESSOR_NAND 0x8F3B8 // Hooks #define FS_OFFSET_300_EXFAT_SDMMC_WRAPPER_READ 0x8A2F4 #define FS_OFFSET_300_EXFAT_SDMMC_WRAPPER_WRITE 0x8A3B4 #define FS_OFFSET_300_EXFAT_RTLD 0x4E8 #define FS_OFFSET_300_EXFAT_RTLD_DESTINATION 0x8C #define FS_OFFSET_300_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_300_EXFAT_LOCK_MUTEX 0x35CC #define FS_OFFSET_300_EXFAT_UNLOCK_MUTEX 0x3638 #define FS_OFFSET_300_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_300_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x8A270 // Misc Data #define FS_OFFSET_300_EXFAT_SD_MUTEX 0xF4C268 #define FS_OFFSET_300_EXFAT_NAND_MUTEX 0xF476F0 #define FS_OFFSET_300_EXFAT_ACTIVE_PARTITION 0xF47730 #define FS_OFFSET_300_EXFAT_SDMMC_DAS_HANDLE 0xF465A0 // NOPs #define FS_OFFSET_300_EXFAT_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_300_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x000391F4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0003A480, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 3, .adrp_offset = 0x0003A778, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_300_EXFAT_H__
2,174
C++
.h
49
42.795918
78
0.736767
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,206
500.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/500.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_500_H__ #define __FS_500_H__ // Accessor vtable getters #define FS_OFFSET_500_SDMMC_ACCESSOR_GC 0xCF250 #define FS_OFFSET_500_SDMMC_ACCESSOR_SD 0xCEFD0 #define FS_OFFSET_500_SDMMC_ACCESSOR_NAND 0xCE990 // Hooks #define FS_OFFSET_500_SDMMC_WRAPPER_READ 0xC9420 #define FS_OFFSET_500_SDMMC_WRAPPER_WRITE 0xC9500 #define FS_OFFSET_500_RTLD 0x584 #define FS_OFFSET_500_RTLD_DESTINATION 0x94 #define FS_OFFSET_500_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_500_LOCK_MUTEX 0x4080 #define FS_OFFSET_500_UNLOCK_MUTEX 0x40D0 #define FS_OFFSET_500_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_500_SDMMC_WRAPPER_CONTROLLER_CLOSE 0xC9380 // Misc Data #define FS_OFFSET_500_SD_MUTEX 0xEC3268 #define FS_OFFSET_500_NAND_MUTEX 0xEBDE58 #define FS_OFFSET_500_ACTIVE_PARTITION 0xEBDE98 #define FS_OFFSET_500_SDMMC_DAS_HANDLE 0xEBCE30 // NOPs #define FS_OFFSET_500_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_500_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00028980, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0002ACE4, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0002B220, .add_rel_offset = 4}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_500_H__
2,033
C++
.h
49
39.673469
76
0.722532
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,207
400_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/400_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_400_EXFAT_H__ #define __FS_400_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_400_EXFAT_SDMMC_ACCESSOR_GC 0xA3374 #define FS_OFFSET_400_EXFAT_SDMMC_ACCESSOR_SD 0xA3114 #define FS_OFFSET_400_EXFAT_SDMMC_ACCESSOR_NAND 0xA2C80 // Hooks #define FS_OFFSET_400_EXFAT_SDMMC_WRAPPER_READ 0x9DBCC #define FS_OFFSET_400_EXFAT_SDMMC_WRAPPER_WRITE 0x9DC8C #define FS_OFFSET_400_EXFAT_RTLD 0x4DC #define FS_OFFSET_400_EXFAT_RTLD_DESTINATION 0x98 #define FS_OFFSET_400_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_400_EXFAT_LOCK_MUTEX 0x39A0 #define FS_OFFSET_400_EXFAT_UNLOCK_MUTEX 0x3A0C #define FS_OFFSET_400_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_400_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x9DB48 // Misc Data #define FS_OFFSET_400_EXFAT_SD_MUTEX 0xF63268 #define FS_OFFSET_400_EXFAT_NAND_MUTEX 0xF5EC60 #define FS_OFFSET_400_EXFAT_ACTIVE_PARTITION 0xF5ECA0 #define FS_OFFSET_400_EXFAT_SDMMC_DAS_HANDLE 0xF5DBF0 // NOPs #define FS_OFFSET_400_EXFAT_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_400_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0002023C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00021BE8, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 3, .adrp_offset = 0x00021EC4, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_400_EXFAT_H__
2,174
C++
.h
49
42.795918
78
0.736767
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,208
1000.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1000.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1000_H__ #define __FS_1000_H__ // Accessor vtable getters #define FS_OFFSET_1000_SDMMC_ACCESSOR_GC 0x14DC90 #define FS_OFFSET_1000_SDMMC_ACCESSOR_SD 0x14BDA0 #define FS_OFFSET_1000_SDMMC_ACCESSOR_NAND 0x146C20 // Hooks #define FS_OFFSET_1000_SDMMC_WRAPPER_READ 0x142380 #define FS_OFFSET_1000_SDMMC_WRAPPER_WRITE 0x142460 #define FS_OFFSET_1000_RTLD 0x634 #define FS_OFFSET_1000_RTLD_DESTINATION 0x9C #define FS_OFFSET_1000_CLKRST_SET_MIN_V_CLK_RATE 0x1415A0 // Misc funcs #define FS_OFFSET_1000_LOCK_MUTEX 0x28910 #define FS_OFFSET_1000_UNLOCK_MUTEX 0x28960 #define FS_OFFSET_1000_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_1000_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1422E0 // Misc Data #define FS_OFFSET_1000_SD_MUTEX 0xE273E8 #define FS_OFFSET_1000_NAND_MUTEX 0xE22DA0 #define FS_OFFSET_1000_ACTIVE_PARTITION 0xE22DE0 #define FS_OFFSET_1000_SDMMC_DAS_HANDLE 0xE0AB90 // NOPs #define FS_OFFSET_1000_SD_DAS_INIT 0x151CEC // Nintendo Paths #define FS_OFFSET_1000_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006BBA4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00078520, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007ED0C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0009115C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1000_H__
2,166
C++
.h
50
41.74
78
0.73327
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,209
810.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/810.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_810_H__ #define __FS_810_H__ // Accessor vtable getters #define FS_OFFSET_810_SDMMC_ACCESSOR_GC 0x15EA20 #define FS_OFFSET_810_SDMMC_ACCESSOR_SD 0x15E790 #define FS_OFFSET_810_SDMMC_ACCESSOR_NAND 0x15AC80 // Hooks #define FS_OFFSET_810_SDMMC_WRAPPER_READ 0x152A80 #define FS_OFFSET_810_SDMMC_WRAPPER_WRITE 0x152B60 #define FS_OFFSET_810_RTLD 0x5B4 #define FS_OFFSET_810_RTLD_DESTINATION 0x9C #define FS_OFFSET_810_CLKRST_SET_MIN_V_CLK_RATE 0x16F370 // Misc funcs #define FS_OFFSET_810_LOCK_MUTEX 0x14B6D0 #define FS_OFFSET_810_UNLOCK_MUTEX 0x14B720 #define FS_OFFSET_810_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_810_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1529E0 // Misc Data #define FS_OFFSET_810_SD_MUTEX 0xF1A3E8 #define FS_OFFSET_810_NAND_MUTEX 0xF15BE8 #define FS_OFFSET_810_ACTIVE_PARTITION 0xF15C28 #define FS_OFFSET_810_SDMMC_DAS_HANDLE 0xE167C0 // NOPs #define FS_OFFSET_810_SD_DAS_INIT 0x87D58 // Nintendo Paths #define FS_OFFSET_810_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0007F5F0, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x00081084, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x00081278, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x00081654, .add_rel_offset = 4}, \ {.opcode_reg = 4, .adrp_offset = 0x00081818, .add_rel_offset = 4}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0} \ } #endif // __FS_810_H__
2,197
C++
.h
51
41.137255
76
0.716893
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,210
301_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/301_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_301_EXFAT_H__ #define __FS_301_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_301_EXFAT_SDMMC_ACCESSOR_GC 0x8FB68 #define FS_OFFSET_301_EXFAT_SDMMC_ACCESSOR_SD 0x8F908 #define FS_OFFSET_301_EXFAT_SDMMC_ACCESSOR_NAND 0x8F474 // Hooks #define FS_OFFSET_301_EXFAT_SDMMC_WRAPPER_READ 0x8A3B0 #define FS_OFFSET_301_EXFAT_SDMMC_WRAPPER_WRITE 0x8A470 #define FS_OFFSET_301_EXFAT_RTLD 0x4E8 #define FS_OFFSET_301_EXFAT_RTLD_DESTINATION 0x8C #define FS_OFFSET_301_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_301_EXFAT_LOCK_MUTEX 0x3638 #define FS_OFFSET_301_EXFAT_UNLOCK_MUTEX 0x36A4 #define FS_OFFSET_301_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_301_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x8A32C // Misc Data #define FS_OFFSET_301_EXFAT_SD_MUTEX 0xF4C268 #define FS_OFFSET_301_EXFAT_NAND_MUTEX 0xF476F0 #define FS_OFFSET_301_EXFAT_ACTIVE_PARTITION 0xF47730 #define FS_OFFSET_301_EXFAT_SDMMC_DAS_HANDLE 0xF465A0 // NOPs #define FS_OFFSET_301_EXFAT_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_301_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00039260, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0003A4EC, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 3, .adrp_offset = 0x0003A7E4, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_301_EXFAT_H__
2,174
C++
.h
49
42.795918
78
0.736767
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,211
1300.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1300.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1300_H__ #define __FS_1300_H__ // Accessor vtable getters #define FS_OFFSET_1300_SDMMC_ACCESSOR_GC 0x158C80 #define FS_OFFSET_1300_SDMMC_ACCESSOR_SD 0x15AA90 #define FS_OFFSET_1300_SDMMC_ACCESSOR_NAND 0x1591B0 // Hooks #define FS_OFFSET_1300_SDMMC_WRAPPER_READ 0x154620 #define FS_OFFSET_1300_SDMMC_WRAPPER_WRITE 0x1546E0 #define FS_OFFSET_1300_RTLD 0x688 #define FS_OFFSET_1300_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1300_CLKRST_SET_MIN_V_CLK_RATE 0x153820 // Misc funcs #define FS_OFFSET_1300_LOCK_MUTEX 0x29690 #define FS_OFFSET_1300_UNLOCK_MUTEX 0x296E0 #define FS_OFFSET_1300_SDMMC_WRAPPER_CONTROLLER_OPEN 0x154500 #define FS_OFFSET_1300_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x154590 // Misc Data #define FS_OFFSET_1300_SD_MUTEX 0xE133E8 #define FS_OFFSET_1300_NAND_MUTEX 0xE0E768 #define FS_OFFSET_1300_ACTIVE_PARTITION 0xE0E7A8 #define FS_OFFSET_1300_SDMMC_DAS_HANDLE 0xDF6E18 // NOPs #define FS_OFFSET_1300_SD_DAS_INIT 0x27744 // Nintendo Paths #define FS_OFFSET_1300_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006EBE0, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007BEEC, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00082294, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0009422C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1300_H__
2,197
C++
.h
50
42.36
78
0.731993
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,212
910_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/910_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_910_EXFAT_H__ #define __FS_910_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_910_EXFAT_SDMMC_ACCESSOR_GC 0x143100 #define FS_OFFSET_910_EXFAT_SDMMC_ACCESSOR_SD 0x141210 #define FS_OFFSET_910_EXFAT_SDMMC_ACCESSOR_NAND 0x13C090 // Hooks #define FS_OFFSET_910_EXFAT_SDMMC_WRAPPER_READ 0x1377F0 #define FS_OFFSET_910_EXFAT_SDMMC_WRAPPER_WRITE 0x1378D0 #define FS_OFFSET_910_EXFAT_RTLD 0x454 #define FS_OFFSET_910_EXFAT_RTLD_DESTINATION 0x9C #define FS_OFFSET_910_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x136A10 // Misc funcs #define FS_OFFSET_910_EXFAT_LOCK_MUTEX 0x25280 #define FS_OFFSET_910_EXFAT_UNLOCK_MUTEX 0x252D0 #define FS_OFFSET_910_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_910_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x137750 // Misc Data #define FS_OFFSET_910_EXFAT_SD_MUTEX 0xE2B3E8 #define FS_OFFSET_910_EXFAT_NAND_MUTEX 0xE26258 #define FS_OFFSET_910_EXFAT_ACTIVE_PARTITION 0xE26298 #define FS_OFFSET_910_EXFAT_SDMMC_DAS_HANDLE 0xE0CFA0 // NOPs #define FS_OFFSET_910_EXFAT_SD_DAS_INIT 0x1472CC // Nintendo Paths #define FS_OFFSET_910_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00068A70, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00070A50, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00081CC4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00081F04, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0008212C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_910_EXFAT_H__
2,350
C++
.h
51
44.490196
78
0.734061
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,213
1900_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1900_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1900_EXFAT_H__ #define __FS_1900_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_1900_EXFAT_SDMMC_ACCESSOR_GC 0x1A1430 #define FS_OFFSET_1900_EXFAT_SDMMC_ACCESSOR_SD 0x1A37B0 #define FS_OFFSET_1900_EXFAT_SDMMC_ACCESSOR_NAND 0x1A1BE0 // Hooks #define FS_OFFSET_1900_EXFAT_SDMMC_WRAPPER_READ 0x19D2A0 #define FS_OFFSET_1900_EXFAT_SDMMC_WRAPPER_WRITE 0x19D300 #define FS_OFFSET_1900_EXFAT_RTLD 0x275F0 #define FS_OFFSET_1900_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x50))) #define FS_OFFSET_1900_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1BF0B0 // Misc funcs #define FS_OFFSET_1900_EXFAT_LOCK_MUTEX 0x196450 #define FS_OFFSET_1900_EXFAT_UNLOCK_MUTEX 0x1964A0 #define FS_OFFSET_1900_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x19D260 #define FS_OFFSET_1900_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x19D280 // Misc Data #define FS_OFFSET_1900_EXFAT_SD_MUTEX 0xFF4408 #define FS_OFFSET_1900_EXFAT_NAND_MUTEX 0xFEFB60 #define FS_OFFSET_1900_EXFAT_ACTIVE_PARTITION 0xFEFBA0 #define FS_OFFSET_1900_EXFAT_SDMMC_DAS_HANDLE 0xFCF908 // NOPs #define FS_OFFSET_1900_EXFAT_SD_DAS_INIT 0x260C4 // Nintendo Paths #define FS_OFFSET_1900_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00067FC8, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00075D6C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0007D1E8, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00092818, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1900_EXFAT_H__
2,327
C++
.h
50
44.96
78
0.738095
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,214
700.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/700.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_700_H__ #define __FS_700_H__ // Accessor vtable getters #define FS_OFFSET_700_SDMMC_ACCESSOR_GC 0x15BD90 #define FS_OFFSET_700_SDMMC_ACCESSOR_SD 0x15BB00 #define FS_OFFSET_700_SDMMC_ACCESSOR_NAND 0x157FF0 // Hooks #define FS_OFFSET_700_SDMMC_WRAPPER_READ 0x14FDF0 #define FS_OFFSET_700_SDMMC_WRAPPER_WRITE 0x14FED0 #define FS_OFFSET_700_RTLD 0x5B4 #define FS_OFFSET_700_RTLD_DESTINATION 0x9C #define FS_OFFSET_700_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_700_LOCK_MUTEX 0x148A90 #define FS_OFFSET_700_UNLOCK_MUTEX 0x148AE0 #define FS_OFFSET_700_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_700_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x14FD50 // Misc Data #define FS_OFFSET_700_SD_MUTEX 0xF123E8 #define FS_OFFSET_700_NAND_MUTEX 0xF0DBE8 #define FS_OFFSET_700_ACTIVE_PARTITION 0xF0DC28 #define FS_OFFSET_700_SDMMC_DAS_HANDLE 0xE0E7A0 // NOPs #define FS_OFFSET_700_SD_DAS_INIT 0x85FE8 // Nintendo Paths #define FS_OFFSET_700_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0007DA90, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0007F344, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0007F538, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0007F914, .add_rel_offset = 4}, \ {.opcode_reg = 4, .adrp_offset = 0x0007FAD8, .add_rel_offset = 4}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_700_H__
2,193
C++
.h
51
41.058824
76
0.715893
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,215
510.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/510.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_510_H__ #define __FS_510_H__ // Accessor vtable getters #define FS_OFFSET_510_SDMMC_ACCESSOR_GC 0xCF620 #define FS_OFFSET_510_SDMMC_ACCESSOR_SD 0xCF3A0 #define FS_OFFSET_510_SDMMC_ACCESSOR_NAND 0xCED60 // Hooks #define FS_OFFSET_510_SDMMC_WRAPPER_READ 0xC97F0 #define FS_OFFSET_510_SDMMC_WRAPPER_WRITE 0xC98D0 #define FS_OFFSET_510_RTLD 0x584 #define FS_OFFSET_510_RTLD_DESTINATION 0x94 #define FS_OFFSET_510_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_510_LOCK_MUTEX 0x4080 #define FS_OFFSET_510_UNLOCK_MUTEX 0x40D0 #define FS_OFFSET_510_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_510_SDMMC_WRAPPER_CONTROLLER_CLOSE 0xC9750 // Misc Data #define FS_OFFSET_510_SD_MUTEX 0xEC4268 #define FS_OFFSET_510_NAND_MUTEX 0xEBEE58 #define FS_OFFSET_510_ACTIVE_PARTITION 0xEBEE98 #define FS_OFFSET_510_SDMMC_DAS_HANDLE 0xEBDE30 // NOPs #define FS_OFFSET_510_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_510_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x000289B0, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0002AD14, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0002B250, .add_rel_offset = 4}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_510_H__
2,033
C++
.h
49
39.673469
76
0.722532
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,216
510_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/510_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_510_EXFAT_H__ #define __FS_510_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_510_EXFAT_SDMMC_ACCESSOR_GC 0xCF620 #define FS_OFFSET_510_EXFAT_SDMMC_ACCESSOR_SD 0xCF3A0 #define FS_OFFSET_510_EXFAT_SDMMC_ACCESSOR_NAND 0xCED60 // Hooks #define FS_OFFSET_510_EXFAT_SDMMC_WRAPPER_READ 0xC97F0 #define FS_OFFSET_510_EXFAT_SDMMC_WRAPPER_WRITE 0xC98D0 #define FS_OFFSET_510_EXFAT_RTLD 0x584 #define FS_OFFSET_510_EXFAT_RTLD_DESTINATION 0x94 #define FS_OFFSET_510_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_510_EXFAT_LOCK_MUTEX 0x4080 #define FS_OFFSET_510_EXFAT_UNLOCK_MUTEX 0x40D0 #define FS_OFFSET_510_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_510_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0xC9750 // Misc Data #define FS_OFFSET_510_EXFAT_SD_MUTEX 0xFA9268 #define FS_OFFSET_510_EXFAT_NAND_MUTEX 0xFA3E58 #define FS_OFFSET_510_EXFAT_ACTIVE_PARTITION 0xFA3E98 #define FS_OFFSET_510_EXFAT_SDMMC_DAS_HANDLE 0xFA2E30 // NOPs #define FS_OFFSET_510_EXFAT_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_510_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x000289B0, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0002AD14, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0002B250, .add_rel_offset = 4}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_510_EXFAT_H__
2,159
C++
.h
49
42.244898
76
0.729177
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,217
810_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/810_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_810_EXFAT_H__ #define __FS_810_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_810_EXFAT_SDMMC_ACCESSOR_GC 0x169FD0 #define FS_OFFSET_810_EXFAT_SDMMC_ACCESSOR_SD 0x169D40 #define FS_OFFSET_810_EXFAT_SDMMC_ACCESSOR_NAND 0x166230 // Hooks #define FS_OFFSET_810_EXFAT_SDMMC_WRAPPER_READ 0x15E030 #define FS_OFFSET_810_EXFAT_SDMMC_WRAPPER_WRITE 0x15E110 #define FS_OFFSET_810_EXFAT_RTLD 0x5B4 #define FS_OFFSET_810_EXFAT_RTLD_DESTINATION 0x9C #define FS_OFFSET_810_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x17A920 // Misc funcs #define FS_OFFSET_810_EXFAT_LOCK_MUTEX 0x156C80 #define FS_OFFSET_810_EXFAT_UNLOCK_MUTEX 0x156CD0 #define FS_OFFSET_810_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_810_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x15DF90 // Misc Data #define FS_OFFSET_810_EXFAT_SD_MUTEX 0xFFE3E8 #define FS_OFFSET_810_EXFAT_NAND_MUTEX 0xFF9BE8 #define FS_OFFSET_810_EXFAT_ACTIVE_PARTITION 0xFF9C28 #define FS_OFFSET_810_EXFAT_SDMMC_DAS_HANDLE 0xEFAA20 // NOPs #define FS_OFFSET_810_EXFAT_SD_DAS_INIT 0x93308 // Nintendo Paths #define FS_OFFSET_810_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0008ABA0, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0008C634, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0008C828, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x0008CC04, .add_rel_offset = 4}, \ {.opcode_reg = 4, .adrp_offset = 0x0008CDC8, .add_rel_offset = 4}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0} \ } #endif // __FS_810_EXFAT_H__
2,323
C++
.h
51
43.607843
76
0.723376
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,218
410_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/410_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_410_EXFAT_H__ #define __FS_410_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_410_EXFAT_SDMMC_ACCESSOR_GC 0xA33D8 #define FS_OFFSET_410_EXFAT_SDMMC_ACCESSOR_SD 0xA3178 #define FS_OFFSET_410_EXFAT_SDMMC_ACCESSOR_NAND 0xA2CE4 // Hooks #define FS_OFFSET_410_EXFAT_SDMMC_WRAPPER_READ 0x9DC30 #define FS_OFFSET_410_EXFAT_SDMMC_WRAPPER_WRITE 0x9DCF0 #define FS_OFFSET_410_EXFAT_RTLD 0x4DC #define FS_OFFSET_410_EXFAT_RTLD_DESTINATION 0x98 #define FS_OFFSET_410_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_410_EXFAT_LOCK_MUTEX 0x39A0 #define FS_OFFSET_410_EXFAT_UNLOCK_MUTEX 0x3A0C #define FS_OFFSET_410_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_410_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x9DBAC // Misc Data #define FS_OFFSET_410_EXFAT_SD_MUTEX 0xF63268 #define FS_OFFSET_410_EXFAT_NAND_MUTEX 0xF5EC60 #define FS_OFFSET_410_EXFAT_ACTIVE_PARTITION 0xF5ECA0 #define FS_OFFSET_410_EXFAT_SDMMC_DAS_HANDLE 0xF5DBF0 // NOPs #define FS_OFFSET_410_EXFAT_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_410_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0002023C, .add_rel_offset = 4}, \ {.opcode_reg = 3, .adrp_offset = 0x00021BE8, .add_rel_offset = 12}, \ {.opcode_reg = 3, .adrp_offset = 0x00021EC4, .add_rel_offset = 12}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_410_EXFAT_H__
2,161
C++
.h
49
42.285714
76
0.729434
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,219
410.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/410.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_410_H__ #define __FS_410_H__ // Accessor vtable getters #define FS_OFFSET_410_SDMMC_ACCESSOR_GC 0xA33D8 #define FS_OFFSET_410_SDMMC_ACCESSOR_SD 0xA3178 #define FS_OFFSET_410_SDMMC_ACCESSOR_NAND 0xA2CE4 // Hooks #define FS_OFFSET_410_SDMMC_WRAPPER_READ 0x9DC30 #define FS_OFFSET_410_SDMMC_WRAPPER_WRITE 0x9DCF0 #define FS_OFFSET_410_RTLD 0x4DC #define FS_OFFSET_410_RTLD_DESTINATION 0x98 #define FS_OFFSET_410_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_410_LOCK_MUTEX 0x39A0 #define FS_OFFSET_410_UNLOCK_MUTEX 0x3A0C #define FS_OFFSET_410_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_410_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x9DBAC // Misc Data #define FS_OFFSET_410_SD_MUTEX 0xE80268 #define FS_OFFSET_410_NAND_MUTEX 0xE7BC60 #define FS_OFFSET_410_ACTIVE_PARTITION 0xE7BCA0 #define FS_OFFSET_410_SDMMC_DAS_HANDLE 0xE7ABF0 // NOPs #define FS_OFFSET_410_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_410_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0002023C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00021BE8, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 3, .adrp_offset = 0x00021EC4, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_410_H__
2,048
C++
.h
49
40.22449
78
0.730653
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,220
1300_exfat.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1300_exfat.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1300_EXFAT_H__ #define __FS_1300_EXFAT_H__ // Accessor vtable getters #define FS_OFFSET_1300_EXFAT_SDMMC_ACCESSOR_GC 0x158C80 #define FS_OFFSET_1300_EXFAT_SDMMC_ACCESSOR_SD 0x15AA90 #define FS_OFFSET_1300_EXFAT_SDMMC_ACCESSOR_NAND 0x1591B0 // Hooks #define FS_OFFSET_1300_EXFAT_SDMMC_WRAPPER_READ 0x154620 #define FS_OFFSET_1300_EXFAT_SDMMC_WRAPPER_WRITE 0x1546E0 #define FS_OFFSET_1300_EXFAT_RTLD 0x688 #define FS_OFFSET_1300_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1300_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x153820 // Misc funcs #define FS_OFFSET_1300_EXFAT_LOCK_MUTEX 0x29690 #define FS_OFFSET_1300_EXFAT_UNLOCK_MUTEX 0x296E0 #define FS_OFFSET_1300_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x154500 #define FS_OFFSET_1300_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x154590 // Misc Data #define FS_OFFSET_1300_EXFAT_SD_MUTEX 0xE203E8 #define FS_OFFSET_1300_EXFAT_NAND_MUTEX 0xE1B768 #define FS_OFFSET_1300_EXFAT_ACTIVE_PARTITION 0xE1B7A8 #define FS_OFFSET_1300_EXFAT_SDMMC_DAS_HANDLE 0xE03E18 // NOPs #define FS_OFFSET_1300_EXFAT_SD_DAS_INIT 0x27744 // Nintendo Paths #define FS_OFFSET_1300_EXFAT_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006EBE0, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007BEEC, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00082294, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0009422C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1300_EXFAT_H__
2,323
C++
.h
50
44.88
78
0.737633
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,221
1500.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1500.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1500_H__ #define __FS_1500_H__ // Accessor vtable getters #define FS_OFFSET_1500_SDMMC_ACCESSOR_GC 0x183E20 #define FS_OFFSET_1500_SDMMC_ACCESSOR_SD 0x185AA0 #define FS_OFFSET_1500_SDMMC_ACCESSOR_NAND 0x1842E0 // Hooks #define FS_OFFSET_1500_SDMMC_WRAPPER_READ 0x17FCF0 #define FS_OFFSET_1500_SDMMC_WRAPPER_WRITE 0x17FD50 #define FS_OFFSET_1500_RTLD 0x26518 #define FS_OFFSET_1500_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1500_CLKRST_SET_MIN_V_CLK_RATE 0x1A0870 // Misc funcs #define FS_OFFSET_1500_LOCK_MUTEX 0x1791A0 #define FS_OFFSET_1500_UNLOCK_MUTEX 0x1791F0 #define FS_OFFSET_1500_SDMMC_WRAPPER_CONTROLLER_OPEN 0x17FCB0 #define FS_OFFSET_1500_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x17FCD0 // Misc Data #define FS_OFFSET_1500_SD_MUTEX 0xFF33F0 #define FS_OFFSET_1500_NAND_MUTEX 0xFEE2E8 #define FS_OFFSET_1500_ACTIVE_PARTITION 0xFEE328 #define FS_OFFSET_1500_SDMMC_DAS_HANDLE 0xFD38D8 // NOPs #define FS_OFFSET_1500_SD_DAS_INIT 0x25454 // Nintendo Paths #define FS_OFFSET_1500_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00063050, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0006FDE8, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x000768D4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00089364, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1500_H__
2,201
C++
.h
50
42.44
78
0.732493
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,222
910.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/910.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_910_H__ #define __FS_910_H__ // Accessor vtable getters #define FS_OFFSET_910_SDMMC_ACCESSOR_GC 0x143100 #define FS_OFFSET_910_SDMMC_ACCESSOR_SD 0x141210 #define FS_OFFSET_910_SDMMC_ACCESSOR_NAND 0x13C090 // Hooks #define FS_OFFSET_910_SDMMC_WRAPPER_READ 0x1377F0 #define FS_OFFSET_910_SDMMC_WRAPPER_WRITE 0x1378D0 #define FS_OFFSET_910_RTLD 0x454 #define FS_OFFSET_910_RTLD_DESTINATION 0x9C #define FS_OFFSET_910_CLKRST_SET_MIN_V_CLK_RATE 0x136A10 // Misc funcs #define FS_OFFSET_910_LOCK_MUTEX 0x25280 #define FS_OFFSET_910_UNLOCK_MUTEX 0x252D0 #define FS_OFFSET_910_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_910_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x137750 // Misc Data #define FS_OFFSET_910_SD_MUTEX 0xE1D3E8 #define FS_OFFSET_910_NAND_MUTEX 0xE18258 #define FS_OFFSET_910_ACTIVE_PARTITION 0xE18298 #define FS_OFFSET_910_SDMMC_DAS_HANDLE 0xDFEFA0 // NOPs #define FS_OFFSET_910_SD_DAS_INIT 0x1472CC // Nintendo Paths #define FS_OFFSET_910_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00068A70, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00070A50, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00081CC4, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00081F04, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x0008212C, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_910_H__
2,224
C++
.h
51
42.019608
78
0.728281
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,223
200.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/200.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_200_H__ #define __FS_200_H__ // Accessor vtable getters #define FS_OFFSET_200_SDMMC_ACCESSOR_GC 0x78BAC #define FS_OFFSET_200_SDMMC_ACCESSOR_SD 0x7894C #define FS_OFFSET_200_SDMMC_ACCESSOR_NAND 0x784BC // Hooks #define FS_OFFSET_200_SDMMC_WRAPPER_READ 0x73478 #define FS_OFFSET_200_SDMMC_WRAPPER_WRITE 0x73538 #define FS_OFFSET_200_RTLD 0x500 #define FS_OFFSET_200_RTLD_DESTINATION 0x98 #define FS_OFFSET_200_CLKRST_SET_MIN_V_CLK_RATE 0x0 // Misc funcs #define FS_OFFSET_200_LOCK_MUTEX 0x3264 #define FS_OFFSET_200_UNLOCK_MUTEX 0x32D0 #define FS_OFFSET_200_SDMMC_WRAPPER_CONTROLLER_OPEN 0 #define FS_OFFSET_200_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x733F4 // Misc Data #define FS_OFFSET_200_SD_MUTEX 0xE42268 #define FS_OFFSET_200_NAND_MUTEX 0xE3CED0 #define FS_OFFSET_200_ACTIVE_PARTITION 0xE3CF10 #define FS_OFFSET_200_SDMMC_DAS_HANDLE 0xE3BDD0 // NOPs #define FS_OFFSET_200_SD_DAS_INIT 0x0 // Nintendo Paths #define FS_OFFSET_200_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x00033F08, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x00035084, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 3, .adrp_offset = 0x0003537C, .add_rel_offset = 0x0000000C}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_200_H__
2,048
C++
.h
49
40.22449
78
0.730653
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,224
1200.h
Atmosphere-NX_Atmosphere/emummc/source/FS/offsets/1200.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __FS_1200_H__ #define __FS_1200_H__ // Accessor vtable getters #define FS_OFFSET_1200_SDMMC_ACCESSOR_GC 0x154FD0 #define FS_OFFSET_1200_SDMMC_ACCESSOR_SD 0x156DE0 #define FS_OFFSET_1200_SDMMC_ACCESSOR_NAND 0x155500 // Hooks #define FS_OFFSET_1200_SDMMC_WRAPPER_READ 0x150970 #define FS_OFFSET_1200_SDMMC_WRAPPER_WRITE 0x150A30 #define FS_OFFSET_1200_RTLD 0x688 #define FS_OFFSET_1200_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x3C))) #define FS_OFFSET_1200_CLKRST_SET_MIN_V_CLK_RATE 0x14FCC0 // Misc funcs #define FS_OFFSET_1200_LOCK_MUTEX 0x29350 #define FS_OFFSET_1200_UNLOCK_MUTEX 0x293A0 #define FS_OFFSET_1200_SDMMC_WRAPPER_CONTROLLER_OPEN 0x150850 #define FS_OFFSET_1200_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x1508E0 // Misc Data #define FS_OFFSET_1200_SD_MUTEX 0xE3D3E8 #define FS_OFFSET_1200_NAND_MUTEX 0xE38768 #define FS_OFFSET_1200_ACTIVE_PARTITION 0xE387A8 #define FS_OFFSET_1200_SDMMC_DAS_HANDLE 0xE20DB0 // NOPs #define FS_OFFSET_1200_SD_DAS_INIT 0x27244 // Nintendo Paths #define FS_OFFSET_1200_NINTENDO_PATHS \ { \ {.opcode_reg = 3, .adrp_offset = 0x0006E810, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 3, .adrp_offset = 0x0007AEC0, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00081254, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 4, .adrp_offset = 0x00092850, .add_rel_offset = 0x00000004}, \ {.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \ } #endif // __FS_1200_H__
2,197
C++
.h
50
42.36
78
0.731993
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,225
sdmmc.h
Atmosphere-NX_Atmosphere/emummc/source/emmc/sdmmc.h
/* * Copyright (c) 2018 naehrwert * Copyright (c) 2018-2020 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _SDMMC_H_ #define _SDMMC_H_ #include "../utils/types.h" #include "../FS/FS.h" #include "sdmmc_driver.h" typedef struct _mmc_cid { u32 manfid; u8 prod_name[8]; u8 card_bga; u8 prv; u32 serial; u16 oemid; u16 year; u8 hwrev; u8 fwrev; u8 month; } mmc_cid_t; typedef struct _mmc_csd { u8 structure; u8 mmca_vsn; u16 cmdclass; u32 c_size; u32 r2w_factor; u32 max_dtr; u32 erase_size; /* In sectors */ u32 read_blkbits; u32 write_blkbits; u32 capacity; u8 write_protect; u16 busspeed; } mmc_csd_t; typedef struct _mmc_ext_csd { u32 sectors; int bkops; /* background support bit */ int bkops_en; /* manual bkops enable bit */ u8 rev; u8 ext_struct; /* 194 */ u8 card_type; /* 196 */ u8 bkops_status; /* 246 */ u8 pre_eol_info; u8 dev_life_est_a; u8 dev_life_est_b; u8 boot_mult; u8 rpmb_mult; u16 dev_version; } mmc_ext_csd_t; typedef struct _sd_scr { u8 sda_vsn; u8 sda_spec3; u8 bus_widths; u8 cmds; } sd_scr_t; typedef struct _sd_ssr { u8 bus_width; u8 speed_class; u8 uhs_grade; u8 video_class; u8 app_class; u32 protected_size; } sd_ssr_t; /*! SDMMC storage context. */ typedef struct _sdmmc_storage_t { sdmmc_t *sdmmc; u32 rca; int has_sector_access; u32 sec_cnt; int is_low_voltage; u32 partition; u8 raw_cid[0x10]; u8 raw_csd[0x10]; u8 raw_scr[8]; mmc_cid_t cid; mmc_csd_t csd; mmc_ext_csd_t ext_csd; sd_scr_t scr; int initialized; } sdmmc_storage_t; extern sdmmc_accessor_t *_current_accessor; extern bool sdmmc_memcpy_buf; int sdmmc_storage_end(sdmmc_storage_t *storage); int sdmmc_storage_read(sdmmc_storage_t *storage, u32 sector, u32 num_sectors, void *buf); int sdmmc_storage_write(sdmmc_storage_t *storage, u32 sector, u32 num_sectors, void *buf); int sdmmc_storage_init_mmc(sdmmc_storage_t *storage, sdmmc_t *sdmmc, u32 bus_width, u32 type); int sdmmc_storage_set_mmc_partition(sdmmc_storage_t *storage, u32 partition); int sdmmc_storage_init_sd(sdmmc_storage_t *storage, sdmmc_t *sdmmc, u32 bus_width, u32 type); int sdmmc_storage_init_gc(sdmmc_storage_t *storage, sdmmc_t *sdmmc); intptr_t sdmmc_calculate_dma_addr(sdmmc_accessor_t *_this, void *buf, unsigned int num_sectors); int sdmmc_calculate_dma_index(sdmmc_accessor_t *_this, void *buf, unsigned int num_sectors); int sdmmc_calculate_fitting_dma_index(sdmmc_accessor_t *_this, unsigned int num_sectors); #endif
3,078
C++
.h
112
25.723214
96
0.726904
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,226
sdmmc_driver.h
Atmosphere-NX_Atmosphere/emummc/source/emmc/sdmmc_driver.h
/* * Copyright (c) 2018 naehrwert * Copyright (c) 2018-2020 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _SDMMC_DRIVER_H_ #define _SDMMC_DRIVER_H_ #include "../utils/types.h" #include "sdmmc_t210.h" /*! SDMMC controller IDs. */ #define SDMMC_1 0 #define SDMMC_2 1 #define SDMMC_3 2 #define SDMMC_4 3 /*! SDMMC power types. */ #define SDMMC_POWER_OFF 0 #define SDMMC_POWER_1_8 1 #define SDMMC_POWER_3_3 2 /*! SDMMC bus widths. */ #define SDMMC_BUS_WIDTH_1 0 #define SDMMC_BUS_WIDTH_4 1 #define SDMMC_BUS_WIDTH_8 2 /*! SDMMC response types. */ #define SDMMC_RSP_TYPE_0 0 #define SDMMC_RSP_TYPE_1 1 #define SDMMC_RSP_TYPE_2 2 #define SDMMC_RSP_TYPE_3 3 #define SDMMC_RSP_TYPE_4 4 #define SDMMC_RSP_TYPE_5 5 /*! SDMMC mask interrupt status. */ #define SDMMC_MASKINT_MASKED 0 #define SDMMC_MASKINT_NOERROR -1 #define SDMMC_MASKINT_ERROR -2 /*! SDMMC present state. */ #define SDHCI_CMD_INHIBIT 0x1 #define SDHCI_DATA_INHIBIT 0x2 #define SDHCI_DOING_WRITE 0x100 #define SDHCI_DOING_READ 0x200 #define SDHCI_SPACE_AVAILABLE 0x400 #define SDHCI_DATA_AVAILABLE 0x800 #define SDHCI_CARD_PRESENT 0x10000 #define SDHCI_CD_STABLE 0x20000 #define SDHCI_CD_LVL 0x40000 #define SDHCI_WRITE_PROTECT 0x80000 #define SDHCI_DATA_LVL_MASK 0xF00000 #define SDHCI_DATA_0_LVL_MASK 0x100000 #define SDHCI_CMD_LVL 0x1000000 /*! SDMMC transfer mode. */ #define SDHCI_TRNS_DMA 0x01 #define SDHCI_TRNS_BLK_CNT_EN 0x02 #define SDHCI_TRNS_AUTO_CMD12 0x04 #define SDHCI_TRNS_AUTO_CMD23 0x08 #define SDHCI_TRNS_AUTO_SEL 0x0C #define SDHCI_TRNS_WRITE 0x00 #define SDHCI_TRNS_READ 0x10 #define SDHCI_TRNS_MULTI 0x20 /*! SDMMC command. */ #define SDHCI_CMD_RESP_MASK 0x3 #define SDHCI_CMD_RESP_NO_RESP 0x0 #define SDHCI_CMD_RESP_LEN136 0x1 #define SDHCI_CMD_RESP_LEN48 0x2 #define SDHCI_CMD_RESP_LEN48_BUSY 0x3 #define SDHCI_CMD_CRC 0x08 #define SDHCI_CMD_INDEX 0x10 #define SDHCI_CMD_DATA 0x20 #define SDHCI_CMD_ABORTCMD 0xC0 /*! SDMMC host control. */ #define SDHCI_CTRL_LED 0x01 #define SDHCI_CTRL_4BITBUS 0x02 #define SDHCI_CTRL_HISPD 0x04 #define SDHCI_CTRL_DMA_MASK 0x18 #define SDHCI_CTRL_SDMA 0x00 #define SDHCI_CTRL_ADMA1 0x08 #define SDHCI_CTRL_ADMA32 0x10 #define SDHCI_CTRL_ADMA64 0x18 #define SDHCI_CTRL_8BITBUS 0x20 #define SDHCI_CTRL_CDTEST_INS 0x40 #define SDHCI_CTRL_CDTEST_EN 0x80 /*! SDMMC host control 2. */ #define SDHCI_CTRL_UHS_MASK 0xFFF8 #define SDHCI_CTRL_VDD_180 8 #define SDHCI_CTRL_DRV_TYPE_B 0x00 #define SDHCI_CTRL_DRV_TYPE_A 0x10 #define SDHCI_CTRL_DRV_TYPE_C 0x20 #define SDHCI_CTRL_DRV_TYPE_D 0x30 #define SDHCI_CTRL_EXEC_TUNING 0x40 #define SDHCI_CTRL_TUNED_CLK 0x80 #define SDHCI_HOST_VERSION_4_EN 0x1000 #define SDHCI_ADDRESSING_64BIT_EN 0x2000 #define SDHCI_CTRL_PRESET_VAL_EN 0x8000 /*! SDMMC power control. */ #define SDHCI_POWER_ON 0x01 #define SDHCI_POWER_180 0x0A #define SDHCI_POWER_300 0x0C #define SDHCI_POWER_330 0x0E #define SDHCI_POWER_MASK 0xF1 // /*! SDMMC max current. */ // #define SDHCI_MAX_CURRENT_330_MASK 0xFF // #define SDHCI_MAX_CURRENT_180_MASK 0xFF0000 // #define SDHCI_MAX_CURRENT_MULTIPLIER 4 /*! SDMMC clock control. */ #define SDHCI_DIVIDER_SHIFT 8 #define SDHCI_DIVIDER_HI_SHIFT 6 #define SDHCI_DIV_MASK 0xFF00 #define SDHCI_DIV_HI_MASK 0xC0 #define SDHCI_PROG_CLOCK_MODE 0x20 #define SDHCI_CLOCK_CARD_EN 0x4 #define SDHCI_CLOCK_INT_STABLE 0x2 #define SDHCI_CLOCK_INT_EN 0x1 /*! SDMMC software reset. */ #define SDHCI_RESET_ALL 0x01 #define SDHCI_RESET_CMD 0x02 #define SDHCI_RESET_DATA 0x04 /*! SDMMC interrupt status and control. */ #define SDHCI_INT_RESPONSE 0x1 #define SDHCI_INT_DATA_END 0x2 #define SDHCI_INT_BLK_GAP 0x4 #define SDHCI_INT_DMA_END 0x8 #define SDHCI_INT_SPACE_AVAIL 0x10 #define SDHCI_INT_DATA_AVAIL 0x20 #define SDHCI_INT_CARD_INSERT 0x40 #define SDHCI_INT_CARD_REMOVE 0x80 #define SDHCI_INT_CARD_INT 0x100 #define SDHCI_INT_RETUNE 0x1000 #define SDHCI_INT_CQE 0x4000 #define SDHCI_INT_ERROR 0x8000 /*! SDMMC error interrupt status and control. */ #define SDHCI_ERR_INT_TIMEOUT 0x1 #define SDHCI_ERR_INT_CRC 0x2 #define SDHCI_ERR_INT_END_BIT 0x4 #define SDHCI_ERR_INT_INDEX 0x8 #define SDHCI_ERR_INT_DATA_TIMEOUT 0x10 #define SDHCI_ERR_INT_DATA_CRC 0x20 #define SDHCI_ERR_INT_DATA_END_BIT 0x40 #define SDHCI_ERR_INT_BUS_POWER 0x80 #define SDHCI_ERR_INT_AUTO_CMD_ERR 0x100 #define SDHCI_ERR_INT_ADMA_ERROR 0x200 #define SDHCI_ERR_INT_ALL_EXCEPT_ADMA_BUSPWR \ (SDHCI_ERR_INT_AUTO_CMD_ERR | SDHCI_ERR_INT_DATA_END_BIT | \ SDHCI_ERR_INT_DATA_CRC | SDHCI_ERR_INT_DATA_TIMEOUT | \ SDHCI_ERR_INT_INDEX | SDHCI_ERR_INT_END_BIT | \ SDHCI_ERR_INT_CRC | SDHCI_ERR_INT_TIMEOUT) /*! SD bus speeds. */ #define UHS_SDR12_BUS_SPEED 0 #define HIGH_SPEED_BUS_SPEED 1 #define UHS_SDR25_BUS_SPEED 1 #define UHS_SDR50_BUS_SPEED 2 #define UHS_SDR104_BUS_SPEED 3 #define UHS_DDR50_BUS_SPEED 4 #define HS400_BUS_SPEED 5 /*! SDMMC timmings. */ #define SDHCI_TIMING_MMC_ID 0 #define SDHCI_TIMING_MMC_LS26 1 #define SDHCI_TIMING_MMC_HS52 2 #define SDHCI_TIMING_MMC_HS200 3 #define SDHCI_TIMING_MMC_HS400 4 #define SDHCI_TIMING_SD_ID 5 #define SDHCI_TIMING_SD_DS12 6 #define SDHCI_TIMING_SD_HS25 7 #define SDHCI_TIMING_UHS_SDR12 8 #define SDHCI_TIMING_UHS_SDR25 9 #define SDHCI_TIMING_UHS_SDR50 10 #define SDHCI_TIMING_UHS_SDR104 11 #define SDHCI_TIMING_UHS_SDR82 12 // SDR104 with a 163.2MHz -> 81.6MHz clock. #define SDHCI_TIMING_UHS_DDR50 13 #define SDHCI_TIMING_MMC_HS102 14 #define SDHCI_CAN_64BIT 0x10000000 /*! SDMMC Low power features. */ #define SDMMC_POWER_SAVE_DISABLE 0 #define SDMMC_POWER_SAVE_ENABLE 1 /*! Helper for SWITCH command argument. */ #define SDMMC_SWITCH(mode, index, value) (((mode) << 24) | ((index) << 16) | ((value) << 8)) /*! SDMMC controller context. */ typedef struct _sdmmc_t { t210_sdmmc_t *regs; u32 id; u32 divisor; u32 clock_stopped; int powersave_enabled; int manual_cal; int card_clock_enabled; int venclkctl_set; u32 venclkctl_tap; u32 expected_rsp_type; u64 last_dma_idx; u64 dma_addr_next; u32 rsp[4]; u32 rsp3; int t210b01; } sdmmc_t; /*! SDMMC command. */ typedef struct _sdmmc_cmd_t { u16 cmd; u32 arg; u32 rsp_type; u32 check_busy; } sdmmc_cmd_t; /*! SDMMC request. */ typedef struct _sdmmc_req_t { void *buf; u32 blksize; u32 num_sectors; int is_write; int is_multi_block; int is_auto_cmd12; } sdmmc_req_t; int sdmmc_get_io_power(sdmmc_t *sdmmc); u32 sdmmc_get_bus_width(sdmmc_t *sdmmc); void sdmmc_set_bus_width(sdmmc_t *sdmmc, u32 bus_width); void sdmmc_save_tap_value(sdmmc_t *sdmmc); int sdmmc_setup_clock(sdmmc_t *sdmmc, u32 type); void sdmmc_card_clock_powersave(sdmmc_t *sdmmc, int powersave_enable); int sdmmc_get_rsp(sdmmc_t *sdmmc, u32 *rsp, u32 size, u32 type); int sdmmc_tuning_execute(sdmmc_t *sdmmc, u32 type, u32 cmd); int sdmmc_stop_transmission(sdmmc_t *sdmmc, u32 *rsp); int sdmmc_get_sd_power_enabled(); bool sdmmc_get_sd_inserted(); int sdmmc_init(sdmmc_t *sdmmc, u32 id, u32 power, u32 bus_width, u32 type, int powersave_enable); void sdmmc_end(sdmmc_t *sdmmc); void sdmmc_init_cmd(sdmmc_cmd_t *cmdbuf, u16 cmd, u32 arg, u32 rsp_type, u32 check_busy); int sdmmc_execute_cmd(sdmmc_t *sdmmc, sdmmc_cmd_t *cmd, sdmmc_req_t *req, u32 *blkcnt_out); int sdmmc_enable_low_voltage(sdmmc_t *sdmmc); #endif
8,091
C++
.h
237
32.818565
98
0.73393
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,227
sdmmc_t210.h
Atmosphere-NX_Atmosphere/emummc/source/emmc/sdmmc_t210.h
/* * Copyright (c) 2018 naehrwert * Copyright (c) 2018-2019 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _SDMMC_T210_H_ #define _SDMMC_T210_H_ #include "../utils/types.h" #define TEGRA_MMC_VNDR_TUN_CTRL0_TAP_VAL_UPDATED_BY_HW 0x20000 #define TEGRA_MMC_DLLCAL_CFG_EN_CALIBRATE 0x80000000 #define TEGRA_MMC_DLLCAL_CFG_STATUS_DLL_ACTIVE 0x80000000 #define TEGRA_MMC_SDMEMCOMPPADCTRL_PAD_E_INPUT_PWRD 0x80000000 #define TEGRA_MMC_SDMEMCOMPPADCTRL_COMP_VREF_SEL_MASK 0xFFFFFFF0 #define TEGRA_MMC_AUTOCALCFG_AUTO_CAL_ENABLE 0x20000000 #define TEGRA_MMC_AUTOCALCFG_AUTO_CAL_START 0x80000000 #define TEGRA_MMC_AUTOCALSTS_AUTO_CAL_ACTIVE 0x80000000 typedef struct _t210_sdmmc_t { vu32 sysad; vu16 blksize; vu16 blkcnt; vu32 argument; vu16 trnmod; vu16 cmdreg; vu32 rspreg0; vu32 rspreg1; vu32 rspreg2; vu32 rspreg3; vu32 bdata; vu32 prnsts; vu8 hostctl; vu8 pwrcon; vu8 blkgap; vu8 wakcon; vu16 clkcon; vu8 timeoutcon; vu8 swrst; vu16 norintsts; vu16 errintsts; vu16 norintstsen; // Enable irq status. vu16 errintstsen; // Enable irq status. vu16 norintsigen; // Enable irq signal to LIC/GIC. vu16 errintsigen; // Enable irq signal to LIC/GIC. vu16 acmd12errsts; vu16 hostctl2; vu32 capareg; vu32 capareg_1; vu32 maxcurr; vu8 rsvd0[4]; // 4C-4F reserved for more max current. vu16 setacmd12err; vu16 setinterr; vu8 admaerr; vu8 rsvd1[3]; // 55-57 reserved. vu32 admaaddr; vu32 admaaddr_hi; vu8 rsvd2[156]; // 60-FB reserved. vu16 slotintsts; vu16 hcver; vu32 venclkctl; vu32 vensysswctl; vu32 venerrintsts; vu32 vencapover; vu32 venbootctl; vu32 venbootacktout; vu32 venbootdattout; vu32 vendebouncecnt; vu32 venmiscctl; vu32 maxcurrover; vu32 maxcurrover_hi; vu32 unk0[32]; // 0x12C vu32 veniotrimctl; vu32 vendllcalcfg; vu32 vendllctl0; vu32 vendllctl1; vu32 vendllcalcfgsts; vu32 ventunctl0; vu32 ventunctl1; vu32 ventunsts0; vu32 ventunsts1; vu32 venclkgatehystcnt; vu32 venpresetval0; vu32 venpresetval1; vu32 venpresetval2; vu32 sdmemcmppadctl; vu32 autocalcfg; vu32 autocalintval; vu32 autocalsts; vu32 iospare; vu32 mcciffifoctl; vu32 timeoutwcoal; vu32 unk1; } t210_sdmmc_t; #endif
2,742
C++
.h
104
24.471154
76
0.785416
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,228
sd.h
Atmosphere-NX_Atmosphere/emummc/source/emmc/sd.h
/* * Copyright (c) 2005-2007 Pierre Ossman, All Rights Reserved. * Copyright (c) 2018 CTCaer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. */ #ifndef MMC_SD_H #define MMC_SD_H /* SD commands type argument response */ /* class 0 */ /* This is basically the same command as for MMC with some quirks. */ #define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */ #define SD_SEND_IF_COND 8 /* bcr [11:0] See below R7 */ #define SD_SWITCH_VOLTAGE 11 /* ac R1 */ /* class 10 */ #define SD_SWITCH 6 /* adtc [31:0] See below R1 */ /* class 5 */ #define SD_ERASE_WR_BLK_START 32 /* ac [31:0] data addr R1 */ #define SD_ERASE_WR_BLK_END 33 /* ac [31:0] data addr R1 */ /* Application commands */ #define SD_APP_SET_BUS_WIDTH 6 /* ac [1:0] bus width R1 */ #define SD_APP_SD_STATUS 13 /* adtc R1 */ #define SD_APP_SEND_NUM_WR_BLKS 22 /* adtc R1 */ #define SD_APP_OP_COND 41 /* bcr [31:0] OCR R3 */ #define SD_APP_SET_CLR_CARD_DETECT 42 #define SD_APP_SEND_SCR 51 /* adtc R1 */ /* OCR bit definitions */ #define SD_OCR_S18R (1 << 24) /* 1.8V switching request */ #define SD_ROCR_S18A SD_OCR_S18R /* 1.8V switching accepted by card */ #define SD_OCR_XPC (1 << 28) /* SDXC power control */ #define SD_OCR_CCS (1 << 30) /* Card Capacity Status */ #define SD_OCR_VDD_27_34 (0x7F << 15) /* VDD voltage 2.7 ~ 3.4 */ #define SD_OCR_VDD_32_33 (1 << 20) /* VDD voltage 3.2 ~ 3.3 */ #define SD_OCR_VDD_18 (1 << 7) /* VDD voltage 1.8 */ /* * SD_SWITCH argument format: * * [31] Check (0) or switch (1) * [30:24] Reserved (0) * [23:20] Function group 6 * [19:16] Function group 5 * [15:12] Function group 4 * [11:8] Function group 3 * [7:4] Function group 2 * [3:0] Function group 1 */ /* * SD_SEND_IF_COND argument format: * * [31:12] Reserved (0) * [11:8] Host Voltage Supply Flags * [7:0] Check Pattern (0xAA) */ /* * SCR field definitions */ #define SCR_SPEC_VER_0 0 /* Implements system specification 1.0 - 1.01 */ #define SCR_SPEC_VER_1 1 /* Implements system specification 1.10 */ #define SCR_SPEC_VER_2 2 /* Implements system specification 2.00-3.0X */ #define SD_SCR_BUS_WIDTH_1 (1<<0) #define SD_SCR_BUS_WIDTH_4 (1<<2) /* * SD bus widths */ #define SD_BUS_WIDTH_1 0 #define SD_BUS_WIDTH_4 2 /* * SD bus speeds */ #define UHS_SDR12_BUS_SPEED 0 #define HIGH_SPEED_BUS_SPEED 1 #define UHS_SDR25_BUS_SPEED 1 #define UHS_SDR50_BUS_SPEED 2 #define UHS_SDR104_BUS_SPEED 3 #define UHS_DDR50_BUS_SPEED 4 #define HS400_BUS_SPEED 5 #define SD_MODE_HIGH_SPEED (1 << HIGH_SPEED_BUS_SPEED) #define SD_MODE_UHS_SDR12 (1 << UHS_SDR12_BUS_SPEED) #define SD_MODE_UHS_SDR25 (1 << UHS_SDR25_BUS_SPEED) #define SD_MODE_UHS_SDR50 (1 << UHS_SDR50_BUS_SPEED) #define SD_MODE_UHS_SDR104 (1 << UHS_SDR104_BUS_SPEED) #define SD_MODE_UHS_DDR50 (1 << UHS_DDR50_BUS_SPEED) #define SD_DRIVER_TYPE_B 0x01 #define SD_DRIVER_TYPE_A 0x02 #define SD_SET_CURRENT_LIMIT_200 0 #define SD_SET_CURRENT_LIMIT_400 1 #define SD_SET_CURRENT_LIMIT_600 2 #define SD_SET_CURRENT_LIMIT_800 3 #define SD_MAX_CURRENT_200 (1 << SD_SET_CURRENT_LIMIT_200) #define SD_MAX_CURRENT_400 (1 << SD_SET_CURRENT_LIMIT_400) #define SD_MAX_CURRENT_600 (1 << SD_SET_CURRENT_LIMIT_600) #define SD_MAX_CURRENT_800 (1 << SD_SET_CURRENT_LIMIT_800) /* * SD_SWITCH mode */ #define SD_SWITCH_CHECK 0 #define SD_SWITCH_SET 1 /* * SD_SWITCH function groups */ #define SD_SWITCH_GRP_ACCESS 0 /* * SD_SWITCH access modes */ #define SD_SWITCH_ACCESS_DEF 0 #define SD_SWITCH_ACCESS_HS 1 #endif /* LINUX_MMC_SD_H */
4,019
C++
.h
110
35.290909
78
0.632391
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,229
nx_emmc.h
Atmosphere-NX_Atmosphere/emummc/source/emmc/nx_emmc.h
/* * Copyright (c) 2018 naehrwert * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _NX_EMMC_H_ #define _NX_EMMC_H_ #include "../utils/types.h" #include "sdmmc.h" typedef struct _gpt_entry_t { u8 type_guid[0x10]; u8 part_guid[0x10]; u64 lba_start; u64 lba_end; u64 attrs; u16 name[36]; } gpt_entry_t; typedef struct _gpt_header_t { u64 signature; u32 revision; u32 size; u32 crc32; u32 res1; u64 my_lba; u64 alt_lba; u64 first_use_lba; u64 last_use_lba; u8 disk_guid[0x10]; u64 part_ent_lba; u32 num_part_ents; u32 part_ent_size; u32 part_ents_crc32; u8 res2[420]; } gpt_header_t; #define NX_GPT_FIRST_LBA 1 #define NX_GPT_NUM_BLOCKS 33 #define NX_EMMC_BLOCKSIZE 512 typedef struct _emmc_part_t { u32 lba_start; u32 lba_end; u64 attrs; s8 name[37]; } emmc_part_t; int nx_emmc_part_read(sdmmc_storage_t *storage, emmc_part_t *part, u32 sector_off, u32 num_sectors, void *buf); int nx_emmc_part_write(sdmmc_storage_t *storage, emmc_part_t *part, u32 sector_off, u32 num_sectors, void *buf); #endif
1,588
C++
.h
59
25.118644
112
0.742275
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,230
mmc.h
Atmosphere-NX_Atmosphere/emummc/source/emmc/mmc.h
/* * Header for MultiMediaCard (MMC) * * Copyright 2002 Hewlett-Packard Company * * Use consistent with the GNU GPL is permitted, * provided that this copyright notice is * preserved in its entirety in all copies and derived works. * * HEWLETT-PACKARD COMPANY MAKES NO WARRANTIES, EXPRESSED OR IMPLIED, * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS * FITNESS FOR ANY PARTICULAR PURPOSE. * * Many thanks to Alessandro Rubini and Jonathan Corbet! * * Based strongly on code by: * * Author: Yong-iL Joh <tolkien@mizi.com> * * Author: Andrew Christian * 15 May 2002 */ #ifndef LINUX_MMC_MMC_H #define LINUX_MMC_MMC_H /* Standard MMC commands (4.1) type argument response */ /* class 1 */ #define MMC_GO_IDLE_STATE 0 /* bc */ #define MMC_SEND_OP_COND 1 /* bcr [31:0] OCR R3 */ #define MMC_ALL_SEND_CID 2 /* bcr R2 */ #define MMC_SET_RELATIVE_ADDR 3 /* ac [31:16] RCA R1 */ #define MMC_SET_DSR 4 /* bc [31:16] RCA */ #define MMC_SLEEP_AWAKE 5 /* ac [31:16] RCA 15:flg R1b */ #define MMC_SWITCH 6 /* ac [31:0] See below R1b */ #define MMC_SELECT_CARD 7 /* ac [31:16] RCA R1 */ #define MMC_SEND_EXT_CSD 8 /* adtc R1 */ #define MMC_SEND_CSD 9 /* ac [31:16] RCA R2 */ #define MMC_SEND_CID 10 /* ac [31:16] RCA R2 */ #define MMC_READ_DAT_UNTIL_STOP 11 /* adtc [31:0] dadr R1 */ #define MMC_STOP_TRANSMISSION 12 /* ac R1b */ #define MMC_SEND_STATUS 13 /* ac [31:16] RCA R1 */ #define MMC_BUS_TEST_R 14 /* adtc R1 */ #define MMC_GO_INACTIVE_STATE 15 /* ac [31:16] RCA */ #define MMC_BUS_TEST_W 19 /* adtc R1 */ #define MMC_SPI_READ_OCR 58 /* spi spi_R3 */ #define MMC_SPI_CRC_ON_OFF 59 /* spi [0:0] flag spi_R1 */ /* class 2 */ #define MMC_SET_BLOCKLEN 16 /* ac [31:0] block len R1 */ #define MMC_READ_SINGLE_BLOCK 17 /* adtc [31:0] data addr R1 */ #define MMC_READ_MULTIPLE_BLOCK 18 /* adtc [31:0] data addr R1 */ #define MMC_SEND_TUNING_BLOCK 19 /* adtc R1 */ #define MMC_SEND_TUNING_BLOCK_HS200 21 /* adtc R1 */ /* class 3 */ #define MMC_WRITE_DAT_UNTIL_STOP 20 /* adtc [31:0] data addr R1 */ /* class 4 */ #define MMC_SET_BLOCK_COUNT 23 /* adtc [31:0] data addr R1 */ #define MMC_WRITE_BLOCK 24 /* adtc [31:0] data addr R1 */ #define MMC_WRITE_MULTIPLE_BLOCK 25 /* adtc R1 */ #define MMC_PROGRAM_CID 26 /* adtc R1 */ #define MMC_PROGRAM_CSD 27 /* adtc R1 */ /* class 6 */ #define MMC_SET_WRITE_PROT 28 /* ac [31:0] data addr R1b */ #define MMC_CLR_WRITE_PROT 29 /* ac [31:0] data addr R1b */ #define MMC_SEND_WRITE_PROT 30 /* adtc [31:0] wpdata addr R1 */ /* class 5 */ #define MMC_ERASE_GROUP_START 35 /* ac [31:0] data addr R1 */ #define MMC_ERASE_GROUP_END 36 /* ac [31:0] data addr R1 */ #define MMC_ERASE 38 /* ac R1b */ /* class 9 */ #define MMC_FAST_IO 39 /* ac <Complex> R4 */ #define MMC_GO_IRQ_STATE 40 /* bcr R5 */ /* class 7 */ #define MMC_LOCK_UNLOCK 42 /* adtc R1b */ /* class 8 */ #define MMC_APP_CMD 55 /* ac [31:16] RCA R1 */ #define MMC_GEN_CMD 56 /* adtc [0] RD/WR R1 */ /* class 11 */ #define MMC_QUE_TASK_PARAMS 44 /* ac [20:16] task id R1 */ #define MMC_QUE_TASK_ADDR 45 /* ac [31:0] data addr R1 */ #define MMC_EXECUTE_READ_TASK 46 /* adtc [20:16] task id R1 */ #define MMC_EXECUTE_WRITE_TASK 47 /* adtc [20:16] task id R1 */ #define MMC_CMDQ_TASK_MGMT 48 /* ac [20:16] task id R1b */ /* * MMC_SWITCH argument format: * * [31:26] Always 0 * [25:24] Access Mode * [23:16] Location of target Byte in EXT_CSD * [15:08] Value Byte * [07:03] Always 0 * [02:00] Command Set */ /* MMC status in R1, for native mode (SPI bits are different) Type e : error bit s : status bit r : detected and set for the actual command response x : detected and set during command execution. the host must poll the card by sending status command in order to read these bits. Clear condition a : according to the card state b : always related to the previous command. Reception of a valid command will clear it (with a delay of one command) c : clear by read */ #define R1_OUT_OF_RANGE (1 << 31) /* er, c */ #define R1_ADDRESS_ERROR (1 << 30) /* erx, c */ #define R1_BLOCK_LEN_ERROR (1 << 29) /* er, c */ #define R1_ERASE_SEQ_ERROR (1 << 28) /* er, c */ #define R1_ERASE_PARAM (1 << 27) /* ex, c */ #define R1_WP_VIOLATION (1 << 26) /* erx, c */ #define R1_CARD_IS_LOCKED (1 << 25) /* sx, a */ #define R1_LOCK_UNLOCK_FAILED (1 << 24) /* erx, c */ #define R1_COM_CRC_ERROR (1 << 23) /* er, b */ #define R1_ILLEGAL_COMMAND (1 << 22) /* er, b */ #define R1_CARD_ECC_FAILED (1 << 21) /* ex, c */ #define R1_CC_ERROR (1 << 20) /* erx, c */ #define R1_ERROR (1 << 19) /* erx, c */ #define R1_UNDERRUN (1 << 18) /* ex, c */ #define R1_OVERRUN (1 << 17) /* ex, c */ #define R1_CID_CSD_OVERWRITE (1 << 16) /* erx, c, CID/CSD overwrite */ #define R1_WP_ERASE_SKIP (1 << 15) /* sx, c */ #define R1_CARD_ECC_DISABLED (1 << 14) /* sx, a */ #define R1_ERASE_RESET (1 << 13) /* sr, c */ #define R1_STATUS(x) ((x) & 0xFFFFE000) #define R1_CURRENT_STATE(x) (((x) & 0x00001E00) >> 9) /* sx, b (4 bits) */ #define R1_READY_FOR_DATA (1 << 8) /* sx, a */ #define R1_SWITCH_ERROR (1 << 7) /* sx, c */ #define R1_EXCEPTION_EVENT (1 << 6) /* sr, a */ #define R1_APP_CMD (1 << 5) /* sr, c */ #define R1_STATE_IDLE 0 #define R1_STATE_READY 1 #define R1_STATE_IDENT 2 #define R1_STATE_STBY 3 #define R1_STATE_TRAN 4 #define R1_STATE_DATA 5 #define R1_STATE_RCV 6 #define R1_STATE_PRG 7 #define R1_STATE_DIS 8 /* * MMC/SD in SPI mode reports R1 status always, and R2 for SEND_STATUS * R1 is the low order byte; R2 is the next highest byte, when present. */ #define R1_SPI_IDLE (1 << 0) #define R1_SPI_ERASE_RESET (1 << 1) #define R1_SPI_ILLEGAL_COMMAND (1 << 2) #define R1_SPI_COM_CRC (1 << 3) #define R1_SPI_ERASE_SEQ (1 << 4) #define R1_SPI_ADDRESS (1 << 5) #define R1_SPI_PARAMETER (1 << 6) /* R1 bit 7 is always zero */ #define R2_SPI_CARD_LOCKED (1 << 8) #define R2_SPI_WP_ERASE_SKIP (1 << 9) /* or lock/unlock fail */ #define R2_SPI_LOCK_UNLOCK_FAIL R2_SPI_WP_ERASE_SKIP #define R2_SPI_ERROR (1 << 10) #define R2_SPI_CC_ERROR (1 << 11) #define R2_SPI_CARD_ECC_ERROR (1 << 12) #define R2_SPI_WP_VIOLATION (1 << 13) #define R2_SPI_ERASE_PARAM (1 << 14) #define R2_SPI_OUT_OF_RANGE (1 << 15) /* or CSD overwrite */ #define R2_SPI_CSD_OVERWRITE R2_SPI_OUT_OF_RANGE /* * OCR bits are mostly in host.h */ #define MMC_CARD_BUSY 0x80000000 /* Card Power up status bit */ /* * Card Command Classes (CCC) */ #define CCC_BASIC (1<<0) /* (0) Basic protocol functions */ /* (CMD0,1,2,3,4,7,9,10,12,13,15) */ /* (and for SPI, CMD58,59) */ #define CCC_STREAM_READ (1<<1) /* (1) Stream read commands */ /* (CMD11) */ #define CCC_BLOCK_READ (1<<2) /* (2) Block read commands */ /* (CMD16,17,18) */ #define CCC_STREAM_WRITE (1<<3) /* (3) Stream write commands */ /* (CMD20) */ #define CCC_BLOCK_WRITE (1<<4) /* (4) Block write commands */ /* (CMD16,24,25,26,27) */ #define CCC_ERASE (1<<5) /* (5) Ability to erase blocks */ /* (CMD32,33,34,35,36,37,38,39) */ #define CCC_WRITE_PROT (1<<6) /* (6) Able to write protect blocks */ /* (CMD28,29,30) */ #define CCC_LOCK_CARD (1<<7) /* (7) Able to lock down card */ /* (CMD16,CMD42) */ #define CCC_APP_SPEC (1<<8) /* (8) Application specific */ /* (CMD55,56,57,ACMD*) */ #define CCC_IO_MODE (1<<9) /* (9) I/O mode */ /* (CMD5,39,40,52,53) */ #define CCC_SWITCH (1<<10) /* (10) High speed switch */ /* (CMD6,34,35,36,37,50) */ /* (11) Reserved */ /* (CMD?) */ /* * CSD field definitions */ #define CSD_STRUCT_VER_1_0 0 /* Valid for system specification 1.0 - 1.2 */ #define CSD_STRUCT_VER_1_1 1 /* Valid for system specification 1.4 - 2.2 */ #define CSD_STRUCT_VER_1_2 2 /* Valid for system specification 3.1 - 3.2 - 3.31 - 4.0 - 4.1 */ #define CSD_STRUCT_EXT_CSD 3 /* Version is coded in CSD_STRUCTURE in EXT_CSD */ #define CSD_SPEC_VER_0 0 /* Implements system specification 1.0 - 1.2 */ #define CSD_SPEC_VER_1 1 /* Implements system specification 1.4 */ #define CSD_SPEC_VER_2 2 /* Implements system specification 2.0 - 2.2 */ #define CSD_SPEC_VER_3 3 /* Implements system specification 3.1 - 3.2 - 3.31 */ #define CSD_SPEC_VER_4 4 /* Implements system specification 4.0 - 4.1 */ /* * EXT_CSD fields */ #define EXT_CSD_CMDQ_MODE_EN 15 /* R/W */ #define EXT_CSD_FLUSH_CACHE 32 /* W */ #define EXT_CSD_CACHE_CTRL 33 /* R/W */ #define EXT_CSD_POWER_OFF_NOTIFICATION 34 /* R/W */ #define EXT_CSD_PACKED_FAILURE_INDEX 35 /* RO */ #define EXT_CSD_PACKED_CMD_STATUS 36 /* RO */ #define EXT_CSD_EXP_EVENTS_STATUS 54 /* RO, 2 bytes */ #define EXT_CSD_EXP_EVENTS_CTRL 56 /* R/W, 2 bytes */ #define EXT_CSD_DATA_SECTOR_SIZE 61 /* R */ #define EXT_CSD_GP_SIZE_MULT 143 /* R/W */ #define EXT_CSD_PARTITION_SETTING_COMPLETED 155 /* R/W */ #define EXT_CSD_PARTITION_ATTRIBUTE 156 /* R/W */ #define EXT_CSD_PARTITION_SUPPORT 160 /* RO */ #define EXT_CSD_HPI_MGMT 161 /* R/W */ #define EXT_CSD_RST_N_FUNCTION 162 /* R/W */ #define EXT_CSD_BKOPS_EN 163 /* R/W */ #define EXT_CSD_BKOPS_START 164 /* W */ #define EXT_CSD_SANITIZE_START 165 /* W */ #define EXT_CSD_WR_REL_PARAM 166 /* RO */ #define EXT_CSD_RPMB_MULT 168 /* RO */ #define EXT_CSD_FW_CONFIG 169 /* R/W */ #define EXT_CSD_BOOT_WP 173 /* R/W */ #define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */ #define EXT_CSD_PART_CONFIG 179 /* R/W */ #define EXT_CSD_ERASED_MEM_CONT 181 /* RO */ #define EXT_CSD_BUS_WIDTH 183 /* R/W */ #define EXT_CSD_STROBE_SUPPORT 184 /* RO */ #define EXT_CSD_HS_TIMING 185 /* R/W */ #define EXT_CSD_POWER_CLASS 187 /* R/W */ #define EXT_CSD_REV 192 /* RO */ #define EXT_CSD_STRUCTURE 194 /* RO */ #define EXT_CSD_CARD_TYPE 196 /* RO */ #define EXT_CSD_DRIVER_STRENGTH 197 /* RO */ #define EXT_CSD_OUT_OF_INTERRUPT_TIME 198 /* RO */ #define EXT_CSD_PART_SWITCH_TIME 199 /* RO */ #define EXT_CSD_PWR_CL_52_195 200 /* RO */ #define EXT_CSD_PWR_CL_26_195 201 /* RO */ #define EXT_CSD_PWR_CL_52_360 202 /* RO */ #define EXT_CSD_PWR_CL_26_360 203 /* RO */ #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ #define EXT_CSD_S_A_TIMEOUT 217 /* RO */ #define EXT_CSD_REL_WR_SEC_C 222 /* RO */ #define EXT_CSD_HC_WP_GRP_SIZE 221 /* RO */ #define EXT_CSD_ERASE_TIMEOUT_MULT 223 /* RO */ #define EXT_CSD_HC_ERASE_GRP_SIZE 224 /* RO */ #define EXT_CSD_BOOT_MULT 226 /* RO */ #define EXT_CSD_SEC_TRIM_MULT 229 /* RO */ #define EXT_CSD_SEC_ERASE_MULT 230 /* RO */ #define EXT_CSD_SEC_FEATURE_SUPPORT 231 /* RO */ #define EXT_CSD_TRIM_MULT 232 /* RO */ #define EXT_CSD_PWR_CL_200_195 236 /* RO */ #define EXT_CSD_PWR_CL_200_360 237 /* RO */ #define EXT_CSD_PWR_CL_DDR_52_195 238 /* RO */ #define EXT_CSD_PWR_CL_DDR_52_360 239 /* RO */ #define EXT_CSD_BKOPS_STATUS 246 /* RO */ #define EXT_CSD_POWER_OFF_LONG_TIME 247 /* RO */ #define EXT_CSD_GENERIC_CMD6_TIME 248 /* RO */ #define EXT_CSD_CACHE_SIZE 249 /* RO, 4 bytes */ #define EXT_CSD_PWR_CL_DDR_200_360 253 /* RO */ #define EXT_CSD_FIRMWARE_VERSION 254 /* RO, 8 bytes */ #define EXT_CSD_DEVICE_VERSION 262 /* RO, 2 bytes */ #define EXT_CSD_PRE_EOL_INFO 267 /* RO */ #define EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A 268 /* RO */ #define EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B 269 /* RO */ #define EXT_CSD_CMDQ_DEPTH 307 /* RO */ #define EXT_CSD_CMDQ_SUPPORT 308 /* RO */ #define EXT_CSD_SUPPORTED_MODE 493 /* RO */ #define EXT_CSD_TAG_UNIT_SIZE 498 /* RO */ #define EXT_CSD_DATA_TAG_SUPPORT 499 /* RO */ #define EXT_CSD_MAX_PACKED_WRITES 500 /* RO */ #define EXT_CSD_MAX_PACKED_READS 501 /* RO */ #define EXT_CSD_BKOPS_SUPPORT 502 /* RO */ #define EXT_CSD_HPI_FEATURES 503 /* RO */ /* * EXT_CSD field definitions */ #define EXT_CSD_WR_REL_PARAM_EN (1<<2) #define EXT_CSD_BOOT_WP_B_PWR_WP_DIS (0x40) #define EXT_CSD_BOOT_WP_B_PERM_WP_DIS (0x10) #define EXT_CSD_BOOT_WP_B_PERM_WP_EN (0x04) #define EXT_CSD_BOOT_WP_B_PWR_WP_EN (0x01) #define EXT_CSD_PART_CONFIG_ACC_MASK (0x7) #define EXT_CSD_PART_CONFIG_ACC_BOOT0 (0x1) #define EXT_CSD_PART_CONFIG_ACC_RPMB (0x3) #define EXT_CSD_PART_CONFIG_ACC_GP0 (0x4) #define EXT_CSD_PART_SETTING_COMPLETED (0x1) #define EXT_CSD_PART_SUPPORT_PART_EN (0x1) #define EXT_CSD_CMD_SET_NORMAL (1<<0) #define EXT_CSD_CMD_SET_SECURE (1<<1) #define EXT_CSD_CMD_SET_CPSECURE (1<<2) #define EXT_CSD_CARD_TYPE_HS_26 (1<<0) /* Card can run at 26MHz */ #define EXT_CSD_CARD_TYPE_HS_52 (1<<1) /* Card can run at 52MHz */ #define EXT_CSD_CARD_TYPE_HS (EXT_CSD_CARD_TYPE_HS_26 | \ EXT_CSD_CARD_TYPE_HS_52) #define EXT_CSD_CARD_TYPE_DDR_1_8V (1<<2) /* Card can run at 52MHz */ /* DDR mode @1.8V or 3V I/O */ #define EXT_CSD_CARD_TYPE_DDR_1_2V (1<<3) /* Card can run at 52MHz */ /* DDR mode @1.2V I/O */ #define EXT_CSD_CARD_TYPE_DDR_52 (EXT_CSD_CARD_TYPE_DDR_1_8V \ | EXT_CSD_CARD_TYPE_DDR_1_2V) #define EXT_CSD_CARD_TYPE_HS200_1_8V (1<<4) /* Card can run at 200MHz */ #define EXT_CSD_CARD_TYPE_HS200_1_2V (1<<5) /* Card can run at 200MHz */ /* SDR mode @1.2V I/O */ #define EXT_CSD_CARD_TYPE_HS200 (EXT_CSD_CARD_TYPE_HS200_1_8V | \ EXT_CSD_CARD_TYPE_HS200_1_2V) #define EXT_CSD_CARD_TYPE_HS400_1_8V (1<<6) /* Card can run at 200MHz DDR, 1.8V */ #define EXT_CSD_CARD_TYPE_HS400_1_2V (1<<7) /* Card can run at 200MHz DDR, 1.2V */ #define EXT_CSD_CARD_TYPE_HS400 (EXT_CSD_CARD_TYPE_HS400_1_8V | \ EXT_CSD_CARD_TYPE_HS400_1_2V) #define EXT_CSD_CARD_TYPE_HS400ES (1<<8) /* Card can run at HS400ES */ #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ #define EXT_CSD_BUS_WIDTH_8 2 /* Card is in 8 bit mode */ #define EXT_CSD_DDR_BUS_WIDTH_4 5 /* Card is in 4 bit DDR mode */ #define EXT_CSD_DDR_BUS_WIDTH_8 6 /* Card is in 8 bit DDR mode */ #define EXT_CSD_BUS_WIDTH_STROBE (1<<7) /* Enhanced strobe mode */ #define EXT_CSD_TIMING_BC 0 /* Backwards compatility */ #define EXT_CSD_TIMING_HS 1 /* High speed */ #define EXT_CSD_TIMING_HS200 2 /* HS200 */ #define EXT_CSD_TIMING_HS400 3 /* HS400 */ #define EXT_CSD_DRV_STR_SHIFT 4 /* Driver Strength shift */ #define EXT_CSD_SEC_ER_EN (1<<0) #define EXT_CSD_SEC_BD_BLK_EN (1<<2) #define EXT_CSD_SEC_GB_CL_EN (1<<4) #define EXT_CSD_SEC_SANITIZE (1<<6) /* v4.5 only */ #define EXT_CSD_RST_N_EN_MASK 0x3 #define EXT_CSD_RST_N_ENABLED 1 /* RST_n is enabled on card */ #define EXT_CSD_NO_POWER_NOTIFICATION 0 #define EXT_CSD_POWER_ON 1 #define EXT_CSD_POWER_OFF_SHORT 2 #define EXT_CSD_POWER_OFF_LONG 3 #define EXT_CSD_PWR_CL_8BIT_MASK 0xF0 /* 8 bit PWR CLS */ #define EXT_CSD_PWR_CL_4BIT_MASK 0x0F /* 8 bit PWR CLS */ #define EXT_CSD_PWR_CL_8BIT_SHIFT 4 #define EXT_CSD_PWR_CL_4BIT_SHIFT 0 #define EXT_CSD_PACKED_EVENT_EN (1<<3) /* * EXCEPTION_EVENT_STATUS field */ #define EXT_CSD_URGENT_BKOPS (1<<0) #define EXT_CSD_DYNCAP_NEEDED (1<<1) #define EXT_CSD_SYSPOOL_EXHAUSTED (1<<2) #define EXT_CSD_PACKED_FAILURE (1<<3) #define EXT_CSD_PACKED_GENERIC_ERROR (1<<0) #define EXT_CSD_PACKED_INDEXED_ERROR (1<<1) /* * BKOPS status level */ #define EXT_CSD_BKOPS_LEVEL_2 0x2 /* * BKOPS modes */ #define EXT_CSD_MANUAL_BKOPS_MASK 0x01 #define EXT_CSD_AUTO_BKOPS_MASK 0x02 /* * Command Queue */ #define EXT_CSD_CMDQ_MODE_ENABLED (1<<0) #define EXT_CSD_CMDQ_DEPTH_MASK 0x1F #define EXT_CSD_CMDQ_SUPPORTED (1<<0) /* * MMC_SWITCH access modes */ #define MMC_SWITCH_MODE_CMD_SET 0x00 /* Change the command set */ #define MMC_SWITCH_MODE_SET_BITS 0x01 /* Set bits which are 1 in value */ #define MMC_SWITCH_MODE_CLEAR_BITS 0x02 /* Clear bits which are 1 in value */ #define MMC_SWITCH_MODE_WRITE_BYTE 0x03 /* Set target to value */ /* * Erase/trim/discard */ #define MMC_ERASE_ARG 0x00000000 #define MMC_SECURE_ERASE_ARG 0x80000000 #define MMC_TRIM_ARG 0x00000001 #define MMC_DISCARD_ARG 0x00000003 #define MMC_SECURE_TRIM1_ARG 0x80000001 #define MMC_SECURE_TRIM2_ARG 0x80008000 #define MMC_SECURE_ARGS 0x80000000 #define MMC_TRIM_ARGS 0x00008001 #endif /* LINUX_MMC_MMC_H */
16,769
C++
.h
387
42.103359
105
0.625451
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,231
nx_sd.h
Atmosphere-NX_Atmosphere/emummc/source/emmc/nx_sd.h
/* * Copyright (c) 2018 naehrwert * Copyright (c) 2018-2019 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef NX_SD_H #define NX_SD_H #include "../utils/types.h" enum { SD_INIT_FAIL = 0, SD_1BIT_HS25 = 1, SD_4BIT_HS25 = 2, SD_UHS_SDR82 = 3, SD_UHS_SDR104 = 4 }; u32 nx_sd_get_mode(); int nx_sd_init_retry(bool power_cycle); bool nx_sd_initialize(bool power_cycle); #endif
954
C++
.h
31
29
76
0.735582
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,232
emummc.h
Atmosphere-NX_Atmosphere/emummc/source/emuMMC/emummc.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __EMUMMC_H__ #define __EMUMMC_H__ #ifdef __cplusplus extern "C" { #endif #include <stdlib.h> #include <stdint.h> #include <malloc.h> #include <stdio.h> #include <string.h> #include "../emmc/nx_sd.h" #include "../emmc/sdmmc.h" #include "../soc/i2c.h" #include "../soc/gpio.h" #include "../utils/util.h" #include "../FS/FS.h" #include "../libs/fatfs/ff.h" #define EMUMMC_FILE_MAX_PARTS 32 #define EMUMMC_FP_CLMT_COUNT 1024 // FS typedefs typedef sdmmc_accessor_t *(*_sdmmc_accessor_gc)(); typedef sdmmc_accessor_t *(*_sdmmc_accessor_sd)(); typedef sdmmc_accessor_t *(*_sdmmc_accessor_nand)(); typedef void (*_lock_mutex)(void *mtx); typedef void (*_unlock_mutex)(void *mtx); bool sdmmc_initialize(void); void sdmmc_finalize(void); int sdmmc_nand_get_active_partition_index(); sdmmc_accessor_t *sdmmc_accessor_get(int mmc_id); void mutex_lock_handler(int mmc_id); void mutex_unlock_handler(int mmc_id); // Hooks uint64_t sdmmc_wrapper_controller_open(int mmc_id); uint64_t sdmmc_wrapper_controller_close(int mmc_id); uint64_t sdmmc_wrapper_read(void *buf, uint64_t bufSize, int mmc_id, unsigned int sector, unsigned int num_sectors); uint64_t sdmmc_wrapper_write(int mmc_id, unsigned int sector, unsigned int num_sectors, void *buf, uint64_t bufSize); typedef struct _file_based_ctxt { FATFS sd_fs; uint64_t parts; uint64_t part_size; FIL fp_boot0; DWORD clmt_boot0[EMUMMC_FP_CLMT_COUNT]; FIL fp_boot1; DWORD clmt_boot1[EMUMMC_FP_CLMT_COUNT]; FIL fp_gpp[EMUMMC_FILE_MAX_PARTS]; DWORD clmt_gpp[EMUMMC_FILE_MAX_PARTS * EMUMMC_FP_CLMT_COUNT]; uint64_t total_sect; } file_based_ctxt; #ifdef __cplusplus } #endif #endif /* __EMUMMC_H__ */
2,343
C++
.h
69
32.42029
117
0.744032
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,233
emummc_ctx.h
Atmosphere-NX_Atmosphere/emummc/source/emuMMC/emummc_ctx.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __EMUMMC_CTX_H__ #define __EMUMMC_CTX_H__ #include "../utils/types.h" #include "../FS/FS_versions.h" #define EMUMMC_STORAGE_MAGIC 0x30534645 /* EFS0, EmuFS0 */ #define EMUMMC_MAX_DIR_LENGTH 0x7F enum emuMMC_Type { // EMMC Device raw emuMMC_EMMC = 0, // SD Device raw emuMMC_SD_Raw, // SD Device File emuMMC_SD_File, emuMMC_MAX }; typedef struct _emuMMC_ctx_t { u32 magic; u32 id; enum FS_VER fs_ver; enum emuMMC_Type EMMC_Type; enum emuMMC_Type SD_Type; /* Partition based */ u64 EMMC_StoragePartitionOffset; u64 SD_StoragePartitionOffset; /* File-Based */ char storagePath[EMUMMC_MAX_DIR_LENGTH+1]; } emuMMC_ctx_t, *PemuMMC_ctx_t; #endif /* __EMUMMC_CTX_H__ */
1,430
C++
.h
46
28.065217
76
0.71179
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,234
util.h
Atmosphere-NX_Atmosphere/emummc/source/utils/util.h
/* * Copyright (c) 2018 naehrwert * Copyright (C) 2018 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _UTIL_H_ #define _UTIL_H_ #include "types.h" #include "../emuMMC/emummc_ctx.h" intptr_t QueryIoMapping(u64 addr, u64 size); #define byte_swap_32(num) (((num >> 24) & 0xff) | ((num << 8) & 0xff0000) | \ ((num >> 8 )& 0xff00) | ((num << 24) & 0xff000000)) typedef struct _cfg_op_t { u32 off; u32 val; } cfg_op_t; u64 get_tmr_us(); u64 get_tmr_ms(); u64 get_tmr_s(); void usleep(u64 ticks); void msleep(u64 milliseconds); void exec_cfg(u32 *base, const cfg_op_t *ops, u32 num_ops); static inline void *armGetTls(void) { void *ret; __asm__ __volatile__("MRS %x[data], TPIDRRO_EL0" : [data]"=r"(ret)); return ret; } extern volatile emuMMC_ctx_t emuMMC_ctx; #endif
1,359
C++
.h
41
31.097561
77
0.703817
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,235
fatal.h
Atmosphere-NX_Atmosphere/emummc/source/utils/fatal.h
/* * Copyright (c) 2019 m4xw <m4x@m4xw.net> * Copyright (c) 2019 Atmosphere-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include "../nx/smc.h" enum FatalReason { Fatal_InitMMC = 0, Fatal_InitSD, Fatal_InvalidAccessor, Fatal_ReadNoAccessor, Fatal_WriteNoAccessor, Fatal_IoMappingLegacy, Fatal_UnknownVersion, Fatal_BadResult, Fatal_GetConfig, Fatal_OpenAccessor, Fatal_CloseAccessor, Fatal_IoMapping, Fatal_FatfsMount, Fatal_FatfsFileOpen, Fatal_FatfsMemExhaustion, Fatal_InvalidEnum, Fatal_Max }; #define AMS_FATAL_ERROR_MAX_STACKTRACE 0x20 #define AMS_FATAL_ERROR_MAX_STACKDUMP 0x100 /* Atmosphere reboot-to-fatal-error. */ typedef struct { uint32_t magic; uint32_t error_desc; uint64_t title_id; union { uint64_t gprs[32]; struct { uint64_t _gprs[29]; uint64_t fp; uint64_t lr; uint64_t sp; }; }; uint64_t pc; uint64_t module_base; uint32_t pstate; uint32_t afsr0; uint32_t afsr1; uint32_t esr; uint64_t far; uint64_t report_identifier; /* Normally just system tick. */ uint64_t stack_trace_size; uint64_t stack_dump_size; uint64_t stack_trace[AMS_FATAL_ERROR_MAX_STACKTRACE]; uint8_t stack_dump[AMS_FATAL_ERROR_MAX_STACKDUMP]; } atmosphere_fatal_error_ctx; /* "AFE1" */ #define ATMOSPHERE_REBOOT_TO_FATAL_MAGIC 0x31454641 /* "AFE0" */ #define ATMOSPHERE_REBOOT_TO_FATAL_MAGIC_0 0x30454641 #define ATMOSPHERE_FATAL_ERROR_ADDR 0x4003E000 #define ATMOSPHERE_FATAL_ERROR_CONTEXT ((volatile atmosphere_fatal_error_ctx *)(ATMOSPHERE_FATAL_ERROR_ADDR)) void __attribute__((noreturn)) fatal_abort(enum FatalReason abortReason);
2,320
C++
.h
76
26.394737
109
0.713008
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,236
types.h
Atmosphere-NX_Atmosphere/emummc/source/utils/types.h
/* * Copyright (c) 2018 naehrwert * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _TYPES_H_ #define _TYPES_H_ #include <stdint.h> #define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define OFFSET_OF(t, m) ((u32)&((t *)NULL)->m) #define CONTAINER_OF(mp, t, mn) ((t *)((u32)mp - OFFSET_OF(t, mn))) /// Creates a bitmask from a bit number. #ifndef BIT #define BIT(n) (1U<<(n)) #endif typedef int8_t s8; typedef int16_t s16; typedef int16_t SHORT; typedef int32_t s32; typedef int32_t INT; typedef int64_t LONG; typedef int64_t s64; typedef uint8_t u8; typedef uint8_t BYTE; typedef uint16_t u16; typedef uint16_t WORD; typedef uint16_t WCHAR; typedef uint32_t u32; typedef uint32_t UINT; typedef uint32_t DWORD; typedef uint64_t QWORD; typedef uint64_t u64; typedef volatile uint8_t vu8; typedef volatile uint16_t vu16; typedef volatile uint32_t vu32; typedef u32 Handle; ///< Kernel object handle. typedef u32 Result; ///< Function error code result type. #define INVALID_HANDLE ((Handle) 0) #define CUR_PROCESS_HANDLE ((Handle) 0xFFFF8001) #ifndef __cplusplus typedef int bool; #define true 1 #define false 0 #endif /* __cplusplus */ #define BOOT_CFG_AUTOBOOT_EN (1 << 0) #define BOOT_CFG_FROM_LAUNCH (1 << 1) #define BOOT_CFG_SEPT_RUN (1 << 7) #define EXTRA_CFG_KEYS (1 << 0) #define EXTRA_CFG_PAYLOAD (1 << 1) #define EXTRA_CFG_MODULE (1 << 2) typedef struct __attribute__((__packed__)) _boot_cfg_t { u8 boot_cfg; u8 autoboot; u8 autoboot_list; u8 extra_cfg; u8 rsvd[128]; } boot_cfg_t; typedef struct __attribute__((__packed__)) _ipl_ver_meta_t { u32 magic; u32 version; u16 rsvd0; u16 rsvd1; } ipl_ver_meta_t; typedef struct __attribute__((__packed__)) _reloc_meta_t { u32 start; u32 stack; u32 end; u32 ep; } reloc_meta_t; #endif
2,406
C++
.h
85
26.976471
75
0.71379
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,237
diskio.h
Atmosphere-NX_Atmosphere/emummc/source/libs/fatfs/diskio.h
/*-----------------------------------------------------------------------/ / Low level disk interface modlue include file (C)ChaN, 2014 / /-----------------------------------------------------------------------*/ #ifndef _DISKIO_DEFINED #define _DISKIO_DEFINED #ifdef __cplusplus extern "C" { #endif #include "../../utils/types.h" /* Status of Disk Functions */ typedef BYTE DSTATUS; /* Results of Disk Functions */ typedef enum { RES_OK = 0, /* 0: Successful */ RES_ERROR, /* 1: R/W Error */ RES_WRPRT, /* 2: Write Protected */ RES_NOTRDY, /* 3: Not Ready */ RES_PARERR /* 4: Invalid Parameter */ } DRESULT; /*---------------------------------------*/ /* Prototypes for disk control functions */ DSTATUS disk_initialize (BYTE pdrv); DSTATUS disk_status (BYTE pdrv); DRESULT disk_read (BYTE pdrv, BYTE* buff, DWORD sector, UINT count); DRESULT disk_write (BYTE pdrv, const BYTE* buff, DWORD sector, UINT count); DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff); /* Disk Status Bits (DSTATUS) */ #define STA_NOINIT 0x01 /* Drive not initialized */ #define STA_NODISK 0x02 /* No medium in the drive */ #define STA_PROTECT 0x04 /* Write protected */ /* Command code for disk_ioctrl fucntion */ /* Generic command (Used by FatFs) */ #define CTRL_SYNC 0 /* Complete pending write process (needed at FF_FS_READONLY == 0) */ #define GET_SECTOR_COUNT 1 /* Get media size (needed at FF_USE_MKFS == 1) */ #define GET_SECTOR_SIZE 2 /* Get sector size (needed at FF_MAX_SS != FF_MIN_SS) */ #define GET_BLOCK_SIZE 3 /* Get erase block size (needed at FF_USE_MKFS == 1) */ #define CTRL_TRIM 4 /* Inform device that the data on the block of sectors is no longer used (needed at FF_USE_TRIM == 1) */ /* Generic command (Not used by FatFs) */ #define CTRL_POWER 5 /* Get/Set power status */ #define CTRL_LOCK 6 /* Lock/Unlock media removal */ #define CTRL_EJECT 7 /* Eject media */ #define CTRL_FORMAT 8 /* Create physical format on the media */ /* MMC/SDC specific ioctl command */ #define MMC_GET_TYPE 10 /* Get card type */ #define MMC_GET_CSD 11 /* Get CSD */ #define MMC_GET_CID 12 /* Get CID */ #define MMC_GET_OCR 13 /* Get OCR */ #define MMC_GET_SDSTAT 14 /* Get SD status */ #define ISDIO_READ 55 /* Read data form SD iSDIO register */ #define ISDIO_WRITE 56 /* Write data to SD iSDIO register */ #define ISDIO_MRITE 57 /* Masked write data to SD iSDIO register */ /* ATA/CF specific ioctl command */ #define ATA_GET_REV 20 /* Get F/W revision */ #define ATA_GET_MODEL 21 /* Get model name */ #define ATA_GET_SN 22 /* Get serial number */ #ifdef __cplusplus } #endif #endif
2,648
C++
.h
59
43.457627
126
0.640716
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
9,238
ff.h
Atmosphere-NX_Atmosphere/emummc/source/libs/fatfs/ff.h
/*----------------------------------------------------------------------------/ / FatFs - Generic FAT Filesystem module R0.13c / /-----------------------------------------------------------------------------/ / / Copyright (C) 2018, ChaN, all right reserved. / / FatFs module is an open source software. Redistribution and use of FatFs in / source and binary forms, with or without modification, are permitted provided / that the following condition is met: / 1. Redistributions of source code must retain the above copyright notice, / this condition and the following disclaimer. / / This software is provided by the copyright holder and contributors "AS IS" / and any warranties related to this software are DISCLAIMED. / The copyright owner or contributors be NOT LIABLE for any damages caused / by use of this software. / /----------------------------------------------------------------------------*/ #ifndef FF_DEFINED #define FF_DEFINED 86604 /* Revision ID */ #ifdef __cplusplus extern "C" { #endif #include "../../utils/types.h" /* Basic integer types */ #include "ffconf.h" /* FatFs configuration options */ #if FF_DEFINED != FFCONF_DEF #error Wrong configuration file (ffconf.h). #endif /* Definitions of volume management */ #if FF_MULTI_PARTITION /* Multiple partition configuration */ typedef struct { BYTE pd; /* Physical drive number */ BYTE pt; /* Partition: 0:Auto detect, 1-4:Forced partition) */ } PARTITION; extern PARTITION VolToPart[]; /* Volume - Partition resolution table */ #endif #if FF_STR_VOLUME_ID #ifndef FF_VOLUME_STRS extern const char* VolumeStr[FF_VOLUMES]; /* User defied volume ID */ #endif #endif /* Type of path name strings on FatFs API */ #ifndef _INC_TCHAR #define _INC_TCHAR #if FF_USE_LFN && FF_LFN_UNICODE == 1 /* Unicode in UTF-16 encoding */ typedef WCHAR TCHAR; #define _T(x) L ## x #define _TEXT(x) L ## x #elif FF_USE_LFN && FF_LFN_UNICODE == 2 /* Unicode in UTF-8 encoding */ typedef char TCHAR; #define _T(x) u8 ## x #define _TEXT(x) u8 ## x #elif FF_USE_LFN && FF_LFN_UNICODE == 3 /* Unicode in UTF-32 encoding */ typedef DWORD TCHAR; #define _T(x) U ## x #define _TEXT(x) U ## x #elif FF_USE_LFN && (FF_LFN_UNICODE < 0 || FF_LFN_UNICODE > 3) #error Wrong FF_LFN_UNICODE setting #else /* ANSI/OEM code in SBCS/DBCS */ typedef char TCHAR; #define _T(x) x #define _TEXT(x) x #endif #endif /* Type of file size variables */ #if FF_FS_EXFAT typedef QWORD FSIZE_t; #else typedef DWORD FSIZE_t; #endif /* Filesystem object structure (FATFS) */ typedef struct { BYTE win[FF_MAX_SS]; /* Disk access window for Directory, FAT (and file data at tiny cfg) */ BYTE fs_type; /* Filesystem type (0:not mounted) */ BYTE pdrv; /* Associated physical drive */ BYTE n_fats; /* Number of FATs (1 or 2) */ BYTE wflag; /* win[] flag (b0:dirty) */ BYTE fsi_flag; /* FSINFO flags (b7:disabled, b0:dirty) */ WORD id; /* Volume mount ID */ WORD n_rootdir; /* Number of root directory entries (FAT12/16) */ WORD csize; /* Cluster size [sectors] */ #if FF_MAX_SS != FF_MIN_SS WORD ssize; /* Sector size (512, 1024, 2048 or 4096) */ #endif #if FF_USE_LFN WCHAR* lfnbuf; /* LFN working buffer */ #endif #if FF_FS_EXFAT BYTE* dirbuf; /* Directory entry block scratchpad buffer for exFAT */ #endif #if FF_FS_REENTRANT FF_SYNC_t sobj; /* Identifier of sync object */ #endif #if !FF_FS_READONLY DWORD last_clst; /* Last allocated cluster */ DWORD free_clst; /* Number of free clusters */ #endif #if FF_FS_RPATH DWORD cdir; /* Current directory start cluster (0:root) */ #if FF_FS_EXFAT DWORD cdc_scl; /* Containing directory start cluster (invalid when cdir is 0) */ DWORD cdc_size; /* b31-b8:Size of containing directory, b7-b0: Chain status */ DWORD cdc_ofs; /* Offset in the containing directory (invalid when cdir is 0) */ #endif #endif DWORD n_fatent; /* Number of FAT entries (number of clusters + 2) */ DWORD fsize; /* Size of an FAT [sectors] */ DWORD volbase; /* Volume base sector */ DWORD fatbase; /* FAT base sector */ DWORD dirbase; /* Root directory base sector/cluster */ DWORD database; /* Data base sector */ #if FF_FS_EXFAT DWORD bitbase; /* Allocation bitmap base sector */ #endif DWORD winsect; /* Current sector appearing in the win[] */ } FATFS; /* Object ID and allocation information (FFOBJID) */ typedef struct { FATFS* fs; /* Pointer to the hosting volume of this object */ WORD id; /* Hosting volume mount ID */ BYTE attr; /* Object attribute */ BYTE stat; /* Object chain status (b1-0: =0:not contiguous, =2:contiguous, =3:fragmented in this session, b2:sub-directory stretched) */ DWORD sclust; /* Object data start cluster (0:no cluster or root directory) */ FSIZE_t objsize; /* Object size (valid when sclust != 0) */ #if FF_FS_EXFAT DWORD n_cont; /* Size of first fragment - 1 (valid when stat == 3) */ DWORD n_frag; /* Size of last fragment needs to be written to FAT (valid when not zero) */ DWORD c_scl; /* Containing directory start cluster (valid when sclust != 0) */ DWORD c_size; /* b31-b8:Size of containing directory, b7-b0: Chain status (valid when c_scl != 0) */ DWORD c_ofs; /* Offset in the containing directory (valid when file object and sclust != 0) */ #endif #if FF_FS_LOCK UINT lockid; /* File lock ID origin from 1 (index of file semaphore table Files[]) */ #endif } FFOBJID; /* File object structure (FIL) */ typedef struct { #if !FF_FS_TINY BYTE buf[FF_MAX_SS]; /* File private data read/write window */ #endif FFOBJID obj; /* Object identifier (must be the 1st member to detect invalid object pointer) */ BYTE flag; /* File status flags */ BYTE err; /* Abort flag (error code) */ FSIZE_t fptr; /* File read/write pointer (Zeroed on file open) */ DWORD clust; /* Current cluster of fpter (invalid when fptr is 0) */ DWORD sect; /* Sector number appearing in buf[] (0:invalid) */ #if !FF_FS_READONLY DWORD dir_sect; /* Sector number containing the directory entry (not used at exFAT) */ BYTE* dir_ptr; /* Pointer to the directory entry in the win[] (not used at exFAT) */ #endif #if FF_USE_FASTSEEK DWORD* cltbl; /* Pointer to the cluster link map table (nulled on open, set by application) */ #endif } FIL; /* Directory object structure (DIR) */ typedef struct { FFOBJID obj; /* Object identifier */ DWORD dptr; /* Current read/write offset */ DWORD clust; /* Current cluster */ DWORD sect; /* Current sector (0:Read operation has terminated) */ BYTE* dir; /* Pointer to the directory item in the win[] */ BYTE fn[12]; /* SFN (in/out) {body[8],ext[3],status[1]} */ #if FF_USE_LFN DWORD blk_ofs; /* Offset of current entry block being processed (0xFFFFFFFF:Invalid) */ #endif #if FF_USE_FIND const TCHAR* pat; /* Pointer to the name matching pattern */ #endif } DIR; /* File information structure (FILINFO) */ typedef struct { FSIZE_t fsize; /* File size */ WORD fdate; /* Modified date */ WORD ftime; /* Modified time */ BYTE fattrib; /* File attribute */ #if FF_USE_LFN TCHAR altname[FF_SFN_BUF + 1];/* Altenative file name */ TCHAR fname[FF_LFN_BUF + 1]; /* Primary file name */ #else TCHAR fname[12 + 1]; /* File name */ #endif } FILINFO; /* File function return code (FRESULT) */ typedef enum { FR_OK = 0, /* (0) Succeeded */ FR_DISK_ERR, /* (1) A hard error occurred in the low level disk I/O layer */ FR_INT_ERR, /* (2) Assertion failed */ FR_NOT_READY, /* (3) The physical drive cannot work */ FR_NO_FILE, /* (4) Could not find the file */ FR_NO_PATH, /* (5) Could not find the path */ FR_INVALID_NAME, /* (6) The path name format is invalid */ FR_DENIED, /* (7) Access denied due to prohibited access or directory full */ FR_EXIST, /* (8) Access denied due to prohibited access */ FR_INVALID_OBJECT, /* (9) The file/directory object is invalid */ FR_WRITE_PROTECTED, /* (10) The physical drive is write protected */ FR_INVALID_DRIVE, /* (11) The logical drive number is invalid */ FR_NOT_ENABLED, /* (12) The volume has no work area */ FR_NO_FILESYSTEM, /* (13) There is no valid FAT volume */ FR_MKFS_ABORTED, /* (14) The f_mkfs() aborted due to any problem */ FR_TIMEOUT, /* (15) Could not get a grant to access the volume within defined period */ FR_LOCKED, /* (16) The operation is rejected according to the file sharing policy */ FR_NOT_ENOUGH_CORE, /* (17) LFN working buffer could not be allocated */ FR_TOO_MANY_OPEN_FILES, /* (18) Number of open files > FF_FS_LOCK */ #ifdef FF_FASTFS FR_INVALID_PARAMETER, /* (19) Given parameter is invalid */ FR_CLTBL_NO_INIT /* (20) The cluster table for fast seek/read/write was not created */ #else FR_INVALID_PARAMETER /* (19) Given parameter is invalid */ #endif } FRESULT; /*--------------------------------------------------------------*/ /* FatFs module application interface */ FRESULT f_open (FIL* fp, const TCHAR* path, BYTE mode); /* Open or create a file */ FRESULT f_close (FIL* fp); /* Close an open file object */ FRESULT f_read (FIL* fp, void* buff, UINT btr, UINT* br); /* Read data from the file */ FRESULT f_write (FIL* fp, const void* buff, UINT btw, UINT* bw); /* Write data to the file */ #ifdef FF_FASTFS FRESULT f_read_fast (FIL* fp, const void* buff, UINT btr); /* Fast read data from the file */ FRESULT f_write_fast (FIL* fp, const void* buff, UINT btw); /* Fast write data to the file */ #endif FRESULT f_lseek (FIL* fp, FSIZE_t ofs); /* Move file pointer of the file object */ FRESULT f_truncate (FIL* fp); /* Truncate the file */ FRESULT f_sync (FIL* fp); /* Flush cached data of the writing file */ FRESULT f_opendir (DIR* dp, const TCHAR* path); /* Open a directory */ FRESULT f_closedir (DIR* dp); /* Close an open directory */ FRESULT f_readdir (DIR* dp, FILINFO* fno); /* Read a directory item */ FRESULT f_findfirst (DIR* dp, FILINFO* fno, const TCHAR* path, const TCHAR* pattern); /* Find first file */ FRESULT f_findnext (DIR* dp, FILINFO* fno); /* Find next file */ FRESULT f_mkdir (const TCHAR* path); /* Create a sub directory */ FRESULT f_unlink (const TCHAR* path); /* Delete an existing file or directory */ FRESULT f_rename (const TCHAR* path_old, const TCHAR* path_new); /* Rename/Move a file or directory */ FRESULT f_stat (const TCHAR* path, FILINFO* fno); /* Get file status */ FRESULT f_chmod (const TCHAR* path, BYTE attr, BYTE mask); /* Change attribute of a file/dir */ FRESULT f_utime (const TCHAR* path, const FILINFO* fno); /* Change timestamp of a file/dir */ FRESULT f_chdir (const TCHAR* path); /* Change current directory */ FRESULT f_chdrive (const TCHAR* path); /* Change current drive */ FRESULT f_getcwd (TCHAR* buff, UINT len); /* Get current directory */ FRESULT f_getfree (const TCHAR* path, DWORD* nclst, FATFS** fatfs); /* Get number of free clusters on the drive */ FRESULT f_getlabel (const TCHAR* path, TCHAR* label, DWORD* vsn); /* Get volume label */ FRESULT f_setlabel (const TCHAR* label); /* Set volume label */ FRESULT f_forward (FIL* fp, UINT(*func)(const BYTE*,UINT), UINT btf, UINT* bf); /* Forward data to the stream */ #ifdef FF_FASTFS DWORD *f_expand_cltbl (FIL* fp, UINT tblsz, DWORD *tbl, FSIZE_t ofs); /* Expand file and populate cluster table */ #endif FRESULT f_expand (FIL* fp, FSIZE_t fsz, BYTE opt); /* Allocate a contiguous block to the file */ FRESULT f_mount (FATFS* fs, const TCHAR* path, BYTE opt); /* Mount/Unmount a logical drive */ FRESULT f_mkfs (const TCHAR* path, BYTE opt, DWORD au, void* work, UINT len); /* Create a FAT volume */ FRESULT f_fdisk (BYTE pdrv, const DWORD* szt, void* work); /* Divide a physical drive into some partitions */ FRESULT f_setcp (WORD cp); /* Set current code page */ int f_putc (TCHAR c, FIL* fp); /* Put a character to the file */ int f_puts (const TCHAR* str, FIL* cp); /* Put a string to the file */ int f_printf (FIL* fp, const TCHAR* str, ...); /* Put a formatted string to the file */ TCHAR* f_gets (TCHAR* buff, int len, FIL* fp); /* Get a string from the file */ #define f_eof(fp) ((int)((fp)->fptr == (fp)->obj.objsize)) #define f_error(fp) ((fp)->err) #define f_tell(fp) ((fp)->fptr) #define f_size(fp) ((fp)->obj.objsize) #define f_rewind(fp) f_lseek((fp), 0) #define f_rewinddir(dp) f_readdir((dp), 0) #define f_rmdir(path) f_unlink(path) #define f_unmount(path) f_mount(0, path, 0) #ifndef EOF #define EOF (-1) #endif /*--------------------------------------------------------------*/ /* Additional user defined functions */ /* RTC function */ #if !FF_FS_READONLY && !FF_FS_NORTC DWORD get_fattime (void); #endif /* LFN support functions */ #if FF_USE_LFN >= 1 /* Code conversion (defined in unicode.c) */ WCHAR ff_oem2uni (WCHAR oem, WORD cp); /* OEM code to Unicode conversion */ WCHAR ff_uni2oem (DWORD uni, WORD cp); /* Unicode to OEM code conversion */ DWORD ff_wtoupper (DWORD uni); /* Unicode upper-case conversion */ #endif #if FF_USE_LFN == 3 /* Dynamic memory allocation */ void* ff_memalloc (UINT msize); /* Allocate memory block */ void ff_memfree (void* mblock); /* Free memory block */ #endif /* Sync functions */ #if FF_FS_REENTRANT int ff_cre_syncobj (BYTE vol, FF_SYNC_t* sobj); /* Create a sync object */ int ff_req_grant (FF_SYNC_t sobj); /* Lock sync object */ void ff_rel_grant (FF_SYNC_t sobj); /* Unlock sync object */ int ff_del_syncobj (FF_SYNC_t sobj); /* Delete a sync object */ #endif /*--------------------------------------------------------------*/ /* Flags and offset address */ /* File access mode and open method flags (3rd argument of f_open) */ #define FA_READ 0x01 #define FA_WRITE 0x02 #define FA_OPEN_EXISTING 0x00 #define FA_CREATE_NEW 0x04 #define FA_CREATE_ALWAYS 0x08 #define FA_OPEN_ALWAYS 0x10 #define FA_OPEN_APPEND 0x30 /* Fast seek controls (2nd argument of f_lseek) */ #define CREATE_LINKMAP ((FSIZE_t)0 - 1) /* Format options (2nd argument of f_mkfs) */ #define FM_FAT 0x01 #define FM_FAT32 0x02 #define FM_EXFAT 0x04 #define FM_ANY 0x07 #define FM_SFD 0x08 /* Filesystem type (FATFS.fs_type) */ #define FS_FAT12 1 #define FS_FAT16 2 #define FS_FAT32 3 #define FS_EXFAT 4 /* File attribute bits for directory entry (FILINFO.fattrib) */ #define AM_RDO 0x01 /* Read only */ #define AM_HID 0x02 /* Hidden */ #define AM_SYS 0x04 /* System */ #define AM_DIR 0x10 /* Directory */ #define AM_ARC 0x20 /* Archive */ #ifdef __cplusplus } #endif #endif /* FF_DEFINED */
14,717
C++
.h
320
44.49375
139
0.661664
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
9,239
ffconf.h
Atmosphere-NX_Atmosphere/emummc/source/libs/fatfs/ffconf.h
/*---------------------------------------------------------------------------/ / FatFs Functional Configurations /---------------------------------------------------------------------------*/ #define FFCONF_DEF 86604 /* Revision ID */ /*---------------------------------------------------------------------------/ / Function Configurations /---------------------------------------------------------------------------*/ #define FF_FS_READONLY 0 /* This option switches read-only configuration. (0:Read/Write or 1:Read-only) / Read-only configuration removes writing API functions, f_write(), f_sync(), / f_unlink(), f_mkdir(), f_chmod(), f_rename(), f_truncate(), f_getfree() / and optional writing functions as well. */ #define FF_FS_MINIMIZE 2 /* This option defines minimization level to remove some basic API functions. / / 0: Basic functions are fully enabled. / 1: f_stat(), f_getfree(), f_unlink(), f_mkdir(), f_truncate() and f_rename() / are removed. / 2: f_opendir(), f_readdir() and f_closedir() are removed in addition to 1. / 3: f_lseek() function is removed in addition to 2. */ #define FF_USE_STRFUNC 2 /* This option switches string functions, f_gets(), f_putc(), f_puts() and f_printf(). / / 0: Disable string functions. / 1: Enable without LF-CRLF conversion. / 2: Enable with LF-CRLF conversion. */ #define FF_USE_FIND 0 /* This option switches filtered directory read functions, f_findfirst() and / f_findnext(). (0:Disable, 1:Enable 2:Enable with matching altname[] too) */ #define FF_USE_MKFS 0 /* This option switches f_mkfs() function. (0:Disable or 1:Enable) */ #define FF_FASTFS 1 #ifdef FF_FASTFS #define FF_USE_FASTSEEK 1 #else #define FF_USE_FASTSEEK 0 #endif /* This option switches fast seek function. (0:Disable or 1:Enable) */ #define FF_USE_EXPAND 0 /* This option switches f_expand function. (0:Disable or 1:Enable) */ #define FF_USE_CHMOD 0 /* This option switches attribute manipulation functions, f_chmod() and f_utime(). / (0:Disable or 1:Enable) Also FF_FS_READONLY needs to be 0 to enable this option. */ #define FF_USE_LABEL 0 /* This option switches volume label functions, f_getlabel() and f_setlabel(). / (0:Disable or 1:Enable) */ #define FF_USE_FORWARD 0 /* This option switches f_forward() function. (0:Disable or 1:Enable) */ /*---------------------------------------------------------------------------/ / Locale and Namespace Configurations /---------------------------------------------------------------------------*/ #define FF_CODE_PAGE 850 /* This option specifies the OEM code page to be used on the target system. / Incorrect code page setting can cause a file open failure. / / 437 - U.S. / 720 - Arabic / 737 - Greek / 771 - KBL / 775 - Baltic / 850 - Latin 1 / 852 - Latin 2 / 855 - Cyrillic / 857 - Turkish / 860 - Portuguese / 861 - Icelandic / 862 - Hebrew / 863 - Canadian French / 864 - Arabic / 865 - Nordic / 866 - Russian / 869 - Greek 2 / 932 - Japanese (DBCS) / 936 - Simplified Chinese (DBCS) / 949 - Korean (DBCS) / 950 - Traditional Chinese (DBCS) / 0 - Include all code pages above and configured by f_setcp() */ #define FF_USE_LFN 3 #define FF_MAX_LFN 255 /* The FF_USE_LFN switches the support for LFN (long file name). / / 0: Disable LFN. FF_MAX_LFN has no effect. / 1: Enable LFN with static working buffer on the BSS. Always NOT thread-safe. / 2: Enable LFN with dynamic working buffer on the STACK. / 3: Enable LFN with dynamic working buffer on the HEAP. / / To enable the LFN, ffunicode.c needs to be added to the project. The LFN function / requiers certain internal working buffer occupies (FF_MAX_LFN + 1) * 2 bytes and / additional (FF_MAX_LFN + 44) / 15 * 32 bytes when exFAT is enabled. / The FF_MAX_LFN defines size of the working buffer in UTF-16 code unit and it can / be in range of 12 to 255. It is recommended to be set 255 to fully support LFN / specification. / When use stack for the working buffer, take care on stack overflow. When use heap / memory for the working buffer, memory management functions, ff_memalloc() and / ff_memfree() in ffsystem.c, need to be added to the project. */ #define FF_LFN_UNICODE 0 /* This option switches the character encoding on the API when LFN is enabled. / / 0: ANSI/OEM in current CP (TCHAR = char) / 1: Unicode in UTF-16 (TCHAR = WCHAR) / 2: Unicode in UTF-8 (TCHAR = char) / 3: Unicode in UTF-32 (TCHAR = DWORD) / / Also behavior of string I/O functions will be affected by this option. / When LFN is not enabled, this option has no effect. */ #define FF_LFN_BUF 255 #define FF_SFN_BUF 12 /* This set of options defines size of file name members in the FILINFO structure / which is used to read out directory items. These values should be suffcient for / the file names to read. The maximum possible length of the read file name depends / on character encoding. When LFN is not enabled, these options have no effect. */ #define FF_STRF_ENCODE 0 /* When FF_LFN_UNICODE >= 1 with LFN enabled, string I/O functions, f_gets(), / f_putc(), f_puts and f_printf() convert the character encoding in it. / This option selects assumption of character encoding ON THE FILE to be / read/written via those functions. / / 0: ANSI/OEM in current CP / 1: Unicode in UTF-16LE / 2: Unicode in UTF-16BE / 3: Unicode in UTF-8 */ #define FF_FS_RPATH 0 /* This option configures support for relative path. / / 0: Disable relative path and remove related functions. / 1: Enable relative path. f_chdir() and f_chdrive() are available. / 2: f_getcwd() function is available in addition to 1. */ /*---------------------------------------------------------------------------/ / Drive/Volume Configurations /---------------------------------------------------------------------------*/ #define FF_VOLUMES 1 /* Number of volumes (logical drives) to be used. (1-10) */ #define FF_STR_VOLUME_ID 0 #define FF_VOLUME_STRS "sd" /* FF_STR_VOLUME_ID switches support for volume ID in arbitrary strings. / When FF_STR_VOLUME_ID is set to 1 or 2, arbitrary strings can be used as drive / number in the path name. FF_VOLUME_STRS defines the volume ID strings for each / logical drives. Number of items must not be less than FF_VOLUMES. Valid / characters for the volume ID strings are A-Z, a-z and 0-9, however, they are / compared in case-insensitive. If FF_STR_VOLUME_ID >= 1 and FF_VOLUME_STRS is / not defined, a user defined volume string table needs to be defined as: / / const char* VolumeStr[FF_VOLUMES] = {"ram","flash","sd","usb",... */ #define FF_MULTI_PARTITION 0 /* This option switches support for multiple volumes on the physical drive. / By default (0), each logical drive number is bound to the same physical drive / number and only an FAT volume found on the physical drive will be mounted. / When this function is enabled (1), each logical drive number can be bound to / arbitrary physical drive and partition listed in the VolToPart[]. Also f_fdisk() / funciton will be available. */ #define FF_MIN_SS 512 #define FF_MAX_SS 512 /* This set of options configures the range of sector size to be supported. (512, / 1024, 2048 or 4096) Always set both 512 for most systems, generic memory card and / harddisk. But a larger value may be required for on-board flash memory and some / type of optical media. When FF_MAX_SS is larger than FF_MIN_SS, FatFs is configured / for variable sector size mode and disk_ioctl() function needs to implement / GET_SECTOR_SIZE command. */ #define FF_USE_TRIM 0 /* This option switches support for ATA-TRIM. (0:Disable or 1:Enable) / To enable Trim function, also CTRL_TRIM command should be implemented to the / disk_ioctl() function. */ #define FF_FS_NOFSINFO 0 /* If you need to know correct free space on the FAT32 volume, set bit 0 of this / option, and f_getfree() function at first time after volume mount will force / a full FAT scan. Bit 1 controls the use of last allocated cluster number. / / bit0=0: Use free cluster count in the FSINFO if available. / bit0=1: Do not trust free cluster count in the FSINFO. / bit1=0: Use last allocated cluster number in the FSINFO if available. / bit1=1: Do not trust last allocated cluster number in the FSINFO. */ /*---------------------------------------------------------------------------/ / System Configurations /---------------------------------------------------------------------------*/ #define FF_FS_TINY 0 /* This option switches tiny buffer configuration. (0:Normal or 1:Tiny) / At the tiny configuration, size of file object (FIL) is shrinked FF_MAX_SS bytes. / Instead of private sector buffer eliminated from the file object, common sector / buffer in the filesystem object (FATFS) is used for the file data transfer. */ #define FF_FS_EXFAT 1 /* This option switches support for exFAT filesystem. (0:Disable or 1:Enable) / To enable exFAT, also LFN needs to be enabled. (FF_USE_LFN >= 1) / Note that enabling exFAT discards ANSI C (C89) compatibility. */ #define FF_FS_NORTC 1 #define FF_NORTC_MON 1 #define FF_NORTC_MDAY 1 #define FF_NORTC_YEAR 2020 /* The option FF_FS_NORTC switches timestamp function. If the system does not have / any RTC function or valid timestamp is not needed, set FF_FS_NORTC = 1 to disable / the timestamp function. Every object modified by FatFs will have a fixed timestamp / defined by FF_NORTC_MON, FF_NORTC_MDAY and FF_NORTC_YEAR in local time. / To enable timestamp function (FF_FS_NORTC = 0), get_fattime() function need to be / added to the project to read current time form real-time clock. FF_NORTC_MON, / FF_NORTC_MDAY and FF_NORTC_YEAR have no effect. / These options have no effect at read-only configuration (FF_FS_READONLY = 1). */ #define FF_FS_LOCK 0 /* The option FF_FS_LOCK switches file lock function to control duplicated file open / and illegal operation to open objects. This option must be 0 when FF_FS_READONLY / is 1. / / 0: Disable file lock function. To avoid volume corruption, application program / should avoid illegal open, remove and rename to the open objects. / >0: Enable file lock function. The value defines how many files/sub-directories / can be opened simultaneously under file lock control. Note that the file / lock control is independent of re-entrancy. */ #define FF_FS_REENTRANT 0 #define FF_FS_TIMEOUT 1000 #define FF_SYNC_t HANDLE /* The option FF_FS_REENTRANT switches the re-entrancy (thread safe) of the FatFs / module itself. Note that regardless of this option, file access to different / volume is always re-entrant and volume control functions, f_mount(), f_mkfs() / and f_fdisk() function, are always not re-entrant. Only file/directory access / to the same volume is under control of this function. / / 0: Disable re-entrancy. FF_FS_TIMEOUT and FF_SYNC_t have no effect. / 1: Enable re-entrancy. Also user provided synchronization handlers, / ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj() / function, must be added to the project. Samples are available in / option/syscall.c. / / The FF_FS_TIMEOUT defines timeout period in unit of time tick. / The FF_SYNC_t defines O/S dependent sync object type. e.g. HANDLE, ID, OS_EVENT*, / SemaphoreHandle_t and etc. A header file for O/S definitions needs to be / included somewhere in the scope of ff.h. */ /*--- End of configuration options ---*/
11,489
C++
.h
230
48.682609
86
0.684916
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
true
false
9,240
clock.h
Atmosphere-NX_Atmosphere/emummc/source/soc/clock.h
/* * Copyright (c) 2018 naehrwert * Copyright (c) 2018-2020 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _CLOCK_H_ #define _CLOCK_H_ #include "../utils/types.h" /*! Clock registers. */ #define CLK_RST_CONTROLLER_RST_SOURCE 0x0 #define CLK_RST_CONTROLLER_RST_DEVICES_L 0x4 #define CLK_RST_CONTROLLER_RST_DEVICES_H 0x8 #define CLK_RST_CONTROLLER_RST_DEVICES_U 0xC #define CLK_RST_CONTROLLER_CLK_OUT_ENB_L 0x10 #define CLK_RST_CONTROLLER_CLK_OUT_ENB_H 0x14 #define CLK_RST_CONTROLLER_CLK_OUT_ENB_U 0x18 #define CLK_RST_CONTROLLER_CCLK_BURST_POLICY 0x20 #define CLK_RST_CONTROLLER_SUPER_CCLK_DIVIDER 0x24 #define CLK_RST_CONTROLLER_SCLK_BURST_POLICY 0x28 #define CLK_RST_CONTROLLER_SUPER_SCLK_DIVIDER 0x2C #define CLK_RST_CONTROLLER_CLK_SYSTEM_RATE 0x30 #define CLK_RST_CONTROLLER_MISC_CLK_ENB 0x48 #define CLK_RST_CONTROLLER_OSC_CTRL 0x50 #define CLK_RST_CONTROLLER_PLLC_BASE 0x80 #define CLK_RST_CONTROLLER_PLLC_OUT 0x84 #define CLK_RST_CONTROLLER_PLLC_MISC 0x88 #define CLK_RST_CONTROLLER_PLLC_MISC_1 0x8C #define CLK_RST_CONTROLLER_PLLM_BASE 0x90 #define CLK_RST_CONTROLLER_PLLM_MISC1 0x98 #define CLK_RST_CONTROLLER_PLLM_MISC2 0x9C #define CLK_RST_CONTROLLER_PLLP_BASE 0xA0 #define CLK_RST_CONTROLLER_PLLD_BASE 0xD0 #define CLK_RST_CONTROLLER_PLLD_MISC1 0xD8 #define CLK_RST_CONTROLLER_PLLD_MISC 0xDC #define CLK_RST_CONTROLLER_PLLX_BASE 0xE0 #define CLK_RST_CONTROLLER_PLLX_MISC 0xE4 #define CLK_RST_CONTROLLER_PLLE_BASE 0xE8 #define CLK_RST_CONTROLLER_PLLE_MISC 0xEC #define CLK_RST_CONTROLLER_LVL2_CLK_GATE_OVRA 0xF8 #define CLK_RST_CONTROLLER_LVL2_CLK_GATE_OVRB 0xFC #define CLK_RST_CONTROLLER_CLK_SOURCE_PWM 0x110 #define CLK_RST_CONTROLLER_CLK_SOURCE_I2C1 0x124 #define CLK_RST_CONTROLLER_CLK_SOURCE_I2C5 0x128 #define CLK_RST_CONTROLLER_CLK_SOURCE_DISP1 0x138 #define CLK_RST_CONTROLLER_CLK_SOURCE_VI 0x148 #define CLK_RST_CONTROLLER_CLK_SOURCE_SDMMC1 0x150 #define CLK_RST_CONTROLLER_CLK_SOURCE_SDMMC2 0x154 #define CLK_RST_CONTROLLER_CLK_SOURCE_SDMMC4 0x164 #define CLK_RST_CONTROLLER_CLK_SOURCE_UARTA 0x178 #define CLK_RST_CONTROLLER_CLK_SOURCE_UARTB 0x17C #define CLK_RST_CONTROLLER_CLK_SOURCE_HOST1X 0x180 #define CLK_RST_CONTROLLER_CLK_SOURCE_I2C2 0x198 #define CLK_RST_CONTROLLER_CLK_SOURCE_EMC 0x19C #define CLK_RST_CONTROLLER_CLK_SOURCE_UARTC 0x1A0 #define CLK_RST_CONTROLLER_CLK_SOURCE_I2C3 0x1B8 #define CLK_RST_CONTROLLER_CLK_SOURCE_SDMMC3 0x1BC #define CLK_RST_CONTROLLER_CLK_SOURCE_UARTD 0x1C0 #define CLK_RST_CONTROLLER_CLK_SOURCE_CSITE 0x1D4 #define CLK_RST_CONTROLLER_CLK_SOURCE_TSEC 0x1F4 #define CLK_RST_CONTROLLER_CLK_OUT_ENB_X 0x280 #define CLK_RST_CONTROLLER_CLK_ENB_X_SET 0x284 #define CLK_RST_CONTROLLER_CLK_ENB_X_CLR 0x288 #define CLK_RST_CONTROLLER_RST_DEVICES_X 0x28C #define CLK_RST_CONTROLLER_RST_DEV_X_SET 0x290 #define CLK_RST_CONTROLLER_RST_DEV_X_CLR 0x294 #define CLK_RST_CONTROLLER_CLK_OUT_ENB_Y 0x298 #define CLK_RST_CONTROLLER_CLK_ENB_Y_SET 0x29C #define CLK_RST_CONTROLLER_CLK_ENB_Y_CLR 0x2A0 #define CLK_RST_CONTROLLER_RST_DEVICES_Y 0x2A4 #define CLK_RST_CONTROLLER_RST_DEV_Y_SET 0x2A8 #define CLK_RST_CONTROLLER_RST_DEV_Y_CLR 0x2AC #define CLK_RST_CONTROLLER_RST_DEV_L_SET 0x300 #define CLK_RST_CONTROLLER_RST_DEV_L_CLR 0x304 #define CLK_RST_CONTROLLER_RST_DEV_H_SET 0x308 #define CLK_RST_CONTROLLER_RST_DEV_H_CLR 0x30C #define CLK_RST_CONTROLLER_RST_DEV_U_SET 0x310 #define CLK_RST_CONTROLLER_RST_DEV_U_CLR 0x314 #define CLK_RST_CONTROLLER_CLK_ENB_L_SET 0x320 #define CLK_RST_CONTROLLER_CLK_ENB_L_CLR 0x324 #define CLK_RST_CONTROLLER_CLK_ENB_H_SET 0x328 #define CLK_RST_CONTROLLER_CLK_ENB_H_CLR 0x32C #define CLK_RST_CONTROLLER_CLK_ENB_U_SET 0x330 #define CLK_RST_CONTROLLER_CLK_ENB_U_CLR 0x334 #define CLK_RST_CONTROLLER_RST_DEVICES_V 0x358 #define CLK_RST_CONTROLLER_RST_DEVICES_W 0x35C #define CLK_RST_CONTROLLER_CLK_OUT_ENB_V 0x360 #define CLK_RST_CONTROLLER_CLK_OUT_ENB_W 0x364 #define CLK_RST_CONTROLLER_CPU_SOFTRST_CTRL2 0x388 #define CLK_RST_CONTROLLER_LVL2_CLK_GATE_OVRC 0x3A0 #define CLK_RST_CONTROLLER_LVL2_CLK_GATE_OVRD 0x3A4 #define CLK_RST_CONTROLLER_CLK_SOURCE_MSELECT 0x3B4 #define CLK_RST_CONTROLLER_CLK_SOURCE_I2C4 0x3C4 #define CLK_RST_CONTROLLER_CLK_SOURCE_SYS 0x400 #define CLK_RST_CONTROLLER_CLK_SOURCE_SOR1 0x410 #define CLK_RST_CONTROLLER_CLK_SOURCE_SE 0x42C #define CLK_RST_CONTROLLER_RST_DEV_V_CLR 0x434 #define CLK_RST_CONTROLLER_CLK_ENB_V_SET 0x440 #define CLK_RST_CONTROLLER_CLK_ENB_V_CLR 0x444 #define CLK_RST_CONTROLLER_CLK_ENB_W_SET 0x448 #define CLK_RST_CONTROLLER_CLK_ENB_W_CLR 0x44C #define CLK_RST_CONTROLLER_RST_CPUG_CMPLX_SET 0x450 #define CLK_RST_CONTROLLER_RST_CPUG_CMPLX_CLR 0x454 #define CLK_RST_CONTROLLER_UTMIP_PLL_CFG2 0x488 #define CLK_RST_CONTROLLER_PLLE_AUX 0x48C #define CLK_RST_CONTROLLER_AUDIO_SYNC_CLK_I2S0 0x4A0 #define CLK_RST_CONTROLLER_PLLX_MISC_3 0x518 #define CLK_RST_CONTROLLER_LVL2_CLK_GATE_OVRE 0x554 #define CLK_RST_CONTROLLER_SPARE_REG0 0x55C #define CLK_RST_CONTROLLER_PLLC4_BASE 0x5A4 #define CLK_RST_CONTROLLER_PLLC4_MISC 0x5A8 #define CLK_RST_CONTROLLER_PLLC_MISC_2 0x5D0 #define CLK_RST_CONTROLLER_PLLC4_OUT 0x5E4 #define CLK_RST_CONTROLLER_PLLMB_BASE 0x5E8 #define CLK_RST_CONTROLLER_CLK_SOURCE_DSIA_LP 0x620 #define CLK_RST_CONTROLLER_CLK_SOURCE_I2C6 0x65C #define CLK_RST_CONTROLLER_CLK_SOURCE_EMC_DLL 0x664 #define CLK_RST_CONTROLLER_CLK_SOURCE_UART_FST_MIPI_CAL 0x66C #define CLK_RST_CONTROLLER_CLK_SOURCE_SDMMC_LEGACY_TM 0x694 #define CLK_RST_CONTROLLER_CLK_SOURCE_NVENC 0x6A0 #define CLK_RST_CONTROLLER_SE_SUPER_CLK_DIVIDER 0x704 #define CLK_RST_CONTROLLER_CLK_SOURCE_UARTAPE 0x710 #define CLK_NO_SOURCE 0x0 /*! PLL control and status bits */ #define PLLCX_BASE_ENABLE (1 << 30) #define PLLCX_BASE_REF_DIS (1 << 29) #define PLLCX_BASE_LOCK (1 << 27) #define PLLC4_MISC_EN_LCKDET (1 << 30) #define PLLC4_BASE_IDDQ (1 << 18) #define PLLC4_OUT3_CLKEN (1 << 1) #define PLLC4_OUT3_RSTN_CLR (1 << 0) /*! Generic clock descriptor. */ typedef struct _sclock_t { u32 reset; u32 enable; u32 source; u8 index; u8 clk_src; u8 clk_div; } sclock_t; /*! Generic clock enable/disable. */ void clock_enable(const sclock_t *clk); void clock_disable(const sclock_t *clk); /*! Clock control for specific hardware portions. */ void clock_enable_i2c5(); void clock_disable_i2c5(); void clock_sdmmc_config_clock_source(u32 *pclock, u32 id, u32 val); void clock_sdmmc_get_card_clock_div(u32 *pclock, u16 *pdivisor, u32 type); int clock_sdmmc_is_not_reset_and_enabled(u32 id); void clock_sdmmc_enable(u32 id, u32 val); void clock_sdmmc_disable(u32 id); #endif
7,067
C++
.h
163
42.165644
76
0.799681
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,241
pmc_lp0_t210.h
Atmosphere-NX_Atmosphere/emummc/source/soc/pmc_lp0_t210.h
/* * Copyright (c) 2010-2015, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. */ #ifndef _TEGRA210_PMC_H_ #define _TEGRA210_PMC_H_ #include "../utils/types.h" struct tegra_pmc_regs { u32 cntrl; u32 sec_disable; u32 pmc_swrst; u32 wake_mask; u32 wake_lvl; u32 wake_status; u32 sw_wake_status; u32 dpd_pads_oride; u32 dpd_sample; u32 dpd_enable; u32 pwrgate_timer_off; u32 clamp_status; u32 pwrgate_toggle; u32 remove_clamping_cmd; u32 pwrgate_status; u32 pwrgood_timer; u32 blink_timer; u32 no_iopower; u32 pwr_det; u32 pwr_det_latch; u32 scratch0; u32 scratch1; u32 scratch2; u32 scratch3; u32 scratch4; u32 scratch5; u32 scratch6; u32 scratch7; u32 scratch8; u32 scratch9; u32 scratch10; u32 scratch11; u32 scratch12; u32 scratch13; u32 scratch14; u32 scratch15; u32 scratch16; u32 scratch17; u32 scratch18; u32 scratch19; u32 odmdata; u32 scratch21; u32 scratch22; u32 scratch23; u32 secure_scratch0; u32 secure_scratch1; u32 secure_scratch2; u32 secure_scratch3; u32 secure_scratch4; u32 secure_scratch5; u32 cpupwrgood_timer; u32 cpupwroff_timer; u32 pg_mask; u32 pg_mask_1; u32 auto_wake_lvl; u32 auto_wake_lvl_mask; u32 wake_delay; u32 pwr_det_val; u32 ddr_pwr; u32 usb_debounce_del; u32 usb_a0; u32 crypto_op; u32 pllp_wb0_override; u32 scratch24; u32 scratch25; u32 scratch26; u32 scratch27; u32 scratch28; u32 scratch29; u32 scratch30; u32 scratch31; u32 scratch32; u32 scratch33; u32 scratch34; u32 scratch35; u32 scratch36; u32 scratch37; u32 scratch38; u32 scratch39; u32 scratch40; u32 scratch41; u32 scratch42; u32 bondout_mirror[3]; u32 sys_33v_en; u32 bondout_mirror_access; u32 gate; u32 wake2_mask; u32 wake2_lvl; u32 wake2_status; u32 sw_wake2_status; u32 auto_wake2_lvl_mask; u32 pg_mask_2; u32 pg_mask_ce1; u32 pg_mask_ce2; u32 pg_mask_ce3; u32 pwrgate_timer_ce[7]; u32 pcx_edpd_cntrl; u32 osc_edpd_over; u32 clk_out_cntrl; u32 sata_pwrgt; u32 sensor_ctrl; u32 rst_status; u32 io_dpd_req; u32 io_dpd_status; u32 io_dpd2_req; u32 io_dpd2_status; u32 sel_dpd_tim; u32 vddp_sel; u32 ddr_cfg; u32 e_no_vttgen; u8 _rsv0[4]; u32 pllm_wb0_override_freq; u32 test_pwrgate; u32 pwrgate_timer_mult; u32 dis_sel_dpd; u32 utmip_uhsic_triggers; u32 utmip_uhsic_saved_state; u32 utmip_pad_cfg; u32 utmip_term_pad_cfg; u32 utmip_uhsic_sleep_cfg; u32 utmip_uhsic_sleepwalk_cfg; u32 utmip_sleepwalk_p[3]; u32 uhsic_sleepwalk_p0; u32 utmip_uhsic_status; u32 utmip_uhsic_fake; u32 bondout_mirror3[5 - 3]; u32 secure_scratch6; u32 secure_scratch7; u32 scratch43; u32 scratch44; u32 scratch45; u32 scratch46; u32 scratch47; u32 scratch48; u32 scratch49; u32 scratch50; u32 scratch51; u32 scratch52; u32 scratch53; u32 scratch54; u32 scratch55; u32 scratch0_eco; u32 por_dpd_ctrl; u32 scratch2_eco; u32 utmip_uhsic_line_wakeup; u32 utmip_bias_master_cntrl; u32 utmip_master_config; u32 td_pwrgate_inter_part_timer; u32 utmip_uhsic2_triggers; u32 utmip_uhsic2_saved_state; u32 utmip_uhsic2_sleep_cfg; u32 utmip_uhsic2_sleepwalk_cfg; u32 uhsic2_sleepwalk_p1; u32 utmip_uhsic2_status; u32 utmip_uhsic2_fake; u32 utmip_uhsic2_line_wakeup; u32 utmip_master2_config; u32 utmip_uhsic_rpd_cfg; u32 pg_mask_ce0; u32 pg_mask3[5 - 3]; u32 pllm_wb0_override2; u32 tsc_mult; u32 cpu_vsense_override; u32 glb_amap_cfg; u32 sticky_bits; u32 sec_disable2; u32 weak_bias; u32 reg_short; u32 pg_mask_andor; u8 _rsv1[0x2c]; u32 secure_scratch8; /* offset 0x300 */ u32 secure_scratch9; u32 secure_scratch10; u32 secure_scratch11; u32 secure_scratch12; u32 secure_scratch13; u32 secure_scratch14; u32 secure_scratch15; u32 secure_scratch16; u32 secure_scratch17; u32 secure_scratch18; u32 secure_scratch19; u32 secure_scratch20; u32 secure_scratch21; u32 secure_scratch22; u32 secure_scratch23; u32 secure_scratch24; u32 secure_scratch25; u32 secure_scratch26; u32 secure_scratch27; u32 secure_scratch28; u32 secure_scratch29; u32 secure_scratch30; u32 secure_scratch31; u32 secure_scratch32; u32 secure_scratch33; u32 secure_scratch34; u32 secure_scratch35; u32 secure_scratch36; u32 secure_scratch37; u32 secure_scratch38; u32 secure_scratch39; u32 secure_scratch40; u32 secure_scratch41; u32 secure_scratch42; u32 secure_scratch43; u32 secure_scratch44; u32 secure_scratch45; u32 secure_scratch46; u32 secure_scratch47; u32 secure_scratch48; u32 secure_scratch49; u32 secure_scratch50; u32 secure_scratch51; u32 secure_scratch52; u32 secure_scratch53; u32 secure_scratch54; u32 secure_scratch55; u32 secure_scratch56; u32 secure_scratch57; u32 secure_scratch58; u32 secure_scratch59; u32 secure_scratch60; u32 secure_scratch61; u32 secure_scratch62; u32 secure_scratch63; u32 secure_scratch64; u32 secure_scratch65; u32 secure_scratch66; u32 secure_scratch67; u32 secure_scratch68; u32 secure_scratch69; u32 secure_scratch70; u32 secure_scratch71; u32 secure_scratch72; u32 secure_scratch73; u32 secure_scratch74; u32 secure_scratch75; u32 secure_scratch76; u32 secure_scratch77; u32 secure_scratch78; u32 secure_scratch79; u32 _rsv0x420[8]; u32 cntrl2; /* 0x440 */ u32 _rsv0x444[2]; u32 event_counter; /* 0x44C */ u32 fuse_control; u32 scratch1_eco; u32 _rsv0x458[1]; u32 io_dpd3_req; /* 0x45C */ u32 io_dpd3_status; u32 io_dpd4_req; u32 io_dpd4_status; u32 _rsv0x46C[30]; u32 ddr_cntrl; /* 0x4E4 */ u32 _rsv0x4E8[70]; u32 scratch56; /* 0x600 */ u32 scratch57; u32 scratch58; u32 scratch59; u32 scratch60; u32 scratch61; u32 scratch62; u32 scratch63; u32 scratch64; u32 scratch65; u32 scratch66; u32 scratch67; u32 scratch68; u32 scratch69; u32 scratch70; u32 scratch71; u32 scratch72; u32 scratch73; u32 scratch74; u32 scratch75; u32 scratch76; u32 scratch77; u32 scratch78; u32 scratch79; u32 scratch80; u32 scratch81; u32 scratch82; u32 scratch83; u32 scratch84; u32 scratch85; u32 scratch86; u32 scratch87; u32 scratch88; u32 scratch89; u32 scratch90; u32 scratch91; u32 scratch92; u32 scratch93; u32 scratch94; u32 scratch95; u32 scratch96; u32 scratch97; u32 scratch98; u32 scratch99; u32 scratch100; u32 scratch101; u32 scratch102; u32 scratch103; u32 scratch104; u32 scratch105; u32 scratch106; u32 scratch107; u32 scratch108; u32 scratch109; u32 scratch110; u32 scratch111; u32 scratch112; u32 scratch113; u32 scratch114; u32 scratch115; u32 scratch116; u32 scratch117; u32 scratch118; u32 scratch119; u32 scratch120; /* 0x700 */ u32 scratch121; u32 scratch122; u32 scratch123; u32 scratch124; u32 scratch125; u32 scratch126; u32 scratch127; u32 scratch128; u32 scratch129; u32 scratch130; u32 scratch131; u32 scratch132; u32 scratch133; u32 scratch134; u32 scratch135; u32 scratch136; u32 scratch137; u32 scratch138; u32 scratch139; u32 scratch140; u32 scratch141; u32 scratch142; u32 scratch143; u32 scratch144; u32 scratch145; u32 scratch146; u32 scratch147; u32 scratch148; u32 scratch149; u32 scratch150; u32 scratch151; u32 scratch152; u32 scratch153; u32 scratch154; u32 scratch155; u32 scratch156; u32 scratch157; u32 scratch158; u32 scratch159; u32 scratch160; u32 scratch161; u32 scratch162; u32 scratch163; u32 scratch164; u32 scratch165; u32 scratch166; u32 scratch167; u32 scratch168; u32 scratch169; u32 scratch170; u32 scratch171; u32 scratch172; u32 scratch173; u32 scratch174; u32 scratch175; u32 scratch176; u32 scratch177; u32 scratch178; u32 scratch179; u32 scratch180; u32 scratch181; u32 scratch182; u32 scratch183; u32 scratch184; u32 scratch185; u32 scratch186; u32 scratch187; u32 scratch188; u32 scratch189; u32 scratch190; u32 scratch191; u32 scratch192; u32 scratch193; u32 scratch194; u32 scratch195; u32 scratch196; u32 scratch197; u32 scratch198; u32 scratch199; u32 scratch200; u32 scratch201; u32 scratch202; u32 scratch203; u32 scratch204; u32 scratch205; u32 scratch206; u32 scratch207; u32 scratch208; u32 scratch209; u32 scratch210; u32 scratch211; u32 scratch212; u32 scratch213; u32 scratch214; u32 scratch215; u32 scratch216; u32 scratch217; u32 scratch218; u32 scratch219; u32 scratch220; u32 scratch221; u32 scratch222; u32 scratch223; u32 scratch224; u32 scratch225; u32 scratch226; u32 scratch227; u32 scratch228; u32 scratch229; u32 scratch230; u32 scratch231; u32 scratch232; u32 scratch233; u32 scratch234; u32 scratch235; u32 scratch236; u32 scratch237; u32 scratch238; u32 scratch239; u32 scratch240; u32 scratch241; u32 scratch242; u32 scratch243; u32 scratch244; u32 scratch245; u32 scratch246; u32 scratch247; u32 scratch248; u32 scratch249; u32 scratch250; u32 scratch251; u32 scratch252; u32 scratch253; u32 scratch254; u32 scratch255; u32 scratch256; u32 scratch257; u32 scratch258; u32 scratch259; u32 scratch260; u32 scratch261; u32 scratch262; u32 scratch263; u32 scratch264; u32 scratch265; u32 scratch266; u32 scratch267; u32 scratch268; u32 scratch269; u32 scratch270; u32 scratch271; u32 scratch272; u32 scratch273; u32 scratch274; u32 scratch275; u32 scratch276; u32 scratch277; u32 scratch278; u32 scratch279; u32 scratch280; u32 scratch281; u32 scratch282; u32 scratch283; u32 scratch284; u32 scratch285; u32 scratch286; u32 scratch287; u32 scratch288; u32 scratch289; u32 scratch290; u32 scratch291; u32 scratch292; u32 scratch293; u32 scratch294; u32 scratch295; u32 scratch296; u32 scratch297; u32 scratch298; u32 scratch299; /* 0x9CC */ u32 _rsv0x9D0[50]; u32 secure_scratch80; /* 0xa98 */ u32 secure_scratch81; u32 secure_scratch82; u32 secure_scratch83; u32 secure_scratch84; u32 secure_scratch85; u32 secure_scratch86; u32 secure_scratch87; u32 secure_scratch88; u32 secure_scratch89; u32 secure_scratch90; u32 secure_scratch91; u32 secure_scratch92; u32 secure_scratch93; u32 secure_scratch94; u32 secure_scratch95; u32 secure_scratch96; u32 secure_scratch97; u32 secure_scratch98; u32 secure_scratch99; u32 secure_scratch100; u32 secure_scratch101; u32 secure_scratch102; u32 secure_scratch103; u32 secure_scratch104; u32 secure_scratch105; u32 secure_scratch106; u32 secure_scratch107; u32 secure_scratch108; u32 secure_scratch109; u32 secure_scratch110; u32 secure_scratch111; u32 secure_scratch112; u32 secure_scratch113; u32 secure_scratch114; u32 secure_scratch115; u32 secure_scratch116; u32 secure_scratch117; u32 secure_scratch118; u32 secure_scratch119; }; #endif /* _TEGRA210_PMC_H_ */
11,060
C++
.h
560
17.757143
76
0.790015
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,242
pmc.h
Atmosphere-NX_Atmosphere/emummc/source/soc/pmc.h
/* * Copyright (c) 2018 naehrwert * Copyright (c) 2018 st4rk * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _PMC_H_ #define _PMC_H_ /*! PMC registers. */ #define APBDEV_PMC_CNTRL 0x0 #define PMC_CNTRL_MAIN_RST (1 << 4) #define APBDEV_PMC_SEC_DISABLE 0x4 #define APBDEV_PMC_PWRGATE_TOGGLE 0x30 #define APBDEV_PMC_PWRGATE_STATUS 0x38 #define APBDEV_PMC_NO_IOPOWER 0x44 #define PMC_NO_IOPOWER_SDMMC1_IO_EN (1 << 12) #define APBDEV_PMC_SCRATCH0 0x50 #define APBDEV_PMC_SCRATCH1 0x54 #define APBDEV_PMC_SCRATCH20 0xA0 #define APBDEV_PMC_PWR_DET_VAL 0xE4 #define PMC_PWR_DET_SDMMC1_IO_EN (1 << 12) #define APBDEV_PMC_DDR_PWR 0xE8 #define APBDEV_PMC_CRYPTO_OP 0xF4 #define PMC_CRYPTO_OP_SE_ENABLE 0 #define PMC_CRYPTO_OP_SE_DISABLE 1 #define APBDEV_PMC_SCRATCH33 0x120 #define APBDEV_PMC_SCRATCH40 0x13C #define APBDEV_PMC_OSC_EDPD_OVER 0x1A4 #define PMC_OSC_EDPD_OVER_OSC_CTRL_OVER 0x400000 #define APBDEV_PMC_RST_STATUS 0x1B4 #define APBDEV_PMC_IO_DPD_REQ 0x1B8 #define APBDEV_PMC_IO_DPD2_REQ 0x1C0 #define APBDEV_PMC_VDDP_SEL 0x1CC #define APBDEV_PMC_DDR_CFG 0x1D0 #define APBDEV_PMC_SCRATCH45 0x234 #define APBDEV_PMC_SCRATCH46 0x238 #define APBDEV_PMC_SCRATCH49 0x244 #define APBDEV_PMC_TSC_MULT 0x2B4 #define APBDEV_PMC_SEC_DISABLE2 0x2C4 #define APBDEV_PMC_WEAK_BIAS 0x2C8 #define APBDEV_PMC_REG_SHORT 0x2CC #define APBDEV_PMC_SEC_DISABLE3 0x2D8 #define APBDEV_PMC_SECURE_SCRATCH21 0x334 #define PMC_FUSE_PRIVATEKEYDISABLE_TZ_STICKY_BIT 0x10 #define APBDEV_PMC_SECURE_SCRATCH32 0x360 #define APBDEV_PMC_SECURE_SCRATCH49 0x3A4 #define APBDEV_PMC_CNTRL2 0x440 #define PMC_CNTRL2_HOLD_CKE_LOW_EN 0x1000 #define APBDEV_PMC_IO_DPD3_REQ 0x45C #define APBDEV_PMC_IO_DPD4_REQ 0x464 #define APBDEV_PMC_UTMIP_PAD_CFG1 0x4C4 #define APBDEV_PMC_UTMIP_PAD_CFG3 0x4CC #define APBDEV_PMC_DDR_CNTRL 0x4E4 #define APBDEV_PMC_SEC_DISABLE4 0x5B0 #define APBDEV_PMC_SEC_DISABLE5 0x5B4 #define APBDEV_PMC_SEC_DISABLE6 0x5B8 #define APBDEV_PMC_SEC_DISABLE7 0x5BC #define APBDEV_PMC_SEC_DISABLE8 0x5C0 #define APBDEV_PMC_SCRATCH188 0x810 #define APBDEV_PMC_SCRATCH190 0x818 #define APBDEV_PMC_SCRATCH200 0x840 #endif
2,669
C++
.h
72
35.819444
76
0.797995
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,243
gpio.h
Atmosphere-NX_Atmosphere/emummc/source/soc/gpio.h
/* * Copyright (c) 2018 naehrwert * Copyright (c) 2019 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _GPIO_H_ #define _GPIO_H_ #include "../utils/types.h" #define GPIO_MODE_SPIO 0 #define GPIO_MODE_GPIO 1 #define GPIO_OUTPUT_DISABLE 0 #define GPIO_OUTPUT_ENABLE 1 #define GPIO_IRQ_DISABLE 0 #define GPIO_IRQ_ENABLE 1 #define GPIO_LOW 0 #define GPIO_HIGH 1 #define GPIO_FALLING 0 #define GPIO_RISING 1 #define GPIO_LEVEL 0 #define GPIO_EDGE 1 #define GPIO_CONFIGURED_EDGE 0 #define GPIO_ANY_EDGE_CHANGE 1 /*! GPIO pins (0-7 for each port). */ #define GPIO_PIN_0 (1 << 0) #define GPIO_PIN_1 (1 << 1) #define GPIO_PIN_2 (1 << 2) #define GPIO_PIN_3 (1 << 3) #define GPIO_PIN_4 (1 << 4) #define GPIO_PIN_5 (1 << 5) #define GPIO_PIN_6 (1 << 6) #define GPIO_PIN_7 (1 << 7) /*! GPIO ports (A-EE). */ #define GPIO_PORT_A 0 #define GPIO_PORT_B 1 #define GPIO_PORT_C 2 #define GPIO_PORT_D 3 #define GPIO_PORT_E 4 #define GPIO_PORT_F 5 #define GPIO_PORT_G 6 #define GPIO_PORT_H 7 #define GPIO_PORT_I 8 #define GPIO_PORT_J 9 #define GPIO_PORT_K 10 #define GPIO_PORT_L 11 #define GPIO_PORT_M 12 #define GPIO_PORT_N 13 #define GPIO_PORT_O 14 #define GPIO_PORT_P 15 #define GPIO_PORT_Q 16 #define GPIO_PORT_R 17 #define GPIO_PORT_S 18 #define GPIO_PORT_T 19 #define GPIO_PORT_U 20 #define GPIO_PORT_V 21 #define GPIO_PORT_W 22 #define GPIO_PORT_X 23 #define GPIO_PORT_Y 24 #define GPIO_PORT_Z 25 #define GPIO_PORT_AA 26 #define GPIO_PORT_BB 27 #define GPIO_PORT_CC 28 #define GPIO_PORT_DD 29 #define GPIO_PORT_EE 30 void gpio_config(u32 port, u32 pins, int mode); void gpio_output_enable(u32 port, u32 pins, int enable); void gpio_write(u32 port, u32 pins, int high); int gpio_read(u32 port, u32 pins); int gpio_interrupt_status(u32 port, u32 pins); void gpio_interrupt_enable(u32 port, u32 pins, int enable); void gpio_interrupt_level(u32 port, u32 pins, int high, int edge, int delta); u32 gpio_get_bank_irq_id(u32 port); #endif
2,501
C++
.h
83
28.807229
77
0.744805
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,244
pinmux.h
Atmosphere-NX_Atmosphere/emummc/source/soc/pinmux.h
/* * Copyright (c) 2018 naehrwert * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _PINMUX_H_ #define _PINMUX_H_ #include "../utils/types.h" /*! APB MISC registers. */ #define APB_MISC_GP_SDMMC1_CLK_LPBK_CONTROL 0x8D4 #define APB_MISC_GP_SDMMC3_CLK_LPBK_CONTROL 0x8D8 #define APB_MISC_GP_SDMMC1_PAD_CFGPADCTRL 0xA98 #define APB_MISC_GP_VGPIO_GPIO_MUX_SEL 0xB74 /*! Pinmux registers. */ #define PINMUX_AUX_SDMMC1_CLK 0x00 #define PINMUX_AUX_SDMMC1_CMD 0x04 #define PINMUX_AUX_SDMMC1_DAT3 0x08 #define PINMUX_AUX_SDMMC1_DAT2 0x0C #define PINMUX_AUX_SDMMC1_DAT1 0x10 #define PINMUX_AUX_SDMMC1_DAT0 0x14 #define PINMUX_AUX_SDMMC3_CLK 0x1C #define PINMUX_AUX_SDMMC3_CMD 0x20 #define PINMUX_AUX_SDMMC3_DAT0 0x24 #define PINMUX_AUX_SDMMC3_DAT1 0x28 #define PINMUX_AUX_SDMMC3_DAT2 0x2C #define PINMUX_AUX_SDMMC3_DAT3 0x30 #define PINMUX_AUX_DMIC3_CLK 0xB4 #define PINMUX_AUX_UART2_TX 0xF4 #define PINMUX_AUX_UART3_TX 0x104 #define PINMUX_AUX_WIFI_EN 0x1B4 #define PINMUX_AUX_WIFI_RST 0x1B8 #define PINMUX_AUX_NFC_EN 0x1D0 #define PINMUX_AUX_NFC_INT 0x1D4 #define PINMUX_AUX_LCD_BL_PWM 0x1FC #define PINMUX_AUX_LCD_BL_EN 0x200 #define PINMUX_AUX_LCD_RST 0x204 #define PINMUX_AUX_GPIO_PE6 0x248 #define PINMUX_AUX_GPIO_PH6 0x250 #define PINMUX_AUX_GPIO_PZ1 0x280 /* Only in T210B01 */ #define PINMUX_AUX_SDMMC2_DAT0 0x294 #define PINMUX_AUX_SDMMC2_DAT1 0x298 #define PINMUX_AUX_SDMMC2_DAT2 0x29C #define PINMUX_AUX_SDMMC2_DAT3 0x2A0 #define PINMUX_AUX_SDMMC2_DAT4 0x2A4 #define PINMUX_AUX_SDMMC2_DAT5 0x2A8 #define PINMUX_AUX_SDMMC2_DAT6 0x2AC #define PINMUX_AUX_SDMMC2_DAT7 0x2B0 #define PINMUX_AUX_SDMMC2_CLK 0x2B4 #define PINMUX_AUX_SDMMC2_CMD 0x2BC /*! 0:UART-A, 1:UART-B, 3:UART-C, 3:UART-D */ #define PINMUX_AUX_UARTX_TX(x) (0xE4 + 0x10 * (x)) #define PINMUX_AUX_UARTX_RX(x) (0xE8 + 0x10 * (x)) #define PINMUX_AUX_UARTX_RTS(x) (0xEC + 0x10 * (x)) #define PINMUX_AUX_UARTX_CTS(x) (0xF0 + 0x10 * (x)) /*! 0:GEN1, 1:GEN2, 2:GEN3, 3:CAM, 4:PWR */ #define PINMUX_AUX_X_I2C_SCL(x) (0xBC + 8 * (x)) #define PINMUX_AUX_X_I2C_SDA(x) (0xC0 + 8 * (x)) #define PINMUX_FUNC_MASK (3 << 0) #define PINMUX_PULL_MASK (3 << 2) #define PINMUX_PULL_NONE (0 << 2) #define PINMUX_PULL_DOWN (1 << 2) #define PINMUX_PULL_UP (2 << 2) #define PINMUX_TRISTATE (1 << 4) #define PINMUX_PARKED (1 << 5) #define PINMUX_INPUT_ENABLE (1 << 6) #define PINMUX_LOCK (1 << 7) #define PINMUX_LPDR (1 << 8) #define PINMUX_HSM (1 << 9) #define PINMUX_IO_HV (1 << 10) #define PINMUX_OPEN_DRAIN (1 << 11) #define PINMUX_SCHMT (1 << 12) #define PINMUX_DRIVE_MASK (3 << 13) #define PINMUX_DRIVE_1X (0 << 13) #define PINMUX_DRIVE_2X (1 << 13) #define PINMUX_DRIVE_3X (2 << 13) #define PINMUX_DRIVE_4X (3 << 13) void pinmux_config_i2c(u32 idx); #endif
3,455
C++
.h
89
37.52809
76
0.706321
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,245
t210.h
Atmosphere-NX_Atmosphere/emummc/source/soc/t210.h
/* * Copyright (c) 2018 naehrwert * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _T210_H_ #define _T210_H_ #include "../utils/types.h" intptr_t QueryIoMapping(u64 addr, u64 size); #define TMR_BASE 0x60005000 #define CLOCK_BASE 0x60006000 #define GPIO_BASE 0x6000D000 #define GPIO_1_BASE (GPIO_BASE) #define GPIO_2_BASE (GPIO_BASE + 0x100) #define GPIO_3_BASE (GPIO_BASE + 0x200) #define GPIO_4_BASE (GPIO_BASE + 0x300) #define GPIO_5_BASE (GPIO_BASE + 0x400) #define GPIO_6_BASE (GPIO_BASE + 0x500) #define GPIO_7_BASE (GPIO_BASE + 0x600) #define GPIO_8_BASE (GPIO_BASE + 0x700) #define APB_MISC_BASE 0x70000000 #define PINMUX_AUX_BASE 0x70003000 #define PWM_BASE 0x7000A000 #define RTC_BASE 0x7000E000 #define PMC_BASE 0x7000E400 #define _REG(base, off) *(vu32 *)(QueryIoMapping((u64)base, 0) + (off)) #define _REG_IO(base, off, size) *(vu32 *)(QueryIoMapping((u64)base, size) + (off)) #define RTC(off) _REG_IO(RTC_BASE, off, 0x4000) #define TMR(off) _REG_IO(TMR_BASE, off, 0x3FF) #define CLOCK(off) _REG_IO(CLOCK_BASE, off, 0x1000) #define PMC(off) _REG_IO(PMC_BASE, off, 0x1000) // ?????????? #define APB_MISC(off) _REG_IO(APB_MISC_BASE, off, 0x4000) #define PINMUX_AUX(off) _REG_IO(APB_MISC_BASE, off + (PINMUX_AUX_BASE - APB_MISC_BASE), 0x4000) #define GPIO(off) _REG_IO(GPIO_BASE, off, 0x1000) #define GPIO_1(off) _REG_IO(GPIO_BASE, off + (GPIO_1_BASE - GPIO_BASE), 0x1000) #define GPIO_2(off) _REG_IO(GPIO_BASE, off + (GPIO_2_BASE - GPIO_BASE), 0x1000) #define GPIO_3(off) _REG_IO(GPIO_BASE, off + (GPIO_3_BASE - GPIO_BASE), 0x1000) #define GPIO_4(off) _REG_IO(GPIO_BASE, off + (GPIO_4_BASE - GPIO_BASE), 0x1000) #define GPIO_5(off) _REG_IO(GPIO_BASE, off + (GPIO_5_BASE - GPIO_BASE), 0x1000) #define GPIO_6(off) _REG_IO(GPIO_BASE, off + (GPIO_6_BASE - GPIO_BASE), 0x1000) #define GPIO_7(off) _REG_IO(GPIO_BASE, off + (GPIO_7_BASE - GPIO_BASE), 0x1000) #define GPIO_8(off) _REG_IO(GPIO_BASE, off + (GPIO_8_BASE - GPIO_BASE), 0x1000) #define HOST1X(off) _REG(HOST1X_BASE, off) #define BPMP_CACHE_CTRL(off) _REG(BPMP_CACHE_BASE, off) #define DISPLAY_A(off) _REG(DISPLAY_A_BASE, off) #define DSI(off) _REG(DSI_BASE, off) #define VIC(off) _REG(VIC_BASE, off) #define TSEC(off) _REG(TSEC_BASE, off) #define SOR1(off) _REG(SOR1_BASE, off) #define FLOW_CTLR(off) _REG(FLOW_CTLR_BASE, off) #define SYSREG(off) _REG(SYSREG_BASE, off) #define SB(off) _REG(SB_BASE, off) #define EXCP_VEC(off) _REG(EXCP_VEC_BASE, off) #define PWM(off) _REG(PWM_BASE, off) #define SYSCTR0(off) _REG(SYSCTR0_BASE, off) #define FUSE(off) _REG(FUSE_BASE, off) #define KFUSE(off) _REG(KFUSE_BASE, off) #define SE(off) _REG(SE_BASE, off) #define MC(off) _REG(MC_BASE, off) #define EMC(off) _REG(EMC_BASE, off) #define MIPI_CAL(off) _REG(MIPI_CAL_BASE, off) #define I2S(off) _REG(I2S_BASE, off) #define CL_DVFS(off) _REG(CL_DVFS_BASE, off) #define TEST_REG(off) _REG(0x0, off) /*! Misc registers. */ #define APB_MISC_PP_STRAPPING_OPT_A 0x08 #define APB_MISC_PP_PINMUX_GLOBAL 0x40 #define APB_MISC_GP_LCD_BL_PWM_CFGPADCTRL 0xA34 #define APB_MISC_GP_SDMMC1_PAD_CFGPADCTRL 0xA98 #define APB_MISC_GP_EMMC2_PAD_CFGPADCTRL 0xA9C #define APB_MISC_GP_EMMC4_PAD_CFGPADCTRL 0xAB4 #define APB_MISC_GP_EMMC4_PAD_PUPD_CFGPADCTRL 0xABC #define APB_MISC_GP_WIFI_EN_CFGPADCTRL 0xB64 #define APB_MISC_GP_WIFI_RST_CFGPADCTRL 0xB68 /*! System registers. */ #define AHB_ARBITRATION_XBAR_CTRL 0xE0 #define AHB_AHB_SPARE_REG 0x110 /*! RTC registers. */ #define APBDEV_RTC_SECONDS 0x8 #define APBDEV_RTC_SHADOW_SECONDS 0xC #define APBDEV_RTC_MILLI_SECONDS 0x10 /*! TMR registers. */ #define TIMERUS_CNTR_1US (0x10 + 0x0) #define TIMERUS_USEC_CFG (0x10 + 0x4) #define TIMER_TMR9_TMR_PTV 0x80 #define TIMER_EN (1 << 31) #define TIMER_PER_EN (1 << 30) #define TIMER_WDT4_CONFIG (0x100 + 0x80) #define TIMER_SRC(TMR) (TMR & 0xF) #define TIMER_PER(PER) ((PER & 0xFF) << 4) #define TIMER_SYSRESET_EN (1 << 14) #define TIMER_PMCRESET_EN (1 << 15) #define TIMER_WDT4_COMMAND (0x108 + 0x80) #define TIMER_START_CNT (1 << 0) #define TIMER_CNT_DISABLE (1 << 1) #define TIMER_WDT4_UNLOCK_PATTERN (0x10C + 0x80) #define TIMER_MAGIC_PTRN 0xC45A #endif
4,713
C++
.h
108
42.5
95
0.720044
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,246
i2c.h
Atmosphere-NX_Atmosphere/emummc/source/soc/i2c.h
/* * Copyright (c) 2018 naehrwert * Copyright (c) 2020 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _I2C_H_ #define _I2C_H_ #include "../utils/types.h" #define I2C_1 0 #define I2C_2 1 #define I2C_3 2 #define I2C_4 3 #define I2C_5 4 #define I2C_6 5 void i2c_init(); int i2c_send_buf_small(u32 i2c_idx, u32 dev_addr, u32 reg, u8 *buf, u32 size); int i2c_recv_buf_small(u8 *buf, u32 size, u32 i2c_idx, u32 dev_addr, u32 reg); int i2c_send_byte(u32 i2c_idx, u32 dev_addr, u32 reg, u8 val); u8 i2c_recv_byte(u32 i2c_idx, u32 dev_addr, u32 reg); #endif
1,125
C++
.h
31
34.645161
78
0.737374
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,247
cache.h
Atmosphere-NX_Atmosphere/emummc/source/nx/cache.h
/** * @file cache.h * @brief AArch64 cache operations. * @author plutoo * @copyright libnx Authors */ #pragma once #include "../utils/types.h" /** * @brief Performs a data cache flush on the specified buffer. * @param addr Address of the buffer. * @param size Size of the buffer, in bytes. * @remarks Cache flush is defined as Clean + Invalidate. * @note The start and end addresses of the buffer are forcibly rounded to cache line boundaries (read from CTR_EL0 system register). */ void armDCacheFlush(void* addr, size_t size); /** * @brief Performs a data cache clean on the specified buffer. * @param addr Address of the buffer. * @param size Size of the buffer, in bytes. * @note The start and end addresses of the buffer are forcibly rounded to cache line boundaries (read from CTR_EL0 system register). */ void armDCacheClean(void* addr, size_t size); /** * @brief Performs an instruction cache invalidation clean on the specified buffer. * @param addr Address of the buffer. * @param size Size of the buffer, in bytes. * @note The start and end addresses of the buffer are forcibly rounded to cache line boundaries (read from CTR_EL0 system register). */ void armICacheInvalidate(void* addr, size_t size); /** * @brief Performs a data cache zeroing operation on the specified buffer. * @param addr Address of the buffer. * @param size Size of the buffer, in bytes. * @note The start and end addresses of the buffer are forcibly rounded to cache line boundaries (read from CTR_EL0 system register). */ void armDCacheZero(void* addr, size_t size);
1,583
C++
.h
37
40.972973
133
0.75227
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,248
smc.h
Atmosphere-NX_Atmosphere/emummc/source/nx/smc.h
/** * @file smc.h * @brief Wrappers for secure monitor calls. * @copyright libnx Authors */ #pragma once #include "../utils/types.h" #include "svc.h" #ifdef __cplusplus extern "C" { #endif typedef enum { SplConfigItem_DisableProgramVerification = 1, SplConfigItem_DramId = 2, SplConfigItem_SecurityEngineIrqNumber = 3, SplConfigItem_Version = 4, SplConfigItem_HardwareType = 5, SplConfigItem_IsRetail = 6, SplConfigItem_IsRecoveryBoot = 7, SplConfigItem_DeviceId = 8, SplConfigItem_BootReason = 9, SplConfigItem_MemoryArrange = 10, SplConfigItem_IsDebugMode = 11, SplConfigItem_KernelMemoryConfiguration = 12, SplConfigItem_IsChargerHiZModeEnabled = 13, SplConfigItem_IsKiosk = 14, SplConfigItem_NewHardwareType = 15, SplConfigItem_NewKeyGeneration = 16, SplConfigItem_Package2Hash = 17, SplConfigItem_ExosphereVersion = 65000, SplConfigItem_NeedsReboot = 65001, SplConfigItem_NeedsShutdown = 65002, SplConfigItem_ExosphereVerHash = 65003, SplConfigItem_HasRcmBugPatch = 65004, } SplConfigItem; typedef enum { SplSocType_Erista = 0, SplSocType_Mariko = 1, } SplSocType; typedef enum { SplHardwareType_Icosa = 0, SplHardwareType_Copper = 1, SplHardwareType_Hoag = 2, SplHardwareType_Iowa = 3, SplHardwareType_Calcio = 4, SplHardwareType_Five = 5, } SplHardwareType; typedef enum { EXO_EMUMMC_TYPE_NONE = 0, EXO_EMUMMC_TYPE_PARTITION = 1, EXO_EMUMMC_TYPE_FILES = 2, } exo_emummc_type_t; typedef enum { EXO_EMUMMC_MMC_NAND = 0, EXO_EMUMMC_MMC_SD = 1, EXO_EMUMMC_MMC_GC = 2, } exo_emummc_mmc_t; typedef struct { uint32_t magic; uint32_t type; uint32_t id; uint32_t fs_version; } exo_emummc_base_config_t; typedef struct { uint64_t start_sector; } exo_emummc_partition_config_t; typedef struct { exo_emummc_base_config_t base_cfg; union { exo_emummc_partition_config_t partition_cfg; }; } exo_emummc_config_t; Result smcGetConfig(SplConfigItem config_item, u64 *out_config); SplHardwareType splGetHardwareType(void); SplSocType splGetSocType(void); void smcRebootToRcm(void); void smcRebootToIramPayload(void); void smcPerformShutdown(void); Result smcCopyToIram(uintptr_t iram_addr, const void *src_addr, u32 size); Result smcCopyFromIram(void *dst_addr, uintptr_t iram_addr, u32 size); Result smcReadWriteRegister(u32 phys_addr, u32 value, u32 mask); Result smcGetEmummcConfig(exo_emummc_mmc_t mmc_id, exo_emummc_config_t *out_cfg, void *out_paths); Result smcGenerateRandomBytes(void *dst, u32 size); u64 smcGenerateRandomU64(void); #ifdef __cplusplus } #endif
2,672
C++
.h
87
27.37931
98
0.746007
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,249
svc.h
Atmosphere-NX_Atmosphere/emummc/source/nx/svc.h
/** * @file svc.h * @brief Wrappers for kernel syscalls. * @copyright libnx Authors */ #pragma once #include "../utils/types.h" /// Memory information structure. typedef struct { u64 addr; ///< Base address. u64 size; ///< Size. u32 type; ///< Memory type (see lower 8 bits of \ref MemoryState). u32 attr; ///< Memory attributes (see \ref MemoryAttribute). u32 perm; ///< Memory permissions (see \ref Permission). u32 device_refcount; ///< Device reference count. u32 ipc_refcount; ///< IPC reference count. u32 padding; ///< Padding. } MemoryInfo; /// Memory permission bitmasks. typedef enum { Perm_None = 0, ///< No permissions. Perm_R = BIT(0), ///< Read permission. Perm_W = BIT(1), ///< Write permission. Perm_X = BIT(2), ///< Execute permission. Perm_Rw = Perm_R | Perm_W, ///< Read/write permissions. Perm_Rx = Perm_R | Perm_X, ///< Read/execute permissions. Perm_DontCare = BIT(28), ///< Don't care } Permission; /// Secure monitor arguments. typedef struct { u64 X[8]; ///< Values of X0 through X7. } SecmonArgs; _Static_assert(sizeof(SecmonArgs) == 0x40, "SecmonArgs definition"); #define DeviceName_SDMMC1A 19 #define DeviceName_SDMMC2A 20 #define DeviceName_SDMMC3A 21 #define DeviceName_SDMMC4A 22 #ifdef __cplusplus extern "C" { #endif /** * @brief Returns a virtual address mapped to a given IO range. * @return Result code. * @note Syscall number 0x55. * @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. * @warning Only exists on [10.0.0+]. For older versions use \ref svcLegacyQueryIoMapping. */ Result svcQueryIoMapping(u64* virtaddr, u64* out_size, u64 physaddr, u64 size); /** * @brief Returns a virtual address mapped to a given IO range. * @return Result code. * @note Syscall number 0x55. * @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. * @warning Only exists on [1.0.0-9.2.0]. For newer versions use \ref svcQueryIoMapping. */ Result svcLegacyQueryIoMapping(u64* virtaddr, u64 physaddr, u64 size); /** * @brief Attaches a device address space to a device. * @return Result code. * @note Syscall number 0x57. * @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. */ Result svcAttachDeviceAddressSpace(u64 device, Handle handle); /** * @brief Query information about an address. Will always fetch the lowest page-aligned mapping that contains the provided address. * @param[out] meminfo_ptr \ref MemoryInfo structure which will be filled in. * @param[out] pageinfo Page information which will be filled in. * @param[in] addr Address to query. * @return Result code. * @note Syscall number 0x06. */ Result svcQueryMemory(MemoryInfo* meminfo_ptr, u32 *pageinfo, u64 addr); /** * @brief Sets the memory permissions for the specified memory with the supplied process handle. * @param[in] proc Process handle. * @param[in] addr Address of the memory. * @param[in] size Size of the memory. * @param[in] perm Permissions (see \ref Permission). * @return Result code. * @remark This returns an error (0xD801) when \p perm is >0x5, hence -WX and RWX are not allowed. * @note Syscall number 0x73. * @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. */ Result svcSetProcessMemoryPermission(Handle proc, u64 addr, u64 size, u32 perm); /** * @brief Set the memory permissions of a (page-aligned) range of memory. * @param[in] addr Start address of the range. * @param[in] size Size of the range, in bytes. * @param[in] perm Permissions (see \ref Permission). * @return Result code. * @remark Perm_X is not allowed. Setting write-only is not allowed either (Perm_W). * This can be used to move back and forth between Perm_None, Perm_R and Perm_Rw. * @note Syscall number 0x01. */ Result svcSetMemoryPermission(void* addr, u64 size, u32 perm); /** * @brief Creates a thread. * @return Result code. * @note Syscall number 0x08. */ Result svcCreateThread(Handle* out, void* entry, void* arg, void* stack_top, int prio, int cpuid); /** * @brief Starts a freshly created thread. * @return Result code. * @note Syscall number 0x09. */ Result svcStartThread(Handle handle); /** * @brief Exits the current thread. * @note Syscall number 0x0A. */ void __attribute__((noreturn)) svcExitThread(void); /** * @brief Closes a handle, decrementing the reference count of the corresponding kernel object. * This might result in the kernel freeing the object. * @param handle Handle to close. * @return Result code. * @note Syscall number 0x16. */ Result svcCloseHandle(Handle handle); /** * @brief Waits on one or more synchronization objects, optionally with a timeout. * @return Result code. * @note Syscall number 0x18. * @note \p handleCount must not be greater than \ref MAX_WAIT_OBJECTS. This is a Horizon kernel limitation. * @note This is the raw syscall, which can be cancelled by \ref svcCancelSynchronization or other means. \ref waitHandles or \ref waitMultiHandle should normally be used instead. */ Result svcWaitSynchronization(s32* index, const Handle* handles, s32 handleCount, u64 timeout); /** * @brief Waits on a single synchronization object, optionally with a timeout. * @return Result code. * @note Wrapper for \ref svcWaitSynchronization. * @note This is the raw syscall, which can be cancelled by \ref svcCancelSynchronization or other means. \ref waitSingleHandle should normally be used instead. */ static inline Result svcWaitSynchronizationSingle(Handle handle, u64 timeout) { s32 tmp; return svcWaitSynchronization(&tmp, &handle, 1, timeout); } /** * @brief Creates an IPC session. * @return Result code. * @note Syscall number 0x40. * @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. */ Result svcCreateSession(Handle *server_handle, Handle *client_handle, u32 unk0, u64 unk1);//unk* are normally 0? /** * @brief Sends an IPC synchronization request to a session. * @return Result code. * @note Syscall number 0x21. */ Result svcSendSyncRequest(Handle session); /** * @brief Performs IPC input/output. * @return Result code. * @note Syscall number 0x43. * @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. */ Result svcReplyAndReceive(s32* index, const Handle* handles, s32 handleCount, Handle replyTarget, u64 timeout); /** * @brief Maps the src address from the supplied process handle into the current process. * @param[in] dst Address to which map the memory in the current process. * @param[in] proc Process handle. * @param[in] src Source mapping address. * @param[in] size Size of the memory. * @return Result code. * @remark This allows mapping code and rodata with RW- permission. * @note Syscall number 0x74. * @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. */ Result svcMapProcessMemory(void* dst, Handle proc, u64 src, u64 size); /** * @brief Undoes the effects of \ref svcMapProcessMemory. * @param[in] dst Destination mapping address * @param[in] proc Process handle. * @param[in] src Address of the memory in the process. * @param[in] size Size of the memory. * @return Result code. * @remark This allows mapping code and rodata with RW- permission. * @note Syscall number 0x75. * @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. */ Result svcUnmapProcessMemory(void* dst, Handle proc, u64 src, u64 size); /** * @brief Calls a secure monitor function (TrustZone, EL3). * @param regs Arguments to pass to the secure monitor. * @return Return value from the secure monitor. * @note Syscall number 0x7F. * @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. */ u64 svcCallSecureMonitor(SecmonArgs* regs); #ifdef __cplusplus } #endif ///@}
8,168
C++
.h
194
40.005155
179
0.726346
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,250
counter.h
Atmosphere-NX_Atmosphere/emummc/source/nx/counter.h
/** * @file counter.h * @brief AArch64 system counter-timer. * @author fincs * @copyright libnx Authors */ #pragma once #include "../utils/types.h" /** * @brief Gets the current system tick. * @return The current system tick. */ static inline u64 armGetSystemTick(void) { u64 ret; __asm__ __volatile__ ("mrs %x[data], cntpct_el0" : [data] "=r" (ret)); return ret; } /** * @brief Gets the system counter-timer frequency * @return The system counter-timer frequency, in Hz. */ static inline u64 armGetSystemTickFreq(void) { u64 ret; __asm__ ("mrs %x[data], cntfrq_el0" : [data] "=r" (ret)); return ret; } /** * @brief Converts from nanoseconds to CPU ticks unit. * @param ns Time in nanoseconds. * @return Time in CPU ticks. */ static inline u64 armNsToTicks(u64 ns) { return (ns * 12) / 625; } /** * @brief Converts from CPU ticks unit to nanoseconds. * @param tick Time in ticks. * @return Time in nanoseconds. */ static inline u64 armTicksToNs(u64 tick) { return (tick * 625) / 12; }
1,040
C++
.h
42
22.452381
74
0.673038
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,251
max7762x.h
Atmosphere-NX_Atmosphere/emummc/source/power/max7762x.h
/* * Copyright (c) 2018 naehrwert * Copyright (c) 2019 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _MAX7762X_H_ #define _MAX7762X_H_ #include "../utils/types.h" /* * Switch Power domains (max77620): * Name | Usage | uV step | uV min | uV default | uV max | Init *-------+---------------+---------+--------+------------+---------+------------------ * sd0 | SoC | 12500 | 600000 | 625000 | 1400000 | 1.125V (pkg1.1) * sd1 | SDRAM | 12500 | 600000 | 1125000 | 1125000 | 1.1V (pkg1.1) * sd2 | ldo{0-1, 7-8} | 12500 | 600000 | 1325000 | 1350000 | 1.325V (pcv) * sd3 | 1.8V general | 12500 | 600000 | 1800000 | 1800000 | * ldo0 | Display Panel | 25000 | 800000 | 1200000 | 1200000 | 1.2V (pkg1.1) * ldo1 | XUSB, PCIE | 25000 | 800000 | 1050000 | 1050000 | 1.05V (pcv) * ldo2 | SDMMC1 | 50000 | 800000 | 1800000 | 3300000 | * ldo3 | GC ASIC | 50000 | 800000 | 3100000 | 3100000 | 3.1V (pcv) * ldo4 | RTC | 12500 | 800000 | 850000 | 850000 | * ldo5 | GC ASIC | 50000 | 800000 | 1800000 | 1800000 | 1.8V (pcv) * ldo6 | Touch, ALS | 50000 | 800000 | 2900000 | 2900000 | 2.9V * ldo7 | XUSB | 50000 | 800000 | 1050000 | 1050000 | * ldo8 | XUSB, DC | 50000 | 800000 | 1050000 | 1050000 | */ /* * MAX77620_AME_GPIO: control GPIO modes (bits 0 - 7 correspond to GPIO0 - GPIO7); 0 -> GPIO, 1 -> alt-mode * MAX77620_REG_GPIOx: 0x9 sets output and enable */ /*! MAX77620 partitions. */ #define REGULATOR_SD0 0 #define REGULATOR_SD1 1 #define REGULATOR_SD2 2 #define REGULATOR_SD3 3 #define REGULATOR_LDO0 4 #define REGULATOR_LDO1 5 #define REGULATOR_LDO2 6 #define REGULATOR_LDO3 7 #define REGULATOR_LDO4 8 #define REGULATOR_LDO5 9 #define REGULATOR_LDO6 10 #define REGULATOR_LDO7 11 #define REGULATOR_LDO8 12 #define REGULATOR_MAX 12 #define MAX77621_CPU_I2C_ADDR 0x1B #define MAX77621_GPU_I2C_ADDR 0x1C #define MAX77621_VOUT_REG 0 #define MAX77621_VOUT_DVC_REG 1 #define MAX77621_CONTROL1_REG 2 #define MAX77621_CONTROL2_REG 3 /* MAX77621_VOUT */ #define MAX77621_VOUT_ENABLE (1 << 7) #define MAX77621_VOUT_MASK 0x7F #define MAX77621_VOUT_0_95V 0x37 #define MAX77621_VOUT_1_09V 0x4F /* MAX77621_VOUT_DVC_DVS */ #define MAX77621_DVS_VOUT_MASK 0x7F /* MAX77621_CONTROL1 */ #define MAX77621_SNS_ENABLE (1 << 7) #define MAX77621_FPWM_EN_M (1 << 6) #define MAX77621_NFSR_ENABLE (1 << 5) #define MAX77621_AD_ENABLE (1 << 4) #define MAX77621_BIAS_ENABLE (1 << 3) #define MAX77621_FREQSHIFT_9PER (1 << 2) #define MAX77621_RAMP_12mV_PER_US 0x0 #define MAX77621_RAMP_25mV_PER_US 0x1 #define MAX77621_RAMP_50mV_PER_US 0x2 #define MAX77621_RAMP_200mV_PER_US 0x3 #define MAX77621_RAMP_MASK 0x3 /* MAX77621_CONTROL2 */ #define MAX77621_WDTMR_ENABLE (1 << 6) #define MAX77621_DISCH_ENBABLE (1 << 5) #define MAX77621_FT_ENABLE (1 << 4) #define MAX77621_T_JUNCTION_120 (1 << 7) #define MAX77621_CKKADV_TRIP_DISABLE 0xC #define MAX77621_CKKADV_TRIP_75mV_PER_US 0x0 #define MAX77621_CKKADV_TRIP_150mV_PER_US 0x4 #define MAX77621_CKKADV_TRIP_75mV_PER_US_HIST_DIS 0x8 #define MAX77621_INDUCTOR_MIN_30_PER 0x0 #define MAX77621_INDUCTOR_NOMINAL 0x1 #define MAX77621_INDUCTOR_PLUS_30_PER 0x2 #define MAX77621_INDUCTOR_PLUS_60_PER 0x3 int max77620_regulator_get_status(u32 id); int max77620_regulator_config_fps(u32 id); int max77620_regulator_set_voltage(u32 id, u32 mv); int max77620_regulator_enable(u32 id, int enable); int max77620_regulator_set_volt_and_flags(u32 id, u32 mv, u8 flags); void max77620_config_default(); #endif
4,252
C++
.h
101
40.792079
106
0.674486
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,252
spl_fs_service.hpp
Atmosphere-NX_Atmosphere/stratosphere/spl/source/spl_fs_service.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> #include "spl_crypto_service.hpp" namespace ams::spl { class FsService : public CryptoService { public: explicit FsService(SecureMonitorManager *manager) : CryptoService(manager) { /* ... */ } public: /* Actual commands. */ Result DecryptAndStoreGcKeyDeprecated(const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source, u32 option) { R_RETURN(m_manager.DecryptAndStoreGcKey(src.GetPointer(), src.GetSize(), access_key, key_source, option)); } Result DecryptAndStoreGcKey(const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source) { R_RETURN(m_manager.DecryptAndStoreGcKey(src.GetPointer(), src.GetSize(), access_key, key_source, static_cast<u32>(smc::DeviceUniqueDataMode::DecryptAndStoreGcKey))); } Result DecryptGcMessage(sf::Out<u32> out_size, const sf::OutPointerBuffer &out, const sf::InPointerBuffer &base, const sf::InPointerBuffer &mod, const sf::InPointerBuffer &label_digest) { R_RETURN(m_manager.DecryptGcMessage(out_size.GetPointer(), out.GetPointer(), out.GetSize(), base.GetPointer(), base.GetSize(), mod.GetPointer(), mod.GetSize(), label_digest.GetPointer(), label_digest.GetSize())); } Result GenerateSpecificAesKey(sf::Out<AesKey> out_key, KeySource key_source, u32 generation, u32 which) { R_RETURN(m_manager.GenerateSpecificAesKey(out_key.GetPointer(), key_source, generation, which)); } Result LoadPreparedAesKey(s32 keyslot, AccessKey access_key) { R_RETURN(m_manager.LoadPreparedAesKey(keyslot, this, access_key)); } Result GetPackage2Hash(const sf::OutPointerBuffer &dst) { R_RETURN(m_manager.GetPackage2Hash(dst.GetPointer(), dst.GetSize())); } }; static_assert(spl::impl::IsIFsInterface<FsService>); }
2,639
C++
.h
45
50.666667
228
0.690255
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,253
spl_general_service.hpp
Atmosphere-NX_Atmosphere/stratosphere/spl/source/spl_general_service.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> #include "spl_secure_monitor_manager.hpp" namespace ams::spl { class GeneralService { protected: SecureMonitorManager &m_manager; public: explicit GeneralService(SecureMonitorManager *manager) : m_manager(*manager) { /* ... */ } public: /* Actual commands. */ Result GetConfig(sf::Out<u64> out, u32 key) { R_RETURN(m_manager.GetConfig(out.GetPointer(), static_cast<spl::ConfigItem>(key))); } Result ModularExponentiate(const sf::OutPointerBuffer &out, const sf::InPointerBuffer &base, const sf::InPointerBuffer &exp, const sf::InPointerBuffer &mod) { R_RETURN(m_manager.ModularExponentiate(out.GetPointer(), out.GetSize(), base.GetPointer(), base.GetSize(), exp.GetPointer(), exp.GetSize(), mod.GetPointer(), mod.GetSize())); } Result SetConfig(u32 key, u64 value) { R_RETURN(m_manager.SetConfig(static_cast<spl::ConfigItem>(key), value)); } Result GenerateRandomBytes(const sf::OutPointerBuffer &out) { R_RETURN(m_manager.GenerateRandomBytes(out.GetPointer(), out.GetSize())); } Result IsDevelopment(sf::Out<bool> is_dev) { R_RETURN(m_manager.IsDevelopment(is_dev.GetPointer())); } Result SetBootReason(BootReasonValue boot_reason) { R_RETURN(m_manager.SetBootReason(boot_reason)); } Result GetBootReason(sf::Out<BootReasonValue> out) { R_RETURN(m_manager.GetBootReason(out.GetPointer())); } }; static_assert(spl::impl::IsIGeneralInterface<GeneralService>); }
2,398
C++
.h
50
39.46
190
0.654126
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,254
spl_es_service.hpp
Atmosphere-NX_Atmosphere/stratosphere/spl/source/spl_es_service.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> #include "spl_device_unique_data_service.hpp" namespace ams::spl { class EsService : public DeviceUniqueDataService { public: explicit EsService(SecureMonitorManager *manager) : DeviceUniqueDataService(manager) { /* ... */ } public: /* Actual commands. */ Result LoadEsDeviceKeyDeprecated(const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source, u32 option) { R_RETURN(m_manager.LoadEsDeviceKey(src.GetPointer(), src.GetSize(), access_key, key_source, option)); } Result LoadEsDeviceKey(const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source) { R_RETURN(m_manager.LoadEsDeviceKey(src.GetPointer(), src.GetSize(), access_key, key_source, static_cast<u32>(smc::DeviceUniqueDataMode::DecryptAndStoreEsDeviceKey))); } Result PrepareEsTitleKey(sf::Out<AccessKey> out_access_key, const sf::InPointerBuffer &base, const sf::InPointerBuffer &mod, const sf::InPointerBuffer &label_digest, u32 generation) { R_RETURN(m_manager.PrepareEsTitleKey(out_access_key.GetPointer(), base.GetPointer(), base.GetSize(), mod.GetPointer(), mod.GetSize(), label_digest.GetPointer(), label_digest.GetSize(), generation)); } Result PrepareCommonEsTitleKey(sf::Out<AccessKey> out_access_key, KeySource key_source, u32 generation) { R_RETURN(m_manager.PrepareCommonEsTitleKey(out_access_key.GetPointer(), key_source, generation)); } Result DecryptAndStoreDrmDeviceCertKey(const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source) { R_RETURN(m_manager.DecryptAndStoreDrmDeviceCertKey(src.GetPointer(), src.GetSize(), access_key, key_source)); } Result ModularExponentiateWithDrmDeviceCertKey(const sf::OutPointerBuffer &out, const sf::InPointerBuffer &base, const sf::InPointerBuffer &mod) { R_RETURN(m_manager.ModularExponentiateWithDrmDeviceCertKey(out.GetPointer(), out.GetSize(), base.GetPointer(), base.GetSize(), mod.GetPointer(), mod.GetSize())); } Result PrepareEsArchiveKey(sf::Out<AccessKey> out_access_key, const sf::InPointerBuffer &base, const sf::InPointerBuffer &mod, const sf::InPointerBuffer &label_digest, u32 generation) { R_RETURN(m_manager.PrepareEsArchiveKey(out_access_key.GetPointer(), base.GetPointer(), base.GetSize(), mod.GetPointer(), mod.GetSize(), label_digest.GetPointer(), label_digest.GetSize(), generation)); } Result LoadPreparedAesKey(s32 keyslot, AccessKey access_key) { R_RETURN(m_manager.LoadPreparedAesKey(keyslot, this, access_key)); } Result PrepareEsUnknown2Key(sf::Out<AccessKey> out_access_key, const sf::InPointerBuffer &base, const sf::InPointerBuffer &mod, const sf::InPointerBuffer &label_digest, u32 generation) { R_RETURN(m_manager.PrepareEsUnknown2Key(out_access_key.GetPointer(), base.GetPointer(), base.GetSize(), mod.GetPointer(), mod.GetSize(), label_digest.GetPointer(), label_digest.GetSize(), generation)); } }; static_assert(spl::impl::IsIEsInterface<EsService>); }
3,953
C++
.h
54
64.111111
217
0.702932
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,255
spl_device_unique_data_service.hpp
Atmosphere-NX_Atmosphere/stratosphere/spl/source/spl_device_unique_data_service.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> #include "spl_crypto_service.hpp" namespace ams::spl { class DeviceUniqueDataService : public CryptoService { public: explicit DeviceUniqueDataService(SecureMonitorManager *manager) : CryptoService(manager) { /* ... */ } public: /* Actual commands. */ Result DecryptDeviceUniqueDataDeprecated(const sf::OutPointerBuffer &dst, const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source, u32 option) { R_RETURN(m_manager.DecryptDeviceUniqueData(dst.GetPointer(), dst.GetSize(), src.GetPointer(), src.GetSize(), access_key, key_source, option)); } Result DecryptDeviceUniqueData(const sf::OutPointerBuffer &dst, const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source) { R_RETURN(m_manager.DecryptDeviceUniqueData(dst.GetPointer(), dst.GetSize(), src.GetPointer(), src.GetSize(), access_key, key_source, static_cast<u32>(smc::DeviceUniqueDataMode::DecryptDeviceUniqueData))); } }; static_assert(spl::impl::IsIDeviceUniqueDataInterface<DeviceUniqueDataService>); }
1,808
C++
.h
33
49.242424
220
0.724449
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,256
spl_secure_monitor_manager.hpp
Atmosphere-NX_Atmosphere/stratosphere/spl/source/spl_secure_monitor_manager.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> namespace ams::spl { class SecureMonitorManager { private: const void *m_aes_keyslot_owners[impl::AesKeySlotCount]{}; public: constexpr SecureMonitorManager() = default; public: void Initialize(); private: Result TestAesKeySlot(s32 *out_index, s32 keyslot, const void *owner); public: Result ModularExponentiate(void *out, size_t out_size, const void *base, size_t base_size, const void *exp, size_t exp_size, const void *mod, size_t mod_size); Result GenerateAesKek(AccessKey *out_access_key, const KeySource &key_source, u32 generation, u32 option); Result LoadAesKey(s32 keyslot, const void *owner, const AccessKey &access_key, const KeySource &key_source); Result GenerateAesKey(AesKey *out_key, const AccessKey &access_key, const KeySource &key_source); Result DecryptDeviceUniqueData(void *dst, size_t dst_size, const void *src, size_t src_size, const AccessKey &access_key, const KeySource &key_source, u32 option); Result ReencryptDeviceUniqueData(void *dst, size_t dst_size, const void *src, size_t src_size, const AccessKey &access_key_dec, const KeySource &source_dec, const AccessKey &access_key_enc, const KeySource &source_enc, u32 option); Result GetConfig(u64 *out, spl::ConfigItem key); Result SetConfig(spl::ConfigItem key, u64 value); Result GetPackage2Hash(void *dst, const size_t size); Result GenerateRandomBytes(void *out, size_t size); Result DecryptAndStoreGcKey(const void *src, size_t src_size, const AccessKey &access_key, const KeySource &key_source, u32 option); Result DecryptGcMessage(u32 *out_size, void *dst, size_t dst_size, const void *base, size_t base_size, const void *mod, size_t mod_size, const void *label_digest, size_t label_digest_size); Result DecryptAndStoreSslClientCertKey(const void *src, size_t src_size, const AccessKey &access_key, const KeySource &key_source); Result ModularExponentiateWithSslClientCertKey(void *out, size_t out_size, const void *base, size_t base_size, const void *mod, size_t mod_size); Result DecryptAndStoreDrmDeviceCertKey(const void *src, size_t src_size, const AccessKey &access_key, const KeySource &key_source); Result ModularExponentiateWithDrmDeviceCertKey(void *out, size_t out_size, const void *base, size_t base_size, const void *mod, size_t mod_size); Result IsDevelopment(bool *out); Result GenerateSpecificAesKey(AesKey *out_key, const KeySource &key_source, u32 generation, u32 which); Result DecryptAesKey(AesKey *out_key, const KeySource &key_source, u32 generation, u32 option); Result ComputeCtr(void *dst, size_t dst_size, s32 keyslot, const void *owner, const void *src, size_t src_size, const IvCtr &iv_ctr); Result ComputeCmac(Cmac *out_cmac, s32 keyslot, const void *owner, const void *data, size_t size); Result LoadEsDeviceKey(const void *src, size_t src_size, const AccessKey &access_key, const KeySource &key_source, u32 option); Result PrepareEsTitleKey(AccessKey *out_access_key, const void *base, size_t base_size, const void *mod, size_t mod_size, const void *label_digest, size_t label_digest_size, u32 generation); Result PrepareEsArchiveKey(AccessKey *out_access_key, const void *base, size_t base_size, const void *mod, size_t mod_size, const void *label_digest, size_t label_digest_size, u32 generation); Result PrepareEsUnknown2Key(AccessKey *out_access_key, const void *base, size_t base_size, const void *mod, size_t mod_size, const void *label_digest, size_t label_digest_size, u32 generation); Result PrepareCommonEsTitleKey(AccessKey *out_access_key, const KeySource &key_source, u32 generation); Result LoadPreparedAesKey(s32 keyslot, const void *owner, const AccessKey &access_key); Result AllocateAesKeySlot(s32 *out_keyslot, const void *owner); Result DeallocateAesKeySlot(s32 keyslot, const void *owner); void DeallocateAesKeySlots(const void *owner); Result SetBootReason(BootReasonValue boot_reason); Result GetBootReason(BootReasonValue *out); os::SystemEvent *GetAesKeySlotAvailableEvent(); }; }
5,095
C++
.h
63
71.777778
243
0.709626
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,257
spl_deprecated_service.hpp
Atmosphere-NX_Atmosphere/stratosphere/spl/source/spl_deprecated_service.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> #include "spl_secure_monitor_manager.hpp" namespace ams::spl { class DeprecatedService { protected: SecureMonitorManager &m_manager; public: explicit DeprecatedService(SecureMonitorManager *manager) : m_manager(*manager) { /* ... */ } public: virtual ~DeprecatedService() { /* Free any keyslots this service is using. */ m_manager.DeallocateAesKeySlots(this); } public: /* Actual commands. */ Result GetConfig(sf::Out<u64> out, u32 which) { R_RETURN(m_manager.GetConfig(out.GetPointer(), static_cast<spl::ConfigItem>(which))); } Result ModularExponentiate(const sf::OutPointerBuffer &out, const sf::InPointerBuffer &base, const sf::InPointerBuffer &exp, const sf::InPointerBuffer &mod) { R_RETURN(m_manager.ModularExponentiate(out.GetPointer(), out.GetSize(), base.GetPointer(), base.GetSize(), exp.GetPointer(), exp.GetSize(), mod.GetPointer(), mod.GetSize())); } Result GenerateAesKek(sf::Out<AccessKey> out_access_key, KeySource key_source, u32 generation, u32 option) { R_RETURN(m_manager.GenerateAesKek(out_access_key.GetPointer(), key_source, generation, option)); } Result LoadAesKey(s32 keyslot, AccessKey access_key, KeySource key_source) { R_RETURN(m_manager.LoadAesKey(keyslot, this, access_key, key_source)); } Result GenerateAesKey(sf::Out<AesKey> out_key, AccessKey access_key, KeySource key_source) { R_RETURN(m_manager.GenerateAesKey(out_key.GetPointer(), access_key, key_source)); } Result SetConfig(u32 which, u64 value) { R_RETURN(m_manager.SetConfig(static_cast<spl::ConfigItem>(which), value)); } Result GenerateRandomBytes(const sf::OutPointerBuffer &out) { R_RETURN(m_manager.GenerateRandomBytes(out.GetPointer(), out.GetSize())); } Result DecryptAndStoreGcKey(const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source, u32 option) { R_RETURN(m_manager.DecryptAndStoreGcKey(src.GetPointer(), src.GetSize(), access_key, key_source, option)); } Result DecryptGcMessage(sf::Out<u32> out_size, const sf::OutPointerBuffer &out, const sf::InPointerBuffer &base, const sf::InPointerBuffer &mod, const sf::InPointerBuffer &label_digest) { R_RETURN(m_manager.DecryptGcMessage(out_size.GetPointer(), out.GetPointer(), out.GetSize(), base.GetPointer(), base.GetSize(), mod.GetPointer(), mod.GetSize(), label_digest.GetPointer(), label_digest.GetSize())); } Result IsDevelopment(sf::Out<bool> is_dev) { R_RETURN(m_manager.IsDevelopment(is_dev.GetPointer())); } Result GenerateSpecificAesKey(sf::Out<AesKey> out_key, KeySource key_source, u32 generation, u32 which) { R_RETURN(m_manager.GenerateSpecificAesKey(out_key.GetPointer(), key_source, generation, which)); } Result DecryptDeviceUniqueData(const sf::OutPointerBuffer &dst, const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source, u32 option) { R_RETURN(m_manager.DecryptDeviceUniqueData(dst.GetPointer(), dst.GetSize(), src.GetPointer(), src.GetSize(), access_key, key_source, option)); } Result DecryptAesKey(sf::Out<AesKey> out_key, KeySource key_source, u32 generation, u32 option) { R_RETURN(m_manager.DecryptAesKey(out_key.GetPointer(), key_source, generation, option)); } Result ComputeCtrDeprecated(const sf::OutBuffer &out_buf, s32 keyslot, const sf::InBuffer &in_buf, IvCtr iv_ctr) { R_RETURN(m_manager.ComputeCtr(out_buf.GetPointer(), out_buf.GetSize(), keyslot, this, in_buf.GetPointer(), in_buf.GetSize(), iv_ctr)); } Result ComputeCtr(const sf::OutNonSecureBuffer &out_buf, s32 keyslot, const sf::InNonSecureBuffer &in_buf, IvCtr iv_ctr) { R_RETURN(m_manager.ComputeCtr(out_buf.GetPointer(), out_buf.GetSize(), keyslot, this, in_buf.GetPointer(), in_buf.GetSize(), iv_ctr)); } Result ComputeCmac(sf::Out<Cmac> out_cmac, s32 keyslot, const sf::InPointerBuffer &in_buf) { R_RETURN(m_manager.ComputeCmac(out_cmac.GetPointer(), keyslot, this, in_buf.GetPointer(), in_buf.GetSize())); } Result LoadEsDeviceKey(const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source, u32 option) { R_RETURN(m_manager.LoadEsDeviceKey(src.GetPointer(), src.GetSize(), access_key, key_source, option)); } Result PrepareEsTitleKeyDeprecated(sf::Out<AccessKey> out_access_key, const sf::InPointerBuffer &base, const sf::InPointerBuffer &mod, const sf::InPointerBuffer &label_digest) { R_RETURN(m_manager.PrepareEsTitleKey(out_access_key.GetPointer(), base.GetPointer(), base.GetSize(), mod.GetPointer(), mod.GetSize(), label_digest.GetPointer(), label_digest.GetSize(), 0)); } Result PrepareEsTitleKey(sf::Out<AccessKey> out_access_key, const sf::InPointerBuffer &base, const sf::InPointerBuffer &mod, const sf::InPointerBuffer &label_digest, u32 generation) { R_RETURN(m_manager.PrepareEsTitleKey(out_access_key.GetPointer(), base.GetPointer(), base.GetSize(), mod.GetPointer(), mod.GetSize(), label_digest.GetPointer(), label_digest.GetSize(), generation)); } Result LoadPreparedAesKey(s32 keyslot, AccessKey access_key) { R_RETURN(m_manager.LoadPreparedAesKey(keyslot, this, access_key)); } Result PrepareCommonEsTitleKeyDeprecated(sf::Out<AccessKey> out_access_key, KeySource key_source) { R_RETURN(m_manager.PrepareCommonEsTitleKey(out_access_key.GetPointer(), key_source, 0)); } Result PrepareCommonEsTitleKey(sf::Out<AccessKey> out_access_key, KeySource key_source, u32 generation) { R_RETURN(m_manager.PrepareCommonEsTitleKey(out_access_key.GetPointer(), key_source, generation)); } Result AllocateAesKeySlot(sf::Out<s32> out_keyslot) { R_RETURN(m_manager.AllocateAesKeySlot(out_keyslot.GetPointer(), this)); } Result DeallocateAesKeySlot(s32 keyslot) { R_RETURN(m_manager.DeallocateAesKeySlot(keyslot, this)); } Result GetAesKeySlotAvailableEvent(sf::OutCopyHandle out_hnd) { out_hnd.SetValue(m_manager.GetAesKeySlotAvailableEvent()->GetReadableHandle(), false); R_SUCCEED(); } Result SetBootReason(BootReasonValue boot_reason) { R_RETURN(m_manager.SetBootReason(boot_reason)); } Result GetBootReason(sf::Out<BootReasonValue> out) { R_RETURN(m_manager.GetBootReason(out.GetPointer())); } }; static_assert(spl::impl::IsIDeprecatedGeneralInterface<DeprecatedService>); }
7,924
C++
.h
116
56.318966
228
0.656254
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,258
spl_random_service.hpp
Atmosphere-NX_Atmosphere/stratosphere/spl/source/spl_random_service.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> #include "spl_secure_monitor_manager.hpp" namespace ams::spl { class RandomService final { protected: SecureMonitorManager &m_manager; public: explicit RandomService(SecureMonitorManager *manager) : m_manager(*manager) { /* ... */ } public: /* Actual commands. */ Result GenerateRandomBytes(const sf::OutBuffer &out) { R_RETURN(m_manager.GenerateRandomBytes(out.GetPointer(), out.GetSize())); } }; static_assert(spl::impl::IsIRandomInterface<RandomService>); }
1,252
C++
.h
32
34.09375
101
0.697617
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,259
spl_ssl_service.hpp
Atmosphere-NX_Atmosphere/stratosphere/spl/source/spl_ssl_service.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> #include "spl_device_unique_data_service.hpp" namespace ams::spl { class SslService : public DeviceUniqueDataService { public: explicit SslService(SecureMonitorManager *manager) : DeviceUniqueDataService(manager) { /* ... */ } public: /* Actual commands. */ Result DecryptAndStoreSslClientCertKey(const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source) { R_RETURN(m_manager.DecryptAndStoreSslClientCertKey(src.GetPointer(), src.GetSize(), access_key, key_source)); } Result ModularExponentiateWithSslClientCertKey(const sf::OutPointerBuffer &out, const sf::InPointerBuffer &base, const sf::InPointerBuffer &mod) { R_RETURN(m_manager.ModularExponentiateWithSslClientCertKey(out.GetPointer(), out.GetSize(), base.GetPointer(), base.GetSize(), mod.GetPointer(), mod.GetSize())); } }; static_assert(spl::impl::IsISslInterface<SslService>); }
1,670
C++
.h
33
45.060606
177
0.71831
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,260
spl_manu_service.hpp
Atmosphere-NX_Atmosphere/stratosphere/spl/source/spl_manu_service.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> #include "spl_device_unique_data_service.hpp" namespace ams::spl { class ManuService : public DeviceUniqueDataService { public: explicit ManuService(SecureMonitorManager *manager) : DeviceUniqueDataService(manager) { /* ... */ } public: /* Actual commands. */ Result ReencryptDeviceUniqueData(const sf::OutPointerBuffer &out, const sf::InPointerBuffer &src, AccessKey access_key_dec, KeySource source_dec, AccessKey access_key_enc, KeySource source_enc, u32 option) { R_RETURN(m_manager.ReencryptDeviceUniqueData(out.GetPointer(), out.GetSize(), src.GetPointer(), src.GetSize(), access_key_dec, source_dec, access_key_enc, source_enc, option)); } }; static_assert(spl::impl::IsIManuInterface<ManuService>); }
1,480
C++
.h
30
44.7
219
0.724257
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,261
spl_crypto_service.hpp
Atmosphere-NX_Atmosphere/stratosphere/spl/source/spl_crypto_service.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> #include "spl_general_service.hpp" namespace ams::spl { class CryptoService : public GeneralService { public: explicit CryptoService(SecureMonitorManager *manager) : GeneralService(manager) { /* ... */ } public: virtual ~CryptoService(){ /* Free any keyslots this service is using. */ m_manager.DeallocateAesKeySlots(this); } public: /* Actual commands. */ Result GenerateAesKek(sf::Out<AccessKey> out_access_key, KeySource key_source, u32 generation, u32 option) { R_RETURN(m_manager.GenerateAesKek(out_access_key.GetPointer(), key_source, generation, option)); } Result LoadAesKey(s32 keyslot, AccessKey access_key, KeySource key_source) { R_RETURN(m_manager.LoadAesKey(keyslot, this, access_key, key_source)); } Result GenerateAesKey(sf::Out<AesKey> out_key, AccessKey access_key, KeySource key_source) { R_RETURN(m_manager.GenerateAesKey(out_key.GetPointer(), access_key, key_source)); } Result DecryptAesKey(sf::Out<AesKey> out_key, KeySource key_source, u32 generation, u32 option) { R_RETURN(m_manager.DecryptAesKey(out_key.GetPointer(), key_source, generation, option)); } Result ComputeCtr(const sf::OutNonSecureBuffer &out_buf, s32 keyslot, const sf::InNonSecureBuffer &in_buf, IvCtr iv_ctr) { R_RETURN(m_manager.ComputeCtr(out_buf.GetPointer(), out_buf.GetSize(), keyslot, this, in_buf.GetPointer(), in_buf.GetSize(), iv_ctr)); } Result ComputeCmac(sf::Out<Cmac> out_cmac, s32 keyslot, const sf::InPointerBuffer &in_buf) { R_RETURN(m_manager.ComputeCmac(out_cmac.GetPointer(), keyslot, this, in_buf.GetPointer(), in_buf.GetSize())); } Result AllocateAesKeySlot(sf::Out<s32> out_keyslot) { R_RETURN(m_manager.AllocateAesKeySlot(out_keyslot.GetPointer(), this)); } Result DeallocateAesKeySlot(s32 keyslot) { R_RETURN(m_manager.DeallocateAesKeySlot(keyslot, this)); } Result GetAesKeySlotAvailableEvent(sf::OutCopyHandle out_hnd) { out_hnd.SetValue(m_manager.GetAesKeySlotAvailableEvent()->GetReadableHandle(), false); R_SUCCEED(); } }; static_assert(spl::impl::IsICryptoInterface<CryptoService>); }
3,187
C++
.h
60
43.5
150
0.653081
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,262
dmnt2_hardware_watchpoint.hpp
Atmosphere-NX_Atmosphere/stratosphere/dmnt.gen2/source/dmnt2_hardware_watchpoint.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> #include "dmnt2_breakpoint_manager_base.hpp" namespace ams::dmnt { struct WatchPoint : public BreakPointBase { svc::HardwareBreakPointRegisterName m_reg; svc::HardwareBreakPointRegisterName m_ctx; bool m_read; bool m_write; void Initialize(svc::HardwareBreakPointRegisterName r, svc::HardwareBreakPointRegisterName c) { m_reg = r; m_ctx = c; } virtual Result Clear(DebugProcess *debug_process) override; Result Set(DebugProcess *debug_process, uintptr_t address, size_t size, bool read, bool write); }; class HardwareWatchPointManager : public BreakPointManagerBase { public: static constexpr size_t BreakPointCountMax = 0x10; private: WatchPoint m_breakpoints[BreakPointCountMax]; public: static bool IsValidWatchPoint(u64 address, u64 size); public: explicit HardwareWatchPointManager(DebugProcess *debug_process); Result SetWatchPoint(u64 address, u64 size, bool read, bool write); Result GetWatchPointInfo(u64 address, bool &read, bool &write); private: virtual BreakPointBase *GetBreakPoint(size_t index) override; }; }
1,935
C++
.h
46
35.673913
103
0.703664
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,263
dmnt2_breakpoint_manager.hpp
Atmosphere-NX_Atmosphere/stratosphere/dmnt.gen2/source/dmnt2_breakpoint_manager.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> #include "dmnt2_breakpoint_manager_base.hpp" namespace ams::dmnt { class DebugProcess; struct BreakPoint : public BreakPointBase { bool m_is_step; BreakPoint() { /* ... */ } virtual Result Set(DebugProcess *debug_process, uintptr_t address, size_t size, bool is_step) = 0; }; class BreakPointManager : public BreakPointManagerBase { public: explicit BreakPointManager(DebugProcess *debug_process); void ClearStep(); Result SetBreakPoint(uintptr_t address, size_t size, bool is_step); }; }
1,261
C++
.h
32
34.96875
106
0.714169
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,264
dmnt2_breakpoint_manager_base.hpp
Atmosphere-NX_Atmosphere/stratosphere/dmnt.gen2/source/dmnt2_breakpoint_manager_base.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> namespace ams::dmnt { class DebugProcess; struct BreakPointBase { bool m_in_use; uintptr_t m_address; size_t m_size; BreakPointBase() : m_in_use(false) { /* ... */ } void Reset() { m_in_use = false; } virtual Result Clear(DebugProcess *debug_process) = 0; }; class BreakPointManagerBase { protected: DebugProcess *m_debug_process; public: explicit BreakPointManagerBase(DebugProcess *debug_process); void ClearAll(); void Reset(); Result ClearBreakPoint(uintptr_t address, size_t size); protected: virtual BreakPointBase *GetBreakPoint(size_t index) = 0; BreakPointBase *GetFreeBreakPoint(); }; }
1,458
C++
.h
40
30.475
76
0.672818
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,265
dmnt2_debug_process.hpp
Atmosphere-NX_Atmosphere/stratosphere/dmnt.gen2/source/dmnt2_debug_process.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> #include "dmnt2_gdb_signal.hpp" #include "dmnt2_module_definition.hpp" #include "dmnt2_software_breakpoint.hpp" #include "dmnt2_hardware_breakpoint.hpp" #include "dmnt2_hardware_watchpoint.hpp" namespace ams::dmnt { class DebugProcess { public: static constexpr size_t ThreadCountMax = 0x100; static constexpr size_t ModuleCountMax = 0x60; enum ProcessStatus { ProcessStatus_DebugBreak, ProcessStatus_Running, ProcessStatus_Exited, }; enum ContinueMode { ContinueMode_Stopped, ContinueMode_Continue, ContinueMode_Step, }; private: os::NativeHandle m_debug_handle{os::InvalidNativeHandle}; s32 m_thread_count{0}; bool m_is_valid{false}; bool m_is_64_bit{false}; bool m_is_64_bit_address_space{false}; ProcessStatus m_status{ProcessStatus_DebugBreak}; os::ProcessId m_process_id{os::InvalidProcessId}; u64 m_last_thread_id{}; u64 m_thread_id_override{}; u64 m_continue_thread_id{}; u64 m_preferred_debug_break_thread_id{}; GdbSignal m_last_signal{}; bool m_stepping{false}; bool m_use_hardware_single_step{false}; bool m_thread_valid[ThreadCountMax]{}; u64 m_thread_ids[ThreadCountMax]{}; osdbg::ThreadInfo m_thread_infos[ThreadCountMax]{}; svc::DebugInfoCreateProcess m_create_process_info{}; SoftwareBreakPointManager m_software_breakpoints; HardwareBreakPointManager m_hardware_breakpoints; HardwareWatchPointManager m_hardware_watchpoints; BreakPointManager &m_step_breakpoints; ModuleDefinition m_module_definitions[ModuleCountMax]{}; size_t m_module_count{}; size_t m_main_module{}; u64 m_process_alias_address{}; u64 m_process_alias_size{}; u64 m_process_heap_address{}; u64 m_process_heap_size{}; u64 m_process_aslr_address{}; u64 m_process_aslr_size{}; u64 m_process_stack_address{}; u64 m_process_stack_size{}; ncm::ProgramLocation m_program_location{}; cfg::OverrideStatus m_process_override_status{}; bool m_is_application{false}; public: DebugProcess() : m_software_breakpoints(this), m_hardware_breakpoints(this), m_hardware_watchpoints(this), m_step_breakpoints(m_software_breakpoints) { if (svc::IsKernelMesosphere()) { uint64_t value = 0; m_use_hardware_single_step = R_SUCCEEDED(::ams::svc::GetInfo(std::addressof(value), ::ams::svc::InfoType_MesosphereMeta, ::ams::svc::InvalidHandle, ::ams::svc::MesosphereMetaInfo_IsSingleStepEnabled)) && value != 0; } } ~DebugProcess() { this->Detach(); } os::NativeHandle GetHandle() const { return m_debug_handle; } bool IsValid() const { return m_is_valid; } bool Is64Bit() const { return m_is_64_bit; } bool Is64BitAddressSpace() const { return m_is_64_bit_address_space; } size_t GetModuleCount() const { return m_module_count; } size_t GetMainModuleIndex() const { return m_main_module; } const char *GetModuleName(size_t ix) const { return m_module_definitions[ix].GetName(); } uintptr_t GetModuleBaseAddress(size_t ix) const { return m_module_definitions[ix].GetAddress(); } uintptr_t GetModuleSize(size_t ix) const { return m_module_definitions[ix].GetSize(); } ProcessStatus GetStatus() const { return m_status; } os::ProcessId GetProcessId() const { return m_process_id; } const char *GetProcessName() const { return m_create_process_info.name; } void SetLastSignal(GdbSignal signal) { m_last_signal = signal; } GdbSignal GetLastSignal() const { return m_last_signal; } Result GetThreadList(s32 *out_count, u64 *out_thread_ids, size_t max_count); Result GetThreadInfoList(s32 *out_count, osdbg::ThreadInfo **out_infos, size_t max_count); u64 GetLastThreadId(); u64 GetThreadIdOverride() { this->GetLastThreadId(); return m_thread_id_override; } u64 GetPreferredDebuggerBreakThreadId() { return m_preferred_debug_break_thread_id; } void SetLastThreadId(u64 tid) { m_last_thread_id = tid; m_thread_id_override = tid; } void SetThreadIdOverride(u64 tid) { m_thread_id_override = tid; m_preferred_debug_break_thread_id = tid; } void SetDebugBreaked() { m_status = ProcessStatus_DebugBreak; } u64 GetAliasRegionAddress() const { return m_process_alias_address; } u64 GetAliasRegionSize() const { return m_process_alias_size; } u64 GetHeapRegionAddress() const { return m_process_heap_address; } u64 GetHeapRegionSize() const { return m_process_heap_size; } u64 GetAslrRegionAddress() const { return m_process_aslr_address; } u64 GetAslrRegionSize() const { return m_process_aslr_size; } u64 GetStackRegionAddress() const { return m_process_stack_address; } u64 GetStackRegionSize() const { return m_process_stack_size; } const ncm::ProgramLocation &GetProgramLocation() const { return m_program_location; } const cfg::OverrideStatus &GetOverrideStatus() const { return m_process_override_status; } bool IsApplication() const { return m_is_application; } public: Result Attach(os::ProcessId process_id, bool start_process = false); void Detach(); Result GetThreadContext(svc::ThreadContext *out, u64 thread_id, u32 flags); Result SetThreadContext(const svc::ThreadContext *ctx, u64 thread_id, u32 flags); Result ReadMemory(void *dst, uintptr_t address, size_t size); Result WriteMemory(const void *src, uintptr_t address, size_t size); Result QueryMemory(svc::MemoryInfo *out, uintptr_t address); Result Continue(); Result Continue(u64 thread_id); Result Step(); Result Step(u64 thread_id); void ClearStep(); Result Break(); Result Terminate(); Result SetBreakPoint(uintptr_t address, size_t size, bool is_step); Result ClearBreakPoint(uintptr_t address, size_t size); Result SetHardwareBreakPoint(uintptr_t address, size_t size, bool is_step); Result ClearHardwareBreakPoint(uintptr_t address, size_t size); Result SetWatchPoint(u64 address, u64 size, bool read, bool write); Result ClearWatchPoint(u64 address, u64 size); Result GetWatchPointInfo(u64 address, bool &read, bool &write); static bool IsValidWatchPoint(u64 address, u64 size); Result GetThreadCurrentCore(u32 *out, u64 thread_id); Result GetProcessDebugEvent(svc::DebugEventInfo *out); void GetBranchTarget(svc::ThreadContext &ctx, u64 thread_id, u64 &current_pc, u64 &target); Result CollectModules(); void GetThreadName(char *dst, u64 thread_id) const; private: Result Start(); void CollectProcessInfo(); s32 ThreadCreate(u64 thread_id); void ThreadExit(u64 thread_id); }; }
8,483
C++
.h
158
42.012658
235
0.626507
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,266
dmnt2_transport_layer.hpp
Atmosphere-NX_Atmosphere/stratosphere/dmnt.gen2/source/dmnt2_transport_layer.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> namespace ams::dmnt::transport { void InitializeByHtcs(); void InitializeByTcp(); enum PortName { PortName_GdbServer, PortName_GdbDebugLog, }; s32 Socket(); s32 Close(s32 desc); s32 Bind(s32 desc, PortName port_name); s32 Listen(s32 desc, s32 backlog_count); s32 Accept(s32 desc); s32 Shutdown(s32 desc); ssize_t Recv(s32 desc, void *buffer, size_t buffer_size, s32 flags); ssize_t Send(s32 desc, const void *buffer, size_t buffer_size, s32 flags); s32 GetLastError(); bool IsLastErrorEAgain(); }
1,251
C++
.h
35
32.114286
78
0.721488
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,267
dmnt2_transport_receive_buffer.hpp
Atmosphere-NX_Atmosphere/stratosphere/dmnt.gen2/source/dmnt2_transport_receive_buffer.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> namespace ams::dmnt { class TransportReceiveBuffer { public: static constexpr size_t ReceiveBufferSize = 4_KB; private: u8 m_buffer[ReceiveBufferSize]; os::Event m_readable_event; os::Event m_writable_event; os::SdkMutex m_mutex; size_t m_readable_size; size_t m_offset; bool m_valid; public: TransportReceiveBuffer() : m_readable_event(os::EventClearMode_ManualClear), m_writable_event(os::EventClearMode_ManualClear), m_mutex(), m_readable_size(), m_offset(), m_valid(true) { /* ... */ } ALWAYS_INLINE bool IsReadable() const { return m_readable_size != 0; } ALWAYS_INLINE bool IsWritable() const { return m_readable_size == 0; } ALWAYS_INLINE bool IsValid() const { return m_valid; } ssize_t Read(void *dst, size_t size); ssize_t Write(const void *src, size_t size); bool WaitToBeReadable(); bool WaitToBeReadable(TimeSpan timeout); bool WaitToBeWritable(); void Invalidate(); }; }
1,815
C++
.h
42
35.833333
208
0.654216
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,268
dmnt2_debug_log.hpp
Atmosphere-NX_Atmosphere/stratosphere/dmnt.gen2/source/dmnt2_debug_log.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> namespace ams::dmnt { void InitializeDebugLog(); void DebugLog(const char *prefix, const char *fmt, ...) __attribute((format(printf, 2, 3))); #define AMS_DMNT2_DEBUG_LOG(fmt, ...) ::ams::dmnt::DebugLog("[dmnt2] ", fmt, ## __VA_ARGS__) #define AMS_DMNT2_GDB_LOG_INFO(fmt, ...) ::ams::dmnt::DebugLog("[gdb-i] ", fmt, ## __VA_ARGS__) #define AMS_DMNT2_GDB_LOG_WARN(fmt, ...) ::ams::dmnt::DebugLog("[gdb-w] ", fmt, ## __VA_ARGS__) #define AMS_DMNT2_GDB_LOG_ERROR(fmt, ...) ::ams::dmnt::DebugLog("[gdb-e] ", fmt, ## __VA_ARGS__) #define AMS_DMNT2_GDB_LOG_DEBUG(fmt, ...) ::ams::dmnt::DebugLog("[gdb-d] ", fmt, ## __VA_ARGS__) }
1,334
C++
.h
26
48.5
100
0.673062
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,269
dmnt2_gdb_server_impl.hpp
Atmosphere-NX_Atmosphere/stratosphere/dmnt.gen2/source/dmnt2_gdb_server_impl.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> #include "dmnt2_gdb_packet_io.hpp" #include "dmnt2_gdb_signal.hpp" #include "dmnt2_debug_process.hpp" namespace ams::dmnt { class GdbServerImpl { private: enum class State { Initial, Running, Exited, Destroyed, }; private: int m_socket; TransportSession m_session; GdbPacketIo m_packet_io; char *m_receive_packet{nullptr}; char *m_reply_cur{nullptr}; char *m_reply_end{nullptr}; char m_buffer[GdbPacketBufferSize / 2]; bool m_killed{false}; os::ThreadType m_events_thread; State m_state; DebugProcess m_debug_process; os::ProcessId m_process_id{os::InvalidProcessId}; os::Event m_event; os::ProcessId m_wait_process_id{os::InvalidProcessId}; public: GdbServerImpl(int socket, void *thread_stack, size_t stack_size); ~GdbServerImpl(); void LoopProcess(); private: void ProcessPacket(char *receive, char *reply); void SendPacket(bool *out_break, const char *src) { return m_packet_io.SendPacket(out_break, src, std::addressof(m_session)); } char *ReceivePacket(bool *out_break, char *dst, size_t size) { return m_packet_io.ReceivePacket(out_break, dst, size, std::addressof(m_session)); } private: bool HasDebugProcess() const { return m_debug_process.IsValid(); } bool Is64Bit() const { return m_debug_process.Is64Bit(); } bool Is64BitAddressSpace() const { return m_debug_process.Is64BitAddressSpace(); } private: static void DebugEventsThreadEntry(void *arg) { static_cast<GdbServerImpl *>(arg)->DebugEventsThread(); } void DebugEventsThread(); void ProcessDebugEvents(); void AppendStopReplyPacket(GdbSignal signal); private: void D(); void G(); void H(); void Hg(); void M(); void P(); void Q(); void QStartNoAckMode(); void T(); void Z(); void c(); bool g(); void k(); void m(); void p(); void v(); void vAttach(); void vCont(); void q(); void qAttached(); void qC(); void qRcmd(); void qSupported(); void qXfer(); void qXferFeaturesRead(); void qXferLibrariesRead(); void qXferOsdataRead(); bool qXferThreadsRead(); void z(); void QuestionMark(); private: Result ParseVCont(char * const token, u64 *thread_ids, u8 *continue_modes, s32 num_threads, DebugProcess::ContinueMode &default_continue_mode); }; }
3,666
C++
.h
96
27.875
159
0.580936
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,270
dmnt2_transport_session.hpp
Atmosphere-NX_Atmosphere/stratosphere/dmnt.gen2/source/dmnt2_transport_session.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> #include "dmnt2_transport_receive_buffer.hpp" namespace ams::dmnt { class TransportSession { private: alignas(os::ThreadStackAlignment) u8 m_receive_thread_stack[util::AlignUp(os::MemoryPageSize + TransportReceiveBuffer::ReceiveBufferSize, os::ThreadStackAlignment)]; TransportReceiveBuffer m_receive_buffer; os::ThreadType m_receive_thread; int m_socket; bool m_valid; public: TransportSession(int fd); ~TransportSession(); ALWAYS_INLINE bool IsValid() const { return m_valid; } bool WaitToBeReadable(); bool WaitToBeReadable(TimeSpan timeout); util::optional<char> GetChar(); ssize_t PutChar(char c); ssize_t PutString(const char *str); private: static void ReceiveThreadEntry(void *arg) { static_cast<TransportSession *>(arg)->ReceiveThreadFunction(); } void ReceiveThreadFunction(); }; }
1,715
C++
.h
42
33.619048
177
0.67527
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
9,271
dmnt2_gdb_signal.hpp
Atmosphere-NX_Atmosphere/stratosphere/dmnt.gen2/source/dmnt2_gdb_signal.hpp
/* * Copyright (c) Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stratosphere.hpp> namespace ams::dmnt { enum GdbSignal { GdbSignal_Signal0 = 0, GdbSignal_Interrupt = 2, GdbSignal_IllegalInstruction = 4, GdbSignal_BreakpointTrap = 5, GdbSignal_EmulationTrap = 7, GdbSignal_ArithmeticException = 8, GdbSignal_Killed = 9, GdbSignal_BusError = 10, GdbSignal_SegmentationFault = 11, GdbSignal_BadSystemCall = 12, }; }
1,170
C++
.h
31
33.387097
76
0.665787
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false