summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv/devices/nvmap.cpp
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-11-26 10:05:09 +0100
committerDavid Marcec <dmarcecguzman@gmail.com>2018-11-26 10:05:09 +0100
commit3d627df4d8a682d39e94116b0fc094b752d8d49f (patch)
tree4d5ff16e08c9177f7c29e38fe112661fd3eb1dca /src/core/hle/service/nvdrv/devices/nvmap.cpp
parentImproved error messages for SVCs (diff)
downloadyuzu-3d627df4d8a682d39e94116b0fc094b752d8d49f.tar
yuzu-3d627df4d8a682d39e94116b0fc094b752d8d49f.tar.gz
yuzu-3d627df4d8a682d39e94116b0fc094b752d8d49f.tar.bz2
yuzu-3d627df4d8a682d39e94116b0fc094b752d8d49f.tar.lz
yuzu-3d627df4d8a682d39e94116b0fc094b752d8d49f.tar.xz
yuzu-3d627df4d8a682d39e94116b0fc094b752d8d49f.tar.zst
yuzu-3d627df4d8a682d39e94116b0fc094b752d8d49f.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvmap.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvmap.cpp b/src/core/hle/service/nvdrv/devices/nvmap.cpp
index 85ba5d4b7..1ec796fc6 100644
--- a/src/core/hle/service/nvdrv/devices/nvmap.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvmap.cpp
@@ -79,12 +79,12 @@ u32 nvmap::IocAlloc(const std::vector<u8>& input, std::vector<u8>& output) {
LOG_DEBUG(Service_NVDRV, "called, addr={:X}", params.addr);
if (!params.handle) {
- LOG_ERROR(Service_NVDRV, "Handle is zero");
+ LOG_ERROR(Service_NVDRV, "Handle is 0");
return static_cast<u32>(NvErrCodes::InvalidValue);
}
if ((params.align - 1) & params.align) {
- LOG_ERROR(Service_NVDRV, "Incorrect alignment");
+ LOG_ERROR(Service_NVDRV, "Incorrect alignment used, alignment={:08X}", params.align);
return static_cast<u32>(NvErrCodes::InvalidValue);
}
@@ -95,12 +95,12 @@ u32 nvmap::IocAlloc(const std::vector<u8>& input, std::vector<u8>& output) {
auto object = GetObject(params.handle);
if (!object) {
- LOG_ERROR(Service_NVDRV, "Object does not exist");
+ LOG_ERROR(Service_NVDRV, "Object does not exist, handle={:08X}", params.handle);
return static_cast<u32>(NvErrCodes::InvalidValue);
}
if (object->status == Object::Status::Allocated) {
- LOG_ERROR(Service_NVDRV, "Object is already allocated");
+ LOG_ERROR(Service_NVDRV, "Object is already allocated, handle={:08X}", params.handle);
return static_cast<u32>(NvErrCodes::OperationNotPermitted);
}
@@ -127,7 +127,7 @@ u32 nvmap::IocGetId(const std::vector<u8>& input, std::vector<u8>& output) {
auto object = GetObject(params.handle);
if (!object) {
- LOG_ERROR(Service_NVDRV, "Object does not exist");
+ LOG_ERROR(Service_NVDRV, "Object does not exist, handle={:08X}", params.handle);
return static_cast<u32>(NvErrCodes::OperationNotPermitted);
}
@@ -146,13 +146,13 @@ u32 nvmap::IocFromId(const std::vector<u8>& input, std::vector<u8>& output) {
auto itr = std::find_if(handles.begin(), handles.end(),
[&](const auto& entry) { return entry.second->id == params.id; });
if (itr == handles.end()) {
- LOG_ERROR(Service_NVDRV, "Object does not exist");
+ LOG_ERROR(Service_NVDRV, "Object does not exist, handle={:08X}", params.handle);
return static_cast<u32>(NvErrCodes::InvalidValue);
}
auto& object = itr->second;
if (object->status != Object::Status::Allocated) {
- LOG_ERROR(Service_NVDRV, "Object is not allocated");
+ LOG_ERROR(Service_NVDRV, "Object is not allocated, handle={:08X}", params.handle);
return static_cast<u32>(NvErrCodes::InvalidValue);
}
@@ -175,12 +175,12 @@ u32 nvmap::IocParam(const std::vector<u8>& input, std::vector<u8>& output) {
auto object = GetObject(params.handle);
if (!object) {
- LOG_ERROR(Service_NVDRV, "Object does not exist");
+ LOG_ERROR(Service_NVDRV, "Object does not exist, handle={:08X}", params.handle);
return static_cast<u32>(NvErrCodes::InvalidValue);
}
if (object->status != Object::Status::Allocated) {
- LOG_ERROR(Service_NVDRV, "Object is not allocated");
+ LOG_ERROR(Service_NVDRV, "Object is not allocated, handle={:08X}", params.handle);
return static_cast<u32>(NvErrCodes::OperationNotPermitted);
}
@@ -220,12 +220,14 @@ u32 nvmap::IocFree(const std::vector<u8>& input, std::vector<u8>& output) {
auto itr = handles.find(params.handle);
if (itr == handles.end()) {
- LOG_ERROR(Service_NVDRV, "Object does not exist");
+ LOG_ERROR(Service_NVDRV, "Object does not exist, handle={:08X}", params.handle);
return static_cast<u32>(NvErrCodes::InvalidValue);
}
if (!itr->second->refcount) {
- LOG_ERROR(Service_NVDRV,
- "There is no references to this object. The object is already freed");
+ LOG_ERROR(
+ Service_NVDRV,
+ "There is no references to this object. The object is already freed. handle={:08X}",
+ params.handle);
return static_cast<u32>(NvErrCodes::InvalidValue);
}