chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.
Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.
The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.
Following REUSE has a few advantages over the current approach:
- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
`.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
files like binary assets / images is always accurate and up to date
To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.
[REUSE]: https://reuse.software
Follow-up to 01cf05bc75b1e47beb08937439f3ed9339e7b254
2022-05-15 02:06:02 +02:00
|
|
|
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
2018-01-18 01:37:34 +01:00
|
|
|
add_library(core STATIC
|
|
|
|
arm/arm_interface.h
|
2018-12-29 02:55:19 +01:00
|
|
|
arm/arm_interface.cpp
|
2018-07-03 15:28:46 +02:00
|
|
|
arm/exclusive_monitor.cpp
|
|
|
|
arm/exclusive_monitor.h
|
2022-04-09 05:53:42 +02:00
|
|
|
arm/symbols.cpp
|
|
|
|
arm/symbols.h
|
2019-06-07 23:46:52 +02:00
|
|
|
constants.cpp
|
|
|
|
constants.h
|
2018-01-18 01:37:34 +01:00
|
|
|
core.cpp
|
|
|
|
core.h
|
|
|
|
core_timing.cpp
|
|
|
|
core_timing.h
|
2020-01-26 19:07:22 +01:00
|
|
|
cpu_manager.cpp
|
|
|
|
cpu_manager.h
|
2018-07-28 22:23:00 +02:00
|
|
|
crypto/aes_util.cpp
|
2018-07-28 05:55:23 +02:00
|
|
|
crypto/aes_util.h
|
|
|
|
crypto/encryption_layer.cpp
|
|
|
|
crypto/encryption_layer.h
|
|
|
|
crypto/key_manager.cpp
|
|
|
|
crypto/key_manager.h
|
2018-09-24 03:06:07 +02:00
|
|
|
crypto/partition_data_manager.cpp
|
|
|
|
crypto/partition_data_manager.h
|
2018-07-28 05:55:23 +02:00
|
|
|
crypto/ctr_encryption_layer.cpp
|
|
|
|
crypto/ctr_encryption_layer.h
|
2018-08-16 23:08:13 +02:00
|
|
|
crypto/xts_encryption_layer.cpp
|
|
|
|
crypto/xts_encryption_layer.h
|
2022-05-31 01:35:01 +02:00
|
|
|
debugger/debugger_interface.h
|
|
|
|
debugger/debugger.cpp
|
|
|
|
debugger/debugger.h
|
|
|
|
debugger/gdbstub_arch.cpp
|
|
|
|
debugger/gdbstub_arch.h
|
|
|
|
debugger/gdbstub.cpp
|
|
|
|
debugger/gdbstub.h
|
2020-04-03 04:00:41 +02:00
|
|
|
device_memory.cpp
|
|
|
|
device_memory.h
|
2023-08-11 03:34:43 +02:00
|
|
|
file_sys/fssystem/fs_i_storage.h
|
|
|
|
file_sys/fssystem/fssystem_aes_ctr_counter_extended_storage.cpp
|
|
|
|
file_sys/fssystem/fssystem_aes_ctr_counter_extended_storage.h
|
|
|
|
file_sys/fssystem/fssystem_aes_ctr_storage.cpp
|
|
|
|
file_sys/fssystem/fssystem_aes_ctr_storage.h
|
|
|
|
file_sys/fssystem/fssystem_aes_xts_storage.cpp
|
|
|
|
file_sys/fssystem/fssystem_aes_xts_storage.h
|
|
|
|
file_sys/fssystem/fssystem_alignment_matching_storage.h
|
|
|
|
file_sys/fssystem/fssystem_alignment_matching_storage_impl.cpp
|
|
|
|
file_sys/fssystem/fssystem_alignment_matching_storage_impl.h
|
|
|
|
file_sys/fssystem/fssystem_bucket_tree.cpp
|
|
|
|
file_sys/fssystem/fssystem_bucket_tree.h
|
|
|
|
file_sys/fssystem/fssystem_bucket_tree_utils.h
|
|
|
|
file_sys/fssystem/fssystem_compressed_storage.h
|
|
|
|
file_sys/fssystem/fssystem_compression_common.h
|
|
|
|
file_sys/fssystem/fssystem_compression_configuration.cpp
|
|
|
|
file_sys/fssystem/fssystem_compression_configuration.h
|
|
|
|
file_sys/fssystem/fssystem_crypto_configuration.cpp
|
|
|
|
file_sys/fssystem/fssystem_crypto_configuration.h
|
|
|
|
file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.cpp
|
|
|
|
file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.h
|
|
|
|
file_sys/fssystem/fssystem_hierarchical_sha256_storage.cpp
|
|
|
|
file_sys/fssystem/fssystem_hierarchical_sha256_storage.h
|
|
|
|
file_sys/fssystem/fssystem_indirect_storage.cpp
|
|
|
|
file_sys/fssystem/fssystem_indirect_storage.h
|
|
|
|
file_sys/fssystem/fssystem_integrity_romfs_storage.cpp
|
|
|
|
file_sys/fssystem/fssystem_integrity_romfs_storage.h
|
|
|
|
file_sys/fssystem/fssystem_integrity_verification_storage.cpp
|
|
|
|
file_sys/fssystem/fssystem_integrity_verification_storage.h
|
|
|
|
file_sys/fssystem/fssystem_memory_resource_buffer_hold_storage.h
|
|
|
|
file_sys/fssystem/fssystem_nca_file_system_driver.cpp
|
|
|
|
file_sys/fssystem/fssystem_nca_file_system_driver.h
|
|
|
|
file_sys/fssystem/fssystem_nca_header.cpp
|
|
|
|
file_sys/fssystem/fssystem_nca_header.h
|
|
|
|
file_sys/fssystem/fssystem_nca_reader.cpp
|
|
|
|
file_sys/fssystem/fssystem_pooled_buffer.cpp
|
|
|
|
file_sys/fssystem/fssystem_pooled_buffer.h
|
|
|
|
file_sys/fssystem/fssystem_sparse_storage.cpp
|
|
|
|
file_sys/fssystem/fssystem_sparse_storage.h
|
|
|
|
file_sys/fssystem/fssystem_switch_storage.h
|
|
|
|
file_sys/fssystem/fssystem_utility.cpp
|
|
|
|
file_sys/fssystem/fssystem_utility.h
|
|
|
|
file_sys/fssystem/fs_types.h
|
2018-08-10 02:51:52 +02:00
|
|
|
file_sys/bis_factory.cpp
|
|
|
|
file_sys/bis_factory.h
|
2018-07-28 05:55:23 +02:00
|
|
|
file_sys/card_image.cpp
|
|
|
|
file_sys/card_image.h
|
2020-12-04 07:41:21 +01:00
|
|
|
file_sys/common_funcs.h
|
2018-07-19 03:07:11 +02:00
|
|
|
file_sys/content_archive.cpp
|
|
|
|
file_sys/content_archive.h
|
2018-07-23 18:33:24 +02:00
|
|
|
file_sys/control_metadata.cpp
|
|
|
|
file_sys/control_metadata.h
|
2018-01-20 04:34:48 +01:00
|
|
|
file_sys/directory.h
|
2018-01-18 01:37:34 +01:00
|
|
|
file_sys/errors.h
|
2018-09-20 04:03:36 +02:00
|
|
|
file_sys/fsmitm_romfsbuild.cpp
|
2018-09-24 03:50:16 +02:00
|
|
|
file_sys/fsmitm_romfsbuild.h
|
2018-09-30 04:15:16 +02:00
|
|
|
file_sys/ips_layer.cpp
|
|
|
|
file_sys/ips_layer.h
|
2019-06-05 06:18:25 +02:00
|
|
|
file_sys/kernel_executable.cpp
|
|
|
|
file_sys/kernel_executable.h
|
2018-07-19 03:07:11 +02:00
|
|
|
file_sys/mode.h
|
2018-08-10 02:51:52 +02:00
|
|
|
file_sys/nca_metadata.cpp
|
|
|
|
file_sys/nca_metadata.h
|
2018-04-16 12:29:15 +02:00
|
|
|
file_sys/partition_filesystem.cpp
|
|
|
|
file_sys/partition_filesystem.h
|
2018-08-26 01:05:22 +02:00
|
|
|
file_sys/patch_manager.cpp
|
|
|
|
file_sys/patch_manager.h
|
2018-02-25 11:34:19 +01:00
|
|
|
file_sys/program_metadata.cpp
|
|
|
|
file_sys/program_metadata.h
|
2018-08-10 02:51:52 +02:00
|
|
|
file_sys/registered_cache.cpp
|
|
|
|
file_sys/registered_cache.h
|
2018-07-28 00:14:03 +02:00
|
|
|
file_sys/romfs.cpp
|
|
|
|
file_sys/romfs.h
|
2018-07-08 05:24:51 +02:00
|
|
|
file_sys/romfs_factory.cpp
|
|
|
|
file_sys/romfs_factory.h
|
|
|
|
file_sys/savedata_factory.cpp
|
|
|
|
file_sys/savedata_factory.h
|
|
|
|
file_sys/sdmc_factory.cpp
|
|
|
|
file_sys/sdmc_factory.h
|
2018-08-25 17:50:15 +02:00
|
|
|
file_sys/submission_package.cpp
|
|
|
|
file_sys/submission_package.h
|
2019-07-06 00:49:52 +02:00
|
|
|
file_sys/system_archive/data/font_chinese_simplified.cpp
|
|
|
|
file_sys/system_archive/data/font_chinese_simplified.h
|
|
|
|
file_sys/system_archive/data/font_chinese_traditional.cpp
|
|
|
|
file_sys/system_archive/data/font_chinese_traditional.h
|
|
|
|
file_sys/system_archive/data/font_extended_chinese_simplified.cpp
|
|
|
|
file_sys/system_archive/data/font_extended_chinese_simplified.h
|
|
|
|
file_sys/system_archive/data/font_korean.cpp
|
|
|
|
file_sys/system_archive/data/font_korean.h
|
|
|
|
file_sys/system_archive/data/font_nintendo_extended.cpp
|
|
|
|
file_sys/system_archive/data/font_nintendo_extended.h
|
|
|
|
file_sys/system_archive/data/font_standard.cpp
|
|
|
|
file_sys/system_archive/data/font_standard.h
|
2019-07-10 13:21:36 +02:00
|
|
|
file_sys/system_archive/mii_model.cpp
|
|
|
|
file_sys/system_archive/mii_model.h
|
2018-11-16 04:34:35 +01:00
|
|
|
file_sys/system_archive/ng_word.cpp
|
|
|
|
file_sys/system_archive/ng_word.h
|
2019-07-06 00:49:52 +02:00
|
|
|
file_sys/system_archive/shared_font.cpp
|
|
|
|
file_sys/system_archive/shared_font.h
|
2018-11-16 04:34:35 +01:00
|
|
|
file_sys/system_archive/system_archive.cpp
|
|
|
|
file_sys/system_archive/system_archive.h
|
2019-03-10 21:51:42 +01:00
|
|
|
file_sys/system_archive/system_version.cpp
|
|
|
|
file_sys/system_archive/system_version.h
|
2019-12-22 23:50:44 +01:00
|
|
|
file_sys/system_archive/time_zone_binary.cpp
|
|
|
|
file_sys/system_archive/time_zone_binary.h
|
2018-07-19 03:07:11 +02:00
|
|
|
file_sys/vfs.cpp
|
|
|
|
file_sys/vfs.h
|
2023-06-03 14:42:52 +02:00
|
|
|
file_sys/vfs_cached.cpp
|
|
|
|
file_sys/vfs_cached.h
|
2018-08-10 02:51:52 +02:00
|
|
|
file_sys/vfs_concat.cpp
|
|
|
|
file_sys/vfs_concat.h
|
2018-09-20 04:03:36 +02:00
|
|
|
file_sys/vfs_layered.cpp
|
|
|
|
file_sys/vfs_layered.h
|
2018-07-19 03:07:11 +02:00
|
|
|
file_sys/vfs_offset.cpp
|
|
|
|
file_sys/vfs_offset.h
|
|
|
|
file_sys/vfs_real.cpp
|
|
|
|
file_sys/vfs_real.h
|
2018-09-20 03:57:39 +02:00
|
|
|
file_sys/vfs_static.h
|
2018-09-24 03:04:13 +02:00
|
|
|
file_sys/vfs_types.h
|
2018-07-28 00:14:03 +02:00
|
|
|
file_sys/vfs_vector.cpp
|
|
|
|
file_sys/vfs_vector.h
|
2018-08-16 23:08:13 +02:00
|
|
|
file_sys/xts_archive.cpp
|
|
|
|
file_sys/xts_archive.h
|
2022-11-13 18:07:48 +01:00
|
|
|
frontend/applets/cabinet.cpp
|
|
|
|
frontend/applets/cabinet.h
|
2020-08-21 13:39:24 +02:00
|
|
|
frontend/applets/controller.cpp
|
|
|
|
frontend/applets/controller.h
|
2019-03-12 00:37:10 +01:00
|
|
|
frontend/applets/error.cpp
|
|
|
|
frontend/applets/error.h
|
|
|
|
frontend/applets/general_frontend.cpp
|
|
|
|
frontend/applets/general_frontend.h
|
2022-03-17 08:01:03 +01:00
|
|
|
frontend/applets/mii_edit.cpp
|
|
|
|
frontend/applets/mii_edit.h
|
2018-11-23 02:58:51 +01:00
|
|
|
frontend/applets/profile_select.cpp
|
|
|
|
frontend/applets/profile_select.h
|
2018-11-10 02:10:58 +01:00
|
|
|
frontend/applets/software_keyboard.cpp
|
|
|
|
frontend/applets/software_keyboard.h
|
2018-12-24 22:22:07 +01:00
|
|
|
frontend/applets/web_browser.cpp
|
|
|
|
frontend/applets/web_browser.h
|
2018-01-18 01:37:34 +01:00
|
|
|
frontend/emu_window.cpp
|
|
|
|
frontend/emu_window.h
|
|
|
|
frontend/framebuffer_layout.cpp
|
|
|
|
frontend/framebuffer_layout.h
|
2023-02-19 08:31:39 +01:00
|
|
|
frontend/graphics_context.h
|
2021-09-21 02:43:16 +02:00
|
|
|
hid/emulated_console.cpp
|
|
|
|
hid/emulated_console.h
|
|
|
|
hid/emulated_controller.cpp
|
|
|
|
hid/emulated_controller.h
|
|
|
|
hid/emulated_devices.cpp
|
|
|
|
hid/emulated_devices.h
|
|
|
|
hid/hid_core.cpp
|
|
|
|
hid/hid_core.h
|
2021-09-20 23:29:43 +02:00
|
|
|
hid/hid_types.h
|
|
|
|
hid/input_converter.cpp
|
|
|
|
hid/input_converter.h
|
2021-09-20 22:02:01 +02:00
|
|
|
hid/input_interpreter.cpp
|
|
|
|
hid/input_interpreter.h
|
2022-06-19 06:36:29 +02:00
|
|
|
hid/irs_types.h
|
2021-09-20 23:29:43 +02:00
|
|
|
hid/motion_input.cpp
|
|
|
|
hid/motion_input.h
|
2021-06-15 09:35:43 +02:00
|
|
|
hle/api_version.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/ipc.h
|
2023-03-07 03:04:12 +01:00
|
|
|
hle/kernel/board/nintendo/nx/k_memory_layout.cpp
|
2022-02-22 02:38:11 +01:00
|
|
|
hle/kernel/board/nintendo/nx/k_memory_layout.h
|
2021-02-19 03:38:23 +01:00
|
|
|
hle/kernel/board/nintendo/nx/k_system_control.cpp
|
|
|
|
hle/kernel/board/nintendo/nx/k_system_control.h
|
2021-03-20 08:00:49 +01:00
|
|
|
hle/kernel/board/nintendo/nx/secure_monitor.h
|
2019-03-20 17:40:09 +01:00
|
|
|
hle/kernel/code_set.cpp
|
|
|
|
hle/kernel/code_set.h
|
2021-02-13 00:43:01 +01:00
|
|
|
hle/kernel/svc_results.h
|
2020-12-04 01:43:18 +01:00
|
|
|
hle/kernel/global_scheduler_context.cpp
|
|
|
|
hle/kernel/global_scheduler_context.h
|
2021-04-03 07:16:58 +02:00
|
|
|
hle/kernel/init/init_slab_setup.cpp
|
|
|
|
hle/kernel/init/init_slab_setup.h
|
2022-02-22 02:39:19 +01:00
|
|
|
hle/kernel/initial_process.h
|
2020-12-30 08:18:06 +01:00
|
|
|
hle/kernel/k_address_arbiter.cpp
|
|
|
|
hle/kernel/k_address_arbiter.h
|
2021-02-13 00:47:05 +01:00
|
|
|
hle/kernel/k_address_space_info.cpp
|
|
|
|
hle/kernel/k_address_space_info.h
|
2021-03-31 23:43:39 +02:00
|
|
|
hle/kernel/k_auto_object.cpp
|
|
|
|
hle/kernel/k_auto_object.h
|
2021-04-01 06:06:02 +02:00
|
|
|
hle/kernel/k_auto_object_container.cpp
|
|
|
|
hle/kernel/k_auto_object_container.h
|
2020-11-17 06:02:45 +01:00
|
|
|
hle/kernel/k_affinity_mask.h
|
2023-01-29 01:38:00 +01:00
|
|
|
hle/kernel/k_capabilities.cpp
|
|
|
|
hle/kernel/k_capabilities.h
|
2021-04-04 04:11:46 +02:00
|
|
|
hle/kernel/k_class_token.cpp
|
|
|
|
hle/kernel/k_class_token.h
|
2021-04-22 06:43:25 +02:00
|
|
|
hle/kernel/k_client_port.cpp
|
|
|
|
hle/kernel/k_client_port.h
|
2021-04-14 02:48:37 +02:00
|
|
|
hle/kernel/k_client_session.cpp
|
|
|
|
hle/kernel/k_client_session.h
|
2021-12-05 21:56:44 +01:00
|
|
|
hle/kernel/k_code_memory.cpp
|
|
|
|
hle/kernel/k_code_memory.h
|
2020-12-29 08:45:28 +01:00
|
|
|
hle/kernel/k_condition_variable.cpp
|
|
|
|
hle/kernel/k_condition_variable.h
|
2022-10-29 21:13:17 +02:00
|
|
|
hle/kernel/k_debug.h
|
2023-01-29 21:03:29 +01:00
|
|
|
hle/kernel/k_device_address_space.cpp
|
|
|
|
hle/kernel/k_device_address_space.h
|
2022-09-06 02:51:50 +02:00
|
|
|
hle/kernel/k_dynamic_page_manager.h
|
2022-09-06 02:55:51 +02:00
|
|
|
hle/kernel/k_dynamic_resource_manager.h
|
2022-09-06 02:53:44 +02:00
|
|
|
hle/kernel/k_dynamic_slab_heap.h
|
2021-01-31 10:37:41 +01:00
|
|
|
hle/kernel/k_event.cpp
|
|
|
|
hle/kernel/k_event.h
|
2022-10-29 22:19:33 +02:00
|
|
|
hle/kernel/k_event_info.h
|
2021-04-24 11:40:31 +02:00
|
|
|
hle/kernel/k_handle_table.cpp
|
|
|
|
hle/kernel/k_handle_table.h
|
2022-12-18 22:37:19 +01:00
|
|
|
hle/kernel/k_hardware_timer_base.h
|
|
|
|
hle/kernel/k_hardware_timer.cpp
|
|
|
|
hle/kernel/k_hardware_timer.h
|
2021-12-30 06:40:38 +01:00
|
|
|
hle/kernel/k_interrupt_manager.cpp
|
|
|
|
hle/kernel/k_interrupt_manager.h
|
2021-11-10 05:54:44 +01:00
|
|
|
hle/kernel/k_light_condition_variable.cpp
|
2021-01-30 10:40:49 +01:00
|
|
|
hle/kernel/k_light_condition_variable.h
|
2021-01-16 06:58:44 +01:00
|
|
|
hle/kernel/k_light_lock.cpp
|
|
|
|
hle/kernel/k_light_lock.h
|
2021-02-13 02:02:51 +01:00
|
|
|
hle/kernel/k_memory_block.h
|
|
|
|
hle/kernel/k_memory_block_manager.cpp
|
|
|
|
hle/kernel/k_memory_block_manager.h
|
2021-03-20 08:53:00 +01:00
|
|
|
hle/kernel/k_memory_layout.cpp
|
2021-02-13 01:02:35 +01:00
|
|
|
hle/kernel/k_memory_layout.h
|
2021-02-13 02:38:40 +01:00
|
|
|
hle/kernel/k_memory_manager.cpp
|
|
|
|
hle/kernel/k_memory_manager.h
|
2021-02-13 09:42:30 +01:00
|
|
|
hle/kernel/k_memory_region.h
|
2021-02-13 10:07:23 +01:00
|
|
|
hle/kernel/k_memory_region_type.h
|
2023-02-17 05:16:08 +01:00
|
|
|
hle/kernel/k_object_name.cpp
|
|
|
|
hle/kernel/k_object_name.h
|
2021-02-12 03:39:06 +01:00
|
|
|
hle/kernel/k_page_bitmap.h
|
2022-03-18 03:09:01 +01:00
|
|
|
hle/kernel/k_page_buffer.cpp
|
2022-03-11 09:18:35 +01:00
|
|
|
hle/kernel/k_page_buffer.h
|
2021-02-13 02:58:31 +01:00
|
|
|
hle/kernel/k_page_heap.cpp
|
|
|
|
hle/kernel/k_page_heap.h
|
2023-01-08 00:32:10 +01:00
|
|
|
hle/kernel/k_page_group.cpp
|
2022-06-26 06:15:31 +02:00
|
|
|
hle/kernel/k_page_group.h
|
2021-02-13 02:58:31 +01:00
|
|
|
hle/kernel/k_page_table.cpp
|
|
|
|
hle/kernel/k_page_table.h
|
2022-10-29 22:38:45 +02:00
|
|
|
hle/kernel/k_page_table_manager.h
|
2022-10-29 22:35:50 +02:00
|
|
|
hle/kernel/k_page_table_slab_heap.h
|
2021-04-24 02:00:15 +02:00
|
|
|
hle/kernel/k_port.cpp
|
|
|
|
hle/kernel/k_port.h
|
2020-11-28 20:23:36 +01:00
|
|
|
hle/kernel/k_priority_queue.h
|
2021-04-24 07:04:28 +02:00
|
|
|
hle/kernel/k_process.cpp
|
|
|
|
hle/kernel/k_process.h
|
2021-01-30 07:48:06 +01:00
|
|
|
hle/kernel/k_readable_event.cpp
|
|
|
|
hle/kernel/k_readable_event.h
|
2021-01-30 10:40:49 +01:00
|
|
|
hle/kernel/k_resource_limit.cpp
|
|
|
|
hle/kernel/k_resource_limit.h
|
2020-12-03 03:08:35 +01:00
|
|
|
hle/kernel/k_scheduler.cpp
|
|
|
|
hle/kernel/k_scheduler.h
|
2020-11-28 22:34:07 +01:00
|
|
|
hle/kernel/k_scheduler_lock.h
|
2020-12-04 07:26:42 +01:00
|
|
|
hle/kernel/k_scoped_lock.h
|
2021-02-05 02:06:54 +01:00
|
|
|
hle/kernel/k_scoped_resource_reservation.h
|
2020-12-04 06:56:02 +01:00
|
|
|
hle/kernel/k_scoped_scheduler_lock_and_sleep.h
|
2021-04-22 06:53:56 +02:00
|
|
|
hle/kernel/k_server_port.cpp
|
|
|
|
hle/kernel/k_server_port.h
|
2021-04-14 02:48:37 +02:00
|
|
|
hle/kernel/k_server_session.cpp
|
|
|
|
hle/kernel/k_server_session.h
|
|
|
|
hle/kernel/k_session.cpp
|
|
|
|
hle/kernel/k_session.h
|
2022-10-15 03:24:25 +02:00
|
|
|
hle/kernel/k_session_request.cpp
|
|
|
|
hle/kernel/k_session_request.h
|
2021-02-06 08:14:31 +01:00
|
|
|
hle/kernel/k_shared_memory.cpp
|
|
|
|
hle/kernel/k_shared_memory.h
|
2021-09-25 17:01:53 +02:00
|
|
|
hle/kernel/k_shared_memory_info.h
|
2021-02-13 01:21:12 +01:00
|
|
|
hle/kernel/k_slab_heap.h
|
2021-02-09 03:02:36 +01:00
|
|
|
hle/kernel/k_spin_lock.cpp
|
|
|
|
hle/kernel/k_spin_lock.h
|
2020-12-22 07:36:53 +01:00
|
|
|
hle/kernel/k_synchronization_object.cpp
|
|
|
|
hle/kernel/k_synchronization_object.h
|
2021-02-12 03:55:22 +01:00
|
|
|
hle/kernel/k_system_control.h
|
2022-10-29 23:33:33 +02:00
|
|
|
hle/kernel/k_system_resource.cpp
|
|
|
|
hle/kernel/k_system_resource.h
|
2020-12-31 08:01:08 +01:00
|
|
|
hle/kernel/k_thread.cpp
|
|
|
|
hle/kernel/k_thread.h
|
2022-03-11 09:36:33 +01:00
|
|
|
hle/kernel/k_thread_local_page.cpp
|
|
|
|
hle/kernel/k_thread_local_page.h
|
2021-11-10 04:02:11 +01:00
|
|
|
hle/kernel/k_thread_queue.cpp
|
2021-01-16 06:53:56 +01:00
|
|
|
hle/kernel/k_thread_queue.h
|
2022-12-18 22:37:19 +01:00
|
|
|
hle/kernel/k_timer_task.h
|
2021-03-20 07:03:57 +01:00
|
|
|
hle/kernel/k_trace.h
|
2021-04-17 09:52:53 +02:00
|
|
|
hle/kernel/k_transfer_memory.cpp
|
|
|
|
hle/kernel/k_transfer_memory.h
|
2023-03-18 02:26:04 +01:00
|
|
|
hle/kernel/k_typed_address.h
|
2022-01-15 01:24:59 +01:00
|
|
|
hle/kernel/k_worker_task.h
|
|
|
|
hle/kernel/k_worker_task_manager.cpp
|
|
|
|
hle/kernel/k_worker_task_manager.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/kernel/kernel.cpp
|
|
|
|
hle/kernel/kernel.h
|
2021-02-13 02:02:51 +01:00
|
|
|
hle/kernel/memory_types.h
|
2023-07-01 21:03:48 +02:00
|
|
|
hle/kernel/message_buffer.h
|
2020-01-25 23:55:32 +01:00
|
|
|
hle/kernel/physical_core.cpp
|
|
|
|
hle/kernel/physical_core.h
|
2020-07-17 04:56:28 +02:00
|
|
|
hle/kernel/physical_memory.h
|
2018-12-19 18:57:47 +01:00
|
|
|
hle/kernel/process_capability.cpp
|
|
|
|
hle/kernel/process_capability.h
|
2021-04-01 06:12:33 +02:00
|
|
|
hle/kernel/slab_helpers.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/kernel/svc.cpp
|
|
|
|
hle/kernel/svc.h
|
2020-12-29 07:42:16 +01:00
|
|
|
hle/kernel/svc_common.h
|
2020-03-27 02:13:46 +01:00
|
|
|
hle/kernel/svc_types.h
|
2022-10-05 02:15:40 +02:00
|
|
|
hle/kernel/svc/svc_activity.cpp
|
|
|
|
hle/kernel/svc/svc_address_arbiter.cpp
|
|
|
|
hle/kernel/svc/svc_address_translation.cpp
|
|
|
|
hle/kernel/svc/svc_cache.cpp
|
|
|
|
hle/kernel/svc/svc_code_memory.cpp
|
|
|
|
hle/kernel/svc/svc_condition_variable.cpp
|
|
|
|
hle/kernel/svc/svc_debug.cpp
|
|
|
|
hle/kernel/svc/svc_debug_string.cpp
|
|
|
|
hle/kernel/svc/svc_device_address_space.cpp
|
|
|
|
hle/kernel/svc/svc_event.cpp
|
|
|
|
hle/kernel/svc/svc_exception.cpp
|
|
|
|
hle/kernel/svc/svc_info.cpp
|
2023-02-05 20:22:02 +01:00
|
|
|
hle/kernel/svc/svc_insecure_memory.cpp
|
2022-10-05 02:15:40 +02:00
|
|
|
hle/kernel/svc/svc_interrupt_event.cpp
|
|
|
|
hle/kernel/svc/svc_io_pool.cpp
|
|
|
|
hle/kernel/svc/svc_ipc.cpp
|
|
|
|
hle/kernel/svc/svc_kernel_debug.cpp
|
|
|
|
hle/kernel/svc/svc_light_ipc.cpp
|
|
|
|
hle/kernel/svc/svc_lock.cpp
|
|
|
|
hle/kernel/svc/svc_memory.cpp
|
|
|
|
hle/kernel/svc/svc_physical_memory.cpp
|
|
|
|
hle/kernel/svc/svc_port.cpp
|
|
|
|
hle/kernel/svc/svc_power_management.cpp
|
|
|
|
hle/kernel/svc/svc_process.cpp
|
|
|
|
hle/kernel/svc/svc_process_memory.cpp
|
|
|
|
hle/kernel/svc/svc_processor.cpp
|
|
|
|
hle/kernel/svc/svc_query_memory.cpp
|
|
|
|
hle/kernel/svc/svc_register.cpp
|
|
|
|
hle/kernel/svc/svc_resource_limit.cpp
|
|
|
|
hle/kernel/svc/svc_secure_monitor_call.cpp
|
|
|
|
hle/kernel/svc/svc_session.cpp
|
|
|
|
hle/kernel/svc/svc_shared_memory.cpp
|
|
|
|
hle/kernel/svc/svc_synchronization.cpp
|
|
|
|
hle/kernel/svc/svc_thread.cpp
|
|
|
|
hle/kernel/svc/svc_thread_profiler.cpp
|
|
|
|
hle/kernel/svc/svc_tick.cpp
|
|
|
|
hle/kernel/svc/svc_transfer_memory.cpp
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/result.h
|
|
|
|
hle/service/acc/acc.cpp
|
|
|
|
hle/service/acc/acc.h
|
2018-04-10 09:18:52 +02:00
|
|
|
hle/service/acc/acc_aa.cpp
|
|
|
|
hle/service/acc/acc_aa.h
|
|
|
|
hle/service/acc/acc_su.cpp
|
|
|
|
hle/service/acc/acc_su.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/acc/acc_u0.cpp
|
|
|
|
hle/service/acc/acc_u0.h
|
2018-04-10 09:18:52 +02:00
|
|
|
hle/service/acc/acc_u1.cpp
|
|
|
|
hle/service/acc/acc_u1.h
|
2021-09-06 13:16:21 +02:00
|
|
|
hle/service/acc/async_context.cpp
|
|
|
|
hle/service/acc/async_context.h
|
2019-06-28 07:31:29 +02:00
|
|
|
hle/service/acc/errors.h
|
2018-08-08 14:26:42 +02:00
|
|
|
hle/service/acc/profile_manager.cpp
|
|
|
|
hle/service/acc/profile_manager.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/am/am.cpp
|
|
|
|
hle/service/am/am.h
|
2018-02-02 22:03:40 +01:00
|
|
|
hle/service/am/applet_ae.cpp
|
|
|
|
hle/service/am/applet_ae.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/am/applet_oe.cpp
|
|
|
|
hle/service/am/applet_oe.h
|
2022-11-13 18:07:48 +01:00
|
|
|
hle/service/am/applets/applet_cabinet.cpp
|
|
|
|
hle/service/am/applets/applet_cabinet.h
|
2021-07-14 06:38:24 +02:00
|
|
|
hle/service/am/applets/applet_controller.cpp
|
|
|
|
hle/service/am/applets/applet_controller.h
|
|
|
|
hle/service/am/applets/applet_error.cpp
|
|
|
|
hle/service/am/applets/applet_error.h
|
|
|
|
hle/service/am/applets/applet_general_backend.cpp
|
|
|
|
hle/service/am/applets/applet_general_backend.h
|
2022-03-17 08:01:03 +01:00
|
|
|
hle/service/am/applets/applet_mii_edit.cpp
|
|
|
|
hle/service/am/applets/applet_mii_edit.h
|
2022-03-17 08:52:48 +01:00
|
|
|
hle/service/am/applets/applet_mii_edit_types.h
|
2021-07-14 06:38:24 +02:00
|
|
|
hle/service/am/applets/applet_profile_select.cpp
|
|
|
|
hle/service/am/applets/applet_profile_select.h
|
|
|
|
hle/service/am/applets/applet_software_keyboard.cpp
|
|
|
|
hle/service/am/applets/applet_software_keyboard.h
|
|
|
|
hle/service/am/applets/applet_software_keyboard_types.h
|
|
|
|
hle/service/am/applets/applet_web_browser.cpp
|
|
|
|
hle/service/am/applets/applet_web_browser.h
|
|
|
|
hle/service/am/applets/applet_web_browser_types.h
|
2018-11-10 02:09:37 +01:00
|
|
|
hle/service/am/applets/applets.cpp
|
|
|
|
hle/service/am/applets/applets.h
|
2018-07-31 13:01:49 +02:00
|
|
|
hle/service/am/idle.cpp
|
|
|
|
hle/service/am/idle.h
|
|
|
|
hle/service/am/omm.cpp
|
|
|
|
hle/service/am/omm.h
|
|
|
|
hle/service/am/spsm.cpp
|
|
|
|
hle/service/am/spsm.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/aoc/aoc_u.cpp
|
|
|
|
hle/service/aoc/aoc_u.h
|
|
|
|
hle/service/apm/apm.cpp
|
|
|
|
hle/service/apm/apm.h
|
2021-07-14 06:52:17 +02:00
|
|
|
hle/service/apm/apm_controller.cpp
|
|
|
|
hle/service/apm/apm_controller.h
|
|
|
|
hle/service/apm/apm_interface.cpp
|
|
|
|
hle/service/apm/apm_interface.h
|
2018-08-01 01:59:42 +02:00
|
|
|
hle/service/audio/audctl.cpp
|
|
|
|
hle/service/audio/audctl.h
|
2018-01-22 04:03:36 +01:00
|
|
|
hle/service/audio/audin_u.cpp
|
|
|
|
hle/service/audio/audin_u.h
|
2018-07-24 12:02:53 +02:00
|
|
|
hle/service/audio/audio.cpp
|
|
|
|
hle/service/audio/audio.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/audio/audout_u.cpp
|
|
|
|
hle/service/audio/audout_u.h
|
2018-08-01 01:59:42 +02:00
|
|
|
hle/service/audio/audrec_a.cpp
|
|
|
|
hle/service/audio/audrec_a.h
|
2018-01-22 04:03:36 +01:00
|
|
|
hle/service/audio/audrec_u.cpp
|
|
|
|
hle/service/audio/audrec_u.h
|
|
|
|
hle/service/audio/audren_u.cpp
|
2018-07-24 12:02:53 +02:00
|
|
|
hle/service/audio/audren_u.h
|
2019-03-05 22:45:22 +01:00
|
|
|
hle/service/audio/errors.h
|
2018-06-25 15:44:17 +02:00
|
|
|
hle/service/audio/hwopus.cpp
|
|
|
|
hle/service/audio/hwopus.h
|
2019-04-29 00:49:46 +02:00
|
|
|
hle/service/bcat/backend/backend.cpp
|
|
|
|
hle/service/bcat/backend/backend.h
|
2018-05-28 15:36:38 +02:00
|
|
|
hle/service/bcat/bcat.cpp
|
|
|
|
hle/service/bcat/bcat.h
|
2021-07-14 06:52:17 +02:00
|
|
|
hle/service/bcat/bcat_module.cpp
|
|
|
|
hle/service/bcat/bcat_module.h
|
2018-08-01 21:40:55 +02:00
|
|
|
hle/service/bpc/bpc.cpp
|
|
|
|
hle/service/bpc/bpc.h
|
2018-07-27 00:00:50 +02:00
|
|
|
hle/service/btdrv/btdrv.cpp
|
|
|
|
hle/service/btdrv/btdrv.h
|
2018-07-29 02:59:09 +02:00
|
|
|
hle/service/btm/btm.cpp
|
|
|
|
hle/service/btm/btm.h
|
2018-08-01 22:24:03 +02:00
|
|
|
hle/service/caps/caps.cpp
|
|
|
|
hle/service/caps/caps.h
|
2020-04-01 01:16:36 +02:00
|
|
|
hle/service/caps/caps_a.cpp
|
|
|
|
hle/service/caps/caps_a.h
|
|
|
|
hle/service/caps/caps_c.cpp
|
|
|
|
hle/service/caps/caps_c.h
|
|
|
|
hle/service/caps/caps_u.cpp
|
|
|
|
hle/service/caps/caps_u.h
|
|
|
|
hle/service/caps/caps_sc.cpp
|
|
|
|
hle/service/caps/caps_sc.h
|
|
|
|
hle/service/caps/caps_ss.cpp
|
|
|
|
hle/service/caps/caps_ss.h
|
|
|
|
hle/service/caps/caps_su.cpp
|
|
|
|
hle/service/caps/caps_su.h
|
2018-07-26 01:04:31 +02:00
|
|
|
hle/service/erpt/erpt.cpp
|
|
|
|
hle/service/erpt/erpt.h
|
2018-07-25 21:30:50 +02:00
|
|
|
hle/service/es/es.cpp
|
|
|
|
hle/service/es/es.h
|
2018-07-26 01:15:31 +02:00
|
|
|
hle/service/eupld/eupld.cpp
|
|
|
|
hle/service/eupld/eupld.h
|
2018-03-20 14:55:20 +01:00
|
|
|
hle/service/fatal/fatal.cpp
|
|
|
|
hle/service/fatal/fatal.h
|
|
|
|
hle/service/fatal/fatal_p.cpp
|
|
|
|
hle/service/fatal/fatal_p.h
|
|
|
|
hle/service/fatal/fatal_u.cpp
|
|
|
|
hle/service/fatal/fatal_u.h
|
2018-01-17 04:20:12 +01:00
|
|
|
hle/service/filesystem/filesystem.cpp
|
|
|
|
hle/service/filesystem/filesystem.h
|
2018-08-01 22:55:07 +02:00
|
|
|
hle/service/filesystem/fsp_ldr.cpp
|
|
|
|
hle/service/filesystem/fsp_ldr.h
|
|
|
|
hle/service/filesystem/fsp_pr.cpp
|
|
|
|
hle/service/filesystem/fsp_pr.h
|
2018-01-17 04:20:12 +01:00
|
|
|
hle/service/filesystem/fsp_srv.cpp
|
|
|
|
hle/service/filesystem/fsp_srv.h
|
2018-07-31 13:20:42 +02:00
|
|
|
hle/service/fgm/fgm.cpp
|
|
|
|
hle/service/fgm/fgm.h
|
2018-02-19 23:34:02 +01:00
|
|
|
hle/service/friend/friend.cpp
|
|
|
|
hle/service/friend/friend.h
|
2021-07-14 06:52:17 +02:00
|
|
|
hle/service/friend/friend_interface.cpp
|
|
|
|
hle/service/friend/friend_interface.h
|
2019-06-25 01:20:28 +02:00
|
|
|
hle/service/glue/arp.cpp
|
|
|
|
hle/service/glue/arp.h
|
|
|
|
hle/service/glue/bgtc.cpp
|
|
|
|
hle/service/glue/bgtc.h
|
2021-04-24 17:26:30 +02:00
|
|
|
hle/service/glue/ectx.cpp
|
|
|
|
hle/service/glue/ectx.h
|
2019-06-25 01:20:28 +02:00
|
|
|
hle/service/glue/errors.h
|
|
|
|
hle/service/glue/glue.cpp
|
|
|
|
hle/service/glue/glue.h
|
2021-07-14 06:52:17 +02:00
|
|
|
hle/service/glue/glue_manager.cpp
|
|
|
|
hle/service/glue/glue_manager.h
|
2021-12-06 05:55:23 +01:00
|
|
|
hle/service/glue/notif.cpp
|
|
|
|
hle/service/glue/notif.h
|
2018-07-26 15:25:54 +02:00
|
|
|
hle/service/grc/grc.cpp
|
|
|
|
hle/service/grc/grc.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/hid/hid.cpp
|
|
|
|
hle/service/hid/hid.h
|
2021-05-03 01:41:03 +02:00
|
|
|
hle/service/hid/hidbus.cpp
|
|
|
|
hle/service/hid/hidbus.h
|
2018-07-26 14:39:25 +02:00
|
|
|
hle/service/hid/irs.cpp
|
|
|
|
hle/service/hid/irs.h
|
2022-06-19 22:54:21 +02:00
|
|
|
hle/service/hid/irs_ring_lifo.h
|
2021-09-21 03:25:22 +02:00
|
|
|
hle/service/hid/ring_lifo.h
|
2018-07-26 14:50:32 +02:00
|
|
|
hle/service/hid/xcd.cpp
|
|
|
|
hle/service/hid/xcd.h
|
2019-07-01 07:12:57 +02:00
|
|
|
hle/service/hid/errors.h
|
2021-04-22 20:15:59 +02:00
|
|
|
hle/service/hid/controllers/console_sixaxis.cpp
|
|
|
|
hle/service/hid/controllers/console_sixaxis.h
|
2018-10-05 16:23:21 +02:00
|
|
|
hle/service/hid/controllers/controller_base.cpp
|
|
|
|
hle/service/hid/controllers/controller_base.h
|
|
|
|
hle/service/hid/controllers/debug_pad.cpp
|
|
|
|
hle/service/hid/controllers/debug_pad.h
|
|
|
|
hle/service/hid/controllers/gesture.cpp
|
|
|
|
hle/service/hid/controllers/gesture.h
|
|
|
|
hle/service/hid/controllers/keyboard.cpp
|
|
|
|
hle/service/hid/controllers/keyboard.h
|
|
|
|
hle/service/hid/controllers/mouse.cpp
|
|
|
|
hle/service/hid/controllers/mouse.h
|
|
|
|
hle/service/hid/controllers/npad.cpp
|
|
|
|
hle/service/hid/controllers/npad.h
|
2022-01-19 03:08:56 +01:00
|
|
|
hle/service/hid/controllers/palma.cpp
|
|
|
|
hle/service/hid/controllers/palma.h
|
2018-10-05 16:23:21 +02:00
|
|
|
hle/service/hid/controllers/stubbed.cpp
|
|
|
|
hle/service/hid/controllers/stubbed.h
|
|
|
|
hle/service/hid/controllers/touchscreen.cpp
|
|
|
|
hle/service/hid/controllers/touchscreen.h
|
|
|
|
hle/service/hid/controllers/xpad.cpp
|
|
|
|
hle/service/hid/controllers/xpad.h
|
2021-05-03 01:41:03 +02:00
|
|
|
hle/service/hid/hidbus/hidbus_base.cpp
|
|
|
|
hle/service/hid/hidbus/hidbus_base.h
|
|
|
|
hle/service/hid/hidbus/ringcon.cpp
|
|
|
|
hle/service/hid/hidbus/ringcon.h
|
|
|
|
hle/service/hid/hidbus/starlink.cpp
|
|
|
|
hle/service/hid/hidbus/starlink.h
|
|
|
|
hle/service/hid/hidbus/stubbed.cpp
|
|
|
|
hle/service/hid/hidbus/stubbed.h
|
2022-06-19 06:45:06 +02:00
|
|
|
hle/service/hid/irsensor/clustering_processor.cpp
|
|
|
|
hle/service/hid/irsensor/clustering_processor.h
|
|
|
|
hle/service/hid/irsensor/image_transfer_processor.cpp
|
|
|
|
hle/service/hid/irsensor/image_transfer_processor.h
|
|
|
|
hle/service/hid/irsensor/ir_led_processor.cpp
|
|
|
|
hle/service/hid/irsensor/ir_led_processor.h
|
|
|
|
hle/service/hid/irsensor/moment_processor.cpp
|
|
|
|
hle/service/hid/irsensor/moment_processor.h
|
|
|
|
hle/service/hid/irsensor/pointing_processor.cpp
|
|
|
|
hle/service/hid/irsensor/pointing_processor.h
|
|
|
|
hle/service/hid/irsensor/processor_base.cpp
|
|
|
|
hle/service/hid/irsensor/processor_base.h
|
|
|
|
hle/service/hid/irsensor/tera_plugin_processor.cpp
|
|
|
|
hle/service/hid/irsensor/tera_plugin_processor.h
|
2018-07-27 19:48:33 +02:00
|
|
|
hle/service/lbl/lbl.cpp
|
|
|
|
hle/service/lbl/lbl.h
|
2022-07-31 04:46:26 +02:00
|
|
|
hle/service/ldn/lan_discovery.cpp
|
|
|
|
hle/service/ldn/lan_discovery.h
|
2022-08-07 23:54:51 +02:00
|
|
|
hle/service/ldn/ldn_results.h
|
2018-07-26 07:16:08 +02:00
|
|
|
hle/service/ldn/ldn.cpp
|
|
|
|
hle/service/ldn/ldn.h
|
2022-08-07 23:54:51 +02:00
|
|
|
hle/service/ldn/ldn_types.h
|
2018-07-26 04:57:08 +02:00
|
|
|
hle/service/ldr/ldr.cpp
|
|
|
|
hle/service/ldr/ldr.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/lm/lm.cpp
|
|
|
|
hle/service/lm/lm.h
|
2018-08-02 15:59:08 +02:00
|
|
|
hle/service/mig/mig.cpp
|
|
|
|
hle/service/mig/mig.h
|
2018-07-27 21:39:30 +02:00
|
|
|
hle/service/mii/mii.cpp
|
|
|
|
hle/service/mii/mii.h
|
2021-07-14 06:52:17 +02:00
|
|
|
hle/service/mii/mii_manager.cpp
|
|
|
|
hle/service/mii/mii_manager.h
|
2020-07-11 04:52:07 +02:00
|
|
|
hle/service/mii/raw_data.cpp
|
|
|
|
hle/service/mii/raw_data.h
|
|
|
|
hle/service/mii/types.h
|
2018-06-05 11:19:29 +02:00
|
|
|
hle/service/mm/mm_u.cpp
|
|
|
|
hle/service/mm/mm_u.h
|
2022-02-11 04:55:28 +01:00
|
|
|
hle/service/mnpp/mnpp_app.cpp
|
|
|
|
hle/service/mnpp/mnpp_app.h
|
2018-07-27 23:32:45 +02:00
|
|
|
hle/service/ncm/ncm.cpp
|
|
|
|
hle/service/ncm/ncm.h
|
2023-04-20 03:01:23 +02:00
|
|
|
hle/service/nfc/common/amiibo_crypto.cpp
|
|
|
|
hle/service/nfc/common/amiibo_crypto.h
|
|
|
|
hle/service/nfc/common/device.cpp
|
|
|
|
hle/service/nfc/common/device.h
|
|
|
|
hle/service/nfc/common/device_manager.cpp
|
|
|
|
hle/service/nfc/common/device_manager.h
|
|
|
|
hle/service/nfc/mifare_result.h
|
|
|
|
hle/service/nfc/mifare_types.h
|
2018-07-27 20:32:39 +02:00
|
|
|
hle/service/nfc/nfc.cpp
|
|
|
|
hle/service/nfc/nfc.h
|
2023-04-20 03:01:23 +02:00
|
|
|
hle/service/nfc/nfc_interface.cpp
|
|
|
|
hle/service/nfc/nfc_interface.h
|
2022-11-09 20:04:11 +01:00
|
|
|
hle/service/nfc/nfc_result.h
|
2023-04-20 03:01:23 +02:00
|
|
|
hle/service/nfc/nfc_types.h
|
2018-07-24 12:02:53 +02:00
|
|
|
hle/service/nfp/nfp.cpp
|
|
|
|
hle/service/nfp/nfp.h
|
2023-04-14 04:24:35 +02:00
|
|
|
hle/service/nfp/nfp_interface.cpp
|
|
|
|
hle/service/nfp/nfp_interface.h
|
2022-09-25 04:28:06 +02:00
|
|
|
hle/service/nfp/nfp_result.h
|
|
|
|
hle/service/nfp/nfp_types.h
|
2021-08-27 02:16:09 +02:00
|
|
|
hle/service/ngct/ngct.cpp
|
|
|
|
hle/service/ngct/ngct.h
|
2018-02-02 12:31:27 +01:00
|
|
|
hle/service/nifm/nifm.cpp
|
|
|
|
hle/service/nifm/nifm.h
|
2018-07-26 08:17:15 +02:00
|
|
|
hle/service/nim/nim.cpp
|
|
|
|
hle/service/nim/nim.h
|
2018-10-21 23:01:01 +02:00
|
|
|
hle/service/npns/npns.cpp
|
|
|
|
hle/service/npns/npns.h
|
2019-05-23 09:55:56 +02:00
|
|
|
hle/service/ns/errors.h
|
2022-09-03 20:30:29 +02:00
|
|
|
hle/service/ns/iplatform_service_manager.cpp
|
|
|
|
hle/service/ns/iplatform_service_manager.h
|
2019-05-23 10:28:27 +02:00
|
|
|
hle/service/ns/language.cpp
|
|
|
|
hle/service/ns/language.h
|
2018-02-15 04:22:41 +01:00
|
|
|
hle/service/ns/ns.cpp
|
|
|
|
hle/service/ns/ns.h
|
2021-11-26 03:36:44 +01:00
|
|
|
hle/service/ns/pdm_qry.cpp
|
|
|
|
hle/service/ns/pdm_qry.h
|
2021-11-01 18:53:32 +01:00
|
|
|
hle/service/nvdrv/core/container.cpp
|
|
|
|
hle/service/nvdrv/core/container.h
|
|
|
|
hle/service/nvdrv/core/nvmap.cpp
|
|
|
|
hle/service/nvdrv/core/nvmap.h
|
|
|
|
hle/service/nvdrv/core/syncpoint_manager.cpp
|
|
|
|
hle/service/nvdrv/core/syncpoint_manager.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/nvdrv/devices/nvdevice.h
|
|
|
|
hle/service/nvdrv/devices/nvdisp_disp0.cpp
|
|
|
|
hle/service/nvdrv/devices/nvdisp_disp0.h
|
|
|
|
hle/service/nvdrv/devices/nvhost_as_gpu.cpp
|
|
|
|
hle/service/nvdrv/devices/nvhost_as_gpu.h
|
2018-01-21 23:59:50 +01:00
|
|
|
hle/service/nvdrv/devices/nvhost_ctrl.cpp
|
|
|
|
hle/service/nvdrv/devices/nvhost_ctrl.h
|
Extra nvdrv support (#162)
* FinishInitalize needed for 3.0.1+ games
* nvdrv:s and nvdrv:t both use NVDRV
* Most settings return 0 on hardware, disabled NV_MEMORY_PROFILER for now.
NVN_THROUGH_OPENGL & NVRM_GPU_PREVENT_USE are a few interesting settings to look at. Carefully choosing settings can help with drawing graphics later on
* Initial /dev/nvhost-gpu support
* ZCullBind
* Stubbed SetErrorNotifier
* Fixed SetErrorNotifier log, Added SetChannelPriority
* Allocate GPFIFO Ex2, Allocate Obj Ctx, Submit GPFIFO
* oops
* Fixed up naming/structs/enums. Used vector instead of array for "gpfifo_entry"
* Added missing fixes
* /dev/nvhost-ctrl-gpu
* unneeded struct
* Forgot u32 in enum class
* Automatic descriptor swapping for ioctls, fixed nvgpu_gpu_get_tpc_masks_args being incorrect size
* nvdrv#QueryEvent
* Renamed logs for nvdrv
* Refactor ioctl so nv_result isn't needed
* /dev/nvhost-as-gpu
* Fixed Log service naming, CtxObjects now u32, renamed all structs, added static_asserts to structs, used INSERT_PADDING_WORDS instead of u32s
* nvdevices now uses "Ioctl" union,
* IoctlGpfifoEntry now uses bit field
* final changes
2018-02-06 03:19:31 +01:00
|
|
|
hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
|
|
|
|
hle/service/nvdrv/devices/nvhost_ctrl_gpu.h
|
|
|
|
hle/service/nvdrv/devices/nvhost_gpu.cpp
|
|
|
|
hle/service/nvdrv/devices/nvhost_gpu.h
|
2018-05-30 11:49:28 +02:00
|
|
|
hle/service/nvdrv/devices/nvhost_nvdec.cpp
|
|
|
|
hle/service/nvdrv/devices/nvhost_nvdec.h
|
2020-10-27 04:07:36 +01:00
|
|
|
hle/service/nvdrv/devices/nvhost_nvdec_common.cpp
|
|
|
|
hle/service/nvdrv/devices/nvhost_nvdec_common.h
|
2018-08-13 06:00:27 +02:00
|
|
|
hle/service/nvdrv/devices/nvhost_nvjpg.cpp
|
|
|
|
hle/service/nvdrv/devices/nvhost_nvjpg.h
|
|
|
|
hle/service/nvdrv/devices/nvhost_vic.cpp
|
|
|
|
hle/service/nvdrv/devices/nvhost_vic.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/nvdrv/devices/nvmap.cpp
|
|
|
|
hle/service/nvdrv/devices/nvmap.h
|
2019-06-07 17:34:55 +02:00
|
|
|
hle/service/nvdrv/nvdata.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/nvdrv/nvdrv.cpp
|
|
|
|
hle/service/nvdrv/nvdrv.h
|
2021-07-14 06:52:17 +02:00
|
|
|
hle/service/nvdrv/nvdrv_interface.cpp
|
|
|
|
hle/service/nvdrv/nvdrv_interface.h
|
2018-01-21 23:59:50 +01:00
|
|
|
hle/service/nvdrv/nvmemp.cpp
|
|
|
|
hle/service/nvdrv/nvmemp.h
|
2023-02-19 21:05:34 +01:00
|
|
|
hle/service/nvnflinger/binder.h
|
|
|
|
hle/service/nvnflinger/buffer_item.h
|
|
|
|
hle/service/nvnflinger/buffer_item_consumer.cpp
|
|
|
|
hle/service/nvnflinger/buffer_item_consumer.h
|
|
|
|
hle/service/nvnflinger/buffer_queue_consumer.cpp
|
|
|
|
hle/service/nvnflinger/buffer_queue_consumer.h
|
|
|
|
hle/service/nvnflinger/buffer_queue_core.cpp
|
|
|
|
hle/service/nvnflinger/buffer_queue_core.h
|
|
|
|
hle/service/nvnflinger/buffer_queue_defs.h
|
|
|
|
hle/service/nvnflinger/buffer_queue_producer.cpp
|
|
|
|
hle/service/nvnflinger/buffer_queue_producer.h
|
|
|
|
hle/service/nvnflinger/buffer_slot.h
|
|
|
|
hle/service/nvnflinger/buffer_transform_flags.h
|
|
|
|
hle/service/nvnflinger/consumer_base.cpp
|
|
|
|
hle/service/nvnflinger/consumer_base.h
|
|
|
|
hle/service/nvnflinger/consumer_listener.h
|
|
|
|
hle/service/nvnflinger/graphic_buffer_producer.cpp
|
|
|
|
hle/service/nvnflinger/graphic_buffer_producer.h
|
|
|
|
hle/service/nvnflinger/hos_binder_driver_server.cpp
|
|
|
|
hle/service/nvnflinger/hos_binder_driver_server.h
|
|
|
|
hle/service/nvnflinger/nvnflinger.cpp
|
|
|
|
hle/service/nvnflinger/nvnflinger.h
|
|
|
|
hle/service/nvnflinger/parcel.h
|
|
|
|
hle/service/nvnflinger/pixel_format.h
|
|
|
|
hle/service/nvnflinger/producer_listener.h
|
|
|
|
hle/service/nvnflinger/status.h
|
|
|
|
hle/service/nvnflinger/ui/fence.h
|
|
|
|
hle/service/nvnflinger/ui/graphic_buffer.h
|
|
|
|
hle/service/nvnflinger/window.h
|
2020-11-19 21:35:07 +01:00
|
|
|
hle/service/olsc/olsc.cpp
|
|
|
|
hle/service/olsc/olsc.h
|
2018-07-31 12:33:38 +02:00
|
|
|
hle/service/pcie/pcie.cpp
|
|
|
|
hle/service/pcie/pcie.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/pctl/pctl.cpp
|
|
|
|
hle/service/pctl/pctl.h
|
2021-07-14 06:52:17 +02:00
|
|
|
hle/service/pctl/pctl_module.cpp
|
|
|
|
hle/service/pctl/pctl_module.h
|
2018-08-01 21:40:55 +02:00
|
|
|
hle/service/pcv/pcv.cpp
|
|
|
|
hle/service/pcv/pcv.h
|
2018-07-25 22:37:00 +02:00
|
|
|
hle/service/pm/pm.cpp
|
|
|
|
hle/service/pm/pm.h
|
2018-04-22 07:04:24 +02:00
|
|
|
hle/service/prepo/prepo.cpp
|
|
|
|
hle/service/prepo/prepo.h
|
2018-08-02 03:59:22 +02:00
|
|
|
hle/service/psc/psc.cpp
|
|
|
|
hle/service/psc/psc.h
|
2018-10-20 23:22:15 +02:00
|
|
|
hle/service/ptm/psm.cpp
|
|
|
|
hle/service/ptm/psm.h
|
2022-06-27 01:48:12 +02:00
|
|
|
hle/service/ptm/ptm.cpp
|
|
|
|
hle/service/ptm/ptm.h
|
|
|
|
hle/service/ptm/ts.cpp
|
|
|
|
hle/service/ptm/ts.h
|
2023-02-19 20:42:12 +01:00
|
|
|
hle/service/hle_ipc.cpp
|
|
|
|
hle/service/hle_ipc.h
|
|
|
|
hle/service/ipc_helpers.h
|
2021-06-28 23:41:24 +02:00
|
|
|
hle/service/kernel_helpers.cpp
|
|
|
|
hle/service/kernel_helpers.h
|
2023-02-18 22:26:48 +01:00
|
|
|
hle/service/mutex.cpp
|
|
|
|
hle/service/mutex.h
|
|
|
|
hle/service/server_manager.cpp
|
|
|
|
hle/service/server_manager.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/service.cpp
|
|
|
|
hle/service/service.h
|
2018-01-19 21:44:58 +01:00
|
|
|
hle/service/set/set.cpp
|
|
|
|
hle/service/set/set.h
|
2018-03-02 09:49:35 +01:00
|
|
|
hle/service/set/set_cal.cpp
|
|
|
|
hle/service/set/set_cal.h
|
|
|
|
hle/service/set/set_fd.cpp
|
|
|
|
hle/service/set/set_fd.h
|
|
|
|
hle/service/set/set_sys.cpp
|
|
|
|
hle/service/set/set_sys.h
|
|
|
|
hle/service/set/settings.cpp
|
|
|
|
hle/service/set/settings.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/sm/sm.cpp
|
|
|
|
hle/service/sm/sm.h
|
2021-07-14 06:52:17 +02:00
|
|
|
hle/service/sm/sm_controller.cpp
|
|
|
|
hle/service/sm/sm_controller.h
|
2018-03-25 11:41:00 +02:00
|
|
|
hle/service/sockets/bsd.cpp
|
|
|
|
hle/service/sockets/bsd.h
|
|
|
|
hle/service/sockets/nsd.cpp
|
|
|
|
hle/service/sockets/nsd.h
|
2018-01-30 07:29:47 +01:00
|
|
|
hle/service/sockets/sfdnsres.cpp
|
2018-01-18 20:35:03 +01:00
|
|
|
hle/service/sockets/sfdnsres.h
|
|
|
|
hle/service/sockets/sockets.cpp
|
|
|
|
hle/service/sockets/sockets.h
|
2020-07-12 03:32:58 +02:00
|
|
|
hle/service/sockets/sockets_translate.cpp
|
|
|
|
hle/service/sockets/sockets_translate.h
|
2018-03-22 07:54:16 +01:00
|
|
|
hle/service/spl/csrng.cpp
|
|
|
|
hle/service/spl/csrng.h
|
|
|
|
hle/service/spl/spl.cpp
|
|
|
|
hle/service/spl/spl.h
|
2021-07-14 06:52:17 +02:00
|
|
|
hle/service/spl/spl_module.cpp
|
|
|
|
hle/service/spl/spl_module.h
|
2021-06-15 08:25:10 +02:00
|
|
|
hle/service/spl/spl_results.h
|
2021-06-15 08:35:06 +02:00
|
|
|
hle/service/spl/spl_types.h
|
2018-03-23 07:32:50 +01:00
|
|
|
hle/service/ssl/ssl.cpp
|
|
|
|
hle/service/ssl/ssl.h
|
Implement SSL service
This implements some missing network APIs including a large chunk of the SSL
service, enough for Mario Maker (with an appropriate mod applied) to connect to
the fan server [Open Course World](https://opencourse.world/).
Connecting to first-party servers is out of scope of this PR and is a
minefield I'd rather not step into.
## TLS
TLS is implemented with multiple backends depending on the system's 'native'
TLS library. Currently there are two backends: Schannel for Windows, and
OpenSSL for Linux. (In reality Linux is a bit of a free-for-all where there's
no one 'native' library, but OpenSSL is the closest it gets.) On macOS the
'native' library is SecureTransport but that isn't implemented in this PR.
(Instead, all non-Windows OSes will use OpenSSL unless disabled with
`-DENABLE_OPENSSL=OFF`.)
Why have multiple backends instead of just using a single library, especially
given that Yuzu already embeds mbedtls for cryptographic algorithms? Well, I
tried implementing this on mbedtls first, but the problem is TLS policies -
mainly trusted certificate policies, and to a lesser extent trusted algorithms,
SSL versions, etc.
...In practice, the chance that someone is going to conduct a man-in-the-middle
attack on a third-party game server is pretty low, but I'm a security nerd so I
like to do the right security things.
My base assumption is that we want to use the host system's TLS policies. An
alternative would be to more closely emulate the Switch's TLS implementation
(which is based on NSS). But for one thing, I don't feel like reverse
engineering it. And I'd argue that for third-party servers such as Open Course
World, it's theoretically preferable to use the system's policies rather than
the Switch's, for two reasons
1. Someday the Switch will stop being updated, and the trusted cert list,
algorithms, etc. will start to go stale, but users will still want to
connect to third-party servers, and there's no reason they shouldn't have
up-to-date security when doing so. At that point, homebrew users on actual
hardware may patch the TLS implementation, but for emulators it's simpler to
just use the host's stack.
2. Also, it's good to respect any custom certificate policies the user may have
added systemwide. For example, they may have added custom trusted CAs in
order to use TLS debugging tools or pass through corporate MitM middleboxes.
Or they may have removed some CAs that are normally trusted out of paranoia.
Note that this policy wouldn't work as-is for connecting to first-party
servers, because some of them serve certificates based on Nintendo's own CA
rather than a publicly trusted one. However, this could probably be solved
easily by using appropriate APIs to adding Nintendo's CA as an alternate
trusted cert for Yuzu's connections. That is not implemented in this PR
because, again, first-party servers are out of scope.
(If anything I'd rather have an option to _block_ connections to Nintendo
servers, but that's not implemented here.)
To use the host's TLS policies, there are three theoretical options:
a) Import the host's trusted certificate list into a cross-platform TLS
library (presumably mbedtls).
b) Use the native TLS library to verify certificates but use a cross-platform
TLS library for everything else.
c) Use the native TLS library for everything.
Two problems with option a). First, importing the trusted certificate list at
minimum requires a bunch of platform-specific code, which mbedtls does not have
built in. Interestingly, OpenSSL recently gained the ability to import the
Windows certificate trust store... but that leads to the second problem, which
is that a list of trusted certificates is [not expressive
enough](https://bugs.archlinux.org/task/41909) to express a modern certificate
trust policy. For example, Windows has the concept of [explicitly distrusted
certificates](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn265983(v=ws.11)),
and macOS requires Certificate Transparency validation for some certificates
with complex rules for when it's required.
Option b) (using native library just to verify certs) is probably feasible, but
it would miss aspects of TLS policy other than trusted certs (like allowed
algorithms), and in any case it might well require writing more code, not less,
compared to using the native library for everything.
So I ended up at option c), using the native library for everything.
What I'd *really* prefer would be to use a third-party library that does option
c) for me. Rust has a good library for this,
[native-tls](https://docs.rs/native-tls/latest/native_tls/). I did search, but
I couldn't find a good option in the C or C++ ecosystem, at least not any that
wasn't part of some much larger framework. I was surprised - isn't this a
pretty common use case? Well, many applications only need TLS for HTTPS, and they can
use libcurl, which has a TLS abstraction layer internally but doesn't expose
it. Other applications only support a single TLS library, or use one of the
aforementioned larger frameworks, or are platform-specific to begin with, or of
course are written in a non-C/C++ language, most of which have some canonical
choice for TLS. But there are also many applications that have a set of TLS
backends just like this; it's just that nobody has gone ahead and abstracted
the pattern into a library, at least not a widespread one.
Amusingly, there is one TLS abstraction layer that Yuzu already bundles: the
one in ffmpeg. But it is missing some features that would be needed to use it
here (like reusing an existing socket rather than managing the socket itself).
Though, that does mean that the wiki's build instructions for Linux (and macOS
for some reason?) already recommend installing OpenSSL, so no need to update
those.
## Other APIs implemented
- Sockets:
- GetSockOpt(`SO_ERROR`)
- SetSockOpt(`SO_NOSIGPIPE`) (stub, I have no idea what this does on Switch)
- `DuplicateSocket` (because the SSL sysmodule calls it internally)
- More `PollEvents` values
- NSD:
- `Resolve` and `ResolveEx` (stub, good enough for Open Course World and
probably most third-party servers, but not first-party)
- SFDNSRES:
- `GetHostByNameRequest` and `GetHostByNameRequestWithOptions`
- `ResolverSetOptionRequest` (stub)
## Fixes
- Parts of the socket code were previously allocating a `sockaddr` object on
the stack when calling functions that take a `sockaddr*` (e.g. `accept`).
This might seem like the right thing to do to avoid illegal aliasing, but in
fact `sockaddr` is not guaranteed to be large enough to hold any particular
type of address, only the header. This worked in practice because in
practice `sockaddr` is the same size as `sockaddr_in`, but it's not how the
API is meant to be used. I changed this to allocate an `sockaddr_in` on the
stack and `reinterpret_cast` it. I could try to do something cleverer with
`aligned_storage`, but casting is the idiomatic way to use these particular
APIs, so it's really the system's responsibility to avoid any aliasing
issues.
- I rewrote most of the `GetAddrInfoRequest[WithOptions]` implementation. The
old implementation invoked the host's getaddrinfo directly from sfdnsres.cpp,
and directly passed through the host's socket type, protocol, etc. values
rather than looking up the corresponding constants on the Switch. To be
fair, these constants don't tend to actually vary across systems, but
still... I added a wrapper for `getaddrinfo` in
`internal_network/network.cpp` similar to the ones for other socket APIs, and
changed the `GetAddrInfoRequest` implementation to use it. While I was at
it, I rewrote the serialization to use the same approach I used to implement
`GetHostByNameRequest`, because it reduces the number of size calculations.
While doing so I removed `AF_INET6` support because the Switch doesn't
support IPv6; it might be nice to support IPv6 anyway, but that would have to
apply to all of the socket APIs.
I also corrected the IPC wrappers for `GetAddrInfoRequest` and
`GetAddrInfoRequestWithOptions` based on reverse engineering and hardware
testing. Every call to `GetAddrInfoRequestWithOptions` returns *four*
different error codes (IPC status, getaddrinfo error code, netdb error code,
and errno), and `GetAddrInfoRequest` returns three of those but in a
different order, and it doesn't really matter but the existing implementation
was a bit off, as I discovered while testing `GetHostByNameRequest`.
- The new serialization code is based on two simple helper functions:
```cpp
template <typename T> static void Append(std::vector<u8>& vec, T t);
void AppendNulTerminated(std::vector<u8>& vec, std::string_view str);
```
I was thinking there must be existing functions somewhere that assist with
serialization/deserialization of binary data, but all I could find was the
helper methods in `IOFile` and `HLERequestContext`, not anything that could
be used with a generic byte buffer. If I'm not missing something, then
maybe I should move the above functions to a new header in `common`...
right now they're just sitting in `sfdnsres.cpp` where they're used.
- Not a fix, but `SocketBase::Recv`/`Send` is changed to use `std::span<u8>`
rather than `std::vector<u8>&` to avoid needing to copy the data to/from a
vector when those methods are called from the TLS implementation.
2023-06-20 03:17:43 +02:00
|
|
|
hle/service/ssl/ssl_backend.h
|
2019-12-22 23:49:51 +01:00
|
|
|
hle/service/time/clock_types.h
|
|
|
|
hle/service/time/ephemeral_network_system_clock_context_writer.h
|
|
|
|
hle/service/time/ephemeral_network_system_clock_core.h
|
|
|
|
hle/service/time/errors.h
|
|
|
|
hle/service/time/local_system_clock_context_writer.h
|
|
|
|
hle/service/time/network_system_clock_context_writer.h
|
|
|
|
hle/service/time/standard_local_system_clock_core.h
|
|
|
|
hle/service/time/standard_network_system_clock_core.h
|
|
|
|
hle/service/time/standard_steady_clock_core.cpp
|
|
|
|
hle/service/time/standard_steady_clock_core.h
|
|
|
|
hle/service/time/standard_user_system_clock_core.cpp
|
|
|
|
hle/service/time/standard_user_system_clock_core.h
|
|
|
|
hle/service/time/steady_clock_core.h
|
|
|
|
hle/service/time/system_clock_context_update_callback.cpp
|
|
|
|
hle/service/time/system_clock_context_update_callback.h
|
|
|
|
hle/service/time/system_clock_core.cpp
|
|
|
|
hle/service/time/system_clock_core.h
|
|
|
|
hle/service/time/tick_based_steady_clock_core.cpp
|
|
|
|
hle/service/time/tick_based_steady_clock_core.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/time/time.cpp
|
|
|
|
hle/service/time/time.h
|
2021-07-14 06:52:17 +02:00
|
|
|
hle/service/time/time_interface.cpp
|
|
|
|
hle/service/time/time_interface.h
|
2019-12-22 23:49:51 +01:00
|
|
|
hle/service/time/time_manager.cpp
|
|
|
|
hle/service/time/time_manager.h
|
2019-06-25 16:45:53 +02:00
|
|
|
hle/service/time/time_sharedmemory.cpp
|
|
|
|
hle/service/time/time_sharedmemory.h
|
2019-12-22 23:49:51 +01:00
|
|
|
hle/service/time/time_zone_content_manager.cpp
|
|
|
|
hle/service/time/time_zone_content_manager.h
|
|
|
|
hle/service/time/time_zone_manager.cpp
|
|
|
|
hle/service/time/time_zone_manager.h
|
|
|
|
hle/service/time/time_zone_service.cpp
|
|
|
|
hle/service/time/time_zone_service.h
|
|
|
|
hle/service/time/time_zone_types.h
|
2018-08-07 08:41:43 +02:00
|
|
|
hle/service/usb/usb.cpp
|
|
|
|
hle/service/usb/usb.h
|
2019-02-19 23:00:03 +01:00
|
|
|
hle/service/vi/display/vi_display.cpp
|
|
|
|
hle/service/vi/display/vi_display.h
|
|
|
|
hle/service/vi/layer/vi_layer.cpp
|
|
|
|
hle/service/vi/layer/vi_layer.h
|
2018-01-18 01:37:34 +01:00
|
|
|
hle/service/vi/vi.cpp
|
|
|
|
hle/service/vi/vi.h
|
|
|
|
hle/service/vi/vi_m.cpp
|
|
|
|
hle/service/vi/vi_m.h
|
2018-02-02 10:59:50 +01:00
|
|
|
hle/service/vi/vi_s.cpp
|
|
|
|
hle/service/vi/vi_s.h
|
|
|
|
hle/service/vi/vi_u.cpp
|
|
|
|
hle/service/vi/vi_u.h
|
2022-07-15 19:45:35 +02:00
|
|
|
internal_network/network.cpp
|
|
|
|
internal_network/network.h
|
|
|
|
internal_network/network_interface.cpp
|
|
|
|
internal_network/network_interface.h
|
|
|
|
internal_network/sockets.h
|
2022-07-30 05:58:23 +02:00
|
|
|
internal_network/socket_proxy.cpp
|
|
|
|
internal_network/socket_proxy.h
|
2018-01-20 20:59:17 +01:00
|
|
|
loader/deconstructed_rom_directory.cpp
|
|
|
|
loader/deconstructed_rom_directory.h
|
2019-06-05 06:21:17 +02:00
|
|
|
loader/kip.cpp
|
|
|
|
loader/kip.h
|
2018-01-18 01:37:34 +01:00
|
|
|
loader/loader.cpp
|
|
|
|
loader/loader.h
|
2018-08-16 23:08:13 +02:00
|
|
|
loader/nax.cpp
|
|
|
|
loader/nax.h
|
2018-06-21 17:16:23 +02:00
|
|
|
loader/nca.cpp
|
|
|
|
loader/nca.h
|
2018-01-18 01:37:34 +01:00
|
|
|
loader/nro.cpp
|
|
|
|
loader/nro.h
|
|
|
|
loader/nso.cpp
|
|
|
|
loader/nso.h
|
2018-08-25 17:50:15 +02:00
|
|
|
loader/nsp.cpp
|
|
|
|
loader/nsp.h
|
2018-07-28 05:55:23 +02:00
|
|
|
loader/xci.cpp
|
|
|
|
loader/xci.h
|
2019-05-31 01:35:03 +02:00
|
|
|
memory/cheat_engine.cpp
|
|
|
|
memory/cheat_engine.h
|
|
|
|
memory/dmnt_cheat_types.h
|
|
|
|
memory/dmnt_cheat_vm.cpp
|
|
|
|
memory/dmnt_cheat_vm.h
|
2018-01-18 01:37:34 +01:00
|
|
|
memory.cpp
|
|
|
|
memory.h
|
|
|
|
perf_stats.cpp
|
|
|
|
perf_stats.h
|
2022-11-23 00:38:23 +01:00
|
|
|
precompiled_headers.h
|
2019-05-18 03:45:56 +02:00
|
|
|
reporter.cpp
|
|
|
|
reporter.h
|
2018-01-18 01:37:34 +01:00
|
|
|
telemetry_session.cpp
|
|
|
|
telemetry_session.h
|
2019-06-07 17:11:11 +02:00
|
|
|
tools/freezer.cpp
|
|
|
|
tools/freezer.h
|
2018-01-18 01:37:34 +01:00
|
|
|
)
|
2013-08-30 05:35:09 +02:00
|
|
|
|
2019-11-12 09:01:29 +01:00
|
|
|
if (MSVC)
|
|
|
|
target_compile_options(core PRIVATE
|
2021-06-28 09:54:37 +02:00
|
|
|
/we4242 # 'identifier': conversion from 'type1' to 'type2', possible loss of data
|
|
|
|
/we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data
|
|
|
|
/we4245 # 'conversion': conversion from 'type1' to 'type2', signed/unsigned mismatch
|
2021-05-16 07:46:30 +02:00
|
|
|
/we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data
|
2022-10-21 08:34:06 +02:00
|
|
|
/we4800 # Implicit conversion from 'type' to bool. Possible information loss
|
2019-11-12 09:01:29 +01:00
|
|
|
)
|
2020-10-13 14:10:50 +02:00
|
|
|
else()
|
|
|
|
target_compile_options(core PRIVATE
|
|
|
|
-Werror=conversion
|
2020-10-21 04:15:59 +02:00
|
|
|
|
2022-10-21 08:34:06 +02:00
|
|
|
-Wno-sign-conversion
|
2020-10-21 04:15:59 +02:00
|
|
|
|
2021-02-10 03:27:12 +01:00
|
|
|
$<$<CXX_COMPILER_ID:Clang>:-fsized-deallocation>
|
2020-10-13 14:10:50 +02:00
|
|
|
)
|
2019-11-12 09:01:29 +01:00
|
|
|
endif()
|
|
|
|
|
2018-01-18 01:37:34 +01:00
|
|
|
create_target_directory_groups(core)
|
2014-08-24 03:22:05 +02:00
|
|
|
|
2023-05-24 00:34:20 +02:00
|
|
|
target_link_libraries(core PUBLIC common PRIVATE audio_core network video_core nx_tzdb)
|
2022-12-06 21:01:26 +01:00
|
|
|
target_link_libraries(core PUBLIC Boost::headers PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls Opus::opus)
|
2022-05-31 20:37:37 +02:00
|
|
|
if (MINGW)
|
|
|
|
target_link_libraries(core PRIVATE ${MSWSOCK_LIBRARY})
|
|
|
|
endif()
|
2019-04-29 00:49:46 +02:00
|
|
|
|
2018-09-16 20:05:51 +02:00
|
|
|
if (ENABLE_WEB_SERVICE)
|
2018-10-11 02:54:00 +02:00
|
|
|
target_compile_definitions(core PRIVATE -DENABLE_WEB_SERVICE)
|
2018-10-11 03:37:19 +02:00
|
|
|
target_link_libraries(core PRIVATE web_service)
|
2018-09-16 20:05:51 +02:00
|
|
|
endif()
|
2018-01-20 01:36:09 +01:00
|
|
|
|
2022-11-06 22:45:36 +01:00
|
|
|
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
2018-01-20 01:36:09 +01:00
|
|
|
target_sources(core PRIVATE
|
2023-06-13 03:34:25 +02:00
|
|
|
arm/dynarmic/arm_dynarmic.h
|
2020-03-02 05:46:10 +01:00
|
|
|
arm/dynarmic/arm_dynarmic_64.cpp
|
|
|
|
arm/dynarmic/arm_dynarmic_64.h
|
2022-11-06 22:45:36 +01:00
|
|
|
arm/dynarmic/arm_dynarmic_32.cpp
|
|
|
|
arm/dynarmic/arm_dynarmic_32.h
|
2023-06-13 03:34:25 +02:00
|
|
|
arm/dynarmic/dynarmic_cp15.cpp
|
|
|
|
arm/dynarmic/dynarmic_cp15.h
|
|
|
|
arm/dynarmic/dynarmic_exclusive_monitor.cpp
|
|
|
|
arm/dynarmic/dynarmic_exclusive_monitor.h
|
2022-11-06 22:45:36 +01:00
|
|
|
hle/service/jit/jit_context.cpp
|
|
|
|
hle/service/jit/jit_context.h
|
|
|
|
hle/service/jit/jit.cpp
|
|
|
|
hle/service/jit/jit.h
|
2018-01-20 01:36:09 +01:00
|
|
|
)
|
2022-11-25 19:35:46 +01:00
|
|
|
target_link_libraries(core PRIVATE dynarmic::dynarmic)
|
2018-01-20 01:36:09 +01:00
|
|
|
endif()
|
2022-11-23 00:38:23 +01:00
|
|
|
|
Implement SSL service
This implements some missing network APIs including a large chunk of the SSL
service, enough for Mario Maker (with an appropriate mod applied) to connect to
the fan server [Open Course World](https://opencourse.world/).
Connecting to first-party servers is out of scope of this PR and is a
minefield I'd rather not step into.
## TLS
TLS is implemented with multiple backends depending on the system's 'native'
TLS library. Currently there are two backends: Schannel for Windows, and
OpenSSL for Linux. (In reality Linux is a bit of a free-for-all where there's
no one 'native' library, but OpenSSL is the closest it gets.) On macOS the
'native' library is SecureTransport but that isn't implemented in this PR.
(Instead, all non-Windows OSes will use OpenSSL unless disabled with
`-DENABLE_OPENSSL=OFF`.)
Why have multiple backends instead of just using a single library, especially
given that Yuzu already embeds mbedtls for cryptographic algorithms? Well, I
tried implementing this on mbedtls first, but the problem is TLS policies -
mainly trusted certificate policies, and to a lesser extent trusted algorithms,
SSL versions, etc.
...In practice, the chance that someone is going to conduct a man-in-the-middle
attack on a third-party game server is pretty low, but I'm a security nerd so I
like to do the right security things.
My base assumption is that we want to use the host system's TLS policies. An
alternative would be to more closely emulate the Switch's TLS implementation
(which is based on NSS). But for one thing, I don't feel like reverse
engineering it. And I'd argue that for third-party servers such as Open Course
World, it's theoretically preferable to use the system's policies rather than
the Switch's, for two reasons
1. Someday the Switch will stop being updated, and the trusted cert list,
algorithms, etc. will start to go stale, but users will still want to
connect to third-party servers, and there's no reason they shouldn't have
up-to-date security when doing so. At that point, homebrew users on actual
hardware may patch the TLS implementation, but for emulators it's simpler to
just use the host's stack.
2. Also, it's good to respect any custom certificate policies the user may have
added systemwide. For example, they may have added custom trusted CAs in
order to use TLS debugging tools or pass through corporate MitM middleboxes.
Or they may have removed some CAs that are normally trusted out of paranoia.
Note that this policy wouldn't work as-is for connecting to first-party
servers, because some of them serve certificates based on Nintendo's own CA
rather than a publicly trusted one. However, this could probably be solved
easily by using appropriate APIs to adding Nintendo's CA as an alternate
trusted cert for Yuzu's connections. That is not implemented in this PR
because, again, first-party servers are out of scope.
(If anything I'd rather have an option to _block_ connections to Nintendo
servers, but that's not implemented here.)
To use the host's TLS policies, there are three theoretical options:
a) Import the host's trusted certificate list into a cross-platform TLS
library (presumably mbedtls).
b) Use the native TLS library to verify certificates but use a cross-platform
TLS library for everything else.
c) Use the native TLS library for everything.
Two problems with option a). First, importing the trusted certificate list at
minimum requires a bunch of platform-specific code, which mbedtls does not have
built in. Interestingly, OpenSSL recently gained the ability to import the
Windows certificate trust store... but that leads to the second problem, which
is that a list of trusted certificates is [not expressive
enough](https://bugs.archlinux.org/task/41909) to express a modern certificate
trust policy. For example, Windows has the concept of [explicitly distrusted
certificates](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn265983(v=ws.11)),
and macOS requires Certificate Transparency validation for some certificates
with complex rules for when it's required.
Option b) (using native library just to verify certs) is probably feasible, but
it would miss aspects of TLS policy other than trusted certs (like allowed
algorithms), and in any case it might well require writing more code, not less,
compared to using the native library for everything.
So I ended up at option c), using the native library for everything.
What I'd *really* prefer would be to use a third-party library that does option
c) for me. Rust has a good library for this,
[native-tls](https://docs.rs/native-tls/latest/native_tls/). I did search, but
I couldn't find a good option in the C or C++ ecosystem, at least not any that
wasn't part of some much larger framework. I was surprised - isn't this a
pretty common use case? Well, many applications only need TLS for HTTPS, and they can
use libcurl, which has a TLS abstraction layer internally but doesn't expose
it. Other applications only support a single TLS library, or use one of the
aforementioned larger frameworks, or are platform-specific to begin with, or of
course are written in a non-C/C++ language, most of which have some canonical
choice for TLS. But there are also many applications that have a set of TLS
backends just like this; it's just that nobody has gone ahead and abstracted
the pattern into a library, at least not a widespread one.
Amusingly, there is one TLS abstraction layer that Yuzu already bundles: the
one in ffmpeg. But it is missing some features that would be needed to use it
here (like reusing an existing socket rather than managing the socket itself).
Though, that does mean that the wiki's build instructions for Linux (and macOS
for some reason?) already recommend installing OpenSSL, so no need to update
those.
## Other APIs implemented
- Sockets:
- GetSockOpt(`SO_ERROR`)
- SetSockOpt(`SO_NOSIGPIPE`) (stub, I have no idea what this does on Switch)
- `DuplicateSocket` (because the SSL sysmodule calls it internally)
- More `PollEvents` values
- NSD:
- `Resolve` and `ResolveEx` (stub, good enough for Open Course World and
probably most third-party servers, but not first-party)
- SFDNSRES:
- `GetHostByNameRequest` and `GetHostByNameRequestWithOptions`
- `ResolverSetOptionRequest` (stub)
## Fixes
- Parts of the socket code were previously allocating a `sockaddr` object on
the stack when calling functions that take a `sockaddr*` (e.g. `accept`).
This might seem like the right thing to do to avoid illegal aliasing, but in
fact `sockaddr` is not guaranteed to be large enough to hold any particular
type of address, only the header. This worked in practice because in
practice `sockaddr` is the same size as `sockaddr_in`, but it's not how the
API is meant to be used. I changed this to allocate an `sockaddr_in` on the
stack and `reinterpret_cast` it. I could try to do something cleverer with
`aligned_storage`, but casting is the idiomatic way to use these particular
APIs, so it's really the system's responsibility to avoid any aliasing
issues.
- I rewrote most of the `GetAddrInfoRequest[WithOptions]` implementation. The
old implementation invoked the host's getaddrinfo directly from sfdnsres.cpp,
and directly passed through the host's socket type, protocol, etc. values
rather than looking up the corresponding constants on the Switch. To be
fair, these constants don't tend to actually vary across systems, but
still... I added a wrapper for `getaddrinfo` in
`internal_network/network.cpp` similar to the ones for other socket APIs, and
changed the `GetAddrInfoRequest` implementation to use it. While I was at
it, I rewrote the serialization to use the same approach I used to implement
`GetHostByNameRequest`, because it reduces the number of size calculations.
While doing so I removed `AF_INET6` support because the Switch doesn't
support IPv6; it might be nice to support IPv6 anyway, but that would have to
apply to all of the socket APIs.
I also corrected the IPC wrappers for `GetAddrInfoRequest` and
`GetAddrInfoRequestWithOptions` based on reverse engineering and hardware
testing. Every call to `GetAddrInfoRequestWithOptions` returns *four*
different error codes (IPC status, getaddrinfo error code, netdb error code,
and errno), and `GetAddrInfoRequest` returns three of those but in a
different order, and it doesn't really matter but the existing implementation
was a bit off, as I discovered while testing `GetHostByNameRequest`.
- The new serialization code is based on two simple helper functions:
```cpp
template <typename T> static void Append(std::vector<u8>& vec, T t);
void AppendNulTerminated(std::vector<u8>& vec, std::string_view str);
```
I was thinking there must be existing functions somewhere that assist with
serialization/deserialization of binary data, but all I could find was the
helper methods in `IOFile` and `HLERequestContext`, not anything that could
be used with a generic byte buffer. If I'm not missing something, then
maybe I should move the above functions to a new header in `common`...
right now they're just sitting in `sfdnsres.cpp` where they're used.
- Not a fix, but `SocketBase::Recv`/`Send` is changed to use `std::span<u8>`
rather than `std::vector<u8>&` to avoid needing to copy the data to/from a
vector when those methods are called from the TLS implementation.
2023-06-20 03:17:43 +02:00
|
|
|
if(ENABLE_OPENSSL)
|
|
|
|
target_sources(core PRIVATE
|
|
|
|
hle/service/ssl/ssl_backend_openssl.cpp)
|
|
|
|
target_link_libraries(core PRIVATE OpenSSL::SSL)
|
2023-07-02 00:02:25 +02:00
|
|
|
elseif (APPLE)
|
|
|
|
target_sources(core PRIVATE
|
|
|
|
hle/service/ssl/ssl_backend_securetransport.cpp)
|
|
|
|
target_link_libraries(core PRIVATE "-framework Security")
|
Implement SSL service
This implements some missing network APIs including a large chunk of the SSL
service, enough for Mario Maker (with an appropriate mod applied) to connect to
the fan server [Open Course World](https://opencourse.world/).
Connecting to first-party servers is out of scope of this PR and is a
minefield I'd rather not step into.
## TLS
TLS is implemented with multiple backends depending on the system's 'native'
TLS library. Currently there are two backends: Schannel for Windows, and
OpenSSL for Linux. (In reality Linux is a bit of a free-for-all where there's
no one 'native' library, but OpenSSL is the closest it gets.) On macOS the
'native' library is SecureTransport but that isn't implemented in this PR.
(Instead, all non-Windows OSes will use OpenSSL unless disabled with
`-DENABLE_OPENSSL=OFF`.)
Why have multiple backends instead of just using a single library, especially
given that Yuzu already embeds mbedtls for cryptographic algorithms? Well, I
tried implementing this on mbedtls first, but the problem is TLS policies -
mainly trusted certificate policies, and to a lesser extent trusted algorithms,
SSL versions, etc.
...In practice, the chance that someone is going to conduct a man-in-the-middle
attack on a third-party game server is pretty low, but I'm a security nerd so I
like to do the right security things.
My base assumption is that we want to use the host system's TLS policies. An
alternative would be to more closely emulate the Switch's TLS implementation
(which is based on NSS). But for one thing, I don't feel like reverse
engineering it. And I'd argue that for third-party servers such as Open Course
World, it's theoretically preferable to use the system's policies rather than
the Switch's, for two reasons
1. Someday the Switch will stop being updated, and the trusted cert list,
algorithms, etc. will start to go stale, but users will still want to
connect to third-party servers, and there's no reason they shouldn't have
up-to-date security when doing so. At that point, homebrew users on actual
hardware may patch the TLS implementation, but for emulators it's simpler to
just use the host's stack.
2. Also, it's good to respect any custom certificate policies the user may have
added systemwide. For example, they may have added custom trusted CAs in
order to use TLS debugging tools or pass through corporate MitM middleboxes.
Or they may have removed some CAs that are normally trusted out of paranoia.
Note that this policy wouldn't work as-is for connecting to first-party
servers, because some of them serve certificates based on Nintendo's own CA
rather than a publicly trusted one. However, this could probably be solved
easily by using appropriate APIs to adding Nintendo's CA as an alternate
trusted cert for Yuzu's connections. That is not implemented in this PR
because, again, first-party servers are out of scope.
(If anything I'd rather have an option to _block_ connections to Nintendo
servers, but that's not implemented here.)
To use the host's TLS policies, there are three theoretical options:
a) Import the host's trusted certificate list into a cross-platform TLS
library (presumably mbedtls).
b) Use the native TLS library to verify certificates but use a cross-platform
TLS library for everything else.
c) Use the native TLS library for everything.
Two problems with option a). First, importing the trusted certificate list at
minimum requires a bunch of platform-specific code, which mbedtls does not have
built in. Interestingly, OpenSSL recently gained the ability to import the
Windows certificate trust store... but that leads to the second problem, which
is that a list of trusted certificates is [not expressive
enough](https://bugs.archlinux.org/task/41909) to express a modern certificate
trust policy. For example, Windows has the concept of [explicitly distrusted
certificates](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn265983(v=ws.11)),
and macOS requires Certificate Transparency validation for some certificates
with complex rules for when it's required.
Option b) (using native library just to verify certs) is probably feasible, but
it would miss aspects of TLS policy other than trusted certs (like allowed
algorithms), and in any case it might well require writing more code, not less,
compared to using the native library for everything.
So I ended up at option c), using the native library for everything.
What I'd *really* prefer would be to use a third-party library that does option
c) for me. Rust has a good library for this,
[native-tls](https://docs.rs/native-tls/latest/native_tls/). I did search, but
I couldn't find a good option in the C or C++ ecosystem, at least not any that
wasn't part of some much larger framework. I was surprised - isn't this a
pretty common use case? Well, many applications only need TLS for HTTPS, and they can
use libcurl, which has a TLS abstraction layer internally but doesn't expose
it. Other applications only support a single TLS library, or use one of the
aforementioned larger frameworks, or are platform-specific to begin with, or of
course are written in a non-C/C++ language, most of which have some canonical
choice for TLS. But there are also many applications that have a set of TLS
backends just like this; it's just that nobody has gone ahead and abstracted
the pattern into a library, at least not a widespread one.
Amusingly, there is one TLS abstraction layer that Yuzu already bundles: the
one in ffmpeg. But it is missing some features that would be needed to use it
here (like reusing an existing socket rather than managing the socket itself).
Though, that does mean that the wiki's build instructions for Linux (and macOS
for some reason?) already recommend installing OpenSSL, so no need to update
those.
## Other APIs implemented
- Sockets:
- GetSockOpt(`SO_ERROR`)
- SetSockOpt(`SO_NOSIGPIPE`) (stub, I have no idea what this does on Switch)
- `DuplicateSocket` (because the SSL sysmodule calls it internally)
- More `PollEvents` values
- NSD:
- `Resolve` and `ResolveEx` (stub, good enough for Open Course World and
probably most third-party servers, but not first-party)
- SFDNSRES:
- `GetHostByNameRequest` and `GetHostByNameRequestWithOptions`
- `ResolverSetOptionRequest` (stub)
## Fixes
- Parts of the socket code were previously allocating a `sockaddr` object on
the stack when calling functions that take a `sockaddr*` (e.g. `accept`).
This might seem like the right thing to do to avoid illegal aliasing, but in
fact `sockaddr` is not guaranteed to be large enough to hold any particular
type of address, only the header. This worked in practice because in
practice `sockaddr` is the same size as `sockaddr_in`, but it's not how the
API is meant to be used. I changed this to allocate an `sockaddr_in` on the
stack and `reinterpret_cast` it. I could try to do something cleverer with
`aligned_storage`, but casting is the idiomatic way to use these particular
APIs, so it's really the system's responsibility to avoid any aliasing
issues.
- I rewrote most of the `GetAddrInfoRequest[WithOptions]` implementation. The
old implementation invoked the host's getaddrinfo directly from sfdnsres.cpp,
and directly passed through the host's socket type, protocol, etc. values
rather than looking up the corresponding constants on the Switch. To be
fair, these constants don't tend to actually vary across systems, but
still... I added a wrapper for `getaddrinfo` in
`internal_network/network.cpp` similar to the ones for other socket APIs, and
changed the `GetAddrInfoRequest` implementation to use it. While I was at
it, I rewrote the serialization to use the same approach I used to implement
`GetHostByNameRequest`, because it reduces the number of size calculations.
While doing so I removed `AF_INET6` support because the Switch doesn't
support IPv6; it might be nice to support IPv6 anyway, but that would have to
apply to all of the socket APIs.
I also corrected the IPC wrappers for `GetAddrInfoRequest` and
`GetAddrInfoRequestWithOptions` based on reverse engineering and hardware
testing. Every call to `GetAddrInfoRequestWithOptions` returns *four*
different error codes (IPC status, getaddrinfo error code, netdb error code,
and errno), and `GetAddrInfoRequest` returns three of those but in a
different order, and it doesn't really matter but the existing implementation
was a bit off, as I discovered while testing `GetHostByNameRequest`.
- The new serialization code is based on two simple helper functions:
```cpp
template <typename T> static void Append(std::vector<u8>& vec, T t);
void AppendNulTerminated(std::vector<u8>& vec, std::string_view str);
```
I was thinking there must be existing functions somewhere that assist with
serialization/deserialization of binary data, but all I could find was the
helper methods in `IOFile` and `HLERequestContext`, not anything that could
be used with a generic byte buffer. If I'm not missing something, then
maybe I should move the above functions to a new header in `common`...
right now they're just sitting in `sfdnsres.cpp` where they're used.
- Not a fix, but `SocketBase::Recv`/`Send` is changed to use `std::span<u8>`
rather than `std::vector<u8>&` to avoid needing to copy the data to/from a
vector when those methods are called from the TLS implementation.
2023-06-20 03:17:43 +02:00
|
|
|
elseif (WIN32)
|
|
|
|
target_sources(core PRIVATE
|
|
|
|
hle/service/ssl/ssl_backend_schannel.cpp)
|
2023-07-17 21:44:15 +02:00
|
|
|
target_link_libraries(core PRIVATE crypt32 secur32)
|
Implement SSL service
This implements some missing network APIs including a large chunk of the SSL
service, enough for Mario Maker (with an appropriate mod applied) to connect to
the fan server [Open Course World](https://opencourse.world/).
Connecting to first-party servers is out of scope of this PR and is a
minefield I'd rather not step into.
## TLS
TLS is implemented with multiple backends depending on the system's 'native'
TLS library. Currently there are two backends: Schannel for Windows, and
OpenSSL for Linux. (In reality Linux is a bit of a free-for-all where there's
no one 'native' library, but OpenSSL is the closest it gets.) On macOS the
'native' library is SecureTransport but that isn't implemented in this PR.
(Instead, all non-Windows OSes will use OpenSSL unless disabled with
`-DENABLE_OPENSSL=OFF`.)
Why have multiple backends instead of just using a single library, especially
given that Yuzu already embeds mbedtls for cryptographic algorithms? Well, I
tried implementing this on mbedtls first, but the problem is TLS policies -
mainly trusted certificate policies, and to a lesser extent trusted algorithms,
SSL versions, etc.
...In practice, the chance that someone is going to conduct a man-in-the-middle
attack on a third-party game server is pretty low, but I'm a security nerd so I
like to do the right security things.
My base assumption is that we want to use the host system's TLS policies. An
alternative would be to more closely emulate the Switch's TLS implementation
(which is based on NSS). But for one thing, I don't feel like reverse
engineering it. And I'd argue that for third-party servers such as Open Course
World, it's theoretically preferable to use the system's policies rather than
the Switch's, for two reasons
1. Someday the Switch will stop being updated, and the trusted cert list,
algorithms, etc. will start to go stale, but users will still want to
connect to third-party servers, and there's no reason they shouldn't have
up-to-date security when doing so. At that point, homebrew users on actual
hardware may patch the TLS implementation, but for emulators it's simpler to
just use the host's stack.
2. Also, it's good to respect any custom certificate policies the user may have
added systemwide. For example, they may have added custom trusted CAs in
order to use TLS debugging tools or pass through corporate MitM middleboxes.
Or they may have removed some CAs that are normally trusted out of paranoia.
Note that this policy wouldn't work as-is for connecting to first-party
servers, because some of them serve certificates based on Nintendo's own CA
rather than a publicly trusted one. However, this could probably be solved
easily by using appropriate APIs to adding Nintendo's CA as an alternate
trusted cert for Yuzu's connections. That is not implemented in this PR
because, again, first-party servers are out of scope.
(If anything I'd rather have an option to _block_ connections to Nintendo
servers, but that's not implemented here.)
To use the host's TLS policies, there are three theoretical options:
a) Import the host's trusted certificate list into a cross-platform TLS
library (presumably mbedtls).
b) Use the native TLS library to verify certificates but use a cross-platform
TLS library for everything else.
c) Use the native TLS library for everything.
Two problems with option a). First, importing the trusted certificate list at
minimum requires a bunch of platform-specific code, which mbedtls does not have
built in. Interestingly, OpenSSL recently gained the ability to import the
Windows certificate trust store... but that leads to the second problem, which
is that a list of trusted certificates is [not expressive
enough](https://bugs.archlinux.org/task/41909) to express a modern certificate
trust policy. For example, Windows has the concept of [explicitly distrusted
certificates](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn265983(v=ws.11)),
and macOS requires Certificate Transparency validation for some certificates
with complex rules for when it's required.
Option b) (using native library just to verify certs) is probably feasible, but
it would miss aspects of TLS policy other than trusted certs (like allowed
algorithms), and in any case it might well require writing more code, not less,
compared to using the native library for everything.
So I ended up at option c), using the native library for everything.
What I'd *really* prefer would be to use a third-party library that does option
c) for me. Rust has a good library for this,
[native-tls](https://docs.rs/native-tls/latest/native_tls/). I did search, but
I couldn't find a good option in the C or C++ ecosystem, at least not any that
wasn't part of some much larger framework. I was surprised - isn't this a
pretty common use case? Well, many applications only need TLS for HTTPS, and they can
use libcurl, which has a TLS abstraction layer internally but doesn't expose
it. Other applications only support a single TLS library, or use one of the
aforementioned larger frameworks, or are platform-specific to begin with, or of
course are written in a non-C/C++ language, most of which have some canonical
choice for TLS. But there are also many applications that have a set of TLS
backends just like this; it's just that nobody has gone ahead and abstracted
the pattern into a library, at least not a widespread one.
Amusingly, there is one TLS abstraction layer that Yuzu already bundles: the
one in ffmpeg. But it is missing some features that would be needed to use it
here (like reusing an existing socket rather than managing the socket itself).
Though, that does mean that the wiki's build instructions for Linux (and macOS
for some reason?) already recommend installing OpenSSL, so no need to update
those.
## Other APIs implemented
- Sockets:
- GetSockOpt(`SO_ERROR`)
- SetSockOpt(`SO_NOSIGPIPE`) (stub, I have no idea what this does on Switch)
- `DuplicateSocket` (because the SSL sysmodule calls it internally)
- More `PollEvents` values
- NSD:
- `Resolve` and `ResolveEx` (stub, good enough for Open Course World and
probably most third-party servers, but not first-party)
- SFDNSRES:
- `GetHostByNameRequest` and `GetHostByNameRequestWithOptions`
- `ResolverSetOptionRequest` (stub)
## Fixes
- Parts of the socket code were previously allocating a `sockaddr` object on
the stack when calling functions that take a `sockaddr*` (e.g. `accept`).
This might seem like the right thing to do to avoid illegal aliasing, but in
fact `sockaddr` is not guaranteed to be large enough to hold any particular
type of address, only the header. This worked in practice because in
practice `sockaddr` is the same size as `sockaddr_in`, but it's not how the
API is meant to be used. I changed this to allocate an `sockaddr_in` on the
stack and `reinterpret_cast` it. I could try to do something cleverer with
`aligned_storage`, but casting is the idiomatic way to use these particular
APIs, so it's really the system's responsibility to avoid any aliasing
issues.
- I rewrote most of the `GetAddrInfoRequest[WithOptions]` implementation. The
old implementation invoked the host's getaddrinfo directly from sfdnsres.cpp,
and directly passed through the host's socket type, protocol, etc. values
rather than looking up the corresponding constants on the Switch. To be
fair, these constants don't tend to actually vary across systems, but
still... I added a wrapper for `getaddrinfo` in
`internal_network/network.cpp` similar to the ones for other socket APIs, and
changed the `GetAddrInfoRequest` implementation to use it. While I was at
it, I rewrote the serialization to use the same approach I used to implement
`GetHostByNameRequest`, because it reduces the number of size calculations.
While doing so I removed `AF_INET6` support because the Switch doesn't
support IPv6; it might be nice to support IPv6 anyway, but that would have to
apply to all of the socket APIs.
I also corrected the IPC wrappers for `GetAddrInfoRequest` and
`GetAddrInfoRequestWithOptions` based on reverse engineering and hardware
testing. Every call to `GetAddrInfoRequestWithOptions` returns *four*
different error codes (IPC status, getaddrinfo error code, netdb error code,
and errno), and `GetAddrInfoRequest` returns three of those but in a
different order, and it doesn't really matter but the existing implementation
was a bit off, as I discovered while testing `GetHostByNameRequest`.
- The new serialization code is based on two simple helper functions:
```cpp
template <typename T> static void Append(std::vector<u8>& vec, T t);
void AppendNulTerminated(std::vector<u8>& vec, std::string_view str);
```
I was thinking there must be existing functions somewhere that assist with
serialization/deserialization of binary data, but all I could find was the
helper methods in `IOFile` and `HLERequestContext`, not anything that could
be used with a generic byte buffer. If I'm not missing something, then
maybe I should move the above functions to a new header in `common`...
right now they're just sitting in `sfdnsres.cpp` where they're used.
- Not a fix, but `SocketBase::Recv`/`Send` is changed to use `std::span<u8>`
rather than `std::vector<u8>&` to avoid needing to copy the data to/from a
vector when those methods are called from the TLS implementation.
2023-06-20 03:17:43 +02:00
|
|
|
else()
|
|
|
|
target_sources(core PRIVATE
|
|
|
|
hle/service/ssl/ssl_backend_none.cpp)
|
|
|
|
endif()
|
|
|
|
|
2022-11-23 00:38:23 +01:00
|
|
|
if (YUZU_USE_PRECOMPILED_HEADERS)
|
|
|
|
target_precompile_headers(core PRIVATE precompiled_headers.h)
|
|
|
|
endif()
|
2023-02-27 05:01:44 +01:00
|
|
|
|
|
|
|
if (YUZU_ENABLE_LTO)
|
|
|
|
set_property(TARGET core PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
|
|
|
endif()
|