summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-01-15 21:42:57 +0100
committerbunnei <bunneidev@gmail.com>2018-01-17 00:50:23 +0100
commitbf0e20c571326f3b39d0bed0a3b5f2129cef81ea (patch)
tree53a44b0e32288d68da9426fd987ee888328d8e07 /src
parentSVC: Add 4.0.0+ comment to GetInfoType enum values. (diff)
downloadyuzu-bf0e20c571326f3b39d0bed0a3b5f2129cef81ea.tar
yuzu-bf0e20c571326f3b39d0bed0a3b5f2129cef81ea.tar.gz
yuzu-bf0e20c571326f3b39d0bed0a3b5f2129cef81ea.tar.bz2
yuzu-bf0e20c571326f3b39d0bed0a3b5f2129cef81ea.tar.lz
yuzu-bf0e20c571326f3b39d0bed0a3b5f2129cef81ea.tar.xz
yuzu-bf0e20c571326f3b39d0bed0a3b5f2129cef81ea.tar.zst
yuzu-bf0e20c571326f3b39d0bed0a3b5f2129cef81ea.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/svc.cpp27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 056ba28ef..088058ebc 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -255,8 +255,9 @@ static ResultCode CancelSynchronization(Handle thread_handle) {
/// Attempts to locks a mutex, creating it if it does not already exist
static ResultCode LockMutex(Handle holding_thread_handle, VAddr mutex_addr,
Handle requesting_thread_handle) {
- LOG_TRACE(Kernel_SVC, "called holding_thread_handle=0x%08X, mutex_addr=0x%llx, "
- "requesting_current_thread_handle=0x%08X",
+ LOG_TRACE(Kernel_SVC,
+ "called holding_thread_handle=0x%08X, mutex_addr=0x%llx, "
+ "requesting_current_thread_handle=0x%08X",
holding_thread_handle, mutex_addr, requesting_thread_handle);
SharedPtr<Thread> holding_thread = g_handle_table.Get<Thread>(holding_thread_handle);
@@ -304,8 +305,6 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
LOG_TRACE(Kernel_SVC, "called info_id=0x%X, info_sub_id=0x%X, handle=0x%08X", info_id,
info_sub_id, handle);
- ASSERT(handle == 0 || handle == CurrentProcess);
-
auto& vm_manager = g_current_process->vm_manager;
switch (static_cast<GetInfoType>(info_id)) {
@@ -321,6 +320,12 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
case GetInfoType::MapRegionSize:
*result = vm_manager.GetAddressSpaceSize();
break;
+ case GetInfoType::HeapRegionBaseAddr:
+ *result = vm_manager.GetNewMapRegionBaseAddr() + vm_manager.GetNewMapRegionSize();
+ break;
+ case GetInfoType::HeapRegionSize:
+ *result = Memory::HEAP_SIZE;
+ break;
case GetInfoType::TotalMemoryUsage:
*result = vm_manager.GetTotalMemoryUsage();
break;
@@ -345,6 +350,15 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
case GetInfoType::IsVirtualAddressMemoryEnabled:
*result = g_current_process->is_virtual_address_memory_enabled;
break;
+ case GetInfoType::TitleId:
+ LOG_WARNING(Kernel_SVC, "(STUBBED) Attempted to query titleid, returned 0");
+ *result = 0;
+ break;
+ case GetInfoType::PrivilegedProcessId:
+ LOG_WARNING(Kernel_SVC,
+ "(STUBBED) Attempted to query priviledged process id bounds, returned 0");
+ *result = 0;
+ break;
default:
UNIMPLEMENTED();
}
@@ -533,8 +547,9 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V
Core::System::GetInstance().PrepareReschedule();
- LOG_TRACE(Kernel_SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, "
- "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X",
+ LOG_TRACE(Kernel_SVC,
+ "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, "
+ "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X",
entry_point, name.c_str(), arg, stack_top, priority, processor_id, *out_handle);
return RESULT_SUCCESS;