kern: add InfoType_TransferMemoryHint

This commit is contained in:
Michael Scire
2024-10-09 11:04:43 -07:00
parent 34e27ee97d
commit 483d06ac0e
3 changed files with 31 additions and 0 deletions

View File

@@ -314,6 +314,19 @@ namespace ams::kern::svc {
*out = io_region->GetHint();
}
break;
case ams::svc::InfoType_TransferMemoryHint:
{
/* Verify the sub-type is valid. */
R_UNLESS(info_subtype == 0, svc::ResultInvalidCombination());
/* Get the transfer memory from its handle. */
KScopedAutoObject transfer_memory = GetCurrentProcess().GetHandleTable().GetObject<KTransferMemory>(handle);
R_UNLESS(transfer_memory.IsNotNull(), svc::ResultInvalidHandle());
/* Get the transfer memory's address hint. */
*out = transfer_memory->GetHint();
}
break;
case ams::svc::InfoType_MesosphereMeta:
{
/* Verify the handle is invalid. */