From 3579797309636dafc918da9e8297eda0e679270f Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Tue, 22 Mar 2022 05:19:18 -0700 Subject: [PATCH] sf: add new debug-interface-id in cmif out header --- .../erpt/sf/erpt_sf_i_attachment.hpp | 2 +- .../erpt/sf/erpt_sf_i_context.hpp | 2 +- .../erpt/sf/erpt_sf_i_manager.hpp | 2 +- .../stratosphere/erpt/sf/erpt_sf_i_report.hpp | 2 +- .../erpt/sf/erpt_sf_i_session.hpp | 2 +- .../fatal/impl/fatal_i_private_service.hpp | 2 +- .../fatal/impl/fatal_i_service.hpp | 2 +- .../fssrv/sf/fssrv_sf_i_device_operator.hpp | 2 +- .../fssrv/sf/fssrv_sf_i_event_notifier.hpp | 2 +- .../fssrv/sf/fssrv_sf_i_file_system_proxy.hpp | 2 +- ...ssrv_sf_i_file_system_proxy_for_loader.hpp | 2 +- .../fssrv/sf/fssrv_sf_i_program_registry.hpp | 2 +- .../fssrv/sf/fssrv_sf_idirectory.hpp | 2 +- .../stratosphere/fssrv/sf/fssrv_sf_ifile.hpp | 2 +- .../fssrv/sf/fssrv_sf_ifilesystem.hpp | 2 +- .../fssrv/sf/fssrv_sf_istorage.hpp | 2 +- .../gpio/sf/gpio_sf_i_manager.hpp | 2 +- .../gpio/sf/gpio_sf_i_pad_session.hpp | 2 +- .../htc/tenv/htc_tenv_i_service.hpp | 2 +- .../htc/tenv/htc_tenv_i_service_manager.hpp | 2 +- .../stratosphere/i2c/sf/i2c_sf_i_manager.hpp | 2 +- .../stratosphere/i2c/sf/i2c_sf_i_session.hpp | 2 +- .../ldr/impl/ldr_debug_monitor_interface.hpp | 2 +- .../impl/ldr_process_manager_interface.hpp | 2 +- .../ldr/impl/ldr_shell_interface.hpp | 2 +- .../lr_i_add_on_content_location_resolver.hpp | 2 +- .../lr/lr_i_location_resolver.hpp | 2 +- .../lr/lr_i_location_resolver_manager.hpp | 2 +- .../lr/lr_i_registered_location_resolver.hpp | 2 +- .../ncm/ncm_i_content_manager.hpp | 2 +- .../ncm/ncm_i_content_meta_database.hpp | 2 +- .../ncm/ncm_i_content_storage.hpp | 2 +- .../stratosphere/ns/impl/ns_i_async.hpp | 2 +- .../pgl/sf/pgl_sf_i_event_observer.hpp | 2 +- .../pgl/sf/pgl_sf_i_shell_interface.hpp | 2 +- .../pm/impl/pm_boot_mode_interface.hpp | 2 +- .../pm/impl/pm_debug_monitor_interface.hpp | 4 +- .../pm/impl/pm_information_interface.hpp | 2 +- .../pm/impl/pm_shell_interface.hpp | 4 +- .../include/stratosphere/psc.hpp | 1 + .../psc/sf/psc_sf_i_pm_module.hpp | 2 +- .../psc/sf/psc_sf_i_pm_service.hpp | 2 +- .../pwm/sf/pwm_sf_i_channel_session.hpp | 2 +- .../stratosphere/pwm/sf/pwm_sf_i_manager.hpp | 2 +- .../ro/impl/ro_debug_monitor_interface.hpp | 2 +- .../stratosphere/ro/impl/ro_ro_interface.hpp | 2 +- .../sf/cmif/sf_cmif_service_dispatch.hpp | 21 +- .../sf/impl/sf_impl_autogen_impl_macros.hpp | 16 +- .../impl/sf_impl_autogen_interface_macros.hpp | 12 +- .../sf/impl/sf_impl_command_serialization.hpp | 1 - .../spl/impl/spl_crypto_interface.hpp | 2 +- .../impl/spl_deprecated_general_interface.hpp | 2 +- .../impl/spl_device_unique_data_interface.hpp | 2 +- .../spl/impl/spl_es_interface.hpp | 2 +- .../spl/impl/spl_fs_interface.hpp | 2 +- .../spl/impl/spl_general_interface.hpp | 2 +- .../spl/impl/spl_manu_interface.hpp | 2 +- .../spl/impl/spl_random_interface.hpp | 2 +- .../spl/impl/spl_ssl_interface.hpp | 2 +- .../tma/tma_i_directory_accessor.hpp | 2 +- .../stratosphere/tma/tma_i_file_accessor.hpp | 2 +- .../stratosphere/tma/tma_i_file_manager.hpp | 4 +- .../stratosphere/tma/tma_i_htc_manager.hpp | 2 +- .../stratosphere/tma/tma_i_htcs_manager.hpp | 2 +- .../include/stratosphere/tma/tma_i_socket.hpp | 2 +- .../stratosphere/usb/ds/usb_i_ds_endpoint.hpp | 2 +- .../usb/ds/usb_i_ds_interface.hpp | 2 +- .../stratosphere/usb/ds/usb_i_ds_service.hpp | 6 +- .../include/stratosphere/usb/usb_device.hpp | 2 +- ...odersrv_decoder_control_server_manager.hpp | 6 +- .../decodersrv_decoder_control_service.cpp | 2 +- .../decodersrv_decoder_control_service.hpp | 8 +- .../source/lm/sf/lm_i_log_getter.hpp | 2 +- .../source/lm/sf/lm_i_log_service.hpp | 4 +- .../sf/cmif/sf_cmif_service_dispatch.cpp | 8 +- .../source/sf/hipc/sf_hipc_mitm_query_api.cpp | 2 +- .../sf_hipc_server_domain_session_manager.cpp | 10 +- .../source/sf/hipc/sf_i_hipc_manager.hpp | 26 +++ ...ce_id_for_debug_enforcement.os.horizon.cpp | 201 ++++++++++++++++++ ...ile_srv_i_profile_controller_for_debug.hpp | 2 +- .../srv/sprofile_srv_i_profile_importer.hpp | 2 +- .../srv/sprofile_srv_i_profile_reader.hpp | 2 +- ...sprofile_srv_i_profile_update_observer.hpp | 2 +- .../sprofile_srv_i_service_for_bg_agent.hpp | 2 +- ...ofile_srv_i_service_for_system_process.hpp | 2 +- .../srv/sprofile_srv_i_service_getter.hpp | 2 +- .../libstratosphere/source/usb/usb_device.cpp | 8 +- ...ice.cpp => usb_remote_ds_root_session.cpp} | 4 +- ...ice.hpp => usb_remote_ds_root_session.hpp} | 8 +- .../impl/crypto_sha256_impl_constexpr.hpp | 13 ++ .../source/bpc_mitm/bpc_ams_service.hpp | 2 +- .../source/bpc_mitm/bpc_mitm_service.hpp | 2 +- .../source/dns_mitm/dnsmitm_resolver_impl.hpp | 2 +- .../source/fs_mitm/fs_mitm_service.hpp | 2 +- .../source/ns_mitm/ns_am_mitm_service.hpp | 2 +- .../source/ns_mitm/ns_web_mitm_service.hpp | 4 +- .../source/set_mitm/set_mitm_service.hpp | 2 +- .../source/set_mitm/setsys_mitm_service.hpp | 2 +- .../source/sysupdater/sysupdater_service.hpp | 2 +- .../dmnt/source/cheat/dmnt_cheat_service.hpp | 2 +- 100 files changed, 381 insertions(+), 146 deletions(-) create mode 100644 libraries/libstratosphere/source/sf/hipc/sf_i_hipc_manager.hpp create mode 100644 libraries/libstratosphere/source/sf/sf_interface_id_for_debug_enforcement.os.horizon.cpp rename libraries/libstratosphere/source/usb/{usb_remote_ds_root_service.cpp => usb_remote_ds_root_session.cpp} (91%) rename libraries/libstratosphere/source/usb/{usb_remote_ds_root_service.hpp => usb_remote_ds_root_session.hpp} (84%) diff --git a/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_attachment.hpp b/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_attachment.hpp index 0f4ba9bfc..2aafa3fe4 100644 --- a/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_attachment.hpp +++ b/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_attachment.hpp @@ -25,4 +25,4 @@ AMS_SF_METHOD_INFO(C, H, 4, Result, Close, (), ()) \ AMS_SF_METHOD_INFO(C, H, 5, Result, GetSize, (ams::sf::Out out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, IAttachment, AMS_ERPT_I_ATTACHMENT_INTERFACE_INFO) \ No newline at end of file +AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, IAttachment, AMS_ERPT_I_ATTACHMENT_INTERFACE_INFO, 0x10FC4A69) \ No newline at end of file diff --git a/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_context.hpp b/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_context.hpp index b5af3bbe1..f2917690f 100644 --- a/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_context.hpp +++ b/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_context.hpp @@ -40,4 +40,4 @@ AMS_SF_METHOD_INFO(C, H, 30, Result, InvalidateForcedShutdownDetection, (), (), hos::Version_12_0_0) -AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, IContext, AMS_ERPT_I_CONTEXT_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, IContext, AMS_ERPT_I_CONTEXT_INTERFACE_INFO, 0xDD41DD03) diff --git a/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_manager.hpp b/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_manager.hpp index b2f64c6a2..e8ed06310 100644 --- a/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_manager.hpp @@ -26,4 +26,4 @@ AMS_SF_METHOD_INFO(C, H, 5, Result, GetAttachmentList, (const ams::sf::OutBuffer &out_buf, const erpt::ReportId &report_id), (out_buf, report_id), hos::Version_8_0_0) -AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, IManager, AMS_ERPT_I_MANAGER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, IManager, AMS_ERPT_I_MANAGER_INTERFACE_INFO, 0x5CFCC43F) diff --git a/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_report.hpp b/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_report.hpp index e69a3d4f7..4b6952556 100644 --- a/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_report.hpp +++ b/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_report.hpp @@ -25,4 +25,4 @@ AMS_SF_METHOD_INFO(C, H, 4, Result, Close, (), ()) \ AMS_SF_METHOD_INFO(C, H, 5, Result, GetSize, (ams::sf::Out out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, IReport, AMS_ERPT_I_REPORT_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, IReport, AMS_ERPT_I_REPORT_INTERFACE_INFO, 0xE4CD5A61) diff --git a/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_session.hpp b/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_session.hpp index d0ff9a391..6bb179885 100644 --- a/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_session.hpp +++ b/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_session.hpp @@ -25,4 +25,4 @@ AMS_SF_METHOD_INFO(C, H, 1, Result, OpenManager, (ams::sf::Out> out), (out)) \ AMS_SF_METHOD_INFO(C, H, 2, Result, OpenAttachment, (ams::sf::Out> out), (out), hos::Version_8_0_0) -AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, ISession, AMS_ERPT_I_SESSION_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, ISession, AMS_ERPT_I_SESSION_INTERFACE_INFO, 0x00395188) diff --git a/libraries/libstratosphere/include/stratosphere/fatal/impl/fatal_i_private_service.hpp b/libraries/libstratosphere/include/stratosphere/fatal/impl/fatal_i_private_service.hpp index 3b051875c..c98f2d6ef 100644 --- a/libraries/libstratosphere/include/stratosphere/fatal/impl/fatal_i_private_service.hpp +++ b/libraries/libstratosphere/include/stratosphere/fatal/impl/fatal_i_private_service.hpp @@ -23,4 +23,4 @@ AMS_SF_METHOD_INFO(C, H, 0, Result, GetFatalEvent, (sf::OutCopyHandle out_h), (out_h)) \ AMS_SF_METHOD_INFO(C, H, 10, Result, GetFatalContext, (sf::Out out_error, sf::Out out_program_id, sf::Out out_policy, sf::Out out_ctx), (out_error, out_program_id, out_policy, out_ctx)) -AMS_SF_DEFINE_INTERFACE(ams::fatal::impl, IPrivateService, AMS_FATAL_I_PRIVATE_SERVICE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::fatal::impl, IPrivateService, AMS_FATAL_I_PRIVATE_SERVICE_INTERFACE_INFO, 0x6C3C9791) diff --git a/libraries/libstratosphere/include/stratosphere/fatal/impl/fatal_i_service.hpp b/libraries/libstratosphere/include/stratosphere/fatal/impl/fatal_i_service.hpp index f3649856b..afa109842 100644 --- a/libraries/libstratosphere/include/stratosphere/fatal/impl/fatal_i_service.hpp +++ b/libraries/libstratosphere/include/stratosphere/fatal/impl/fatal_i_service.hpp @@ -24,4 +24,4 @@ AMS_SF_METHOD_INFO(C, H, 1, Result, ThrowFatalWithPolicy, (Result error, const sf::ClientProcessId &client_pid, fatal::FatalPolicy policy), (error, client_pid, policy)) \ AMS_SF_METHOD_INFO(C, H, 2, Result, ThrowFatalWithCpuContext, (Result error, const sf::ClientProcessId &client_pid, fatal::FatalPolicy policy, const fatal::CpuContext &cpu_ctx), (error, client_pid, policy, cpu_ctx)) -AMS_SF_DEFINE_INTERFACE(ams::fatal::impl, IService, AMS_FATAL_I_SERVICE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::fatal::impl, IService, AMS_FATAL_I_SERVICE_INTERFACE_INFO, 0x91328766) diff --git a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_device_operator.hpp b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_device_operator.hpp index 05a7962d8..324c26b11 100644 --- a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_device_operator.hpp +++ b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_device_operator.hpp @@ -23,4 +23,4 @@ AMS_SF_METHOD_INFO(C, H, 200, Result, IsGameCardInserted, (ams::sf::Out out), (out)) \ AMS_SF_METHOD_INFO(C, H, 202, Result, GetGameCardHandle, (ams::sf::Out out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IDeviceOperator, AMS_FSSRV_I_DEVICE_OPERATOR_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IDeviceOperator, AMS_FSSRV_I_DEVICE_OPERATOR_INTERFACE_INFO, 0x1484E21C) diff --git a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_event_notifier.hpp b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_event_notifier.hpp index 1e71ec5c1..0436c4080 100644 --- a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_event_notifier.hpp +++ b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_event_notifier.hpp @@ -20,4 +20,4 @@ #define AMS_FSSRV_I_EVENT_NOTIFIER_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, GetEventHandle, (ams::sf::OutCopyHandle out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IEventNotifier, AMS_FSSRV_I_EVENT_NOTIFIER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IEventNotifier, AMS_FSSRV_I_EVENT_NOTIFIER_INTERFACE_INFO, 0xA7E3A62C) diff --git a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy.hpp b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy.hpp index d8e7e2a43..b5df43455 100644 --- a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy.hpp +++ b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy.hpp @@ -146,4 +146,4 @@ /* AMS_SF_METHOD_INFO(C, H, 1200, Result, OpenMultiCommitManager, (), (), hos::Version_6_0_0) */ \ /* AMS_SF_METHOD_INFO(C, H, 1300, Result, OpenBisWiper, (), (), hos::Version_10_0_0) */ -AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IFileSystemProxy, AMS_FSSRV_I_FILE_SYSTEM_PROXY_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IFileSystemProxy, AMS_FSSRV_I_FILE_SYSTEM_PROXY_INTERFACE_INFO, 0x7DF34ED2) diff --git a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy_for_loader.hpp b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy_for_loader.hpp index 01350ceb3..87f75ef01 100644 --- a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy_for_loader.hpp +++ b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy_for_loader.hpp @@ -25,4 +25,4 @@ AMS_SF_METHOD_INFO(C, H, 1, Result, IsArchivedProgram, (ams::sf::Out out, u64 process_id), (out, process_id)) \ AMS_SF_METHOD_INFO(C, H, 2, Result, SetCurrentProcess, (const ams::sf::ClientProcessId &client_pid), (client_pid), hos::Version_4_0_0) -AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IFileSystemProxyForLoader, AMS_FSSRV_I_FILE_SYSTEM_PROXY_FOR_LOADER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IFileSystemProxyForLoader, AMS_FSSRV_I_FILE_SYSTEM_PROXY_FOR_LOADER_INTERFACE_INFO, 0xDC92EE15) diff --git a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_program_registry.hpp b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_program_registry.hpp index 4b0a728ce..cc8b6fbe8 100644 --- a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_program_registry.hpp +++ b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_program_registry.hpp @@ -25,5 +25,5 @@ AMS_SF_METHOD_INFO(C, H, 2, Result, SetCurrentProcess, (const ams::sf::ClientProcessId &client_pid), (client_pid)) \ AMS_SF_METHOD_INFO(C, H, 256, Result, SetEnabledProgramVerification, (bool en), (en)) -AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IProgramRegistry, AMS_FSSRV_I_PROGRAM_REGISTRY_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IProgramRegistry, AMS_FSSRV_I_PROGRAM_REGISTRY_INTERFACE_INFO, 0xDA73738C) diff --git a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_idirectory.hpp b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_idirectory.hpp index a65dcdf5b..bc2dbf783 100644 --- a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_idirectory.hpp +++ b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_idirectory.hpp @@ -22,4 +22,4 @@ AMS_SF_METHOD_INFO(C, H, 0, Result, Read, (ams::sf::Out out, const ams::sf::OutBuffer &out_entries), (out, out_entries)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, GetEntryCount, (ams::sf::Out out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IDirectory, AMS_FSSRV_I_DIRECTORY_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IDirectory, AMS_FSSRV_I_DIRECTORY_INTERFACE_INFO, 0xB4953DB6) diff --git a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_ifile.hpp b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_ifile.hpp index 94b9211f2..7bfd07c0b 100644 --- a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_ifile.hpp +++ b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_ifile.hpp @@ -28,4 +28,4 @@ AMS_SF_METHOD_INFO(C, H, 5, Result, OperateRange, (ams::sf::Out out, s32 op_id, s64 offset, s64 size), (out, op_id, offset, size), hos::Version_4_0_0) \ AMS_SF_METHOD_INFO(C, H, 6, Result, OperateRangeWithBuffer, (const ams::sf::OutNonSecureBuffer &out_buf, const ams::sf::InNonSecureBuffer &in_buf, s32 op_id, s64 offset, s64 size), (out_buf, in_buf, op_id, offset, size), hos::Version_12_0_0) -AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IFile, AMS_FSSRV_I_FILE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IFile, AMS_FSSRV_I_FILE_INTERFACE_INFO, 0xF3716DA1) diff --git a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_ifilesystem.hpp b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_ifilesystem.hpp index 12308b374..469f60668 100644 --- a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_ifilesystem.hpp +++ b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_ifilesystem.hpp @@ -40,4 +40,4 @@ AMS_SF_METHOD_INFO(C, H, 14, Result, GetFileTimeStampRaw, (ams::sf::Out out, const ams::fssrv::sf::Path &path), (out, path), hos::Version_3_0_0) \ AMS_SF_METHOD_INFO(C, H, 15, Result, QueryEntry, (const ams::sf::OutBuffer &out_buf, const ams::sf::InBuffer &in_buf, s32 query_id, const ams::fssrv::sf::Path &path), (out_buf, in_buf, query_id, path), hos::Version_4_0_0) -AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IFileSystem, AMS_FSSRV_I_FILESYSTEM_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IFileSystem, AMS_FSSRV_I_FILESYSTEM_INTERFACE_INFO, 0xD4EA59E7) diff --git a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_istorage.hpp b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_istorage.hpp index 6f503ab8c..82c60a295 100644 --- a/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_istorage.hpp +++ b/libraries/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_istorage.hpp @@ -27,4 +27,4 @@ AMS_SF_METHOD_INFO(C, H, 4, Result, GetSize, (ams::sf::Out out), (out)) \ AMS_SF_METHOD_INFO(C, H, 5, Result, OperateRange, (ams::sf::Out out, s32 op_id, s64 offset, s64 size), (out, op_id, offset, size), hos::Version_4_0_0) -AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IStorage, AMS_FSSRV_I_STORAGE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IStorage, AMS_FSSRV_I_STORAGE_INTERFACE_INFO, 0xC4D2CAEB) diff --git a/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_manager.hpp b/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_manager.hpp index e4e68947c..077885fc8 100644 --- a/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_manager.hpp @@ -34,4 +34,4 @@ AMS_SF_METHOD_INFO(C, H, 9, Result, SetWakeEventActiveFlagSetForDebug2, (DeviceCode device_code, bool is_enabled), (device_code, is_enabled), hos::Version_5_0_0 ) \ AMS_SF_METHOD_INFO(C, H, 10, Result, SetRetryValues, (u32 arg0, u32 arg1), (arg0, arg1), hos::Version_6_0_0 ) -AMS_SF_DEFINE_INTERFACE(ams::gpio::sf, IManager, AMS_GPIO_I_MANAGER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::gpio::sf, IManager, AMS_GPIO_I_MANAGER_INTERFACE_INFO, 0xD219501E) diff --git a/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_pad_session.hpp b/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_pad_session.hpp index 00e9d80d7..9c0fb619e 100644 --- a/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_pad_session.hpp +++ b/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_pad_session.hpp @@ -38,4 +38,4 @@ AMS_SF_METHOD_INFO(C, H, 16, Result, SetValueForSleepState, (gpio::GpioValue value), (value), hos::Version_4_0_0) \ AMS_SF_METHOD_INFO(C, H, 16, Result, GetValueForSleepState, (ams::sf::Out out), (out), hos::Version_6_0_0) -AMS_SF_DEFINE_INTERFACE(ams::gpio::sf, IPadSession, AMS_GPIO_I_PAD_SESSION_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::gpio::sf, IPadSession, AMS_GPIO_I_PAD_SESSION_INTERFACE_INFO, 0x7448A8A7) diff --git a/libraries/libstratosphere/include/stratosphere/htc/tenv/htc_tenv_i_service.hpp b/libraries/libstratosphere/include/stratosphere/htc/tenv/htc_tenv_i_service.hpp index ec4c9e447..288300832 100644 --- a/libraries/libstratosphere/include/stratosphere/htc/tenv/htc_tenv_i_service.hpp +++ b/libraries/libstratosphere/include/stratosphere/htc/tenv/htc_tenv_i_service.hpp @@ -23,4 +23,4 @@ AMS_SF_METHOD_INFO(C, H, 1, Result, GetVariableLength, (sf::Out out_size,const htc::tenv::VariableName &name), (out_size, name)) \ AMS_SF_METHOD_INFO(C, H, 2, Result, WaitUntilVariableAvailable, (s64 timeout_ms), (timeout_ms)) -AMS_SF_DEFINE_INTERFACE(ams::htc::tenv, IService, AMS_HTC_TENV_I_SERVICE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::htc::tenv, IService, AMS_HTC_TENV_I_SERVICE_INTERFACE_INFO, 0x041F65C5) diff --git a/libraries/libstratosphere/include/stratosphere/htc/tenv/htc_tenv_i_service_manager.hpp b/libraries/libstratosphere/include/stratosphere/htc/tenv/htc_tenv_i_service_manager.hpp index ea75b1452..1ff6aba7c 100644 --- a/libraries/libstratosphere/include/stratosphere/htc/tenv/htc_tenv_i_service_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/htc/tenv/htc_tenv_i_service_manager.hpp @@ -22,4 +22,4 @@ #define AMS_HTC_TENV_I_SERVICE_MANAGER_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, GetServiceInterface, (sf::Out> out, const sf::ClientProcessId &process_id), (out, process_id)) -AMS_SF_DEFINE_INTERFACE(ams::htc::tenv, IServiceManager, AMS_HTC_TENV_I_SERVICE_MANAGER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::htc::tenv, IServiceManager, AMS_HTC_TENV_I_SERVICE_MANAGER_INTERFACE_INFO, 0x38649D88) diff --git a/libraries/libstratosphere/include/stratosphere/i2c/sf/i2c_sf_i_manager.hpp b/libraries/libstratosphere/include/stratosphere/i2c/sf/i2c_sf_i_manager.hpp index 1f9fb0cd1..7342f08c7 100644 --- a/libraries/libstratosphere/include/stratosphere/i2c/sf/i2c_sf_i_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/i2c/sf/i2c_sf_i_manager.hpp @@ -27,4 +27,4 @@ AMS_SF_METHOD_INFO(C, H, 3, Result, HasDeviceForDev, (ams::sf::Out out, i2c::I2cDevice device), (out, device), hos::Version_Min, hos::Version_5_1_0) \ AMS_SF_METHOD_INFO(C, H, 4, Result, OpenSession2, (ams::sf::Out> out, DeviceCode device_code), (out, device_code), hos::Version_6_0_0 ) -AMS_SF_DEFINE_INTERFACE(ams::i2c::sf, IManager, AMS_I2C_I_MANAGER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::i2c::sf, IManager, AMS_I2C_I_MANAGER_INTERFACE_INFO, 0xE4C9D8F0) diff --git a/libraries/libstratosphere/include/stratosphere/i2c/sf/i2c_sf_i_session.hpp b/libraries/libstratosphere/include/stratosphere/i2c/sf/i2c_sf_i_session.hpp index a0aa029a2..22cf9afa8 100644 --- a/libraries/libstratosphere/include/stratosphere/i2c/sf/i2c_sf_i_session.hpp +++ b/libraries/libstratosphere/include/stratosphere/i2c/sf/i2c_sf_i_session.hpp @@ -27,4 +27,4 @@ AMS_SF_METHOD_INFO(C, H, 12, Result, ExecuteCommandList, (const ams::sf::OutAutoSelectBuffer &rcv_buf, const ams::sf::InPointerArray &command_list), (rcv_buf, command_list) ) \ AMS_SF_METHOD_INFO(C, H, 13, Result, SetRetryPolicy, (s32 max_retry_count, s32 retry_interval_us), (max_retry_count, retry_interval_us), hos::Version_6_0_0 ) -AMS_SF_DEFINE_INTERFACE(ams::i2c::sf, ISession, AMS_I2C_I_SESSION_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::i2c::sf, ISession, AMS_I2C_I_SESSION_INTERFACE_INFO, 0x40154EFE) diff --git a/libraries/libstratosphere/include/stratosphere/ldr/impl/ldr_debug_monitor_interface.hpp b/libraries/libstratosphere/include/stratosphere/ldr/impl/ldr_debug_monitor_interface.hpp index 39db27f85..d27cdf52a 100644 --- a/libraries/libstratosphere/include/stratosphere/ldr/impl/ldr_debug_monitor_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/ldr/impl/ldr_debug_monitor_interface.hpp @@ -26,4 +26,4 @@ AMS_SF_METHOD_INFO(C, H, 2, Result, GetProcessModuleInfo, (sf::Out count, const sf::OutPointerArray &out, os::ProcessId process_id), (count, out, process_id)) \ AMS_SF_METHOD_INFO(C, H, 65000, void, AtmosphereHasLaunchedBootProgram, (sf::Out out, ncm::ProgramId program_id), (out, program_id)) -AMS_SF_DEFINE_INTERFACE(ams::ldr::impl, IDebugMonitorInterface, AMS_LDR_I_DEBUG_MONITOR_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::ldr::impl, IDebugMonitorInterface, AMS_LDR_I_DEBUG_MONITOR_INTERFACE_INTERFACE_INFO, 0xEE195D22) diff --git a/libraries/libstratosphere/include/stratosphere/ldr/impl/ldr_process_manager_interface.hpp b/libraries/libstratosphere/include/stratosphere/ldr/impl/ldr_process_manager_interface.hpp index 4e0f36bb0..651b25bff 100644 --- a/libraries/libstratosphere/include/stratosphere/ldr/impl/ldr_process_manager_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/ldr/impl/ldr_process_manager_interface.hpp @@ -29,4 +29,4 @@ AMS_SF_METHOD_INFO(C, H, 65001, Result, AtmosphereGetProgramInfo, (sf::Out out_program_info, sf::Out out_status, const ncm::ProgramLocation &loc), (out_program_info, out_status, loc)) \ AMS_SF_METHOD_INFO(C, H, 65002, Result, AtmospherePinProgram, (sf::Out out_id, const ncm::ProgramLocation &loc, const cfg::OverrideStatus &override_status), (out_id, loc, override_status)) -AMS_SF_DEFINE_INTERFACE(ams::ldr::impl, IProcessManagerInterface, AMS_LDR_I_PROCESS_MANAGER_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::ldr::impl, IProcessManagerInterface, AMS_LDR_I_PROCESS_MANAGER_INTERFACE_INTERFACE_INFO, 0x01518B8E) diff --git a/libraries/libstratosphere/include/stratosphere/ldr/impl/ldr_shell_interface.hpp b/libraries/libstratosphere/include/stratosphere/ldr/impl/ldr_shell_interface.hpp index 972d20c74..0333e7da2 100644 --- a/libraries/libstratosphere/include/stratosphere/ldr/impl/ldr_shell_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/ldr/impl/ldr_shell_interface.hpp @@ -26,4 +26,4 @@ AMS_SF_METHOD_INFO(C, H, 65000, Result, AtmosphereRegisterExternalCode, (sf::OutMoveHandle out, ncm::ProgramId program_id), (out, program_id)) \ AMS_SF_METHOD_INFO(C, H, 65001, void, AtmosphereUnregisterExternalCode, (ncm::ProgramId program_id), (program_id)) -AMS_SF_DEFINE_INTERFACE(ams::ldr::impl, IShellInterface, AMS_LDR_I_SHELL_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::ldr::impl, IShellInterface, AMS_LDR_I_SHELL_INTERFACE_INTERFACE_INFO, 0x3EE5B554) diff --git a/libraries/libstratosphere/include/stratosphere/lr/lr_i_add_on_content_location_resolver.hpp b/libraries/libstratosphere/include/stratosphere/lr/lr_i_add_on_content_location_resolver.hpp index 9f101be9e..813e07899 100644 --- a/libraries/libstratosphere/include/stratosphere/lr/lr_i_add_on_content_location_resolver.hpp +++ b/libraries/libstratosphere/include/stratosphere/lr/lr_i_add_on_content_location_resolver.hpp @@ -25,4 +25,4 @@ AMS_SF_METHOD_INFO(C, H, 3, Result, RefreshApplicationAddOnContent, (const sf::InArray &ids), (ids), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 4, Result, UnregisterApplicationAddOnContent, (ncm::ApplicationId id), (id), hos::Version_9_0_0) -AMS_SF_DEFINE_INTERFACE(ams::lr, IAddOnContentLocationResolver, AMS_LR_I_ADD_ON_CONTENT_LOCATION_RESOLVER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::lr, IAddOnContentLocationResolver, AMS_LR_I_ADD_ON_CONTENT_LOCATION_RESOLVER_INTERFACE_INFO, 0x77617E39) diff --git a/libraries/libstratosphere/include/stratosphere/lr/lr_i_location_resolver.hpp b/libraries/libstratosphere/include/stratosphere/lr/lr_i_location_resolver.hpp index fbbfa8c48..434ccdcdb 100644 --- a/libraries/libstratosphere/include/stratosphere/lr/lr_i_location_resolver.hpp +++ b/libraries/libstratosphere/include/stratosphere/lr/lr_i_location_resolver.hpp @@ -46,4 +46,4 @@ AMS_SF_METHOD_INFO(C, H, 19, Result, EraseProgramRedirectionForDebug, (ncm::ProgramId id), (id), hos::Version_7_0_0) -AMS_SF_DEFINE_INTERFACE(ams::lr, ILocationResolver, AMS_LR_I_LOCATION_RESOLVER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::lr, ILocationResolver, AMS_LR_I_LOCATION_RESOLVER_INTERFACE_INFO, 0xB36C8B0E) diff --git a/libraries/libstratosphere/include/stratosphere/lr/lr_i_location_resolver_manager.hpp b/libraries/libstratosphere/include/stratosphere/lr/lr_i_location_resolver_manager.hpp index 3ba3fb6fb..548fb7273 100644 --- a/libraries/libstratosphere/include/stratosphere/lr/lr_i_location_resolver_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/lr/lr_i_location_resolver_manager.hpp @@ -26,4 +26,4 @@ AMS_SF_METHOD_INFO(C, H, 2, Result, RefreshLocationResolver, (ncm::StorageId storage_id), (storage_id)) \ AMS_SF_METHOD_INFO(C, H, 3, Result, OpenAddOnContentLocationResolver, (sf::Out> out), (out), hos::Version_2_0_0) -AMS_SF_DEFINE_INTERFACE(ams::lr, ILocationResolverManager, AMS_LR_I_LOCATION_RESOLVER_MANAGER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::lr, ILocationResolverManager, AMS_LR_I_LOCATION_RESOLVER_MANAGER_INTERFACE_INFO, 0xB2950191) diff --git a/libraries/libstratosphere/include/stratosphere/lr/lr_i_registered_location_resolver.hpp b/libraries/libstratosphere/include/stratosphere/lr/lr_i_registered_location_resolver.hpp index 225107a0b..ec0e755dd 100644 --- a/libraries/libstratosphere/include/stratosphere/lr/lr_i_registered_location_resolver.hpp +++ b/libraries/libstratosphere/include/stratosphere/lr/lr_i_registered_location_resolver.hpp @@ -33,4 +33,4 @@ AMS_SF_METHOD_INFO(C, H, 8, Result, Refresh, (), (), hos::Version_7_0_0) \ AMS_SF_METHOD_INFO(C, H, 9, Result, RefreshExcluding, (const sf::InArray &ids), (ids), hos::Version_9_0_0) -AMS_SF_DEFINE_INTERFACE(ams::lr, IRegisteredLocationResolver, AMS_LR_I_REGISTERED_LOCATION_RESOLVER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::lr, IRegisteredLocationResolver, AMS_LR_I_REGISTERED_LOCATION_RESOLVER_INTERFACE_INFO, 0x35346AC9) diff --git a/libraries/libstratosphere/include/stratosphere/ncm/ncm_i_content_manager.hpp b/libraries/libstratosphere/include/stratosphere/ncm/ncm_i_content_manager.hpp index 101f42c53..75ca42304 100644 --- a/libraries/libstratosphere/include/stratosphere/ncm/ncm_i_content_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/ncm/ncm_i_content_manager.hpp @@ -35,4 +35,4 @@ AMS_SF_METHOD_INFO(C, H, 13, Result, InvalidateRightsIdCache, (), (), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 14, Result, GetMemoryReport, (sf::Out out), (out), hos::Version_10_0_0) -AMS_SF_DEFINE_INTERFACE(ams::ncm, IContentManager, AMS_NCM_I_CONTENT_MANAGER_INTERFACE_INFO); +AMS_SF_DEFINE_INTERFACE(ams::ncm, IContentManager, AMS_NCM_I_CONTENT_MANAGER_INTERFACE_INFO, 0xFDB4FFE1); diff --git a/libraries/libstratosphere/include/stratosphere/ncm/ncm_i_content_meta_database.hpp b/libraries/libstratosphere/include/stratosphere/ncm/ncm_i_content_meta_database.hpp index ca800f7cc..7bd096584 100644 --- a/libraries/libstratosphere/include/stratosphere/ncm/ncm_i_content_meta_database.hpp +++ b/libraries/libstratosphere/include/stratosphere/ncm/ncm_i_content_meta_database.hpp @@ -42,4 +42,4 @@ AMS_SF_METHOD_INFO(C, H, 21, Result, GetCount, (sf::Out out_count), (out_count), hos::Version_10_0_0) \ AMS_SF_METHOD_INFO(C, H, 22, Result, GetOwnerApplicationId, (sf::Out out_id, const ncm::ContentMetaKey &key), (out_id, key), hos::Version_10_0_0) -AMS_SF_DEFINE_INTERFACE(ams::ncm, IContentMetaDatabase, AMS_NCM_I_CONTENT_META_DATABASE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::ncm, IContentMetaDatabase, AMS_NCM_I_CONTENT_META_DATABASE_INTERFACE_INFO, 0x58021FEC) diff --git a/libraries/libstratosphere/include/stratosphere/ncm/ncm_i_content_storage.hpp b/libraries/libstratosphere/include/stratosphere/ncm/ncm_i_content_storage.hpp index 53f23c506..753e10bab 100644 --- a/libraries/libstratosphere/include/stratosphere/ncm/ncm_i_content_storage.hpp +++ b/libraries/libstratosphere/include/stratosphere/ncm/ncm_i_content_storage.hpp @@ -54,4 +54,4 @@ AMS_SF_METHOD_INFO(C, H, 28, Result, RegisterPath, (const ncm::ContentId &content_id, const ncm::Path &path), (content_id, path), hos::Version_13_0_0) \ AMS_SF_METHOD_INFO(C, H, 29, Result, ClearRegisteredPath, (), (), hos::Version_13_0_0) -AMS_SF_DEFINE_INTERFACE(ams::ncm, IContentStorage, AMS_NCM_I_CONTENT_STORAGE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::ncm, IContentStorage, AMS_NCM_I_CONTENT_STORAGE_INTERFACE_INFO, 0xFEAE3DD1) diff --git a/libraries/libstratosphere/include/stratosphere/ns/impl/ns_i_async.hpp b/libraries/libstratosphere/include/stratosphere/ns/impl/ns_i_async.hpp index 563181d1d..a6f5b9e40 100644 --- a/libraries/libstratosphere/include/stratosphere/ns/impl/ns_i_async.hpp +++ b/libraries/libstratosphere/include/stratosphere/ns/impl/ns_i_async.hpp @@ -24,4 +24,4 @@ AMS_SF_METHOD_INFO(C, H, 1, Result, Cancel, (), ()) \ AMS_SF_METHOD_INFO(C, H, 2, Result, GetErrorContext, (::ams::sf::Out<::ams::err::ErrorContext> out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::ns::impl, IAsyncResult, AMS_NS_I_ASYNC_RESULT_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::ns::impl, IAsyncResult, AMS_NS_I_ASYNC_RESULT_INTERFACE_INFO, 0x66E1ADBD) diff --git a/libraries/libstratosphere/include/stratosphere/pgl/sf/pgl_sf_i_event_observer.hpp b/libraries/libstratosphere/include/stratosphere/pgl/sf/pgl_sf_i_event_observer.hpp index 2ad1777e6..387fb8147 100644 --- a/libraries/libstratosphere/include/stratosphere/pgl/sf/pgl_sf_i_event_observer.hpp +++ b/libraries/libstratosphere/include/stratosphere/pgl/sf/pgl_sf_i_event_observer.hpp @@ -24,5 +24,5 @@ AMS_SF_METHOD_INFO(C, H, 0, Result, GetProcessEventHandle, (ams::sf::OutCopyHandle out), (out)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, GetProcessEventInfo, (ams::sf::Out out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::pgl::sf, IEventObserver, AMS_PGL_SF_I_EVENT_OBSERVER_INTERFACE_INFO); +AMS_SF_DEFINE_INTERFACE(ams::pgl::sf, IEventObserver, AMS_PGL_SF_I_EVENT_OBSERVER_INTERFACE_INFO, 0x00000000); diff --git a/libraries/libstratosphere/include/stratosphere/pgl/sf/pgl_sf_i_shell_interface.hpp b/libraries/libstratosphere/include/stratosphere/pgl/sf/pgl_sf_i_shell_interface.hpp index c0a56d7f1..a5fb69726 100644 --- a/libraries/libstratosphere/include/stratosphere/pgl/sf/pgl_sf_i_shell_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/pgl/sf/pgl_sf_i_shell_interface.hpp @@ -36,4 +36,4 @@ AMS_SF_METHOD_INFO(C, H, 20, Result, GetShellEventObserver, (ams::sf::Out> out), (out)) \ AMS_SF_METHOD_INFO(C, H, 21, Result, Command21NotImplemented, (ams::sf::Out out, u32 in, const ams::sf::InBuffer &buf1, const ams::sf::InBuffer &buf2), (out, in, buf1, buf2), hos::Version_11_0_0) -AMS_SF_DEFINE_INTERFACE(ams::pgl::sf, IShellInterface, AMS_PGL_I_SHELL_INTERFACE_INTERFACE_INFO); +AMS_SF_DEFINE_INTERFACE(ams::pgl::sf, IShellInterface, AMS_PGL_I_SHELL_INTERFACE_INTERFACE_INFO, 0x00000000); diff --git a/libraries/libstratosphere/include/stratosphere/pm/impl/pm_boot_mode_interface.hpp b/libraries/libstratosphere/include/stratosphere/pm/impl/pm_boot_mode_interface.hpp index 9a39de6a8..a34f2272d 100644 --- a/libraries/libstratosphere/include/stratosphere/pm/impl/pm_boot_mode_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/pm/impl/pm_boot_mode_interface.hpp @@ -23,4 +23,4 @@ AMS_SF_METHOD_INFO(C, H, 0, void, GetBootMode, (sf::Out out), (out)) \ AMS_SF_METHOD_INFO(C, H, 1, void, SetMaintenanceBoot, (), ()) -AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IBootModeInterface, AMS_PM_I_BOOT_MODE_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IBootModeInterface, AMS_PM_I_BOOT_MODE_INTERFACE_INTERFACE_INFO, 0x96D01649) diff --git a/libraries/libstratosphere/include/stratosphere/pm/impl/pm_debug_monitor_interface.hpp b/libraries/libstratosphere/include/stratosphere/pm/impl/pm_debug_monitor_interface.hpp index e6555f7ff..f9e063baa 100644 --- a/libraries/libstratosphere/include/stratosphere/pm/impl/pm_debug_monitor_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/pm/impl/pm_debug_monitor_interface.hpp @@ -31,7 +31,7 @@ AMS_SF_METHOD_INFO(C, H, 65000, Result, AtmosphereGetProcessInfo, (sf::OutCopyHandle out_process_handle, sf::Out out_loc, sf::Out out_status, os::ProcessId process_id), (out_process_handle, out_loc, out_status, process_id)) \ AMS_SF_METHOD_INFO(C, H, 65001, Result, AtmosphereGetCurrentLimitInfo, (sf::Out out_cur_val, sf::Out out_lim_val, u32 group, u32 resource), (out_cur_val, out_lim_val, group, resource)) -AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IDebugMonitorInterface, AMS_PM_I_DEBUG_MONITOR_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IDebugMonitorInterface, AMS_PM_I_DEBUG_MONITOR_INTERFACE_INTERFACE_INFO, 0x9391F0EE) #define AMS_PM_I_DEPRECATED_DEBUG_MONITOR_INTERFACE_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, GetModuleIdList, (sf::Out out_count, const sf::OutBuffer &out_buf, u64 unused), (out_count, out_buf, unused)) \ @@ -45,4 +45,4 @@ AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IDebugMonitorInterface, AMS_PM_I_DEBUG_MO AMS_SF_METHOD_INFO(C, H, 65000, Result, AtmosphereGetProcessInfo, (sf::OutCopyHandle out_process_handle, sf::Out out_loc, sf::Out out_status, os::ProcessId process_id), (out_process_handle, out_loc, out_status, process_id)) \ AMS_SF_METHOD_INFO(C, H, 65001, Result, AtmosphereGetCurrentLimitInfo, (sf::Out out_cur_val, sf::Out out_lim_val, u32 group, u32 resource), (out_cur_val, out_lim_val, group, resource)) -AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IDeprecatedDebugMonitorInterface, AMS_PM_I_DEPRECATED_DEBUG_MONITOR_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IDeprecatedDebugMonitorInterface, AMS_PM_I_DEPRECATED_DEBUG_MONITOR_INTERFACE_INTERFACE_INFO, 0x9391F0EE) diff --git a/libraries/libstratosphere/include/stratosphere/pm/impl/pm_information_interface.hpp b/libraries/libstratosphere/include/stratosphere/pm/impl/pm_information_interface.hpp index 7a28ff575..35f5d7089 100644 --- a/libraries/libstratosphere/include/stratosphere/pm/impl/pm_information_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/pm/impl/pm_information_interface.hpp @@ -27,4 +27,4 @@ AMS_SF_METHOD_INFO(C, H, 65001, Result, AtmosphereHasLaunchedBootProgram, (sf::Out out, ncm::ProgramId program_id), (out, program_id)) \ AMS_SF_METHOD_INFO(C, H, 65002, Result, AtmosphereGetProcessInfo, (sf::Out out_loc, sf::Out out_status, os::ProcessId process_id), (out_loc, out_status, process_id)) -AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IInformationInterface, AMS_PM_I_INFORMATION_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IInformationInterface, AMS_PM_I_INFORMATION_INTERFACE_INTERFACE_INFO, 0xF205AA1F) diff --git a/libraries/libstratosphere/include/stratosphere/pm/impl/pm_shell_interface.hpp b/libraries/libstratosphere/include/stratosphere/pm/impl/pm_shell_interface.hpp index 45684f8f8..a8a6177b1 100644 --- a/libraries/libstratosphere/include/stratosphere/pm/impl/pm_shell_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/pm/impl/pm_shell_interface.hpp @@ -32,7 +32,7 @@ AMS_SF_METHOD_INFO(C, H, 9, void, GetBootFinishedEventHandle, (sf::OutCopyHandle out), (out), hos::Version_8_0_0) \ AMS_SF_METHOD_INFO(C, H, 10, Result, BoostSystemThreadResourceLimit, (), ()) -AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IShellInterface, AMS_PM_I_SHELL_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IShellInterface, AMS_PM_I_SHELL_INTERFACE_INTERFACE_INFO, 0x387D60C0) #define AMS_PM_I_DEPRECATED_SHELL_INTERFACE_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, LaunchProgram, (sf::Out out_process_id, const ncm::ProgramLocation &loc, u32 flags), (out_process_id, loc, flags)) \ @@ -46,4 +46,4 @@ AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IShellInterface, AMS_PM_I_SHELL_INTERFACE AMS_SF_METHOD_INFO(C, H, 8, Result, GetApplicationProcessIdForShell, (sf::Out out), (out)) \ AMS_SF_METHOD_INFO(C, H, 9, Result, BoostSystemMemoryResourceLimit, (u64 boost_size), (boost_size), hos::Version_4_0_0) -AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IDeprecatedShellInterface, AMS_PM_I_DEPRECATED_SHELL_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IDeprecatedShellInterface, AMS_PM_I_DEPRECATED_SHELL_INTERFACE_INTERFACE_INFO, 0x387D60C0) diff --git a/libraries/libstratosphere/include/stratosphere/psc.hpp b/libraries/libstratosphere/include/stratosphere/psc.hpp index d8de61ee0..bebecf100 100644 --- a/libraries/libstratosphere/include/stratosphere/psc.hpp +++ b/libraries/libstratosphere/include/stratosphere/psc.hpp @@ -19,4 +19,5 @@ #include #include #include +#include #include diff --git a/libraries/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_module.hpp b/libraries/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_module.hpp index 0bde2fa5b..90c2f5a14 100644 --- a/libraries/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_module.hpp +++ b/libraries/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_module.hpp @@ -26,4 +26,4 @@ AMS_SF_METHOD_INFO(C, H, 3, Result, Finalize, (), ()) \ AMS_SF_METHOD_INFO(C, H, 4, Result, AcknowledgeEx, (psc::PmState state), (state), hos::Version_5_1_0) -AMS_SF_DEFINE_INTERFACE(ams::psc::sf, IPmModule, AMS_PSC_I_PM_MODULE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::psc::sf, IPmModule, AMS_PSC_I_PM_MODULE_INTERFACE_INFO, 0x4275F38F) diff --git a/libraries/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_service.hpp b/libraries/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_service.hpp index 27191c4b0..78fff84fd 100644 --- a/libraries/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_service.hpp +++ b/libraries/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_service.hpp @@ -21,4 +21,4 @@ #define AMS_PSC_I_PM_SERVICE_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, Initialize, (ams::sf::Out> out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::psc::sf, IPmService, AMS_PSC_I_PM_SERVICE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::psc::sf, IPmService, AMS_PSC_I_PM_SERVICE_INTERFACE_INFO, 0xEABE6F26) diff --git a/libraries/libstratosphere/include/stratosphere/pwm/sf/pwm_sf_i_channel_session.hpp b/libraries/libstratosphere/include/stratosphere/pwm/sf/pwm_sf_i_channel_session.hpp index 20c764877..b09d1155f 100644 --- a/libraries/libstratosphere/include/stratosphere/pwm/sf/pwm_sf_i_channel_session.hpp +++ b/libraries/libstratosphere/include/stratosphere/pwm/sf/pwm_sf_i_channel_session.hpp @@ -28,4 +28,4 @@ AMS_SF_METHOD_INFO(C, H, 6, Result, SetScale, (double scale), (scale), hos::Version_6_0_0) \ AMS_SF_METHOD_INFO(C, H, 7, Result, GetScale, (ams::sf::Out out), (out), hos::Version_6_0_0) -AMS_SF_DEFINE_INTERFACE(ams::pwm::sf, IChannelSession, AMS_PWM_I_CHANNEL_SESSION_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::pwm::sf, IChannelSession, AMS_PWM_I_CHANNEL_SESSION_INTERFACE_INFO, 0xAC0A18F9) diff --git a/libraries/libstratosphere/include/stratosphere/pwm/sf/pwm_sf_i_manager.hpp b/libraries/libstratosphere/include/stratosphere/pwm/sf/pwm_sf_i_manager.hpp index 352dd2d05..edf0f4d51 100644 --- a/libraries/libstratosphere/include/stratosphere/pwm/sf/pwm_sf_i_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/pwm/sf/pwm_sf_i_manager.hpp @@ -25,4 +25,4 @@ AMS_SF_METHOD_INFO(C, H, 1, Result, OpenSession, (ams::sf::Out> out, pwm::ChannelName channel_name), (out, channel_name) ) \ AMS_SF_METHOD_INFO(C, H, 2, Result, OpenSession2, (ams::sf::Out> out, DeviceCode device_code), (out, device_code), hos::Version_6_0_0) -AMS_SF_DEFINE_INTERFACE(ams::pwm::sf, IManager, AMS_PWM_I_MANAGER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::pwm::sf, IManager, AMS_PWM_I_MANAGER_INTERFACE_INFO, 0xBC382479) diff --git a/libraries/libstratosphere/include/stratosphere/ro/impl/ro_debug_monitor_interface.hpp b/libraries/libstratosphere/include/stratosphere/ro/impl/ro_debug_monitor_interface.hpp index b4c99061a..822e271ad 100644 --- a/libraries/libstratosphere/include/stratosphere/ro/impl/ro_debug_monitor_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/ro/impl/ro_debug_monitor_interface.hpp @@ -23,4 +23,4 @@ #define AMS_RO_I_DEBUG_MONITOR_INTERFACE_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, GetProcessModuleInfo, (sf::Out out_count, const sf::OutArray &out_infos, os::ProcessId process_id), (out_count, out_infos, process_id)) -AMS_SF_DEFINE_INTERFACE(ams::ro::impl, IDebugMonitorInterface, AMS_RO_I_DEBUG_MONITOR_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::ro::impl, IDebugMonitorInterface, AMS_RO_I_DEBUG_MONITOR_INTERFACE_INTERFACE_INFO, 0xBBA11B0A) diff --git a/libraries/libstratosphere/include/stratosphere/ro/impl/ro_ro_interface.hpp b/libraries/libstratosphere/include/stratosphere/ro/impl/ro_ro_interface.hpp index e528c0772..8a993f65b 100644 --- a/libraries/libstratosphere/include/stratosphere/ro/impl/ro_ro_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/ro/impl/ro_ro_interface.hpp @@ -27,4 +27,4 @@ AMS_SF_METHOD_INFO(C, H, 4, Result, RegisterProcessHandle, (const sf::ClientProcessId &client_pid, sf::CopyHandle &&process_h), (client_pid, std::move(process_h))) \ AMS_SF_METHOD_INFO(C, H, 10, Result, RegisterProcessModuleInfo, (const sf::ClientProcessId &client_pid, u64 nrr_address, u64 nrr_size, sf::CopyHandle &&process_h), (client_pid, nrr_address, nrr_size, std::move(process_h)), hos::Version_7_0_0) -AMS_SF_DEFINE_INTERFACE(ams::ro::impl, IRoInterface, AMS_RO_I_RO_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::ro::impl, IRoInterface, AMS_RO_I_RO_INTERFACE_INTERFACE_INFO, 0xA52C55A9) diff --git a/libraries/libstratosphere/include/stratosphere/sf/cmif/sf_cmif_service_dispatch.hpp b/libraries/libstratosphere/include/stratosphere/sf/cmif/sf_cmif_service_dispatch.hpp index 810d578ef..2268f9470 100644 --- a/libraries/libstratosphere/include/stratosphere/sf/cmif/sf_cmif_service_dispatch.hpp +++ b/libraries/libstratosphere/include/stratosphere/sf/cmif/sf_cmif_service_dispatch.hpp @@ -85,10 +85,11 @@ namespace ams::sf::cmif { namespace impl { + class ServiceDispatchTableBase { protected: - Result ProcessMessageImpl(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data, const ServiceCommandMeta *entries, const size_t entry_count) const; - Result ProcessMessageForMitmImpl(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data, const ServiceCommandMeta *entries, const size_t entry_count) const; + Result ProcessMessageImpl(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data, const ServiceCommandMeta *entries, const size_t entry_count, u32 interface_id_for_debug) const; + Result ProcessMessageForMitmImpl(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data, const ServiceCommandMeta *entries, const size_t entry_count, u32 interface_id_for_debug) const; public: /* CRTP. */ template @@ -104,7 +105,7 @@ namespace ams::sf::cmif { } }; - template + template class ServiceDispatchTableImpl : public ServiceDispatchTableBase { public: static constexpr size_t NumEntries = N; @@ -114,11 +115,11 @@ namespace ams::sf::cmif { explicit constexpr ServiceDispatchTableImpl(const std::array &e) : m_entries{e} { /* ... */ } Result ProcessMessage(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data) const { - return this->ProcessMessageImpl(ctx, in_raw_data, m_entries.data(), m_entries.size()); + return this->ProcessMessageImpl(ctx, in_raw_data, m_entries.data(), m_entries.size(), InterfaceIdForDebug); } Result ProcessMessageForMitm(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data) const { - return this->ProcessMessageForMitmImpl(ctx, in_raw_data, m_entries.data(), m_entries.size()); + return this->ProcessMessageForMitmImpl(ctx, in_raw_data, m_entries.data(), m_entries.size(), InterfaceIdForDebug); } constexpr const std::array &GetEntries() const { @@ -128,10 +129,10 @@ namespace ams::sf::cmif { } - template - class ServiceDispatchTable : public impl::ServiceDispatchTableImpl { + template + class ServiceDispatchTable : public impl::ServiceDispatchTableImpl { public: - explicit constexpr ServiceDispatchTable(const std::array &e) : impl::ServiceDispatchTableImpl(e) { /* ... */ } + explicit constexpr ServiceDispatchTable(const std::array &e) : impl::ServiceDispatchTableImpl(e) { /* ... */ } }; struct ServiceDispatchMeta { @@ -158,13 +159,13 @@ namespace ams::sf::cmif { template<> struct ServiceDispatchTraits { - static constexpr inline auto DispatchTable = ServiceDispatchTable<0>(std::array{}); + static constexpr inline auto DispatchTable = ServiceDispatchTable<0, 0>(std::array{}); }; #if AMS_SF_MITM_SUPPORTED template<> struct ServiceDispatchTraits { - static constexpr inline auto DispatchTable = ServiceDispatchTable<0>(std::array{}); + static constexpr inline auto DispatchTable = ServiceDispatchTable<0, 0>(std::array{}); }; #endif diff --git a/libraries/libstratosphere/include/stratosphere/sf/impl/sf_impl_autogen_impl_macros.hpp b/libraries/libstratosphere/include/stratosphere/sf/impl/sf_impl_autogen_impl_macros.hpp index 0a11f5af6..a17d09e51 100644 --- a/libraries/libstratosphere/include/stratosphere/sf/impl/sf_impl_autogen_impl_macros.hpp +++ b/libraries/libstratosphere/include/stratosphere/sf/impl/sf_impl_autogen_impl_macros.hpp @@ -25,10 +25,10 @@ namespace ams::sf::impl { return ImplGetter::GetImplPointer(static_cast(this))->NAME ARGNAMES; \ } - #define AMS_SF_DEFINE_INTERFACE_WITH_DEFAULT_BASE(NAMESPACE, INTERFACE, BASE, CMD_MACRO) \ + #define AMS_SF_DEFINE_INTERFACE_WITH_DEFAULT_BASE(NAMESPACE, INTERFACE, BASE, CMD_MACRO, INTF_ID) \ namespace NAMESPACE { \ \ - AMS_SF_DEFINE_INTERFACE_IMPL(BASE, INTERFACE, CMD_MACRO) \ + AMS_SF_DEFINE_INTERFACE_IMPL(BASE, INTERFACE, CMD_MACRO, INTF_ID) \ \ } \ \ @@ -45,16 +45,16 @@ namespace ams::sf::impl { \ } - #define AMS_SF_DEFINE_INTERFACE(NAMESPACE, INTERFACE, CMD_MACRO) \ - AMS_SF_DEFINE_INTERFACE_WITH_DEFAULT_BASE(NAMESPACE, INTERFACE, ::ams::sf::IServiceObject, CMD_MACRO) + #define AMS_SF_DEFINE_INTERFACE(NAMESPACE, INTERFACE, CMD_MACRO, INTF_ID) \ + AMS_SF_DEFINE_INTERFACE_WITH_DEFAULT_BASE(NAMESPACE, INTERFACE, ::ams::sf::IServiceObject, CMD_MACRO, INTF_ID) - #define AMS_SF_DEFINE_MITM_INTERFACE(NAMESPACE, INTERFACE, CMD_MACRO) \ - AMS_SF_DEFINE_INTERFACE_WITH_DEFAULT_BASE(NAMESPACE, INTERFACE, ::ams::sf::IMitmServiceObject, CMD_MACRO) + #define AMS_SF_DEFINE_MITM_INTERFACE(NAMESPACE, INTERFACE, CMD_MACRO, INTF_ID) \ + AMS_SF_DEFINE_INTERFACE_WITH_DEFAULT_BASE(NAMESPACE, INTERFACE, ::ams::sf::IMitmServiceObject, CMD_MACRO, INTF_ID) - #define AMS_SF_DEFINE_INTERFACE_WITH_BASE(NAMESPACE, INTERFACE, BASE, CMD_MACRO) \ + #define AMS_SF_DEFINE_INTERFACE_WITH_BASE(NAMESPACE, INTERFACE, BASE, CMD_MACRO, INTF_ID) \ namespace NAMESPACE { \ \ - AMS_SF_DEFINE_INTERFACE_IMPL(BASE, INTERFACE, CMD_MACRO) \ + AMS_SF_DEFINE_INTERFACE_IMPL(BASE, INTERFACE, CMD_MACRO, INTF_ID) \ \ } \ \ diff --git a/libraries/libstratosphere/include/stratosphere/sf/impl/sf_impl_autogen_interface_macros.hpp b/libraries/libstratosphere/include/stratosphere/sf/impl/sf_impl_autogen_interface_macros.hpp index 74d0ab1bd..19e528046 100644 --- a/libraries/libstratosphere/include/stratosphere/sf/impl/sf_impl_autogen_interface_macros.hpp +++ b/libraries/libstratosphere/include/stratosphere/sf/impl/sf_impl_autogen_interface_macros.hpp @@ -65,8 +65,10 @@ namespace ams::sf::impl { template struct Print; - #define AMS_SF_IMPL_DEFINE_INTERFACE(BASECLASS, CLASSNAME, CMD_MACRO) \ + #define AMS_SF_IMPL_DEFINE_INTERFACE(BASECLASS, CLASSNAME, CMD_MACRO, INTF_ID) \ class CLASSNAME : public BASECLASS { \ + public: \ + static constexpr u32 InterfaceIdForDebug = INTF_ID; \ private: \ CMD_MACRO(CLASSNAME, AMS_SF_IMPL_DEFINE_INTERFACE_SYNC_METHOD) \ public: \ @@ -118,7 +120,7 @@ namespace ams::sf::impl { } \ } \ \ - return ::ams::sf::cmif::ServiceDispatchTable { combined_entries }; \ + return ::ams::sf::cmif::ServiceDispatchTable { combined_entries }; \ }() \ }; \ }; @@ -147,9 +149,9 @@ namespace ams::sf::impl { template \ concept Is##CLASSNAME = CMD_MACRO(CLASSNAME, AMS_SF_IMPL_CHECK_CONCEPT_HELPER) true; - #define AMS_SF_DEFINE_INTERFACE_IMPL(BASECLASS, CLASSNAME, CMD_MACRO) \ - AMS_SF_IMPL_DEFINE_INTERFACE(BASECLASS, CLASSNAME, CMD_MACRO) \ - AMS_SF_IMPL_DEFINE_CONCEPT(CLASSNAME, CMD_MACRO) \ + #define AMS_SF_DEFINE_INTERFACE_IMPL(BASECLASS, CLASSNAME, CMD_MACRO, INTF_ID) \ + AMS_SF_IMPL_DEFINE_INTERFACE(BASECLASS, CLASSNAME, CMD_MACRO, INTF_ID) \ + AMS_SF_IMPL_DEFINE_CONCEPT(CLASSNAME, CMD_MACRO) \ static_assert(Is##CLASSNAME); #define AMS_SF_METHOD_INFO_7(CLASSNAME, HANDLER, CMD_ID, RETURN, NAME, ARGS, ARGNAMES) \ diff --git a/libraries/libstratosphere/include/stratosphere/sf/impl/sf_impl_command_serialization.hpp b/libraries/libstratosphere/include/stratosphere/sf/impl/sf_impl_command_serialization.hpp index cef1c5e3e..3fdbcbb79 100644 --- a/libraries/libstratosphere/include/stratosphere/sf/impl/sf_impl_command_serialization.hpp +++ b/libraries/libstratosphere/include/stratosphere/sf/impl/sf_impl_command_serialization.hpp @@ -1254,7 +1254,6 @@ namespace ams::sf::impl { constexpr bool ReturnsVoid = std::is_same::value; static_assert(ReturnsResult || ReturnsVoid, "Service Commands must return Result or void."); - return InvokeServiceCommandImplCommon(out_header_ptr, ctx, in_raw_data, +[](sf::IServiceObject *srv_obj, Arguments &&... args) -> Result { if constexpr (ReturnsResult) { return (static_cast(srv_obj)->*ServiceCommandImpl)(std::forward(args)...); diff --git a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_crypto_interface.hpp b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_crypto_interface.hpp index 5d606f357..cb16205ee 100644 --- a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_crypto_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_crypto_interface.hpp @@ -31,4 +31,4 @@ AMS_SF_METHOD_INFO(C, H, 22, Result, DeallocateAesKeySlot, (s32 keyslot), (keyslot)) \ AMS_SF_METHOD_INFO(C, H, 23, Result, GetAesKeySlotAvailableEvent, (sf::OutCopyHandle out_hnd), (out_hnd)) -AMS_SF_DEFINE_INTERFACE_WITH_BASE(ams::spl::impl, ICryptoInterface, ::ams::spl::impl::IGeneralInterface, AMS_SPL_I_CRYPTO_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE_WITH_BASE(ams::spl::impl, ICryptoInterface, ::ams::spl::impl::IGeneralInterface, AMS_SPL_I_CRYPTO_INTERFACE_INTERFACE_INFO, 0xEF3598D9) diff --git a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_deprecated_general_interface.hpp b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_deprecated_general_interface.hpp index 50e87c82c..7e3e210a9 100644 --- a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_deprecated_general_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_deprecated_general_interface.hpp @@ -48,4 +48,4 @@ AMS_SF_METHOD_INFO(C, H, 24, Result, SetBootReason, (spl::BootReasonValue boot_reason), (boot_reason), hos::Version_3_0_0) \ AMS_SF_METHOD_INFO(C, H, 25, Result, GetBootReason, (sf::Out out), (out), hos::Version_3_0_0) -AMS_SF_DEFINE_INTERFACE(ams::spl::impl, IDeprecatedGeneralInterface, AMS_SPL_I_DEPRECATED_GENERAL_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::spl::impl, IDeprecatedGeneralInterface, AMS_SPL_I_DEPRECATED_GENERAL_INTERFACE_INTERFACE_INFO, 0x127DDBD0) diff --git a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_device_unique_data_interface.hpp b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_device_unique_data_interface.hpp index 250d5958d..268f2b19b 100644 --- a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_device_unique_data_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_device_unique_data_interface.hpp @@ -24,4 +24,4 @@ AMS_SF_METHOD_INFO(C, H, 13, Result, DecryptDeviceUniqueDataDeprecated, (const sf::OutPointerBuffer &dst, const sf::InPointerBuffer &src, spl::AccessKey access_key, spl::KeySource key_source, u32 option), (dst, src, access_key, key_source, option), hos::Version_Min, hos::Version_4_1_0) \ AMS_SF_METHOD_INFO(C, H, 13, Result, DecryptDeviceUniqueData, (const sf::OutPointerBuffer &dst, const sf::InPointerBuffer &src, spl::AccessKey access_key, spl::KeySource key_source), (dst, src, access_key, key_source), hos::Version_5_0_0) -AMS_SF_DEFINE_INTERFACE_WITH_BASE(ams::spl::impl, IDeviceUniqueDataInterface, ::ams::spl::impl::ICryptoInterface, AMS_SPL_I_DEVICE_UNIQUE_DATA_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE_WITH_BASE(ams::spl::impl, IDeviceUniqueDataInterface, ::ams::spl::impl::ICryptoInterface, AMS_SPL_I_DEVICE_UNIQUE_DATA_INTERFACE_INTERFACE_INFO, 0xADAD1D0A) diff --git a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_es_interface.hpp b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_es_interface.hpp index c97fafb7e..0fda18172 100644 --- a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_es_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_es_interface.hpp @@ -30,4 +30,4 @@ AMS_SF_METHOD_INFO(C, H, 31, Result, PrepareEsArchiveKey, (sf::Out out_access_key, const sf::InPointerBuffer &base, const sf::InPointerBuffer &mod, const sf::InPointerBuffer &label_digest, u32 generation), (out_access_key, base, mod, label_digest, generation), hos::Version_6_0_0) \ AMS_SF_METHOD_INFO(C, H, 32, Result, LoadPreparedAesKey, (s32 keyslot, spl::AccessKey access_key), (keyslot, access_key), hos::Version_6_0_0) -AMS_SF_DEFINE_INTERFACE_WITH_BASE(ams::spl::impl, IEsInterface, ::ams::spl::impl::IDeviceUniqueDataInterface, AMS_SPL_I_ES_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE_WITH_BASE(ams::spl::impl, IEsInterface, ::ams::spl::impl::IDeviceUniqueDataInterface, AMS_SPL_I_ES_INTERFACE_INTERFACE_INFO, 0x346D5001) diff --git a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_fs_interface.hpp b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_fs_interface.hpp index f5d97dd21..c8e9712c6 100644 --- a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_fs_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_fs_interface.hpp @@ -28,4 +28,4 @@ AMS_SF_METHOD_INFO(C, H, 19, Result, LoadPreparedAesKey, (s32 keyslot, spl::AccessKey access_key), (keyslot, access_key)) \ AMS_SF_METHOD_INFO(C, H, 31, Result, GetPackage2Hash, (const sf::OutPointerBuffer &dst), (dst), hos::Version_5_0_0) -AMS_SF_DEFINE_INTERFACE_WITH_BASE(ams::spl::impl, IFsInterface, ::ams::spl::impl::ICryptoInterface, AMS_SPL_I_FS_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE_WITH_BASE(ams::spl::impl, IFsInterface, ::ams::spl::impl::ICryptoInterface, AMS_SPL_I_FS_INTERFACE_INTERFACE_INFO, 0x682B3803) diff --git a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_general_interface.hpp b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_general_interface.hpp index 9033efb09..c25102e6c 100644 --- a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_general_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_general_interface.hpp @@ -28,4 +28,4 @@ AMS_SF_METHOD_INFO(C, H, 24, Result, SetBootReason, (spl::BootReasonValue boot_reason), (boot_reason), hos::Version_3_0_0) \ AMS_SF_METHOD_INFO(C, H, 25, Result, GetBootReason, (sf::Out out), (out), hos::Version_3_0_0) -AMS_SF_DEFINE_INTERFACE(ams::spl::impl, IGeneralInterface, AMS_SPL_I_GENERAL_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::spl::impl, IGeneralInterface, AMS_SPL_I_GENERAL_INTERFACE_INTERFACE_INFO, 0x127DDBD0) diff --git a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_manu_interface.hpp b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_manu_interface.hpp index 364dfe76e..be7366b2f 100644 --- a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_manu_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_manu_interface.hpp @@ -23,4 +23,4 @@ #define AMS_SPL_I_MANU_INTERFACE_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 30, Result, ReencryptDeviceUniqueData, (const sf::OutPointerBuffer &out, const sf::InPointerBuffer &src, spl::AccessKey access_key_dec, spl::KeySource source_dec, spl::AccessKey access_key_enc, spl::KeySource source_enc, u32 option), (out, src, access_key_dec, source_dec, access_key_enc, source_enc, option)) -AMS_SF_DEFINE_INTERFACE_WITH_BASE(ams::spl::impl, IManuInterface, ::ams::spl::impl::IDeviceUniqueDataInterface, AMS_SPL_I_MANU_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE_WITH_BASE(ams::spl::impl, IManuInterface, ::ams::spl::impl::IDeviceUniqueDataInterface, AMS_SPL_I_MANU_INTERFACE_INTERFACE_INFO, 0xF5643734) diff --git a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_random_interface.hpp b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_random_interface.hpp index 61adfd81d..811c6762e 100644 --- a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_random_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_random_interface.hpp @@ -22,4 +22,4 @@ #define AMS_SPL_I_RANDOM_INTERFACE_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, GenerateRandomBytes, (const sf::OutBuffer &out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::spl::impl, IRandomInterface, AMS_SPL_I_RANDOM_INTERFACE_INTERFACE_INFO) \ No newline at end of file +AMS_SF_DEFINE_INTERFACE(ams::spl::impl, IRandomInterface, AMS_SPL_I_RANDOM_INTERFACE_INTERFACE_INFO, 0xBDE33ED4) \ No newline at end of file diff --git a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_ssl_interface.hpp b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_ssl_interface.hpp index 244c0bb81..3925a723d 100644 --- a/libraries/libstratosphere/include/stratosphere/spl/impl/spl_ssl_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/spl/impl/spl_ssl_interface.hpp @@ -24,4 +24,4 @@ AMS_SF_METHOD_INFO(C, H, 26, Result, DecryptAndStoreSslClientCertKey, (const sf::InPointerBuffer &src, spl::AccessKey access_key, spl::KeySource key_source), (src, access_key, key_source), hos::Version_5_0_0) \ AMS_SF_METHOD_INFO(C, H, 27, Result, ModularExponentiateWithSslClientCertKey, (const sf::OutPointerBuffer &out, const sf::InPointerBuffer &base, const sf::InPointerBuffer &mod), (out, base, mod), hos::Version_5_0_0) -AMS_SF_DEFINE_INTERFACE_WITH_BASE(ams::spl::impl, ISslInterface, ::ams::spl::impl::IDeviceUniqueDataInterface, AMS_SPL_I_SSL_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE_WITH_BASE(ams::spl::impl, ISslInterface, ::ams::spl::impl::IDeviceUniqueDataInterface, AMS_SPL_I_SSL_INTERFACE_INTERFACE_INFO, 0x0E1D71B7) diff --git a/libraries/libstratosphere/include/stratosphere/tma/tma_i_directory_accessor.hpp b/libraries/libstratosphere/include/stratosphere/tma/tma_i_directory_accessor.hpp index f126066cc..876c5d634 100644 --- a/libraries/libstratosphere/include/stratosphere/tma/tma_i_directory_accessor.hpp +++ b/libraries/libstratosphere/include/stratosphere/tma/tma_i_directory_accessor.hpp @@ -25,4 +25,4 @@ AMS_SF_METHOD_INFO(C, H, 2, Result, SetPriorityForDirectory, (s32 priority), (priority)) \ AMS_SF_METHOD_INFO(C, H, 3, Result, GetPriorityForDirectory, (ams::sf::Out out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::tma, IDirectoryAccessor, AMS_TMA_I_DIRECTORY_ACCESSOR_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::tma, IDirectoryAccessor, AMS_TMA_I_DIRECTORY_ACCESSOR_INTERFACE_INFO, 0x070BADB5) diff --git a/libraries/libstratosphere/include/stratosphere/tma/tma_i_file_accessor.hpp b/libraries/libstratosphere/include/stratosphere/tma/tma_i_file_accessor.hpp index cff1c4046..487156fb4 100644 --- a/libraries/libstratosphere/include/stratosphere/tma/tma_i_file_accessor.hpp +++ b/libraries/libstratosphere/include/stratosphere/tma/tma_i_file_accessor.hpp @@ -28,4 +28,4 @@ AMS_SF_METHOD_INFO(C, H, 5, Result, SetPriorityForFile, (s32 priority), (priority)) \ AMS_SF_METHOD_INFO(C, H, 6, Result, GetPriorityForFile, (ams::sf::Out out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::tma, IFileAccessor, AMS_TMA_I_FILE_ACCESSOR_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::tma, IFileAccessor, AMS_TMA_I_FILE_ACCESSOR_INTERFACE_INFO, 0x985A04E3) diff --git a/libraries/libstratosphere/include/stratosphere/tma/tma_i_file_manager.hpp b/libraries/libstratosphere/include/stratosphere/tma/tma_i_file_manager.hpp index d3b3f7360..1949079ec 100644 --- a/libraries/libstratosphere/include/stratosphere/tma/tma_i_file_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/tma/tma_i_file_manager.hpp @@ -36,7 +36,7 @@ AMS_SF_METHOD_INFO(C, H, 12, Result, GetCaseSensitivePath, (const tma::Path &path, const sf::OutBuffer &out), (path, out)) \ AMS_SF_METHOD_INFO(C, H, 13, Result, GetDiskFreeSpaceExW, (sf::Out out_free, sf::Out out_total, sf::Out out_total_free, const tma::Path &path), (out_free, out_total, out_total_free, path)) -AMS_SF_DEFINE_INTERFACE(ams::tma, IFileManager, AMS_TMA_I_FILE_MANAGER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::tma, IFileManager, AMS_TMA_I_FILE_MANAGER_INTERFACE_INFO, 0xA15AF3E1) /* Prior to system version 6.0.0, case sensitivity was not parameterized. */ #define AMS_TMA_I_DEPRECATED_FILE_MANAGER_INTERFACE_INFO(C, H) \ @@ -55,4 +55,4 @@ AMS_SF_DEFINE_INTERFACE(ams::tma, IFileManager, AMS_TMA_I_FILE_MANAGER_INTERFACE AMS_SF_METHOD_INFO(C, H, 12, Result, GetCaseSensitivePath, (const tma::Path &path, const sf::OutBuffer &out), (path, out)) \ AMS_SF_METHOD_INFO(C, H, 13, Result, GetDiskFreeSpaceExW, (sf::Out out_free, sf::Out out_total, sf::Out out_total_free, const tma::Path &path), (out_free, out_total, out_total_free, path)) -AMS_SF_DEFINE_INTERFACE(ams::tma, IDeprecatedFileManager, AMS_TMA_I_DEPRECATED_FILE_MANAGER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::tma, IDeprecatedFileManager, AMS_TMA_I_DEPRECATED_FILE_MANAGER_INTERFACE_INFO, 0xA15AF3E1) diff --git a/libraries/libstratosphere/include/stratosphere/tma/tma_i_htc_manager.hpp b/libraries/libstratosphere/include/stratosphere/tma/tma_i_htc_manager.hpp index 17e6f9b38..065719a42 100644 --- a/libraries/libstratosphere/include/stratosphere/tma/tma_i_htc_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/tma/tma_i_htc_manager.hpp @@ -38,4 +38,4 @@ AMS_SF_METHOD_INFO(C, H, 16, Result, SetBridgeSubnetMask, (const sf::InBuffer &arg), (arg)) \ AMS_SF_METHOD_INFO(C, H, 17, Result, SetBridgePort, (const sf::InBuffer &arg), (arg)) -AMS_SF_DEFINE_INTERFACE(ams::tma, IHtcManager, AMS_TMA_I_HTC_MANAGER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::tma, IHtcManager, AMS_TMA_I_HTC_MANAGER_INTERFACE_INFO, 0x8591F069) diff --git a/libraries/libstratosphere/include/stratosphere/tma/tma_i_htcs_manager.hpp b/libraries/libstratosphere/include/stratosphere/tma/tma_i_htcs_manager.hpp index 69b2b9cbb..6a34c983f 100644 --- a/libraries/libstratosphere/include/stratosphere/tma/tma_i_htcs_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/tma/tma_i_htcs_manager.hpp @@ -40,4 +40,4 @@ AMS_SF_METHOD_INFO(C, H, 130, Result, StartSelect, (sf::Out out_task_id, sf::OutCopyHandle out_event, const sf::InMapAliasArray &read_handles, const sf::InMapAliasArray &write_handles, const sf::InMapAliasArray &exception_handles, s64 tv_sec, s64 tv_usec), (out_task_id, out_event, read_handles, write_handles, exception_handles, tv_sec, tv_usec)) \ AMS_SF_METHOD_INFO(C, H, 131, Result, EndSelect, (sf::Out out_err, sf::Out out_count, const sf::OutMapAliasArray &read_handles, const sf::OutMapAliasArray &write_handles, const sf::OutMapAliasArray &exception_handles, u32 task_id), (out_err, out_count, read_handles, write_handles, exception_handles, task_id)) -AMS_SF_DEFINE_INTERFACE(ams::tma, IHtcsManager, AMS_TMA_I_HTCS_MANAGER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::tma, IHtcsManager, AMS_TMA_I_HTCS_MANAGER_INTERFACE_INFO, 0x91ECD04F) diff --git a/libraries/libstratosphere/include/stratosphere/tma/tma_i_socket.hpp b/libraries/libstratosphere/include/stratosphere/tma/tma_i_socket.hpp index f416844a0..7adb35f5d 100644 --- a/libraries/libstratosphere/include/stratosphere/tma/tma_i_socket.hpp +++ b/libraries/libstratosphere/include/stratosphere/tma/tma_i_socket.hpp @@ -47,4 +47,4 @@ AMS_SF_METHOD_INFO(C, H, 23, Result, ContinueSend, (sf::Out out_size, sf::Out out_wait, const sf::InNonSecureAutoSelectBuffer &buffer, u32 task_id), (out_size, out_wait, buffer, task_id)) \ AMS_SF_METHOD_INFO(C, H, 130, Result, GetPrimitive, (sf::Out out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::tma, ISocket, AMS_TMA_I_SOCKET_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::tma, ISocket, AMS_TMA_I_SOCKET_INTERFACE_INFO, 0x34CFC7C1) diff --git a/libraries/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_endpoint.hpp b/libraries/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_endpoint.hpp index 728928e1d..bdbc80e84 100644 --- a/libraries/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_endpoint.hpp +++ b/libraries/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_endpoint.hpp @@ -29,5 +29,5 @@ /* TODO: Deprecated interface? */ -AMS_SF_DEFINE_INTERFACE(ams::usb::ds, IDsEndpoint, AMS_USB_I_DS_ENDPOINT_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::usb::ds, IDsEndpoint, AMS_USB_I_DS_ENDPOINT_INTERFACE_INFO, 0x107E43A4) diff --git a/libraries/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_interface.hpp b/libraries/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_interface.hpp index d72761446..36b96f084 100644 --- a/libraries/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_interface.hpp +++ b/libraries/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_interface.hpp @@ -37,5 +37,5 @@ /* TODO: Deprecated interface? */ -AMS_SF_DEFINE_INTERFACE(ams::usb::ds, IDsInterface, AMS_USB_I_DS_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::usb::ds, IDsInterface, AMS_USB_I_DS_INTERFACE_INTERFACE_INFO, 0x5632AFB2) diff --git a/libraries/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_service.hpp b/libraries/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_service.hpp index 1925e7e9c..2877e341c 100644 --- a/libraries/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_service.hpp +++ b/libraries/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_service.hpp @@ -35,10 +35,10 @@ /* TODO: Deprecated interface? */ -AMS_SF_DEFINE_INTERFACE(ams::usb::ds, IDsService, AMS_USB_I_DS_SERVICE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::usb::ds, IDsService, AMS_USB_I_DS_SERVICE_INTERFACE_INFO, 0x306DB3C1) -#define AMS_USB_I_DS_ROOT_SERVICE_INTERFACE_INFO(C, H) \ +#define AMS_USB_I_DS_ROOT_SESSION_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, GetService, (sf::Out> out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::usb::ds, IDsRootService, AMS_USB_I_DS_ROOT_SERVICE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::usb::ds, IDsRootSession, AMS_USB_I_DS_ROOT_SESSION_INTERFACE_INFO, 0x2EC38748) diff --git a/libraries/libstratosphere/include/stratosphere/usb/usb_device.hpp b/libraries/libstratosphere/include/stratosphere/usb/usb_device.hpp index e41654d42..6c318560c 100644 --- a/libraries/libstratosphere/include/stratosphere/usb/usb_device.hpp +++ b/libraries/libstratosphere/include/stratosphere/usb/usb_device.hpp @@ -35,7 +35,7 @@ namespace ams::usb { sf::ExpHeapAllocator m_allocator{}; u8 m_heap_buffer[32_KB]; lmem::HeapHandle m_heap_handle{}; - sf::SharedPointer m_root_service{}; + sf::SharedPointer m_root_session{}; sf::SharedPointer m_ds_service{}; bool m_is_initialized{false}; std::atomic m_reference_count{0}; diff --git a/libraries/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_server_manager.hpp b/libraries/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_server_manager.hpp index 0ac745f67..d44137af1 100644 --- a/libraries/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_server_manager.hpp +++ b/libraries/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_server_manager.hpp @@ -26,10 +26,10 @@ namespace ams::capsrv::server { static constexpr inline size_t MaxSessions = 2; static constexpr inline sm::ServiceName ServiceName = sm::ServiceName::Encode("caps:dc"); - using ServiceHolderType = sf::UnmanagedServiceObject; + using ServiceHolderType = ams::sf::UnmanagedServiceObject; - using ServerOptions = sf::hipc::DefaultServerManagerOptions; - using ServerManager = sf::hipc::ServerManager; + using ServerOptions = ams::sf::hipc::DefaultServerManagerOptions; + using ServerManager = ams::sf::hipc::ServerManager; private: util::optional m_service_holder; util::optional m_server_manager_holder; diff --git a/libraries/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_service.cpp b/libraries/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_service.cpp index 21b3025f7..328eb5bc3 100644 --- a/libraries/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_service.cpp +++ b/libraries/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_service.cpp @@ -69,7 +69,7 @@ namespace ams::capsrv::server { } - Result DecoderControlService::DecodeJpeg(const sf::OutNonSecureBuffer &out, const sf::InBuffer &in, u32 width, u32 height, const ScreenShotDecodeOption &option) { + Result DecoderControlService::DecodeJpeg(const ams::sf::OutNonSecureBuffer &out, const ams::sf::InBuffer &in, u32 width, u32 height, const ScreenShotDecodeOption &option) { /* Get the work buffer. */ void *work = g_work_memory.jpeg_decoder_memory; size_t work_size = sizeof(g_work_memory.jpeg_decoder_memory); diff --git a/libraries/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_service.hpp b/libraries/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_service.hpp index 00cfd190b..feab40ba0 100644 --- a/libraries/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_service.hpp +++ b/libraries/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_service.hpp @@ -17,16 +17,16 @@ #include #define AMS_CAPSRV_DECODER_CONTROL_SERVICE_INTERFACE_INFO(C, H) \ - AMS_SF_METHOD_INFO(C, H, 3001, Result, DecodeJpeg, (const sf::OutNonSecureBuffer &out, const sf::InBuffer &in, u32 width, u32 height, const capsrv::ScreenShotDecodeOption &option), (out, in, width, height, option)) + AMS_SF_METHOD_INFO(C, H, 3001, Result, DecodeJpeg, (const ams::sf::OutNonSecureBuffer &out, const ams::sf::InBuffer &in, u32 width, u32 height, const capsrv::ScreenShotDecodeOption &option), (out, in, width, height, option)) -AMS_SF_DEFINE_INTERFACE(ams::capsrv::server, IDecoderControlService, AMS_CAPSRV_DECODER_CONTROL_SERVICE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::capsrv::sf, IDecoderControlService, AMS_CAPSRV_DECODER_CONTROL_SERVICE_INTERFACE_INFO, 0xD168E90B) namespace ams::capsrv::server { class DecoderControlService final { public: - Result DecodeJpeg(const sf::OutNonSecureBuffer &out, const sf::InBuffer &in, u32 width, u32 height, const ScreenShotDecodeOption &option); + Result DecodeJpeg(const ams::sf::OutNonSecureBuffer &out, const ams::sf::InBuffer &in, u32 width, u32 height, const ScreenShotDecodeOption &option); }; - static_assert(IsIDecoderControlService); + static_assert(capsrv::sf::IsIDecoderControlService); } diff --git a/libraries/libstratosphere/source/lm/sf/lm_i_log_getter.hpp b/libraries/libstratosphere/source/lm/sf/lm_i_log_getter.hpp index 0ec7fd911..e39dbb9dd 100644 --- a/libraries/libstratosphere/source/lm/sf/lm_i_log_getter.hpp +++ b/libraries/libstratosphere/source/lm/sf/lm_i_log_getter.hpp @@ -21,4 +21,4 @@ AMS_SF_METHOD_INFO(C, H, 1, Result, StopLogging, (), ()) \ AMS_SF_METHOD_INFO(C, H, 2, Result, GetLog, (const sf::OutAutoSelectBuffer &message, sf::Out out_size, sf::Out out_drop_count), (message, out_size, out_drop_count)) -AMS_SF_DEFINE_INTERFACE(ams::lm, ILogGetter, AMS_LM_I_LOG_GETTER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::lm, ILogGetter, AMS_LM_I_LOG_GETTER_INTERFACE_INFO, 0x565EA15C) diff --git a/libraries/libstratosphere/source/lm/sf/lm_i_log_service.hpp b/libraries/libstratosphere/source/lm/sf/lm_i_log_service.hpp index 56b0f2136..dcefb0078 100644 --- a/libraries/libstratosphere/source/lm/sf/lm_i_log_service.hpp +++ b/libraries/libstratosphere/source/lm/sf/lm_i_log_service.hpp @@ -20,9 +20,9 @@ AMS_SF_METHOD_INFO(C, H, 0, Result, Log, (const sf::InAutoSelectBuffer &message), (message)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, SetDestination, (u32 destination), (destination)) -AMS_SF_DEFINE_INTERFACE(ams::lm, ILogger, AMS_LM_I_LOGGER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::lm, ILogger, AMS_LM_I_LOGGER_INTERFACE_INFO, 0x3E81DAD2) #define AMS_LM_I_LOG_SERVICE_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, OpenLogger, (sf::Out> out, const sf::ClientProcessId &client_process_id), (out, client_process_id)) -AMS_SF_DEFINE_INTERFACE(ams::lm, ILogService, AMS_LM_I_LOG_SERVICE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::lm, ILogService, AMS_LM_I_LOG_SERVICE_INTERFACE_INFO, 0xE1D7F748) diff --git a/libraries/libstratosphere/source/sf/cmif/sf_cmif_service_dispatch.cpp b/libraries/libstratosphere/source/sf/cmif/sf_cmif_service_dispatch.cpp index 117c1f806..1be21ecc2 100644 --- a/libraries/libstratosphere/source/sf/cmif/sf_cmif_service_dispatch.cpp +++ b/libraries/libstratosphere/source/sf/cmif/sf_cmif_service_dispatch.cpp @@ -83,7 +83,7 @@ namespace ams::sf::cmif { } - Result impl::ServiceDispatchTableBase::ProcessMessageImpl(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data, const ServiceCommandMeta *entries, const size_t entry_count) const { + Result impl::ServiceDispatchTableBase::ProcessMessageImpl(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data, const ServiceCommandMeta *entries, const size_t entry_count, u32 interface_id_for_debug) const { /* Get versioning info. */ const auto hos_version = hos::GetVersion(); const u32 max_cmif_version = hos_version >= hos::Version_5_0_0 ? 1 : 0; @@ -115,13 +115,13 @@ namespace ams::sf::cmif { } /* Write output header to raw data. */ - *out_header = CmifOutHeader{OutHeaderMagic, 0, command_result.GetValue(), 0}; + *out_header = CmifOutHeader{OutHeaderMagic, 0, command_result.GetValue(), interface_id_for_debug}; return ResultSuccess(); } #if AMS_SF_MITM_SUPPORTED - Result impl::ServiceDispatchTableBase::ProcessMessageForMitmImpl(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data, const ServiceCommandMeta *entries, const size_t entry_count) const { + Result impl::ServiceDispatchTableBase::ProcessMessageForMitmImpl(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data, const ServiceCommandMeta *entries, const size_t entry_count, u32 interface_id_for_debug) const { /* Get versioning info. */ const auto hos_version = hos::GetVersion(); const u32 max_cmif_version = hos_version >= hos::Version_5_0_0 ? 1 : 0; @@ -162,7 +162,7 @@ namespace ams::sf::cmif { } /* Write output header to raw data. */ - *out_header = CmifOutHeader{OutHeaderMagic, 0, command_result.GetValue(), 0}; + *out_header = CmifOutHeader{OutHeaderMagic, 0, command_result.GetValue(), interface_id_for_debug}; return ResultSuccess(); } diff --git a/libraries/libstratosphere/source/sf/hipc/sf_hipc_mitm_query_api.cpp b/libraries/libstratosphere/source/sf/hipc/sf_hipc_mitm_query_api.cpp index 494f70392..2f7dd5e79 100644 --- a/libraries/libstratosphere/source/sf/hipc/sf_hipc_mitm_query_api.cpp +++ b/libraries/libstratosphere/source/sf/hipc/sf_hipc_mitm_query_api.cpp @@ -21,7 +21,7 @@ #define AMS_SF_HIPC_IMPL_I_MITM_QUERY_SERVICE_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 65000, void, ShouldMitm, (sf::Out out, const sm::MitmProcessInfo &client_info), (out, client_info)) -AMS_SF_DEFINE_INTERFACE(ams::sf::hipc::impl, IMitmQueryService, AMS_SF_HIPC_IMPL_I_MITM_QUERY_SERVICE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::sf::hipc::impl, IMitmQueryService, AMS_SF_HIPC_IMPL_I_MITM_QUERY_SERVICE_INTERFACE_INFO, 0xEC6BE3FF) namespace ams::sf::hipc::impl { diff --git a/libraries/libstratosphere/source/sf/hipc/sf_hipc_server_domain_session_manager.cpp b/libraries/libstratosphere/source/sf/hipc/sf_hipc_server_domain_session_manager.cpp index 52441446e..38336828d 100644 --- a/libraries/libstratosphere/source/sf/hipc/sf_hipc_server_domain_session_manager.cpp +++ b/libraries/libstratosphere/source/sf/hipc/sf_hipc_server_domain_session_manager.cpp @@ -14,15 +14,7 @@ * along with this program. If not, see . */ #include - -#define AMS_SF_HIPC_IMPL_I_HIPC_MANAGER_INTERFACE_INFO(C, H) \ - AMS_SF_METHOD_INFO(C, H, 0, Result, ConvertCurrentObjectToDomain, (ams::sf::Out out), (out)) \ - AMS_SF_METHOD_INFO(C, H, 1, Result, CopyFromCurrentDomain, (ams::sf::OutMoveHandle out, ams::sf::cmif::DomainObjectId object_id), (out, object_id)) \ - AMS_SF_METHOD_INFO(C, H, 2, Result, CloneCurrentObject, (ams::sf::OutMoveHandle out), (out)) \ - AMS_SF_METHOD_INFO(C, H, 3, void, QueryPointerBufferSize, (ams::sf::Out out), (out)) \ - AMS_SF_METHOD_INFO(C, H, 4, Result, CloneCurrentObjectEx, (ams::sf::OutMoveHandle out, u32 tag), (out, tag)) - -AMS_SF_DEFINE_INTERFACE(ams::sf::hipc::impl, IHipcManager, AMS_SF_HIPC_IMPL_I_HIPC_MANAGER_INTERFACE_INFO) +#include "sf_i_hipc_manager.hpp" namespace ams::sf::hipc { diff --git a/libraries/libstratosphere/source/sf/hipc/sf_i_hipc_manager.hpp b/libraries/libstratosphere/source/sf/hipc/sf_i_hipc_manager.hpp new file mode 100644 index 000000000..a14ca3af4 --- /dev/null +++ b/libraries/libstratosphere/source/sf/hipc/sf_i_hipc_manager.hpp @@ -0,0 +1,26 @@ +/* + * 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 . + */ +#include +#pragma once + +#define AMS_SF_HIPC_IMPL_I_HIPC_MANAGER_INTERFACE_INFO(C, H) \ + AMS_SF_METHOD_INFO(C, H, 0, Result, ConvertCurrentObjectToDomain, (ams::sf::Out out), (out)) \ + AMS_SF_METHOD_INFO(C, H, 1, Result, CopyFromCurrentDomain, (ams::sf::OutMoveHandle out, ams::sf::cmif::DomainObjectId object_id), (out, object_id)) \ + AMS_SF_METHOD_INFO(C, H, 2, Result, CloneCurrentObject, (ams::sf::OutMoveHandle out), (out)) \ + AMS_SF_METHOD_INFO(C, H, 3, void, QueryPointerBufferSize, (ams::sf::Out out), (out)) \ + AMS_SF_METHOD_INFO(C, H, 4, Result, CloneCurrentObjectEx, (ams::sf::OutMoveHandle out, u32 tag), (out, tag)) + +AMS_SF_DEFINE_INTERFACE(ams::sf::hipc::impl, IHipcManager, AMS_SF_HIPC_IMPL_I_HIPC_MANAGER_INTERFACE_INFO, 0xEC6BE3FF) diff --git a/libraries/libstratosphere/source/sf/sf_interface_id_for_debug_enforcement.os.horizon.cpp b/libraries/libstratosphere/source/sf/sf_interface_id_for_debug_enforcement.os.horizon.cpp new file mode 100644 index 000000000..24e1a0352 --- /dev/null +++ b/libraries/libstratosphere/source/sf/sf_interface_id_for_debug_enforcement.os.horizon.cpp @@ -0,0 +1,201 @@ +/* + * 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 . + */ +#include +#include "../capsrv/server/decodersrv/decodersrv_decoder_control_service.hpp" +#include "../lm/sf/lm_i_log_getter.hpp" +#include "../lm/sf/lm_i_log_service.hpp" +#include "../sf/hipc/sf_i_hipc_manager.hpp" +#include "../sprofile/srv/sprofile_srv_i_service_getter.hpp" + +namespace { + + constexpr u32 GenerateInterfaceIdFromName(const char *s) { + /* Get the interface length. */ + const auto len = ams::util::Strlen(s); + + /* Calculate the sha256. */ + u8 hash[ams::crypto::Sha256Generator::HashSize] = {}; + ams::crypto::GenerateSha256(hash, sizeof(hash), s, len); + + /* Read it out as little endian. */ + u32 id = 0; + for (size_t i = 0; i < sizeof(id); ++i) { + id |= static_cast(hash[i]) << (BITSIZEOF(u8) * i); + } + + return id; + } + + static_assert(GenerateInterfaceIdFromName("nn::sf::hipc::detail::IHipcManager") == 0xEC6BE3FF); + + constexpr void ConvertAtmosphereNameToNintendoName(char *dst, const char *src) { + /* Determine src len. */ + const auto len = ams::util::Strlen(src); + const auto *s = src; + + /* Atmosphere names begin with ams::, Nintendo names begin with nn::. */ + AMS_ASSUME(src[0] == 'a'); + AMS_ASSUME(src[1] == 'm'); + AMS_ASSERT(src[2] == 's'); + dst[0] = 'n'; + dst[1] = 'n'; + src += 3; + dst += 2; + + /* Copy over. */ + while ((src - s) < len) { + /* Atmosphere uses ::impl:: instead of ::detail::, ::IDeprecated* for deprecated services. */ + if (src[0] == ':' && src[1] == ':' && src[2] == 'i' && src[3] == 'm' && src[4] == 'p' && src[5] == 'l' && src[6] == ':' && src[7] == ':') { + dst[0] = ':'; + dst[1] = ':'; + dst[2] = 'd'; + dst[3] = 'e'; + dst[4] = 't'; + dst[5] = 'a'; + dst[6] = 'i'; + dst[7] = 'l'; + + src += 6; /* ::impl */ + dst += 8; /* ::detail */ + } else if (src[0] == ':' && src[1] == ':' && src[2] == 'I' && src[3] == 'D' && src[4] == 'e' && src[5] == 'p' && src[6] == 'r' && src[7] == 'e' && src[8] == 'c' && src[9] == 'a' && src[10] == 't' && src[11] == 'e' && src[12] == 'd') { + dst[0] = ':'; + dst[1] = ':'; + dst[2] = 'I'; + + src += 13; /* ::IDeprecated */ + dst += 3; /* ::I */ + } else { + *(dst++) = *(src++); + } + } + + *dst = 0; + } + + constexpr u32 GenerateInterfaceIdFromAtmosphereName(const char *ams) { + char nn[0x100] = {}; + ConvertAtmosphereNameToNintendoName(nn, ams); + + return GenerateInterfaceIdFromName(nn); + } + +} + +#define AMS_IMPL_CHECK_INTERFACE_ID(AMS_INTF) \ + static_assert(AMS_INTF::InterfaceIdForDebug == GenerateInterfaceIdFromAtmosphereName( #AMS_INTF ), #AMS_INTF) + + +AMS_IMPL_CHECK_INTERFACE_ID(ams::capsrv::sf::IDecoderControlService); + +AMS_IMPL_CHECK_INTERFACE_ID(ams::erpt::sf::IAttachment); +AMS_IMPL_CHECK_INTERFACE_ID(ams::erpt::sf::IContext); +AMS_IMPL_CHECK_INTERFACE_ID(ams::erpt::sf::IManager); +AMS_IMPL_CHECK_INTERFACE_ID(ams::erpt::sf::IReport); +AMS_IMPL_CHECK_INTERFACE_ID(ams::erpt::sf::ISession); + +static_assert(::ams::fatal::impl::IPrivateService::InterfaceIdForDebug == GenerateInterfaceIdFromName("nn::fatalsrv::IPrivateService")); // TODO: FIX-TO-MATCH +static_assert(::ams::fatal::impl::IService::InterfaceIdForDebug == GenerateInterfaceIdFromName("nn::fatalsrv::IService")); // TODO: FIX-TO-MATCH + +AMS_IMPL_CHECK_INTERFACE_ID(ams::fssrv::sf::IDirectory); +AMS_IMPL_CHECK_INTERFACE_ID(ams::fssrv::sf::IFile); +AMS_IMPL_CHECK_INTERFACE_ID(ams::fssrv::sf::IFileSystem); +AMS_IMPL_CHECK_INTERFACE_ID(ams::fssrv::sf::IStorage); +AMS_IMPL_CHECK_INTERFACE_ID(ams::fssrv::sf::IDeviceOperator); +AMS_IMPL_CHECK_INTERFACE_ID(ams::fssrv::sf::IEventNotifier); +AMS_IMPL_CHECK_INTERFACE_ID(ams::fssrv::sf::IFileSystemProxy); +AMS_IMPL_CHECK_INTERFACE_ID(ams::fssrv::sf::IFileSystemProxyForLoader); +AMS_IMPL_CHECK_INTERFACE_ID(ams::fssrv::sf::IProgramRegistry); + +static_assert(::ams::gpio::sf::IManager::InterfaceIdForDebug == GenerateInterfaceIdFromName("nn::gpio::IManager")); // TODO: FIX-TO-MATCH +static_assert(::ams::gpio::sf::IPadSession::InterfaceIdForDebug == GenerateInterfaceIdFromName("nn::gpio::IPadSession")); // TODO: FIX-TO-MATCH + +AMS_IMPL_CHECK_INTERFACE_ID(ams::htc::tenv::IService); +AMS_IMPL_CHECK_INTERFACE_ID(ams::htc::tenv::IServiceManager); + +static_assert(::ams::i2c::sf::IManager::InterfaceIdForDebug == GenerateInterfaceIdFromName("nn::i2c::IManager")); // TODO: FIX-TO-MATCH +static_assert(::ams::i2c::sf::ISession::InterfaceIdForDebug == GenerateInterfaceIdFromName("nn::i2c::ISession")); // TODO: FIX-TO-MATCH + +AMS_IMPL_CHECK_INTERFACE_ID(ams::ldr::impl::IDebugMonitorInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::ldr::impl::IProcessManagerInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::ldr::impl::IShellInterface); + +AMS_IMPL_CHECK_INTERFACE_ID(ams::lr::IAddOnContentLocationResolver); +AMS_IMPL_CHECK_INTERFACE_ID(ams::lr::ILocationResolver); +AMS_IMPL_CHECK_INTERFACE_ID(ams::lr::ILocationResolverManager); +AMS_IMPL_CHECK_INTERFACE_ID(ams::lr::IRegisteredLocationResolver); + +AMS_IMPL_CHECK_INTERFACE_ID(ams::lm::ILogGetter); +AMS_IMPL_CHECK_INTERFACE_ID(ams::lm::ILogger); +AMS_IMPL_CHECK_INTERFACE_ID(ams::lm::ILogService); + +AMS_IMPL_CHECK_INTERFACE_ID(ams::ncm::IContentManager); +AMS_IMPL_CHECK_INTERFACE_ID(ams::ncm::IContentMetaDatabase); +AMS_IMPL_CHECK_INTERFACE_ID(ams::ncm::IContentStorage); + +AMS_IMPL_CHECK_INTERFACE_ID(ams::ns::impl::IAsyncResult); + +//AMS_IMPL_CHECK_INTERFACE_ID(ams::pgl::sf::IEventObserver); +//AMS_IMPL_CHECK_INTERFACE_ID(ams::pgl::sf::IShellInterface); + +AMS_IMPL_CHECK_INTERFACE_ID(ams::pm::impl::IBootModeInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::pm::impl::IDebugMonitorInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::pm::impl::IDeprecatedDebugMonitorInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::pm::impl::IInformationInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::pm::impl::IShellInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::pm::impl::IDeprecatedShellInterface); + +AMS_IMPL_CHECK_INTERFACE_ID(ams::psc::sf::IPmModule); +AMS_IMPL_CHECK_INTERFACE_ID(ams::psc::sf::IPmService); + +static_assert(::ams::pwm::sf::IChannelSession::InterfaceIdForDebug == GenerateInterfaceIdFromName("nn::pwm::IChannelSession")); // TODO: FIX-TO-MATCH +static_assert(::ams::pwm::sf::IManager::InterfaceIdForDebug == GenerateInterfaceIdFromName("nn::pwm::IManager")); // TODO: FIX-TO-MATCH + +AMS_IMPL_CHECK_INTERFACE_ID(ams::ro::impl::IDebugMonitorInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::ro::impl::IRoInterface); + +//AMS_IMPL_CHECK_INTERFACE_ID(ams::sf::hipc::impl::IMitmQueryService); +AMS_IMPL_CHECK_INTERFACE_ID(ams::sf::hipc::impl::IHipcManager); + +AMS_IMPL_CHECK_INTERFACE_ID(ams::spl::impl::ICryptoInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::spl::impl::IDeprecatedGeneralInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::spl::impl::IDeviceUniqueDataInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::spl::impl::IEsInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::spl::impl::IFsInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::spl::impl::IGeneralInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::spl::impl::IManuInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::spl::impl::IRandomInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::spl::impl::ISslInterface); + +AMS_IMPL_CHECK_INTERFACE_ID(ams::sprofile::srv::IProfileControllerForDebug); +AMS_IMPL_CHECK_INTERFACE_ID(ams::sprofile::srv::IProfileImporter); +AMS_IMPL_CHECK_INTERFACE_ID(ams::sprofile::srv::IProfileReader); +AMS_IMPL_CHECK_INTERFACE_ID(ams::sprofile::srv::IProfileUpdateObserver); +AMS_IMPL_CHECK_INTERFACE_ID(ams::sprofile::srv::ISprofileServiceForBgAgent); +AMS_IMPL_CHECK_INTERFACE_ID(ams::sprofile::srv::ISprofileServiceForSystemProcess); +AMS_IMPL_CHECK_INTERFACE_ID(ams::sprofile::srv::IServiceGetter); + +AMS_IMPL_CHECK_INTERFACE_ID(ams::tma::IDirectoryAccessor); +AMS_IMPL_CHECK_INTERFACE_ID(ams::tma::IFileAccessor); +AMS_IMPL_CHECK_INTERFACE_ID(ams::tma::IFileManager); +AMS_IMPL_CHECK_INTERFACE_ID(ams::tma::IDeprecatedFileManager); +AMS_IMPL_CHECK_INTERFACE_ID(ams::tma::IHtcsManager); +AMS_IMPL_CHECK_INTERFACE_ID(ams::tma::IHtcManager); +AMS_IMPL_CHECK_INTERFACE_ID(ams::tma::ISocket); + +AMS_IMPL_CHECK_INTERFACE_ID(ams::usb::ds::IDsEndpoint); +AMS_IMPL_CHECK_INTERFACE_ID(ams::usb::ds::IDsInterface); +AMS_IMPL_CHECK_INTERFACE_ID(ams::usb::ds::IDsService); +AMS_IMPL_CHECK_INTERFACE_ID(ams::usb::ds::IDsRootSession); diff --git a/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_controller_for_debug.hpp b/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_controller_for_debug.hpp index 836dfd184..7d51c7df2 100644 --- a/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_controller_for_debug.hpp +++ b/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_controller_for_debug.hpp @@ -21,4 +21,4 @@ AMS_SF_METHOD_INFO(C, H, 2001, Result, GetRaw, (sf::Out out_type, sf::Out out_value, sprofile::Identifier profile, sprofile::Identifier key), (out_type, out_value, profile, key)) -AMS_SF_DEFINE_INTERFACE(ams::sprofile::srv, IProfileControllerForDebug, AMS_SPROFILE_I_PROFILE_CONTROLLER_FOR_DEBUG_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::sprofile::srv, IProfileControllerForDebug, AMS_SPROFILE_I_PROFILE_CONTROLLER_FOR_DEBUG_INTERFACE_INFO, 0xA8C14F64) diff --git a/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_importer.hpp b/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_importer.hpp index fb592cae3..8d0c2b32b 100644 --- a/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_importer.hpp +++ b/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_importer.hpp @@ -22,4 +22,4 @@ AMS_SF_METHOD_INFO(C, H, 1, Result, Commit, (), ()) \ AMS_SF_METHOD_INFO(C, H, 2, Result, ImportMetadata, (const sprofile::srv::ProfileMetadataForImportMetadata &import), (import)) \ -AMS_SF_DEFINE_INTERFACE(ams::sprofile::srv, IProfileImporter, AMS_SPROFILE_I_PROFILE_IMPORTER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::sprofile::srv, IProfileImporter, AMS_SPROFILE_I_PROFILE_IMPORTER_INTERFACE_INFO, 0x1629C4E6) diff --git a/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_reader.hpp b/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_reader.hpp index 9d2458588..e9a48faae 100644 --- a/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_reader.hpp +++ b/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_reader.hpp @@ -23,4 +23,4 @@ AMS_SF_METHOD_INFO(C, H, 3, Result, GetUnsigned32, (sf::Out out, sprofile::Identifier profile, sprofile::Identifier key), (out, profile, key)) \ AMS_SF_METHOD_INFO(C, H, 4, Result, GetByte, (sf::Out out, sprofile::Identifier profile, sprofile::Identifier key), (out, profile, key)) -AMS_SF_DEFINE_INTERFACE(ams::sprofile::srv, IProfileReader, AMS_SPROFILE_I_PROFILE_READER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::sprofile::srv, IProfileReader, AMS_SPROFILE_I_PROFILE_READER_INTERFACE_INFO, 0x97090D4D) diff --git a/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_update_observer.hpp b/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_update_observer.hpp index 1830e1551..ab68ad3bf 100644 --- a/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_update_observer.hpp +++ b/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_update_observer.hpp @@ -21,4 +21,4 @@ AMS_SF_METHOD_INFO(C, H, 1, Result, Unlisten, (sprofile::Identifier profile), (profile)) \ AMS_SF_METHOD_INFO(C, H, 2, Result, GetEventHandle, (ams::sf::OutCopyHandle out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::sprofile::srv, IProfileUpdateObserver, AMS_SPROFILE_I_PROFILE_UPDATE_OBSERVER_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::sprofile::srv, IProfileUpdateObserver, AMS_SPROFILE_I_PROFILE_UPDATE_OBSERVER_INTERFACE_INFO, 0xB52A765C) diff --git a/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_for_bg_agent.hpp b/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_for_bg_agent.hpp index a850f8ad1..5edce1d7d 100644 --- a/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_for_bg_agent.hpp +++ b/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_for_bg_agent.hpp @@ -23,4 +23,4 @@ AMS_SF_METHOD_INFO(C, H, 201, Result, IsUpdateNeeded, (sf::Out out, sprofile::Identifier revision_key), (out, revision_key)) \ AMS_SF_METHOD_INFO(C, H, 2000, Result, Reset, (), ()) -AMS_SF_DEFINE_INTERFACE(ams::sprofile::srv, ISprofileServiceForBgAgent, AMS_SPROFILE_I_SPROFILE_SERVICE_FOR_BG_AGENT_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::sprofile::srv, ISprofileServiceForBgAgent, AMS_SPROFILE_I_SPROFILE_SERVICE_FOR_BG_AGENT_INTERFACE_INFO, 0xCCD828EC) diff --git a/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_for_system_process.hpp b/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_for_system_process.hpp index 9171a5476..d05e76c4e 100644 --- a/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_for_system_process.hpp +++ b/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_for_system_process.hpp @@ -24,4 +24,4 @@ AMS_SF_METHOD_INFO(C, H, 101, Result, OpenProfileUpdateObserver, (sf::Out> out), (out)) \ AMS_SF_METHOD_INFO(C, H, 900, Result, OpenProfileControllerForDebug, (sf::Out> out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::sprofile::srv, ISprofileServiceForSystemProcess, AMS_SPROFILE_I_SPROFILE_SERVICE_FOR_SYSTEM_PROCESS_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::sprofile::srv, ISprofileServiceForSystemProcess, AMS_SPROFILE_I_SPROFILE_SERVICE_FOR_SYSTEM_PROCESS_INTERFACE_INFO, 0x919612FB) diff --git a/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_getter.hpp b/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_getter.hpp index 838157065..ce2f06527 100644 --- a/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_getter.hpp +++ b/libraries/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_getter.hpp @@ -22,4 +22,4 @@ AMS_SF_METHOD_INFO(C, H, 0, Result, GetServiceForSystemProcess, (sf::Out> out), (out)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, GetServiceForBgAgent, (sf::Out> out), (out)) -AMS_SF_DEFINE_INTERFACE(ams::sprofile::srv, IServiceGetter, AMS_SPROFILE_I_SERVICE_GETTER_INTERFACE_INFO) \ No newline at end of file +AMS_SF_DEFINE_INTERFACE(ams::sprofile::srv, IServiceGetter, AMS_SPROFILE_I_SERVICE_GETTER_INTERFACE_INFO, 0x2CFB8417) \ No newline at end of file diff --git a/libraries/libstratosphere/source/usb/usb_device.cpp b/libraries/libstratosphere/source/usb/usb_device.cpp index 61072e05e..4881e05e0 100644 --- a/libraries/libstratosphere/source/usb/usb_device.cpp +++ b/libraries/libstratosphere/source/usb/usb_device.cpp @@ -14,7 +14,7 @@ * along with this program. If not, see . */ #include -#include "usb_remote_ds_root_service.hpp" +#include "usb_remote_ds_root_session.hpp" #include "usb_remote_ds_service.hpp" #include "impl/usb_util.hpp" @@ -48,9 +48,9 @@ namespace ams::usb { using ObjectFactory = sf::ObjectFactory; if (hos::GetVersion() >= hos::Version_11_0_0) { - m_root_service = ObjectFactory::CreateSharedEmplaced(std::addressof(m_allocator), srv, std::addressof(m_allocator)); + m_root_session = ObjectFactory::CreateSharedEmplaced(std::addressof(m_allocator), srv, std::addressof(m_allocator)); - R_TRY(m_root_service->GetService(std::addressof(m_ds_service))); + R_TRY(m_root_session->GetService(std::addressof(m_ds_service))); } else { m_ds_service = ObjectFactory::CreateSharedEmplaced(std::addressof(m_allocator), srv, std::addressof(m_allocator)); } @@ -102,7 +102,7 @@ namespace ams::usb { /* Destroy interface objects. */ m_ds_service = nullptr; - m_root_service = nullptr; + m_root_session = nullptr; return ResultSuccess(); } diff --git a/libraries/libstratosphere/source/usb/usb_remote_ds_root_service.cpp b/libraries/libstratosphere/source/usb/usb_remote_ds_root_session.cpp similarity index 91% rename from libraries/libstratosphere/source/usb/usb_remote_ds_root_service.cpp rename to libraries/libstratosphere/source/usb/usb_remote_ds_root_session.cpp index 58c33a001..fea1ada56 100644 --- a/libraries/libstratosphere/source/usb/usb_remote_ds_root_service.cpp +++ b/libraries/libstratosphere/source/usb/usb_remote_ds_root_session.cpp @@ -14,13 +14,13 @@ * along with this program. If not, see . */ #include -#include "usb_remote_ds_root_service.hpp" +#include "usb_remote_ds_root_session.hpp" #include "usb_remote_ds_service.hpp" namespace ams::usb { #if defined(ATMOSPHERE_OS_HORIZON) - Result RemoteDsRootService::GetService(sf::Out> out) { + Result RemoteDsRootSession::GetService(sf::Out> out) { Service srv; serviceAssumeDomain(std::addressof(m_srv)); diff --git a/libraries/libstratosphere/source/usb/usb_remote_ds_root_service.hpp b/libraries/libstratosphere/source/usb/usb_remote_ds_root_session.hpp similarity index 84% rename from libraries/libstratosphere/source/usb/usb_remote_ds_root_service.hpp rename to libraries/libstratosphere/source/usb/usb_remote_ds_root_session.hpp index 5cd0aee28..9a17459eb 100644 --- a/libraries/libstratosphere/source/usb/usb_remote_ds_root_service.hpp +++ b/libraries/libstratosphere/source/usb/usb_remote_ds_root_session.hpp @@ -19,7 +19,7 @@ namespace ams::usb { #if defined(ATMOSPHERE_OS_HORIZON) - class RemoteDsRootService { + class RemoteDsRootSession { private: using Allocator = sf::ExpHeapAllocator; using ObjectFactory = sf::ObjectFactory; @@ -27,12 +27,12 @@ namespace ams::usb { Service m_srv; Allocator *m_allocator; public: - RemoteDsRootService(Service &srv, sf::ExpHeapAllocator *allocator) : m_srv(srv), m_allocator(allocator) { /* ... */ } - virtual ~RemoteDsRootService() { serviceClose(std::addressof(m_srv)); } + RemoteDsRootSession(Service &srv, sf::ExpHeapAllocator *allocator) : m_srv(srv), m_allocator(allocator) { /* ... */ } + virtual ~RemoteDsRootSession() { serviceClose(std::addressof(m_srv)); } public: Result GetService(sf::Out> out); }; - static_assert(ds::IsIDsRootService); + static_assert(ds::IsIDsRootSession); #endif } diff --git a/libraries/libvapours/include/vapours/crypto/impl/crypto_sha256_impl_constexpr.hpp b/libraries/libvapours/include/vapours/crypto/impl/crypto_sha256_impl_constexpr.hpp index 54ee0f9f1..99bb41a83 100644 --- a/libraries/libvapours/include/vapours/crypto/impl/crypto_sha256_impl_constexpr.hpp +++ b/libraries/libvapours/include/vapours/crypto/impl/crypto_sha256_impl_constexpr.hpp @@ -277,6 +277,19 @@ namespace ams::crypto::impl { m_buffer[i] = 0; } } + + /* Store the size field. */ + m_buffer[BlockSizeWithoutSizeField + 0] = static_cast((m_bits_consumed >> (BITSIZEOF(u8) * 7)) & 0xFF); + m_buffer[BlockSizeWithoutSizeField + 1] = static_cast((m_bits_consumed >> (BITSIZEOF(u8) * 6)) & 0xFF); + m_buffer[BlockSizeWithoutSizeField + 2] = static_cast((m_bits_consumed >> (BITSIZEOF(u8) * 5)) & 0xFF); + m_buffer[BlockSizeWithoutSizeField + 3] = static_cast((m_bits_consumed >> (BITSIZEOF(u8) * 4)) & 0xFF); + m_buffer[BlockSizeWithoutSizeField + 4] = static_cast((m_bits_consumed >> (BITSIZEOF(u8) * 3)) & 0xFF); + m_buffer[BlockSizeWithoutSizeField + 5] = static_cast((m_bits_consumed >> (BITSIZEOF(u8) * 2)) & 0xFF); + m_buffer[BlockSizeWithoutSizeField + 6] = static_cast((m_bits_consumed >> (BITSIZEOF(u8) * 1)) & 0xFF); + m_buffer[BlockSizeWithoutSizeField + 7] = static_cast((m_bits_consumed >> (BITSIZEOF(u8) * 0)) & 0xFF); + + /* Process the final block. */ + this->ProcessBlock(m_buffer); } }; diff --git a/stratosphere/ams_mitm/source/bpc_mitm/bpc_ams_service.hpp b/stratosphere/ams_mitm/source/bpc_mitm/bpc_ams_service.hpp index 9d1c9079f..51c0001f6 100644 --- a/stratosphere/ams_mitm/source/bpc_mitm/bpc_ams_service.hpp +++ b/stratosphere/ams_mitm/source/bpc_mitm/bpc_ams_service.hpp @@ -20,7 +20,7 @@ AMS_SF_METHOD_INFO(C, H, 65000, void, RebootToFatalError, (const ams::FatalErrorContext &ctx), (ctx)) \ AMS_SF_METHOD_INFO(C, H, 65001, void, SetRebootPayload, (const ams::sf::InBuffer &payload), (payload)) -AMS_SF_DEFINE_INTERFACE(ams::mitm::bpc::impl, IAtmosphereInterface, AMS_BPC_MITM_ATMOSPHERE_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::mitm::bpc::impl, IAtmosphereInterface, AMS_BPC_MITM_ATMOSPHERE_INTERFACE_INTERFACE_INFO, 0x00000000) namespace ams::mitm::bpc { diff --git a/stratosphere/ams_mitm/source/bpc_mitm/bpc_mitm_service.hpp b/stratosphere/ams_mitm/source/bpc_mitm/bpc_mitm_service.hpp index 4e87b405e..6e2b00910 100644 --- a/stratosphere/ams_mitm/source/bpc_mitm/bpc_mitm_service.hpp +++ b/stratosphere/ams_mitm/source/bpc_mitm/bpc_mitm_service.hpp @@ -20,7 +20,7 @@ AMS_SF_METHOD_INFO(C, H, 0, Result, ShutdownSystem, (), ()) \ AMS_SF_METHOD_INFO(C, H, 1, Result, RebootSystem, (), ()) -AMS_SF_DEFINE_MITM_INTERFACE(ams::mitm::bpc::impl, IBpcMitmInterface, AMS_BPC_MITM_INTERFACE_INFO) +AMS_SF_DEFINE_MITM_INTERFACE(ams::mitm::bpc::impl, IBpcMitmInterface, AMS_BPC_MITM_INTERFACE_INFO, 0xF6C277FD) namespace ams::mitm::bpc { diff --git a/stratosphere/ams_mitm/source/dns_mitm/dnsmitm_resolver_impl.hpp b/stratosphere/ams_mitm/source/dns_mitm/dnsmitm_resolver_impl.hpp index a17d97b03..0b4036969 100644 --- a/stratosphere/ams_mitm/source/dns_mitm/dnsmitm_resolver_impl.hpp +++ b/stratosphere/ams_mitm/source/dns_mitm/dnsmitm_resolver_impl.hpp @@ -23,7 +23,7 @@ AMS_SF_METHOD_INFO(C, H, 12, Result, GetAddrInfoRequestWithOptions, (const sf::ClientProcessId &client_pid, const sf::InBuffer &node, const sf::InBuffer &srv, const sf::InBuffer &serialized_hint, const sf::OutAutoSelectBuffer &out_addrinfo, sf::Out out_size, sf::Out out_retval, u32 options_version, const sf::InAutoSelectBuffer &options, u32 num_options, sf::Out out_host_error, sf::Out out_errno), (client_pid, node, srv, serialized_hint, out_addrinfo, out_size, out_retval, options_version, options, num_options, out_host_error, out_errno), hos::Version_5_0_0) \ AMS_SF_METHOD_INFO(C, H, 65000, Result, AtmosphereReloadHostsFile, (), ()) -AMS_SF_DEFINE_MITM_INTERFACE(ams::mitm::socket::resolver, IResolver, AMS_DNS_MITM_INTERFACE_INFO) +AMS_SF_DEFINE_MITM_INTERFACE(ams::mitm::socket::resolver, IResolver, AMS_DNS_MITM_INTERFACE_INFO, 0x5935F91A) namespace ams::mitm::socket::resolver { diff --git a/stratosphere/ams_mitm/source/fs_mitm/fs_mitm_service.hpp b/stratosphere/ams_mitm/source/fs_mitm/fs_mitm_service.hpp index f91114e66..7101bfb75 100644 --- a/stratosphere/ams_mitm/source/fs_mitm/fs_mitm_service.hpp +++ b/stratosphere/ams_mitm/source/fs_mitm/fs_mitm_service.hpp @@ -29,7 +29,7 @@ AMS_SF_METHOD_INFO(C, H, 810, Result, RegisterProgramIndexMapInfo, (const sf::InBuffer &info_buffer, s32 info_count), (info_buffer, info_count), hos::Version_7_0_0) -AMS_SF_DEFINE_MITM_INTERFACE(ams::mitm::fs, IFsMitmInterface, AMS_FS_MITM_INTERFACE_INFO) +AMS_SF_DEFINE_MITM_INTERFACE(ams::mitm::fs, IFsMitmInterface, AMS_FS_MITM_INTERFACE_INFO, 0x7DF34ED2) namespace ams::mitm::fs { diff --git a/stratosphere/ams_mitm/source/ns_mitm/ns_am_mitm_service.hpp b/stratosphere/ams_mitm/source/ns_mitm/ns_am_mitm_service.hpp index 0a4bbe5a7..dcf6f0327 100644 --- a/stratosphere/ams_mitm/source/ns_mitm/ns_am_mitm_service.hpp +++ b/stratosphere/ams_mitm/source/ns_mitm/ns_am_mitm_service.hpp @@ -21,7 +21,7 @@ AMS_SF_METHOD_INFO(C, H, 23, Result, ResolveApplicationContentPath, (ncm::ProgramId application_id, u8 content_type), (application_id, content_type)) \ AMS_SF_METHOD_INFO(C, H, 92, Result, GetRunningApplicationProgramId, (sf::Out out, ncm::ProgramId application_id), (out, application_id), hos::Version_6_0_0) -AMS_SF_DEFINE_MITM_INTERFACE(ams::mitm::ns::impl, IAmMitmInterface, AMS_NS_AM_MITM_INTERFACE_INFO) +AMS_SF_DEFINE_MITM_INTERFACE(ams::mitm::ns::impl, IAmMitmInterface, AMS_NS_AM_MITM_INTERFACE_INFO, 0x059D2C39) namespace ams::mitm::ns { diff --git a/stratosphere/ams_mitm/source/ns_mitm/ns_web_mitm_service.hpp b/stratosphere/ams_mitm/source/ns_mitm/ns_web_mitm_service.hpp index ced65e0b5..2d298ac43 100644 --- a/stratosphere/ams_mitm/source/ns_mitm/ns_web_mitm_service.hpp +++ b/stratosphere/ams_mitm/source/ns_mitm/ns_web_mitm_service.hpp @@ -23,12 +23,12 @@ AMS_SF_METHOD_INFO(C, H, 23, Result, ResolveApplicationContentPath, (ncm::ProgramId application_id, u8 content_type), (application_id, content_type)) \ AMS_SF_METHOD_INFO(C, H, 92, Result, GetRunningApplicationProgramId, (sf::Out out, ncm::ProgramId application_id), (out, application_id), hos::Version_6_0_0) -AMS_SF_DEFINE_INTERFACE(ams::mitm::ns::impl, IDocumentInterface, AMS_NS_DOCUMENT_MITM_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::mitm::ns::impl, IDocumentInterface, AMS_NS_DOCUMENT_MITM_INTERFACE_INFO, 0x0F9B1C00) #define AMS_NS_WEB_MITM_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 7999, Result, GetDocumentInterface, (sf::Out> out), (out)) -AMS_SF_DEFINE_MITM_INTERFACE(ams::mitm::ns::impl, IWebMitmInterface, AMS_NS_WEB_MITM_INTERFACE_INFO) +AMS_SF_DEFINE_MITM_INTERFACE(ams::mitm::ns::impl, IWebMitmInterface, AMS_NS_WEB_MITM_INTERFACE_INFO, 0xF4EC2D1A) namespace ams::mitm::ns { diff --git a/stratosphere/ams_mitm/source/set_mitm/set_mitm_service.hpp b/stratosphere/ams_mitm/source/set_mitm/set_mitm_service.hpp index f65e919ed..15c78e3f4 100644 --- a/stratosphere/ams_mitm/source/set_mitm/set_mitm_service.hpp +++ b/stratosphere/ams_mitm/source/set_mitm/set_mitm_service.hpp @@ -20,7 +20,7 @@ AMS_SF_METHOD_INFO(C, H, 0, Result, GetLanguageCode, (sf::Out out), (out)) \ AMS_SF_METHOD_INFO(C, H, 4, Result, GetRegionCode, (sf::Out out), (out)) -AMS_SF_DEFINE_MITM_INTERFACE(ams::mitm::settings, ISetMitmInterface, AMS_SETTINGS_MITM_INTERFACE_INFO) +AMS_SF_DEFINE_MITM_INTERFACE(ams::mitm::settings, ISetMitmInterface, AMS_SETTINGS_MITM_INTERFACE_INFO, 0x7F7BAF0A) namespace ams::mitm::settings { diff --git a/stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.hpp b/stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.hpp index b9e6ededd..5779438bb 100644 --- a/stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.hpp +++ b/stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.hpp @@ -23,7 +23,7 @@ AMS_SF_METHOD_INFO(C, H, 38, Result, GetSettingsItemValue, (sf::Out out_size, const sf::OutBuffer &out, const ams::settings::SettingsName &name, const ams::settings::SettingsItemKey &key), (out_size, out, name, key)) \ AMS_SF_METHOD_INFO(C, H, 62, Result, GetDebugModeFlag, (sf::Out out), (out)) -AMS_SF_DEFINE_MITM_INTERFACE(ams::mitm::settings, ISetSysMitmInterface, AMS_SETTINGS_SYSTEM_MITM_INTERFACE_INFO) +AMS_SF_DEFINE_MITM_INTERFACE(ams::mitm::settings, ISetSysMitmInterface, AMS_SETTINGS_SYSTEM_MITM_INTERFACE_INFO, 0x0E82ED13) namespace ams::mitm::settings { diff --git a/stratosphere/ams_mitm/source/sysupdater/sysupdater_service.hpp b/stratosphere/ams_mitm/source/sysupdater/sysupdater_service.hpp index 7901bbebb..57a3b0003 100644 --- a/stratosphere/ams_mitm/source/sysupdater/sysupdater_service.hpp +++ b/stratosphere/ams_mitm/source/sysupdater/sysupdater_service.hpp @@ -50,7 +50,7 @@ namespace ams::mitm::sysupdater { AMS_SF_METHOD_INFO(C, H, 6, Result, HasPreparedUpdate, (sf::Out out), (out)) \ AMS_SF_METHOD_INFO(C, H, 7, Result, ApplyPreparedUpdate, (), ()) -AMS_SF_DEFINE_INTERFACE(ams::mitm::sysupdater::impl, ISystemUpdateInterface, AMS_SYSUPDATER_SYSTEM_UPDATE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::mitm::sysupdater::impl, ISystemUpdateInterface, AMS_SYSUPDATER_SYSTEM_UPDATE_INTERFACE_INFO, 0x00000000) namespace ams::mitm::sysupdater { diff --git a/stratosphere/dmnt/source/cheat/dmnt_cheat_service.hpp b/stratosphere/dmnt/source/cheat/dmnt_cheat_service.hpp index e64c3192d..74b26e4a6 100644 --- a/stratosphere/dmnt/source/cheat/dmnt_cheat_service.hpp +++ b/stratosphere/dmnt/source/cheat/dmnt_cheat_service.hpp @@ -46,7 +46,7 @@ AMS_SF_METHOD_INFO(C, H, 65303, Result, EnableFrozenAddress, (sf::Out out_value, u64 address, u64 width), (out_value, address, width)) \ AMS_SF_METHOD_INFO(C, H, 65304, Result, DisableFrozenAddress, (u64 address), (address)) -AMS_SF_DEFINE_INTERFACE(ams::dmnt::cheat::impl, ICheatInterface, AMS_DMNT_I_CHEAT_INTERFACE_INTERFACE_INFO) +AMS_SF_DEFINE_INTERFACE(ams::dmnt::cheat::impl, ICheatInterface, AMS_DMNT_I_CHEAT_INTERFACE_INTERFACE_INFO, 0x00000000) namespace ams::dmnt::cheat {