Compare commits

..

No commits in common. "919e3d3938a184d7d91e0549e1086e81b9bdbd3e" and "99edb1c0f0feceb9890d113ce3f3760740b6ea4f" have entirely different histories.

5 changed files with 8 additions and 62 deletions

View File

@ -161,11 +161,6 @@ typedef struct {
u32 iova; u32 iova;
} nvioctl_command_buffer_map; } nvioctl_command_buffer_map;
typedef struct {
u32 rate;
u32 moduleid;
} nvioctl_clk_rate;
#define NVGPU_ZBC_TYPE_INVALID 0 #define NVGPU_ZBC_TYPE_INVALID 0
#define NVGPU_ZBC_TYPE_COLOR 1 #define NVGPU_ZBC_TYPE_COLOR 1
#define NVGPU_ZBC_TYPE_DEPTH 2 #define NVGPU_ZBC_TYPE_DEPTH 2
@ -289,7 +284,5 @@ Result nvioctlChannel_Submit(u32 fd, const nvioctl_cmdbuf *cmdbufs, u32 num_cmdb
const nvioctl_syncpt_incr *syncpt_incrs, u32 num_syncpt_incrs, nvioctl_fence *fences, u32 num_fences); const nvioctl_syncpt_incr *syncpt_incrs, u32 num_syncpt_incrs, nvioctl_fence *fences, u32 num_fences);
Result nvioctlChannel_GetSyncpt(u32 fd, u32 module_id, u32 *syncpt); Result nvioctlChannel_GetSyncpt(u32 fd, u32 module_id, u32 *syncpt);
Result nvioctlChannel_GetModuleClockRate(u32 fd, u32 module_id, u32 *freq); Result nvioctlChannel_GetModuleClockRate(u32 fd, u32 module_id, u32 *freq);
Result nvioctlChannel_SetModuleClockRate(u32 fd, u32 module_id, u32 freq);
Result nvioctlChannel_MapCommandBuffer(u32 fd, nvioctl_command_buffer_map *maps, u32 num_maps, bool compressed); Result nvioctlChannel_MapCommandBuffer(u32 fd, nvioctl_command_buffer_map *maps, u32 num_maps, bool compressed);
Result nvioctlChannel_UnmapCommandBuffer(u32 fd, const nvioctl_command_buffer_map *maps, u32 num_maps, bool compressed); Result nvioctlChannel_UnmapCommandBuffer(u32 fd, const nvioctl_command_buffer_map *maps, u32 num_maps, bool compressed);
Result nvioctlChannel_SetSubmitTimeout(u32 fd, u32 timeout);

View File

@ -650,9 +650,7 @@ Result fsDeviceOperatorIsGameCardInserted(FsDeviceOperator* d, bool* out);
Result fsDeviceOperatorGetGameCardHandle(FsDeviceOperator* d, FsGameCardHandle* out); Result fsDeviceOperatorGetGameCardHandle(FsDeviceOperator* d, FsGameCardHandle* out);
Result fsDeviceOperatorGetGameCardUpdatePartitionInfo(FsDeviceOperator* d, const FsGameCardHandle* handle, FsGameCardUpdatePartitionInfo* out); Result fsDeviceOperatorGetGameCardUpdatePartitionInfo(FsDeviceOperator* d, const FsGameCardHandle* handle, FsGameCardUpdatePartitionInfo* out);
Result fsDeviceOperatorGetGameCardAttribute(FsDeviceOperator* d, const FsGameCardHandle* handle, u8 *out); Result fsDeviceOperatorGetGameCardAttribute(FsDeviceOperator* d, const FsGameCardHandle* handle, u8 *out);
Result fsDeviceOperatorGetGameCardDeviceCertificate(FsDeviceOperator* d, const FsGameCardHandle* handle, void* dst, size_t dst_size, s64 size);
Result fsDeviceOperatorGetGameCardIdSet(FsDeviceOperator* d, void* dst, size_t dst_size, s64 size); Result fsDeviceOperatorGetGameCardIdSet(FsDeviceOperator* d, void* dst, size_t dst_size, s64 size);
Result fsDeviceOperatorGetGameCardErrorReportInfo(FsDeviceOperator* d, FsGameCardErrorReportInfo* out); Result fsDeviceOperatorGetGameCardErrorReportInfo(FsDeviceOperator* d, FsGameCardErrorReportInfo* out);
Result fsDeviceOperatorGetGameCardDeviceId(FsDeviceOperator* d, void* dst, size_t dst_size, s64 size); Result fsDeviceOperatorGetGameCardDeviceId(FsDeviceOperator* d, void* dst, size_t dst_size, s64 size);
Result fsDeviceOperatorChallengeCardExistence(FsDeviceOperator* d, const FsGameCardHandle* handle, void* dst, size_t dst_size, void* seed, size_t seed_size, void* value, size_t value_size);
void fsDeviceOperatorClose(FsDeviceOperator* d); void fsDeviceOperatorClose(FsDeviceOperator* d);

View File

