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

@ -18,7 +18,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
_addOnContentListChangedEvent = new KEvent(context.Device.System.KernelContext);
}
[Command(2)]
[CommandHipc(2)]
// CountAddOnContent(pid) -> u32
public ResultCode CountAddOnContent(ServiceCtx context)
{
@ -47,7 +47,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
return (uint)context.Device.System.ContentManager.GetAocCount();
}
[Command(3)]
[CommandHipc(3)]
// ListAddOnContent(u32, u32, pid) -> (u32, buffer<u32>)
public ResultCode ListAddOnContent(ServiceCtx context)
{
@ -84,7 +84,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
return ResultCode.Success;
}
[Command(5)]
[CommandHipc(5)]
// GetAddOnContentBaseId(pid) -> u64
public ResultCode GetAddonContentBaseId(ServiceCtx context)
{
@ -114,7 +114,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
return aocBaseId;
}
[Command(7)]
[CommandHipc(7)]
// PrepareAddOnContent(u32, pid)
public ResultCode PrepareAddOnContent(ServiceCtx context)
{
@ -131,7 +131,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
return ResultCode.Success;
}
[Command(8)]
[CommandHipc(8)]
// GetAddOnContentListChangedEvent() -> handle<copy>
public ResultCode GetAddOnContentListChangedEvent(ServiceCtx context)
{
@ -153,7 +153,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
}
[Command(9)] // [10.0.0+]
[CommandHipc(9)] // [10.0.0+]
// GetAddOnContentLostErrorCode() -> u64
public ResultCode GetAddOnContentLostErrorCode(ServiceCtx context)
{
@ -166,7 +166,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
return ResultCode.Success;
}
[Command(100)]
[CommandHipc(100)]
// CreateEcPurchasedEventManager() -> object<nn::ec::IPurchaseEventManager>
public ResultCode CreateEcPurchasedEventManager(ServiceCtx context)
{
@ -177,7 +177,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
return ResultCode.Success;
}
[Command(101)]
[CommandHipc(101)]
// CreatePermanentEcPurchasedEventManager() -> object<nn::ec::IPurchaseEventManager>
public ResultCode CreatePermanentEcPurchasedEventManager(ServiceCtx context)
{

View file

@ -5,7 +5,7 @@
{
public IApplicationManagerInterface(ServiceCtx context) { }
[Command(400)]
[CommandHipc(400)]
// GetApplicationControlData(u8, u64) -> (unknown<4>, buffer<unknown, 6>)
public ResultCode GetApplicationControlData(ServiceCtx context)
{

View file

@ -16,7 +16,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
_purchasedEvent = new KEvent(system.KernelContext);
}
[Command(0)]
[CommandHipc(0)]
// SetDefaultDeliveryTarget(pid, buffer<bytes, 5> unknown)
public ResultCode SetDefaultDeliveryTarget(ServiceCtx context)
{
@ -35,7 +35,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
return ResultCode.Success;
}
[Command(2)]
[CommandHipc(2)]
// GetPurchasedEventReadableHandle() -> handle<copy, event>
public ResultCode GetPurchasedEventReadableHandle(ServiceCtx context)
{

View file

@ -4,7 +4,7 @@
{
public IReadOnlyApplicationControlDataInterface(ServiceCtx context) { }
[Command(0)]
[CommandHipc(0)]
// GetApplicationControlData(u8, u64) -> (unknown<4>, buffer<unknown, 6>)
public ResultCode GetApplicationControlData(ServiceCtx context)
{

View file

@ -9,7 +9,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
{
public IServiceGetterInterface(ServiceCtx context) { }
[Command(7996)]
[CommandHipc(7996)]
// GetApplicationManagerInterface() -> object<nn::ns::detail::IApplicationManagerInterface>
public ResultCode GetApplicationManagerInterface(ServiceCtx context)
{
@ -18,7 +18,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
return ResultCode.Success;
}
[Command(7989)]
[CommandHipc(7989)]
// GetReadOnlyApplicationControlDataInterface() -> object<nn::ns::detail::IReadOnlyApplicationControlDataInterface>
public ResultCode GetReadOnlyApplicationControlDataInterface(ServiceCtx context)
{