summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/process_capability.cpp5
-rw-r--r--src/core/hle/kernel/process_capability.h2
-rw-r--r--src/core/hle/kernel/svc.cpp132
-rw-r--r--src/core/hle/service/acc/acc.cpp17
-rw-r--r--src/core/hle/service/acc/acc_su.cpp36
-rw-r--r--src/core/hle/service/acc/acc_u1.cpp28
-rw-r--r--src/core/hle/service/audio/hwopus.cpp4
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp19
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.h2
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp8
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp17
-rw-r--r--src/core/hle/service/service.cpp6
12 files changed, 221 insertions, 55 deletions
diff --git a/src/core/hle/kernel/process_capability.cpp b/src/core/hle/kernel/process_capability.cpp
index 3fc326eab..1006ee50c 100644
--- a/src/core/hle/kernel/process_capability.cpp
+++ b/src/core/hle/kernel/process_capability.cpp
@@ -281,11 +281,6 @@ ResultCode ProcessCapabilities::HandleSyscallFlags(u32& set_svc_bits, u32 flags)
continue;
}
- if (svc_number >= svc_capabilities.size()) {
- LOG_ERROR(Kernel, "Process svc capability is out of range! svc_number={}", svc_number);
- return ResultOutOfRange;
- }
-
svc_capabilities[svc_number] = true;
}
diff --git a/src/core/hle/kernel/process_capability.h b/src/core/hle/kernel/process_capability.h
index 73ad197fa..b7a9b2e45 100644
--- a/src/core/hle/kernel/process_capability.h
+++ b/src/core/hle/kernel/process_capability.h
@@ -68,7 +68,7 @@ enum class ProgramType {
class ProcessCapabilities {
public:
using InterruptCapabilities = std::bitset<1024>;
- using SyscallCapabilities = std::bitset<128>;
+ using SyscallCapabilities = std::bitset<192>;
ProcessCapabilities() = default;
ProcessCapabilities(const ProcessCapabilities&) = delete;
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 326d3b9ec..fcffc746d 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -2455,6 +2455,74 @@ static const FunctionDef SVC_Table_32[] = {
{0x79, nullptr, "Unknown"},
{0x7A, nullptr, "Unknown"},
{0x7B, nullptr, "TerminateProcess32"},
+ {0x7C, nullptr, "GetProcessInfo32"},
+ {0x7D, nullptr, "CreateResourceLimit32"},
+ {0x7E, nullptr, "SetResourceLimitLimitValue32"},
+ {0x7F, nullptr, "CallSecureMonitor32"},
+ {0x80, nullptr, "Unknown"},
+ {0x81, nullptr, "Unknown"},
+ {0x82, nullptr, "Unknown"},
+ {0x83, nullptr, "Unknown"},
+ {0x84, nullptr, "Unknown"},
+ {0x85, nullptr, "Unknown"},
+ {0x86, nullptr, "Unknown"},
+ {0x87, nullptr, "Unknown"},
+ {0x88, nullptr, "Unknown"},
+ {0x89, nullptr, "Unknown"},
+ {0x8A, nullptr, "Unknown"},
+ {0x8B, nullptr, "Unknown"},
+ {0x8C, nullptr, "Unknown"},
+ {0x8D, nullptr, "Unknown"},
+ {0x8E, nullptr, "Unknown"},
+ {0x8F, nullptr, "Unknown"},
+ {0x90, nullptr, "Unknown"},
+ {0x91, nullptr, "Unknown"},
+ {0x92, nullptr, "Unknown"},
+ {0x93, nullptr, "Unknown"},
+ {0x94, nullptr, "Unknown"},
+ {0x95, nullptr, "Unknown"},
+ {0x96, nullptr, "Unknown"},
+ {0x97, nullptr, "Unknown"},
+ {0x98, nullptr, "Unknown"},
+ {0x99, nullptr, "Unknown"},
+ {0x9A, nullptr, "Unknown"},
+ {0x9B, nullptr, "Unknown"},
+ {0x9C, nullptr, "Unknown"},
+ {0x9D, nullptr, "Unknown"},
+ {0x9E, nullptr, "Unknown"},
+ {0x9F, nullptr, "Unknown"},
+ {0xA0, nullptr, "Unknown"},
+ {0xA1, nullptr, "Unknown"},
+ {0xA2, nullptr, "Unknown"},
+ {0xA3, nullptr, "Unknown"},
+ {0xA4, nullptr, "Unknown"},
+ {0xA5, nullptr, "Unknown"},
+ {0xA6, nullptr, "Unknown"},
+ {0xA7, nullptr, "Unknown"},
+ {0xA8, nullptr, "Unknown"},
+ {0xA9, nullptr, "Unknown"},
+ {0xAA, nullptr, "Unknown"},
+ {0xAB, nullptr, "Unknown"},
+ {0xAC, nullptr, "Unknown"},
+ {0xAD, nullptr, "Unknown"},
+ {0xAE, nullptr, "Unknown"},
+ {0xAF, nullptr, "Unknown"},
+ {0xB0, nullptr, "Unknown"},
+ {0xB1, nullptr, "Unknown"},
+ {0xB2, nullptr, "Unknown"},
+ {0xB3, nullptr, "Unknown"},
+ {0xB4, nullptr, "Unknown"},
+ {0xB5, nullptr, "Unknown"},
+ {0xB6, nullptr, "Unknown"},
+ {0xB7, nullptr, "Unknown"},
+ {0xB8, nullptr, "Unknown"},
+ {0xB9, nullptr, "Unknown"},
+ {0xBA, nullptr, "Unknown"},
+ {0xBB, nullptr, "Unknown"},
+ {0xBC, nullptr, "Unknown"},
+ {0xBD, nullptr, "Unknown"},
+ {0xBE, nullptr, "Unknown"},
+ {0xBF, nullptr, "Unknown"},
};
static const FunctionDef SVC_Table_64[] = {
@@ -2586,6 +2654,70 @@ static const FunctionDef SVC_Table_64[] = {
{0x7D, SvcWrap64<CreateResourceLimit>, "CreateResourceLimit"},
{0x7E, SvcWrap64<SetResourceLimitLimitValue>, "SetResourceLimitLimitValue"},
{0x7F, nullptr, "CallSecureMonitor"},
+ {0x80, nullptr, "Unknown"},
+ {0x81, nullptr, "Unknown"},
+ {0x82, nullptr, "Unknown"},
+ {0x83, nullptr, "Unknown"},
+ {0x84, nullptr, "Unknown"},
+ {0x85, nullptr, "Unknown"},
+ {0x86, nullptr, "Unknown"},
+ {0x87, nullptr, "Unknown"},
+ {0x88, nullptr, "Unknown"},
+ {0x89, nullptr, "Unknown"},
+ {0x8A, nullptr, "Unknown"},
+ {0x8B, nullptr, "Unknown"},
+ {0x8C, nullptr, "Unknown"},
+ {0x8D, nullptr, "Unknown"},
+ {0x8E, nullptr, "Unknown"},
+ {0x8F, nullptr, "Unknown"},
+ {0x90, nullptr, "Unknown"},
+ {0x91, nullptr, "Unknown"},
+ {0x92, nullptr, "Unknown"},
+ {0x93, nullptr, "Unknown"},
+ {0x94, nullptr, "Unknown"},
+ {0x95, nullptr, "Unknown"},
+ {0x96, nullptr, "Unknown"},
+ {0x97, nullptr, "Unknown"},
+ {0x98, nullptr, "Unknown"},
+ {0x99, nullptr, "Unknown"},
+ {0x9A, nullptr, "Unknown"},
+ {0x9B, nullptr, "Unknown"},
+ {0x9C, nullptr, "Unknown"},
+ {0x9D, nullptr, "Unknown"},
+ {0x9E, nullptr, "Unknown"},
+ {0x9F, nullptr, "Unknown"},
+ {0xA0, nullptr, "Unknown"},
+ {0xA1, nullptr, "Unknown"},
+ {0xA2, nullptr, "Unknown"},
+ {0xA3, nullptr, "Unknown"},
+ {0xA4, nullptr, "Unknown"},
+ {0xA5, nullptr, "Unknown"},
+ {0xA6, nullptr, "Unknown"},
+ {0xA7, nullptr, "Unknown"},
+ {0xA8, nullptr, "Unknown"},
+ {0xA9, nullptr, "Unknown"},
+ {0xAA, nullptr, "Unknown"},
+ {0xAB, nullptr, "Unknown"},
+ {0xAC, nullptr, "Unknown"},
+ {0xAD, nullptr, "Unknown"},
+ {0xAE, nullptr, "Unknown"},
+ {0xAF, nullptr, "Unknown"},
+ {0xB0, nullptr, "Unknown"},
+ {0xB1, nullptr, "Unknown"},
+ {0xB2, nullptr, "Unknown"},
+ {0xB3, nullptr, "Unknown"},
+ {0xB4, nullptr, "Unknown"},
+ {0xB5, nullptr, "Unknown"},
+ {0xB6, nullptr, "Unknown"},
+ {0xB7, nullptr, "Unknown"},
+ {0xB8, nullptr, "Unknown"},
+ {0xB9, nullptr, "Unknown"},
+ {0xBA, nullptr, "Unknown"},
+ {0xBB, nullptr, "Unknown"},
+ {0xBC, nullptr, "Unknown"},
+ {0xBD, nullptr, "Unknown"},
+ {0xBE, nullptr, "Unknown"},
+ {0xBF, nullptr, "Unknown"},
};
static const FunctionDef* GetSVCInfo32(u32 func_num) {
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index 615e20a54..52535ecc0 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -610,12 +610,17 @@ public:
explicit DAUTH_O(Core::System& system_, Common::UUID) : ServiceFramework{system_, "dauth:o"} {
// clang-format off
static const FunctionInfo functions[] = {
- {0, nullptr, "EnsureAuthenticationTokenCacheAsync"}, // [5.0.0-5.1.0] GeneratePostData
- {1, nullptr, "LoadAuthenticationTokenCache"}, // 6.0.0+
- {2, nullptr, "InvalidateAuthenticationTokenCache"}, // 6.0.0+
- {10, nullptr, "EnsureEdgeTokenCacheAsync"}, // 6.0.0+
- {11, nullptr, "LoadEdgeTokenCache"}, // 6.0.0+
- {12, nullptr, "InvalidateEdgeTokenCache"}, // 6.0.0+
+ {0, nullptr, "EnsureAuthenticationTokenCacheAsync"},
+ {1, nullptr, "LoadAuthenticationTokenCache"},
+ {2, nullptr, "InvalidateAuthenticationTokenCache"},
+ {10, nullptr, "EnsureEdgeTokenCacheAsync"},
+ {11, nullptr, "LoadEdgeTokenCache"},
+ {12, nullptr, "InvalidateEdgeTokenCache"},
+ {20, nullptr, "EnsureApplicationAuthenticationCacheAsync"},
+ {21, nullptr, "LoadApplicationAuthenticationTokenCache"},
+ {22, nullptr, "LoadApplicationNetworkServiceClientConfigCache"},
+ {23, nullptr, "IsApplicationAuthenticationCacheAvailable"},
+ {24, nullptr, "InvalidateApplicationAuthenticationCache"},
};
// clang-format on
diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cpp
index 49b22583e..bb6118abf 100644
--- a/src/core/hle/service/acc/acc_su.cpp
+++ b/src/core/hle/service/acc/acc_su.cpp
@@ -17,28 +17,30 @@ ACC_SU::ACC_SU(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p
{3, &ACC_SU::ListOpenUsers, "ListOpenUsers"},
{4, &ACC_SU::GetLastOpenedUser, "GetLastOpenedUser"},
{5, &ACC_SU::GetProfile, "GetProfile"},
- {6, nullptr, "GetProfileDigest"}, // 3.0.0+
+ {6, nullptr, "GetProfileDigest"},
{50, &ACC_SU::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},
{51, &ACC_SU::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"},
- {60, &ACC_SU::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"}, // 5.0.0 - 5.1.0
- {99, nullptr, "DebugActivateOpenContextRetention"}, // 6.0.0+
+ {60, &ACC_SU::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"},
+ {99, nullptr, "DebugActivateOpenContextRetention"},
{100, nullptr, "GetUserRegistrationNotifier"},
{101, nullptr, "GetUserStateChangeNotifier"},
{102, nullptr, "GetBaasAccountManagerForSystemService"},
{103, nullptr, "GetBaasUserAvailabilityChangeNotifier"},
{104, nullptr, "GetProfileUpdateNotifier"},
- {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, // 4.0.0+
- {106, nullptr, "GetProfileSyncNotifier"}, // 9.0.0+
+ {105, nullptr, "CheckNetworkServiceAvailabilityAsync"},
+ {106, nullptr, "GetProfileSyncNotifier"},
{110, &ACC_SU::StoreSaveDataThumbnailSystem, "StoreSaveDataThumbnail"},
{111, nullptr, "ClearSaveDataThumbnail"},
{112, nullptr, "LoadSaveDataThumbnail"},
- {113, nullptr, "GetSaveDataThumbnailExistence"}, // 5.0.0+
- {120, nullptr, "ListOpenUsersInApplication"}, // 10.0.0+
- {130, nullptr, "ActivateOpenContextRetention"}, // 6.0.0+
- {140, &ACC_SU::ListQualifiedUsers, "ListQualifiedUsers"}, // 6.0.0+
- {150, nullptr, "AuthenticateApplicationAsync"}, // 10.0.0+
- {190, nullptr, "GetUserLastOpenedApplication"}, // 1.0.0 - 9.2.0
- {191, nullptr, "ActivateOpenContextHolder"}, // 7.0.0+
+ {113, nullptr, "GetSaveDataThumbnailExistence"},
+ {120, nullptr, "ListOpenUsersInApplication"},
+ {130, nullptr, "ActivateOpenContextRetention"},
+ {140, &ACC_SU::ListQualifiedUsers, "ListQualifiedUsers"},
+ {150, nullptr, "AuthenticateApplicationAsync"},
+ {151, nullptr, "Unknown151"},
+ {152, nullptr, "Unknown152"},
+ {190, nullptr, "GetUserLastOpenedApplication"},
+ {191, nullptr, "ActivateOpenContextHolder"},
{200, nullptr, "BeginUserRegistration"},
{201, nullptr, "CompleteUserRegistration"},
{202, nullptr, "CancelUserRegistration"},
@@ -46,15 +48,15 @@ ACC_SU::ACC_SU(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p
{204, nullptr, "SetUserPosition"},
{205, &ACC_SU::GetProfileEditor, "GetProfileEditor"},
{206, nullptr, "CompleteUserRegistrationForcibly"},
- {210, nullptr, "CreateFloatingRegistrationRequest"}, // 3.0.0+
- {211, nullptr, "CreateProcedureToRegisterUserWithNintendoAccount"}, // 8.0.0+
- {212, nullptr, "ResumeProcedureToRegisterUserWithNintendoAccount"}, // 8.0.0+
+ {210, nullptr, "CreateFloatingRegistrationRequest"},
+ {211, nullptr, "CreateProcedureToRegisterUserWithNintendoAccount"},
+ {212, nullptr, "ResumeProcedureToRegisterUserWithNintendoAccount"},
{230, nullptr, "AuthenticateServiceAsync"},
{250, nullptr, "GetBaasAccountAdministrator"},
{290, nullptr, "ProxyProcedureForGuestLoginWithNintendoAccount"},
- {291, nullptr, "ProxyProcedureForFloatingRegistrationWithNintendoAccount"}, // 3.0.0+
+ {291, nullptr, "ProxyProcedureForFloatingRegistrationWithNintendoAccount"},
{299, nullptr, "SuspendBackgroundDaemon"},
- {997, nullptr, "DebugInvalidateTokenCacheForUser"}, // 3.0.0+
+ {997, nullptr, "DebugInvalidateTokenCacheForUser"},
{998, nullptr, "DebugSetUserStateClose"},
{999, nullptr, "DebugSetUserStateOpen"},
};
diff --git a/src/core/hle/service/acc/acc_u1.cpp b/src/core/hle/service/acc/acc_u1.cpp
index 951081cd0..71982ad5a 100644
--- a/src/core/hle/service/acc/acc_u1.cpp
+++ b/src/core/hle/service/acc/acc_u1.cpp
@@ -17,29 +17,31 @@ ACC_U1::ACC_U1(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p
{3, &ACC_U1::ListOpenUsers, "ListOpenUsers"},
{4, &ACC_U1::GetLastOpenedUser, "GetLastOpenedUser"},
{5, &ACC_U1::GetProfile, "GetProfile"},
- {6, nullptr, "GetProfileDigest"}, // 3.0.0+
+ {6, nullptr, "GetProfileDigest"},
{50, &ACC_U1::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},
{51, &ACC_U1::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"},
- {60, &ACC_U1::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"}, // 5.0.0 - 5.1.0
- {99, nullptr, "DebugActivateOpenContextRetention"}, // 6.0.0+
+ {60, &ACC_U1::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"},
+ {99, nullptr, "DebugActivateOpenContextRetention"},
{100, nullptr, "GetUserRegistrationNotifier"},
{101, nullptr, "GetUserStateChangeNotifier"},
{102, nullptr, "GetBaasAccountManagerForSystemService"},
{103, nullptr, "GetBaasUserAvailabilityChangeNotifier"},
{104, nullptr, "GetProfileUpdateNotifier"},
- {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, // 4.0.0+
- {106, nullptr, "GetProfileSyncNotifier"}, // 9.0.0+
+ {105, nullptr, "CheckNetworkServiceAvailabilityAsync"},
+ {106, nullptr, "GetProfileSyncNotifier"},
{110, &ACC_U1::StoreSaveDataThumbnailApplication, "StoreSaveDataThumbnail"},
{111, nullptr, "ClearSaveDataThumbnail"},
{112, nullptr, "LoadSaveDataThumbnail"},
- {113, nullptr, "GetSaveDataThumbnailExistence"}, // 5.0.0+
- {120, nullptr, "ListOpenUsersInApplication"}, // 10.0.0+
- {130, nullptr, "ActivateOpenContextRetention"}, // 6.0.0+
- {140, &ACC_U1::ListQualifiedUsers, "ListQualifiedUsers"}, // 6.0.0+
- {150, nullptr, "AuthenticateApplicationAsync"}, // 10.0.0+
- {190, nullptr, "GetUserLastOpenedApplication"}, // 1.0.0 - 9.2.0
- {191, nullptr, "ActivateOpenContextHolder"}, // 7.0.0+
- {997, nullptr, "DebugInvalidateTokenCacheForUser"}, // 3.0.0+
+ {113, nullptr, "GetSaveDataThumbnailExistence"},
+ {120, nullptr, "ListOpenUsersInApplication"},
+ {130, nullptr, "ActivateOpenContextRetention"},
+ {140, &ACC_U1::ListQualifiedUsers, "ListQualifiedUsers"},
+ {150, nullptr, "AuthenticateApplicationAsync"},
+ {151, nullptr, "Unknown151"},
+ {152, nullptr, "Unknown152"},
+ {190, nullptr, "GetUserLastOpenedApplication"},
+ {191, nullptr, "ActivateOpenContextHolder"},
+ {997, nullptr, "DebugInvalidateTokenCacheForUser"},
{998, nullptr, "DebugSetUserStateClose"},
{999, nullptr, "DebugSetUserStateOpen"},
};
diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp
index ea3414fd2..19c578b3a 100644
--- a/src/core/hle/service/audio/hwopus.cpp
+++ b/src/core/hle/service/audio/hwopus.cpp
@@ -297,6 +297,10 @@ HwOpus::HwOpus(Core::System& system_) : ServiceFramework{system_, "hwopus"} {
{1, &HwOpus::GetWorkBufferSize, "GetWorkBufferSize"},
{2, nullptr, "OpenOpusDecoderForMultiStream"},
{3, nullptr, "GetWorkBufferSizeForMultiStream"},
+ {4, nullptr, "OpenHardwareOpusDecoderEx"},
+ {5, nullptr, "GetWorkBufferSizeEx"},
+ {6, nullptr, "OpenHardwareOpusDecoderForMultiStreamEx"},
+ {7, nullptr, "GetWorkBufferSizeForMultiStreamEx"},
};
RegisterHandlers(functions);
}
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index 9cc260515..a0215c4d7 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -118,9 +118,13 @@ public:
explicit IFile(Core::System& system_, FileSys::VirtualFile backend_)
: ServiceFramework{system_, "IFile"}, backend(std::move(backend_)) {
static const FunctionInfo functions[] = {
- {0, &IFile::Read, "Read"}, {1, &IFile::Write, "Write"},
- {2, &IFile::Flush, "Flush"}, {3, &IFile::SetSize, "SetSize"},
- {4, &IFile::GetSize, "GetSize"}, {5, nullptr, "OperateRange"},
+ {0, &IFile::Read, "Read"},
+ {1, &IFile::Write, "Write"},
+ {2, &IFile::Flush, "Flush"},
+ {3, &IFile::SetSize, "SetSize"},
+ {4, &IFile::GetSize, "GetSize"},
+ {5, nullptr, "OperateRange"},
+ {6, nullptr, "OperateRangeWithBuffer"},
};
RegisterHandlers(functions);
}
@@ -708,7 +712,10 @@ FSP_SRV::FSP_SRV(Core::System& system_)
{84, nullptr, "ListApplicationAccessibleSaveDataOwnerId"},
{85, nullptr, "OpenSaveDataTransferManagerForSaveDataRepair"},
{86, nullptr, "OpenSaveDataMover"},
+ {87, nullptr, "OpenSaveDataTransferManagerForRepair"},
{100, nullptr, "OpenImageDirectoryFileSystem"},
+ {101, nullptr, "OpenBaseFileSystem"},
+ {102, nullptr, "FormatBaseFileSystem"},
{110, nullptr, "OpenContentStorageFileSystem"},
{120, nullptr, "OpenCloudBackupWorkStorageFileSystem"},
{130, nullptr, "OpenCustomStorageFileSystem"},
@@ -764,10 +771,12 @@ FSP_SRV::FSP_SRV(Core::System& system_)
{1008, nullptr, "OpenRegisteredUpdatePartition"},
{1009, nullptr, "GetAndClearMemoryReportInfo"},
{1010, nullptr, "SetDataStorageRedirectTarget"},
- {1011, &FSP_SRV::GetAccessLogVersionInfo, "GetAccessLogVersionInfo"},
+ {1011, &FSP_SRV::GetProgramIndexForAccessLog, "GetProgramIndexForAccessLog"},
{1012, nullptr, "GetFsStackUsage"},
{1013, nullptr, "UnsetSaveDataRootPath"},
{1014, nullptr, "OutputMultiProgramTagAccessLog"},
+ {1016, nullptr, "FlushAccessLogOnSdCard"},
+ {1017, nullptr, "OutputApplicationInfoAccessLog"},
{1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"},
{1110, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId2"},
{1200, &FSP_SRV::OpenMultiCommitManager, "OpenMultiCommitManager"},
@@ -1051,7 +1060,7 @@ void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
}
-void FSP_SRV::GetAccessLogVersionInfo(Kernel::HLERequestContext& ctx) {
+void FSP_SRV::GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_FS, "called");
IPC::ResponseBuilder rb{ctx, 4};
diff --git a/src/core/hle/service/filesystem/fsp_srv.h b/src/core/hle/service/filesystem/fsp_srv.h
index 8ed933279..b01b924eb 100644
--- a/src/core/hle/service/filesystem/fsp_srv.h
+++ b/src/core/hle/service/filesystem/fsp_srv.h
@@ -53,7 +53,7 @@ private:
void SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx);
void GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx);
void OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx);
- void GetAccessLogVersionInfo(Kernel::HLERequestContext& ctx);
+ void GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx);
void OpenMultiCommitManager(Kernel::HLERequestContext& ctx);
FileSystemController& fsc;
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
index 933d42f3f..2edd803f3 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
@@ -248,7 +248,13 @@ NvResult nvhost_ctrl_gpu::ZBCSetTable(const std::vector<u8>& input, std::vector<
IoctlZbcSetTable params{};
std::memcpy(&params, input.data(), input.size());
// TODO(ogniK): What does this even actually do?
- std::memcpy(output.data(), &params, output.size());
+
+ // Prevent null pointer being passed as arg 1
+ if (output.empty()) {
+ LOG_WARNING(Service_NVDRV, "Avoiding passing null pointer to memcpy");
+ } else {
+ std::memcpy(output.data(), &params, output.size());
+ }
return NvResult::Success;
}
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp
index 4898dc27a..c2f152190 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp
@@ -23,17 +23,22 @@ namespace {
template <typename T>
std::size_t SpliceVectors(const std::vector<u8>& input, std::vector<T>& dst, std::size_t count,
std::size_t offset) {
- std::memcpy(dst.data(), input.data() + offset, count * sizeof(T));
- offset += count * sizeof(T);
- return offset;
+ if (!dst.empty()) {
+ std::memcpy(dst.data(), input.data() + offset, count * sizeof(T));
+ }
+ return 0;
}
// Write vectors will write data to the output buffer
template <typename T>
std::size_t WriteVectors(std::vector<u8>& dst, const std::vector<T>& src, std::size_t offset) {
- std::memcpy(dst.data() + offset, src.data(), src.size() * sizeof(T));
- offset += src.size() * sizeof(T);
- return offset;
+ if (src.empty()) {
+ return 0;
+ } else {
+ std::memcpy(dst.data() + offset, src.data(), src.size() * sizeof(T));
+ offset += src.size() * sizeof(T);
+ return offset;
+ }
}
} // Anonymous namespace
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 1da56bc27..aec399076 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -70,6 +70,7 @@
#include "core/hle/service/vi/vi.h"
#include "core/hle/service/wlan/wlan.h"
#include "core/reporter.h"
+#include "core/settings.h"
namespace Service {
@@ -146,6 +147,11 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(Kernel::HLERequestContext
system.GetReporter().SaveUnimplementedFunctionReport(ctx, ctx.GetCommand(), function_name,
service_name);
UNIMPLEMENTED_MSG("Unknown / unimplemented {}", fmt::to_string(buf));
+ if (Settings::values.use_auto_stub) {
+ LOG_WARNING(Service, "Using auto stub fallback!");
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(RESULT_SUCCESS);
+ }
}
void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) {