@ -31,7 +31,7 @@ typedef enum {
SetSysProductModel_Iowa = 3, ///< Mariko Model SetSysProductModel_Iowa = 3, ///< Mariko Model
SetSysProductModel_Hoag = 4, ///< Mariko Lite Model SetSysProductModel_Hoag = 4, ///< Mariko Lite Model
SetSysProductModel_Calcio = 5, ///< Mariko "Simulation" Model SetSysProductModel_Calcio = 5, ///< Mariko "Simulation" Model
SetSysProductModel_Aula = 6, ///< Mariko OLED Model SetSysProductModel_Aula = 6, ///< Mariko Pro Model(?)
} SetSysProductModel; } SetSysProductModel;
/// IDs for Language. /// IDs for Language.

View File

@ -254,12 +254,15 @@ Result nvioctlChannel_GetSyncpt(u32 fd, u32 id, u32 *syncpt) {
} }
Result nvioctlChannel_GetModuleClockRate(u32 fd, u32 module_id, u32 *freq) { Result nvioctlChannel_GetModuleClockRate(u32 fd, u32 module_id, u32 *freq) {
nvioctl_clk_rate data = { struct {
.moduleid = module_id, __nv_out u32 rate;
__nv_in u32 module;
} data = {
.module = module_id,
}; };
u32 nr = _NV_IOWR(0, hosversionBefore(8,0,0) ? 0x14 : 0x23, data); u32 ioctl = _NV_IOWR(0, hosversionAtLeast(8,0,0) ? 0x14 : 0x23, data);
Result rc = nvIoctl(fd, nr, &data); Result rc = nvIoctl(fd, ioctl, &data);
if (R_SUCCEEDED(rc) && freq) if (R_SUCCEEDED(rc) && freq)
*freq = data.rate; *freq = data.rate;
@ -267,25 +270,6 @@ Result nvioctlChannel_GetModuleClockRate(u32 fd, u32 module_id, u32 *freq) {
return rc; return rc;
} }
Result nvioctlChannel_SetModuleClockRate(u32 fd, u32 module_id, u32 freq) {
nvioctl_clk_rate data = {
.rate = freq,
.moduleid = module_id,
};
return nvIoctl(fd, _NV_IOW(0, 0x08, data), &data);
}
Result nvioctlChannel_SetSubmitTimeout(u32 fd, u32 timeout) {
struct {
__nv_in u32 timeout;
} data = {
.timeout = timeout,
};
return nvIoctl(fd, _NV_IOW(0, 0x07, data), &data);
}
Result nvioctlChannel_MapCommandBuffer(u32 fd, nvioctl_command_buffer_map *maps, u32 num_maps, bool compressed) { Result nvioctlChannel_MapCommandBuffer(u32 fd, nvioctl_command_buffer_map *maps, u32 num_maps, bool compressed) {
if (num_maps > 0x200) if (num_maps > 0x200)
return MAKERESULT(Module_Libnx, LibnxError_OutOfMemory); return MAKERESULT(Module_Libnx, LibnxError_OutOfMemory);

View File

@ -1226,17 +1226,6 @@ Result fsDeviceOperatorGetGameCardAttribute(FsDeviceOperator* d, const FsGameCar
return _fsObjectDispatchInOut(&d->s, 205, *handle, *out); return _fsObjectDispatchInOut(&d->s, 205, *handle, *out);
} }
Result fsDeviceOperatorGetGameCardDeviceCertificate(FsDeviceOperator* d, const FsGameCardHandle* handle, void* dst, size_t dst_size, s64 size) {
const struct {
FsGameCardHandle handle;
s64 buffer_size;
} in = { *handle, size };
return _fsObjectDispatchIn(&d->s, 206, in,
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
.buffers = { { dst, dst_size } });
}
Result fsDeviceOperatorGetGameCardIdSet(FsDeviceOperator* d, void* dst, size_t dst_size, s64 size) { Result fsDeviceOperatorGetGameCardIdSet(FsDeviceOperator* d, void* dst, size_t dst_size, s64 size) {
return _fsCmdInSizeOutBuffer(&d->s, dst, dst_size, size, 208); return _fsCmdInSizeOutBuffer(&d->s, dst, dst_size, size, 208);
} }
@ -1253,24 +1242,6 @@ Result fsDeviceOperatorGetGameCardDeviceId(FsDeviceOperator* d, void* dst, size_
return _fsCmdInSizeOutBuffer(&d->s, dst, dst_size, size, 218); return _fsCmdInSizeOutBuffer(&d->s, dst, dst_size, size, 218);
} }
Result fsDeviceOperatorChallengeCardExistence(FsDeviceOperator* d, const FsGameCardHandle* handle, void* dst, size_t dst_size, void* seed, size_t seed_size, void* value, size_t value_size) {
if (hosversionBefore(8,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _fsObjectDispatchIn(&d->s, 219, *handle,
.buffer_attrs = {
SfBufferAttr_HipcMapAlias | SfBufferAttr_Out,
SfBufferAttr_HipcMapAlias | SfBufferAttr_In,
SfBufferAttr_HipcMapAlias | SfBufferAttr_In,
},
.buffers = {
{ dst, dst_size },
{ seed, seed_size },
{ value, value_size },
},
);
}
void fsDeviceOperatorClose(FsDeviceOperator* d) { void fsDeviceOperatorClose(FsDeviceOperator* d) {
_fsObjectClose(&d->s); _fsObjectClose(&d->s);
} }