Stub nvdrv {Get,Dump}Status

This commit is contained in:
Billy Laws 2022-05-12 17:38:06 +01:00
parent 97e740c986
commit bca88685bd
2 changed files with 30 additions and 0 deletions

View File

@ -133,10 +133,27 @@ namespace skyline::service::nvdrv {
return NVRESULT(driver.Ioctl3(fd, ioctl, *buf, inlineBuf));
}
Result INvDrvServices::GetStatus(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
struct Status {
u32 freeSize;
u32 allocatableSize;
u32 minimumFreeSize;
u32 minimumAllocatableSize;
u32 reserved;
};
// Return empty values since we don't use the transfer memory for allocations
response.Push<Status>({});
return NVRESULT(NvResult::Success);
}
Result INvDrvServices::SetAruid(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
return NVRESULT(NvResult::Success);
}
Result INvDrvServices::DumpStatus(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
return {};
}
Result INvDrvServices::SetGraphicsFirmwareMemoryMarginEnabled(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
return {};

View File

@ -53,12 +53,23 @@ namespace skyline::service::nvdrv {
*/
Result QueryEvent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/**
* @brief Returns info about the usage of the transfer memory by the internal allocator
* @url https://switchbrew.org/wiki/NV_services#GetStatus
*/
Result GetStatus(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/**
* @brief Sets the AppletResourceUserId which matches the PID
* @url https://switchbrew.org/wiki/NV_services#SetAruid
*/
Result SetAruid(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/**
* @url https://switchbrew.org/wiki/NV_services#DumpStatus
*/
Result DumpStatus(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/**
* @brief Perform an IOCTL on the specified FD with an extra input buffer
* @url https://switchbrew.org/wiki/NV_services#Ioctl2
@ -83,7 +94,9 @@ namespace skyline::service::nvdrv {
SFUNC(0x2, INvDrvServices, Close),
SFUNC(0x3, INvDrvServices, Initialize),
SFUNC(0x4, INvDrvServices, QueryEvent),
SFUNC(0x6, INvDrvServices, GetStatus),
SFUNC(0x8, INvDrvServices, SetAruid),
SFUNC(0x9, INvDrvServices, DumpStatus),
SFUNC(0xB, INvDrvServices, Ioctl2),
SFUNC(0xC, INvDrvServices, Ioctl3),
SFUNC(0xD, INvDrvServices, SetGraphicsFirmwareMemoryMarginEnabled)