diff --git a/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_attachment.hpp b/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_attachment.hpp index 0f4ba9bf..2aafa3fe 100644 --- a/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_attachment.hpp +++ b/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/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_context.hpp b/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_context.hpp index b5af3bbe..f2917690 100644 --- a/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_context.hpp +++ b/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/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_manager.hpp b/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_manager.hpp index b2f64c6a..e8ed0631 100644 --- a/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_manager.hpp +++ b/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/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_report.hpp b/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_report.hpp index e69a3d4f..4b695255 100644 --- a/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_report.hpp +++ b/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/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_session.hpp b/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_session.hpp index d0ff9a39..6bb17988 100644 --- a/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_session.hpp +++ b/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/libstratosphere/include/stratosphere/fatal/impl/fatal_i_private_service.hpp b/libstratosphere/include/stratosphere/fatal/impl/fatal_i_private_service.hpp index 3b051875..c98f2d6e 100644 --- a/libstratosphere/include/stratosphere/fatal/impl/fatal_i_private_service.hpp +++ b/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/libstratosphere/include/stratosphere/fatal/impl/fatal_i_service.hpp b/libstratosphere/include/stratosphere/fatal/impl/fatal_i_service.hpp index f3649856..afa10984 100644 --- a/libstratosphere/include/stratosphere/fatal/impl/fatal_i_service.hpp +++ b/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/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_device_operator.hpp b/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_device_operator.hpp index 05a7962d..324c26b1 100644 --- a/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_device_operator.hpp +++ b/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/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_event_notifier.hpp b/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_event_notifier.hpp index 1e71ec5c..0436c408 100644 --- a/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_event_notifier.hpp +++ b/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/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy.hpp b/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy.hpp index d8e7e2a4..b5df4345 100644 --- a/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy.hpp +++ b/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/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy_for_loader.hpp b/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy_for_loader.hpp index 01350ceb..87f75ef0 100644 --- a/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_file_system_proxy_for_loader.hpp +++ b/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/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_program_registry.hpp b/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_program_registry.hpp index 4b0a728c..cc8b6fbe 100644 --- a/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_i_program_registry.hpp +++ b/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/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_idirectory.hpp b/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_idirectory.hpp index a65dcdf5..bc2dbf78 100644 --- a/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_idirectory.hpp +++ b/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/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_ifile.hpp b/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_ifile.hpp index 94b9211f..7bfd07c0 100644 --- a/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_ifile.hpp +++ b/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/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_ifilesystem.hpp b/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_ifilesystem.hpp index 12308b37..469f6066 100644 --- a/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_ifilesystem.hpp +++ b/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/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_istorage.hpp b/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_istorage.hpp index 6f503ab8..82c60a29 100644 --- a/libstratosphere/include/stratosphere/fssrv/sf/fssrv_sf_istorage.hpp +++ b/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/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_manager.hpp b/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_manager.hpp index e4e68947..077885fc 100644 --- a/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_manager.hpp +++ b/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/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_pad_session.hpp b/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_pad_session.hpp index 00e9d80d..9c0fb619 100644 --- a/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_pad_session.hpp +++ b/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/libstratosphere/include/stratosphere/htc/tenv/htc_tenv_i_service.hpp b/libstratosphere/include/stratosphere/htc/tenv/htc_tenv_i_service.hpp index ec4c9e44..28830083 100644 --- a/libstratosphere/include/stratosphere/htc/tenv/htc_tenv_i_service.hpp +++ b/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/libstratosphere/include/stratosphere/htc/tenv/htc_tenv_i_service_manager.hpp b/libstratosphere/include/stratosphere/htc/tenv/htc_tenv_i_service_manager.hpp index ea75b145..1ff6aba7 100644 --- a/libstratosphere/include/stratosphere/htc/tenv/htc_tenv_i_service_manager.hpp +++ b/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/libstratosphere/include/stratosphere/i2c/sf/i2c_sf_i_manager.hpp b/libstratosphere/include/stratosphere/i2c/sf/i2c_sf_i_manager.hpp index 1f9fb0cd..7342f08c 100644 --- a/libstratosphere/include/stratosphere/i2c/sf/i2c_sf_i_manager.hpp +++ b/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/libstratosphere/include/stratosphere/i2c/sf/i2c_sf_i_session.hpp b/libstratosphere/include/stratosphere/i2c/sf/i2c_sf_i_session.hpp index a0aa029a..22cf9afa 100644 --- a/libstratosphere/include/stratosphere/i2c/sf/i2c_sf_i_session.hpp +++ b/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/libstratosphere/include/stratosphere/ldr/impl/ldr_debug_monitor_interface.hpp b/libstratosphere/include/stratosphere/ldr/impl/ldr_debug_monitor_interface.hpp index 39db27f8..d27cdf52 100644 --- a/libstratosphere/include/stratosphere/ldr/impl/ldr_debug_monitor_interface.hpp +++ b/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/libstratosphere/include/stratosphere/ldr/impl/ldr_process_manager_interface.hpp b/libstratosphere/include/stratosphere/ldr/impl/ldr_process_manager_interface.hpp index 4e0f36bb..651b25bf 100644 --- a/libstratosphere/include/stratosphere/ldr/impl/ldr_process_manager_interface.hpp +++ b/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/libstratosphere/include/stratosphere/ldr/impl/ldr_shell_interface.hpp b/libstratosphere/include/stratosphere/ldr/impl/ldr_shell_interface.hpp index 972d20c7..0333e7da 100644 --- a/libstratosphere/include/stratosphere/ldr/impl/ldr_shell_interface.hpp +++ b/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/libstratosphere/include/stratosphere/lr/lr_i_add_on_content_location_resolver.hpp b/libstratosphere/include/stratosphere/lr/lr_i_add_on_content_location_resolver.hpp index 9f101be9..813e0789 100644 --- a/libstratosphere/include/stratosphere/lr/lr_i_add_on_content_location_resolver.hpp +++ b/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/libstratosphere/include/stratosphere/lr/lr_i_location_resolver.hpp b/libstratosphere/include/stratosphere/lr/lr_i_location_resolver.hpp index fbbfa8c4..434ccdcd 100644 --- a/libstratosphere/include/stratosphere/lr/lr_i_location_resolver.hpp +++ b/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/libstratosphere/include/stratosphere/lr/lr_i_location_resolver_manager.hpp b/libstratosphere/include/stratosphere/lr/lr_i_location_resolver_manager.hpp index 3ba3fb6f..548fb727 100644 --- a/libstratosphere/include/stratosphere/lr/lr_i_location_resolver_manager.hpp +++ b/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/libstratosphere/include/stratosphere/lr/lr_i_registered_location_resolver.hpp b/libstratosphere/include/stratosphere/lr/lr_i_registered_location_resolver.hpp index 225107a0..ec0e755d 100644 --- a/libstratosphere/include/stratosphere/lr/lr_i_registered_location_resolver.hpp +++ b/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/libstratosphere/include/stratosphere/ncm/ncm_i_content_manager.hpp b/libstratosphere/include/stratosphere/ncm/ncm_i_content_manager.hpp index 101f42c5..75ca4230 100644 --- a/libstratosphere/include/stratosphere/ncm/ncm_i_content_manager.hpp +++ b/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/libstratosphere/include/stratosphere/ncm/ncm_i_content_meta_database.hpp b/libstratosphere/include/stratosphere/ncm/ncm_i_content_meta_database.hpp index ca800f7c..7bd09658 100644 --- a/libstratosphere/include/stratosphere/ncm/ncm_i_content_meta_database.hpp +++ b/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/libstratosphere/include/stratosphere/ncm/ncm_i_content_storage.hpp b/libstratosphere/include/stratosphere/ncm/ncm_i_content_storage.hpp index 53f23c50..753e10ba 100644 --- a/libstratosphere/include/stratosphere/ncm/ncm_i_content_storage.hpp +++ b/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/libstratosphere/include/stratosphere/ns/impl/ns_i_async.hpp b/libstratosphere/include/stratosphere/ns/impl/ns_i_async.hpp index 563181d1..a6f5b9e4 100644 --- a/libstratosphere/include/stratosphere/ns/impl/ns_i_async.hpp +++ b/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/libstratosphere/include/stratosphere/pgl/sf/pgl_sf_i_event_observer.hpp b/libstratosphere/include/stratosphere/pgl/sf/pgl_sf_i_event_observer.hpp index 2ad1777e..387fb814 100644 --- a/libstratosphere/include/stratosphere/pgl/sf/pgl_sf_i_event_observer.hpp +++ b/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/libstratosphere/include/stratosphere/pgl/sf/pgl_sf_i_shell_interface.hpp b/libstratosphere/include/stratosphere/pgl/sf/pgl_sf_i_shell_interface.hpp index c0a56d7f..a5fb6972 100644 --- a/libstratosphere/include/stratosphere/pgl/sf/pgl_sf_i_shell_interface.hpp +++ b/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/libstratosphere/include/stratosphere/pm/impl/pm_boot_mode_interface.hpp b/libstratosphere/include/stratosphere/pm/impl/pm_boot_mode_interface.hpp index 9a39de6a..a34f2272 100644 --- a/libstratosphere/include/stratosphere/pm/impl/pm_boot_mode_interface.hpp +++ b/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/libstratosphere/include/stratosphere/pm/impl/pm_debug_monitor_interface.hpp b/libstratosphere/include/stratosphere/pm/impl/pm_debug_monitor_interface.hpp index e6555f7f..f9e063ba 100644 --- a/libstratosphere/include/stratosphere/pm/impl/pm_debug_monitor_interface.hpp +++ b/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/libstratosphere/include/stratosphere/pm/impl/pm_information_interface.hpp b/libstratosphere/include/stratosphere/pm/impl/pm_information_interface.hpp index 7a28ff57..35f5d708 100644 --- a/libstratosphere/include/stratosphere/pm/impl/pm_information_interface.hpp +++ b/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/libstratosphere/include/stratosphere/pm/impl/pm_shell_interface.hpp b/libstratosphere/include/stratosphere/pm/impl/pm_shell_interface.hpp index 45684f8f..a8a6177b 100644 --- a/libstratosphere/include/stratosphere/pm/impl/pm_shell_interface.hpp +++ b/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/libstratosphere/include/stratosphere/psc.hpp b/libstratosphere/include/stratosphere/psc.hpp index d8de61ee..bebecf10 100644 --- a/libstratosphere/include/stratosphere/psc.hpp +++ b/libstratosphere/include/stratosphere/psc.hpp @@ -19,4 +19,5 @@ #include #include #include +#include #include diff --git a/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_module.hpp b/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_module.hpp index 0bde2fa5..90c2f5a1 100644 --- a/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_module.hpp +++ b/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/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_service.hpp b/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_service.hpp index 27191c4b..78fff84f 100644 --- a/libstratosphere/include/stratosphere/psc/sf/psc_sf_i_pm_service.hpp +++ b/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/libstratosphere/include/stratosphere/pwm/sf/pwm_sf_i_channel_session.hpp b/libstratosphere/include/stratosphere/pwm/sf/pwm_sf_i_channel_session.hpp index 20c76487..b09d1155 100644 --- a/libstratosphere/include/stratosphere/pwm/sf/pwm_sf_i_channel_session.hpp +++ b/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/libstratosphere/include/stratosphere/pwm/sf/pwm_sf_i_manager.hpp b/libstratosphere/include/stratosphere/pwm/sf/pwm_sf_i_manager.hpp index 352dd2d0..edf0f4d5 100644 --- a/libstratosphere/include/stratosphere/pwm/sf/pwm_sf_i_manager.hpp +++ b/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/libstratosphere/include/stratosphere/ro/impl/ro_debug_monitor_interface.hpp b/libstratosphere/include/stratosphere/ro/impl/ro_debug_monitor_interface.hpp index b4c99061..822e271a 100644 --- a/libstratosphere/include/stratosphere/ro/impl/ro_debug_monitor_interface.hpp +++ b/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/libstratosphere/include/stratosphere/ro/impl/ro_ro_interface.hpp b/libstratosphere/include/stratosphere/ro/impl/ro_ro_interface.hpp index e528c077..8a993f65 100644 --- a/libstratosphere/include/stratosphere/ro/impl/ro_ro_interface.hpp +++ b/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/libstratosphere/include/stratosphere/sf/cmif/sf_cmif_service_dispatch.hpp b/libstratosphere/include/stratosphere/sf/cmif/sf_cmif_service_dispatch.hpp index 810d578e..2268f947 100644 --- a/libstratosphere/include/stratosphere/sf/cmif/sf_cmif_service_dispatch.hpp +++ b/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/libstratosphere/include/stratosphere/sf/impl/sf_impl_autogen_impl_macros.hpp b/libstratosphere/include/stratosphere/sf/impl/sf_impl_autogen_impl_macros.hpp index 0a11f5af..a17d09e5 100644 --- a/libstratosphere/include/stratosphere/sf/impl/sf_impl_autogen_impl_macros.hpp +++ b/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/libstratosphere/include/stratosphere/sf/impl/sf_impl_autogen_interface_macros.hpp b/libstratosphere/include/stratosphere/sf/impl/sf_impl_autogen_interface_macros.hpp index 74d0ab1b..19e52804 100644 --- a/libstratosphere/include/stratosphere/sf/impl/sf_impl_autogen_interface_macros.hpp +++ b/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/libstratosphere/include/stratosphere/sf/impl/sf_impl_command_serialization.hpp b/libstratosphere/include/stratosphere/sf/impl/sf_impl_command_serialization.hpp index cef1c5e3..3fdbcbb7 100644 --- a/libstratosphere/include/stratosphere/sf/impl/sf_impl_command_serialization.hpp +++ b/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/libstratosphere/include/stratosphere/spl/impl/spl_crypto_interface.hpp b/libstratosphere/include/stratosphere/spl/impl/spl_crypto_interface.hpp index 5d606f35..cb16205e 100644 --- a/libstratosphere/include/stratosphere/spl/impl/spl_crypto_interface.hpp +++ b/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/libstratosphere/include/stratosphere/spl/impl/spl_deprecated_general_interface.hpp b/libstratosphere/include/stratosphere/spl/impl/spl_deprecated_general_interface.hpp index 50e87c82..7e3e210a 100644 --- a/libstratosphere/include/stratosphere/spl/impl/spl_deprecated_general_interface.hpp +++ b/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/libstratosphere/include/stratosphere/spl/impl/spl_device_unique_data_interface.hpp b/libstratosphere/include/stratosphere/spl/impl/spl_device_unique_data_interface.hpp index 250d5958..268f2b19 100644 --- a/libstratosphere/include/stratosphere/spl/impl/spl_device_unique_data_interface.hpp +++ b/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/libstratosphere/include/stratosphere/spl/impl/spl_es_interface.hpp b/libstratosphere/include/stratosphere/spl/impl/spl_es_interface.hpp index c97fafb7..0fda1817 100644 --- a/libstratosphere/include/stratosphere/spl/impl/spl_es_interface.hpp +++ b/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/libstratosphere/include/stratosphere/spl/impl/spl_fs_interface.hpp b/libstratosphere/include/stratosphere/spl/impl/spl_fs_interface.hpp index f5d97dd2..c8e9712c 100644 --- a/libstratosphere/include/stratosphere/spl/impl/spl_fs_interface.hpp +++ b/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/libstratosphere/include/stratosphere/spl/impl/spl_general_interface.hpp b/libstratosphere/include/stratosphere/spl/impl/spl_general_interface.hpp index 9033efb0..c25102e6 100644 --- a/libstratosphere/include/stratosphere/spl/impl/spl_general_interface.hpp +++ b/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/libstratosphere/include/stratosphere/spl/impl/spl_manu_interface.hpp b/libstratosphere/include/stratosphere/spl/impl/spl_manu_interface.hpp index 364dfe76..be7366b2 100644 --- a/libstratosphere/include/stratosphere/spl/impl/spl_manu_interface.hpp +++ b/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/libstratosphere/include/stratosphere/spl/impl/spl_random_interface.hpp b/libstratosphere/include/stratosphere/spl/impl/spl_random_interface.hpp index 61adfd81..811c6762 100644 --- a/libstratosphere/include/stratosphere/spl/impl/spl_random_interface.hpp +++ b/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/libstratosphere/include/stratosphere/spl/impl/spl_ssl_interface.hpp b/libstratosphere/include/stratosphere/spl/impl/spl_ssl_interface.hpp index 244c0bb8..3925a723 100644 --- a/libstratosphere/include/stratosphere/spl/impl/spl_ssl_interface.hpp +++ b/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/libstratosphere/include/stratosphere/tma/tma_i_directory_accessor.hpp b/libstratosphere/include/stratosphere/tma/tma_i_directory_accessor.hpp index f126066c..876c5d63 100644 --- a/libstratosphere/include/stratosphere/tma/tma_i_directory_accessor.hpp +++ b/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/libstratosphere/include/stratosphere/tma/tma_i_file_accessor.hpp b/libstratosphere/include/stratosphere/tma/tma_i_file_accessor.hpp index cff1c404..487156fb 100644 --- a/libstratosphere/include/stratosphere/tma/tma_i_file_accessor.hpp +++ b/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/libstratosphere/include/stratosphere/tma/tma_i_file_manager.hpp b/libstratosphere/include/stratosphere/tma/tma_i_file_manager.hpp index d3b3f736..1949079e 100644 --- a/libstratosphere/include/stratosphere/tma/tma_i_file_manager.hpp +++ b/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/libstratosphere/include/stratosphere/tma/tma_i_htc_manager.hpp b/libstratosphere/include/stratosphere/tma/tma_i_htc_manager.hpp index 17e6f9b3..065719a4 100644 --- a/libstratosphere/include/stratosphere/tma/tma_i_htc_manager.hpp +++ b/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/libstratosphere/include/stratosphere/tma/tma_i_htcs_manager.hpp b/libstratosphere/include/stratosphere/tma/tma_i_htcs_manager.hpp index 69b2b9cb..6a34c983 100644 --- a/libstratosphere/include/stratosphere/tma/tma_i_htcs_manager.hpp +++ b/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/libstratosphere/include/stratosphere/tma/tma_i_socket.hpp b/libstratosphere/include/stratosphere/tma/tma_i_socket.hpp index f416844a..7adb35f5 100644 --- a/libstratosphere/include/stratosphere/tma/tma_i_socket.hpp +++ b/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/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_endpoint.hpp b/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_endpoint.hpp index 728928e1..bdbc80e8 100644 --- a/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_endpoint.hpp +++ b/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/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_interface.hpp b/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_interface.hpp index d7276144..36b96f08 100644 --- a/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_interface.hpp +++ b/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/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_service.hpp b/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_service.hpp index 1925e7e9..2877e341 100644 --- a/libstratosphere/include/stratosphere/usb/ds/usb_i_ds_service.hpp +++ b/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/libstratosphere/include/stratosphere/usb/usb_device.hpp b/libstratosphere/include/stratosphere/usb/usb_device.hpp index e41654d4..6c318560 100644 --- a/libstratosphere/include/stratosphere/usb/usb_device.hpp +++ b/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/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_server_manager.hpp b/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_server_manager.hpp index 0ac745f6..d44137af 100644 --- a/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_server_manager.hpp +++ b/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/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_service.cpp b/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_service.cpp index 21b3025f..328eb5bc 100644 --- a/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_service.cpp +++ b/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/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_service.hpp b/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_service.hpp index 00cfd190..feab40ba 100644 --- a/libstratosphere/source/capsrv/server/decodersrv/decodersrv_decoder_control_service.hpp +++ b/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/libstratosphere/source/lm/sf/lm_i_log_getter.hpp b/libstratosphere/source/lm/sf/lm_i_log_getter.hpp index 0ec7fd91..e39dbb9d 100644 --- a/libstratosphere/source/lm/sf/lm_i_log_getter.hpp +++ b/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/libstratosphere/source/lm/sf/lm_i_log_service.hpp b/libstratosphere/source/lm/sf/lm_i_log_service.hpp index 56b0f213..dcefb007 100644 --- a/libstratosphere/source/lm/sf/lm_i_log_service.hpp +++ b/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/libstratosphere/source/sf/cmif/sf_cmif_service_dispatch.cpp b/libstratosphere/source/sf/cmif/sf_cmif_service_dispatch.cpp index 117c1f80..1be21ecc 100644 --- a/libstratosphere/source/sf/cmif/sf_cmif_service_dispatch.cpp +++ b/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/libstratosphere/source/sf/hipc/sf_hipc_mitm_query_api.cpp b/libstratosphere/source/sf/hipc/sf_hipc_mitm_query_api.cpp index 494f7039..2f7dd5e7 100644 --- a/libstratosphere/source/sf/hipc/sf_hipc_mitm_query_api.cpp +++ b/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/libstratosphere/source/sf/hipc/sf_hipc_server_domain_session_manager.cpp b/libstratosphere/source/sf/hipc/sf_hipc_server_domain_session_manager.cpp index 52441446..38336828 100644 --- a/libstratosphere/source/sf/hipc/sf_hipc_server_domain_session_manager.cpp +++ b/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/libstratosphere/source/sf/hipc/sf_i_hipc_manager.hpp b/libstratosphere/source/sf/hipc/sf_i_hipc_manager.hpp new file mode 100644 index 00000000..a14ca3af --- /dev/null +++ b/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/libstratosphere/source/sf/sf_interface_id_for_debug_enforcement.os.horizon.cpp b/libstratosphere/source/sf/sf_interface_id_for_debug_enforcement.os.horizon.cpp new file mode 100644 index 00000000..24e1a035 --- /dev/null +++ b/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/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_controller_for_debug.hpp b/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_controller_for_debug.hpp index 836dfd18..7d51c7df 100644 --- a/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_controller_for_debug.hpp +++ b/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/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_importer.hpp b/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_importer.hpp index fb592cae..8d0c2b32 100644 --- a/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_importer.hpp +++ b/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/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_reader.hpp b/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_reader.hpp index 9d245858..e9a48faa 100644 --- a/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_reader.hpp +++ b/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/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_update_observer.hpp b/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_update_observer.hpp index 1830e155..ab68ad3b 100644 --- a/libstratosphere/source/sprofile/srv/sprofile_srv_i_profile_update_observer.hpp +++ b/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/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_for_bg_agent.hpp b/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_for_bg_agent.hpp index a850f8ad..5edce1d7 100644 --- a/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_for_bg_agent.hpp +++ b/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/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_for_system_process.hpp b/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_for_system_process.hpp index 9171a547..d05e76c4 100644 --- a/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_for_system_process.hpp +++ b/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/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_getter.hpp b/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_getter.hpp index 83815706..ce2f0652 100644 --- a/libstratosphere/source/sprofile/srv/sprofile_srv_i_service_getter.hpp +++ b/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/libstratosphere/source/usb/usb_device.cpp b/libstratosphere/source/usb/usb_device.cpp index 61072e05..4881e05e 100644 --- a/libstratosphere/source/usb/usb_device.cpp +++ b/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/libstratosphere/source/usb/usb_remote_ds_root_service.cpp b/libstratosphere/source/usb/usb_remote_ds_root_session.cpp similarity index 91% rename from libstratosphere/source/usb/usb_remote_ds_root_service.cpp rename to libstratosphere/source/usb/usb_remote_ds_root_session.cpp index 58c33a00..fea1ada5 100644 --- a/libstratosphere/source/usb/usb_remote_ds_root_service.cpp +++ b/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/libstratosphere/source/usb/usb_remote_ds_root_service.hpp b/libstratosphere/source/usb/usb_remote_ds_root_session.hpp similarity index 84% rename from libstratosphere/source/usb/usb_remote_ds_root_service.hpp rename to libstratosphere/source/usb/usb_remote_ds_root_session.hpp index 5cd0aee2..9a17459e 100644 --- a/libstratosphere/source/usb/usb_remote_ds_root_service.hpp +++ b/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/libvapours/include/vapours/crypto/impl/crypto_sha256_impl_constexpr.hpp b/libvapours/include/vapours/crypto/impl/crypto_sha256_impl_constexpr.hpp index 54ee0f9f..99bb41a8 100644 --- a/libvapours/include/vapours/crypto/impl/crypto_sha256_impl_constexpr.hpp +++ b/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); } };