Initial support for the new 12.x IPC system (#2182)

* Rename CommandAttribute as CommandHIpcAttribute to prepare for 12.x changes

* Implement inital support for TIPC and adds SM command ids

* *Ipc to *ipc

* Missed a ref in last commit...

* CommandAttributeTIpc to CommandAttributeTipc

* Addresses comment and fixes some bugs around

TIPC doesn't have any padding requirements as buffer C isn't a thing
Fix for RegisterService inverting two argument only on TIPC
This commit is contained in:
Mary 2021-04-14 00:01:24 +02:00 committed by GitHub
parent faa654dbaf
commit 0746b83edf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
132 changed files with 1077 additions and 951 deletions

View file

@ -43,7 +43,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
_healthWarningDisappearedSystemEvent = new KEvent(system.KernelContext);
}
[Command(1)]
[CommandHipc(1)]
// PopLaunchParameter(LaunchParameterKind kind) -> object<nn::am::service::IStorage>
public ResultCode PopLaunchParameter(ServiceCtx context)
{
@ -76,7 +76,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(20)]
[CommandHipc(20)]
// EnsureSaveData(nn::account::Uid) -> u64
public ResultCode EnsureSaveData(ServiceCtx context)
{
@ -108,7 +108,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return (ResultCode)result.Value;
}
[Command(21)]
[CommandHipc(21)]
// GetDesiredLanguage() -> nn::settings::LanguageCode
public ResultCode GetDesiredLanguage(ServiceCtx context)
{
@ -145,7 +145,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(22)]
[CommandHipc(22)]
// SetTerminateResult(u32)
public ResultCode SetTerminateResult(ServiceCtx context)
{
@ -156,7 +156,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(23)]
[CommandHipc(23)]
// GetDisplayVersion() -> nn::oe::DisplayVersion
public ResultCode GetDisplayVersion(ServiceCtx context)
{
@ -167,7 +167,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(26)] // 3.0.0+
[CommandHipc(26)] // 3.0.0+
// GetSaveDataSize(u8 save_data_type, nn::account::Uid) -> (u64 save_size, u64 journal_size)
public ResultCode GetSaveDataSize(ServiceCtx context)
{
@ -186,7 +186,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(30)]
[CommandHipc(30)]
// BeginBlockingHomeButtonShortAndLongPressed()
public ResultCode BeginBlockingHomeButtonShortAndLongPressed(ServiceCtx context)
{
@ -197,7 +197,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(31)]
[CommandHipc(31)]
// EndBlockingHomeButtonShortAndLongPressed()
public ResultCode EndBlockingHomeButtonShortAndLongPressed(ServiceCtx context)
{
@ -208,7 +208,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(32)] // 2.0.0+
[CommandHipc(32)] // 2.0.0+
// BeginBlockingHomeButton(u64 nano_second)
public ResultCode BeginBlockingHomeButton(ServiceCtx context)
{
@ -221,7 +221,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(33)] // 2.0.0+
[CommandHipc(33)] // 2.0.0+
// EndBlockingHomeButton()
public ResultCode EndBlockingHomeButton(ServiceCtx context)
{
@ -232,7 +232,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(40)]
[CommandHipc(40)]
// NotifyRunning() -> b8
public ResultCode NotifyRunning(ServiceCtx context)
{
@ -241,7 +241,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(50)] // 2.0.0+
[CommandHipc(50)] // 2.0.0+
// GetPseudoDeviceId() -> nn::util::Uuid
public ResultCode GetPseudoDeviceId(ServiceCtx context)
{
@ -253,7 +253,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(66)] // 3.0.0+
[CommandHipc(66)] // 3.0.0+
// InitializeGamePlayRecording(u64, handle<copy>)
public ResultCode InitializeGamePlayRecording(ServiceCtx context)
{
@ -262,7 +262,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(67)] // 3.0.0+
[CommandHipc(67)] // 3.0.0+
// SetGamePlayRecordingState(u32)
public ResultCode SetGamePlayRecordingState(ServiceCtx context)
{
@ -273,7 +273,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(90)] // 4.0.0+
[CommandHipc(90)] // 4.0.0+
// EnableApplicationCrashReport(u8)
public ResultCode EnableApplicationCrashReport(ServiceCtx context)
{
@ -284,7 +284,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(100)] // 5.0.0+
[CommandHipc(100)] // 5.0.0+
// InitializeApplicationCopyrightFrameBuffer(s32 width, s32 height, handle<copy, transfer_memory> transfer_memory, u64 transfer_memory_size)
public ResultCode InitializeApplicationCopyrightFrameBuffer(ServiceCtx context)
{
@ -330,7 +330,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return resultCode;
}
[Command(101)] // 5.0.0+
[CommandHipc(101)] // 5.0.0+
// SetApplicationCopyrightImage(buffer<bytes, 0x45> frame_buffer, s32 x, s32 y, s32 width, s32 height, s32 window_origin_mode)
public ResultCode SetApplicationCopyrightImage(ServiceCtx context)
{
@ -377,7 +377,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(102)] // 5.0.0+
[CommandHipc(102)] // 5.0.0+
// SetApplicationCopyrightVisibility(bool visible)
public ResultCode SetApplicationCopyrightVisibility(ServiceCtx context)
{
@ -390,7 +390,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(110)] // 5.0.0+
[CommandHipc(110)] // 5.0.0+
// QueryApplicationPlayStatistics(buffer<bytes, 5> title_id_list) -> (buffer<bytes, 6> entries, s32 entries_count)
public ResultCode QueryApplicationPlayStatistics(ServiceCtx context)
{
@ -398,7 +398,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return (ResultCode)QueryPlayStatisticsManager.GetPlayStatistics(context);
}
[Command(111)] // 6.0.0+
[CommandHipc(111)] // 6.0.0+
// QueryApplicationPlayStatisticsByUid(nn::account::Uid, buffer<bytes, 5> title_id_list) -> (buffer<bytes, 6> entries, s32 entries_count)
public ResultCode QueryApplicationPlayStatisticsByUid(ServiceCtx context)
{
@ -406,7 +406,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return (ResultCode)QueryPlayStatisticsManager.GetPlayStatistics(context, true);
}
[Command(120)] // 5.0.0+
[CommandHipc(120)] // 5.0.0+
// ExecuteProgram(ProgramSpecifyKind kind, u64 value)
public ResultCode ExecuteProgram(ServiceCtx context)
{
@ -424,7 +424,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(121)] // 5.0.0+
[CommandHipc(121)] // 5.0.0+
// ClearUserChannel()
public ResultCode ClearUserChannel(ServiceCtx context)
{
@ -433,7 +433,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(122)] // 5.0.0+
[CommandHipc(122)] // 5.0.0+
// UnpopToUserChannel(object<nn::am::service::IStorage> input_storage)
public ResultCode UnpopToUserChannel(ServiceCtx context)
{
@ -444,7 +444,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(123)] // 5.0.0+
[CommandHipc(123)] // 5.0.0+
// GetPreviousProgramIndex() -> s32 program_index
public ResultCode GetPreviousProgramIndex(ServiceCtx context)
{
@ -457,7 +457,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(130)] // 8.0.0+
[CommandHipc(130)] // 8.0.0+
// GetGpuErrorDetectedSystemEvent() -> handle<copy>
public ResultCode GetGpuErrorDetectedSystemEvent(ServiceCtx context)
{
@ -478,7 +478,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(140)] // 9.0.0+
[CommandHipc(140)] // 9.0.0+
// GetFriendInvitationStorageChannelEvent() -> handle<copy>
public ResultCode GetFriendInvitationStorageChannelEvent(ServiceCtx context)
{
@ -495,7 +495,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(141)] // 9.0.0+
[CommandHipc(141)] // 9.0.0+
// TryPopFromFriendInvitationStorageChannel() -> object<nn::am::service::IStorage>
public ResultCode TryPopFromFriendInvitationStorageChannel(ServiceCtx context)
{
@ -509,7 +509,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.NotAvailable;
}
[Command(150)] // 9.0.0+
[CommandHipc(150)] // 9.0.0+
// GetNotificationStorageChannelEvent() -> handle<copy>
public ResultCode GetNotificationStorageChannelEvent(ServiceCtx context)
{
@ -526,7 +526,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
[Command(160)] // 9.0.0+
[CommandHipc(160)] // 9.0.0+
// GetHealthWarningDisappearedSystemEvent() -> handle<copy>
public ResultCode GetHealthWarningDisappearedSystemEvent(ServiceCtx context)
{

View file

@ -12,7 +12,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService
_pid = pid;
}
[Command(0)]
[CommandHipc(0)]
// GetCommonStateGetter() -> object<nn::am::service::ICommonStateGetter>
public ResultCode GetCommonStateGetter(ServiceCtx context)
{
@ -21,7 +21,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService
return ResultCode.Success;
}
[Command(1)]
[CommandHipc(1)]
// GetSelfController() -> object<nn::am::service::ISelfController>
public ResultCode GetSelfController(ServiceCtx context)
{
@ -30,7 +30,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService
return ResultCode.Success;
}
[Command(2)]
[CommandHipc(2)]
// GetWindowController() -> object<nn::am::service::IWindowController>
public ResultCode GetWindowController(ServiceCtx context)
{
@ -39,7 +39,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService
return ResultCode.Success;
}
[Command(3)]
[CommandHipc(3)]
// GetAudioController() -> object<nn::am::service::IAudioController>
public ResultCode GetAudioController(ServiceCtx context)
{
@ -48,7 +48,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService
return ResultCode.Success;
}
[Command(4)]
[CommandHipc(4)]
// GetDisplayController() -> object<nn::am::service::IDisplayController>
public ResultCode GetDisplayController(ServiceCtx context)
{
@ -57,7 +57,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService
return ResultCode.Success;
}
[Command(11)]
[CommandHipc(11)]
// GetLibraryAppletCreator() -> object<nn::am::service::ILibraryAppletCreator>
public ResultCode GetLibraryAppletCreator(ServiceCtx context)
{
@ -66,7 +66,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService
return ResultCode.Success;
}
[Command(20)]
[CommandHipc(20)]
// GetApplicationFunctions() -> object<nn::am::service::IApplicationFunctions>
public ResultCode GetApplicationFunctions(ServiceCtx context)
{
@ -75,7 +75,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService
return ResultCode.Success;
}
[Command(1000)]
[CommandHipc(1000)]
// GetDebugFunctions() -> object<nn::am::service::IDebugFunctions>
public ResultCode GetDebugFunctions(ServiceCtx context)
{