summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-01-16 23:06:45 +0100
committerDavid Marcec <dmarcecguzman@gmail.com>2018-01-16 23:06:45 +0100
commit68143af6369c1f3349a455fbf94d1bc77ad55957 (patch)
treee0024c82bf788da4837b80de4efa479f523b8dd3 /src/core/hle/kernel
parentIncreased heap size and changed tls area vaddr (diff)
downloadyuzu-68143af6369c1f3349a455fbf94d1bc77ad55957.tar
yuzu-68143af6369c1f3349a455fbf94d1bc77ad55957.tar.gz
yuzu-68143af6369c1f3349a455fbf94d1bc77ad55957.tar.bz2
yuzu-68143af6369c1f3349a455fbf94d1bc77ad55957.tar.lz
yuzu-68143af6369c1f3349a455fbf94d1bc77ad55957.tar.xz
yuzu-68143af6369c1f3349a455fbf94d1bc77ad55957.tar.zst
yuzu-68143af6369c1f3349a455fbf94d1bc77ad55957.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/process.h2
-rw-r--r--src/core/hle/kernel/svc.cpp12
-rw-r--r--src/core/hle/kernel/svc.h13
-rw-r--r--src/core/hle/kernel/vm_manager.cpp4
4 files changed, 29 insertions, 2 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h
index 20b4e401c..add98472f 100644
--- a/src/core/hle/kernel/process.h
+++ b/src/core/hle/kernel/process.h
@@ -131,6 +131,8 @@ public:
/// Bitmask of allowed CPUs that this process' threads can run on. TODO(Subv): Actually parse
/// this value from the process header.
u32 allowed_processor_mask = THREADPROCESSORID_DEFAULT_MASK;
+ u32 allowed_thread_priority_mask = 0xFFFFFFFF;
+ u32 is_virtual_address_memory_enabled = 0;
/// Current status of the process
ProcessStatus status;
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 9c60576c1..2f1b79f32 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -313,6 +313,15 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
case GetInfoType::AllowedCpuIdBitmask:
*result = g_current_process->allowed_processor_mask;
break;
+ case GetInfoType::AllowedThreadPrioBitmask:
+ *result = g_current_process->allowed_thread_priority_mask;
+ break;
+ case GetInfoType::MapRegionBaseAddr:
+ *result = vm_manager.GetAddressSpaceBaseAddr();
+ break;
+ case GetInfoType::MapRegionSize:
+ *result = vm_manager.GetAddressSpaceSize();
+ break;
case GetInfoType::TotalMemoryUsage:
*result = vm_manager.GetTotalMemoryUsage();
break;
@@ -334,6 +343,9 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
case GetInfoType::NewMapRegionSize:
*result = vm_manager.GetNewMapRegionSize();
break;
+ case GetInfoType::IsVirtualAddressMemoryEnabled:
+ *result = g_current_process->is_virtual_address_memory_enabled;
+ break;
default:
UNIMPLEMENTED();
}
diff --git a/src/core/hle/kernel/svc.h b/src/core/hle/kernel/svc.h
index 610cd1d7d..a56fd3602 100644
--- a/src/core/hle/kernel/svc.h
+++ b/src/core/hle/kernel/svc.h
@@ -24,14 +24,27 @@ struct PageInfo {
enum class GetInfoType : u64 {
// 1.0.0+
AllowedCpuIdBitmask = 0,
+ AllowedThreadPrioBitmask = 1,
+ MapRegionBaseAddr = 2,
+ MapRegionSize = 3,
+ HeapRegionBaseAddr = 4,
+ HeapRegionSize = 5,
TotalMemoryUsage = 6,
TotalHeapUsage = 7,
+ IsCurrentProcessBeingDebugged = 8,
+ ResourceHandleLimit = 9,
+ IdleTickCount = 10,
RandomEntropy = 11,
+ PerformanceCounter = 0xF0000002,
// 2.0.0+
AddressSpaceBaseAddr = 12,
AddressSpaceSize = 13,
NewMapRegionBaseAddr = 14,
NewMapRegionSize = 15,
+ // 3.0.0+
+ IsVirtualAddressMemoryEnabled = 16,
+ TitleId = 18,
+ PrivilegedProcessId = 19,
};
void CallSVC(u32 immediate);
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp
index dca637dde..d6d0ad996 100644
--- a/src/core/hle/kernel/vm_manager.cpp
+++ b/src/core/hle/kernel/vm_manager.cpp
@@ -356,12 +356,12 @@ void VMManager::UpdatePageTableForVMA(const VirtualMemoryArea& vma) {
u64 VMManager::GetTotalMemoryUsage() {
LOG_WARNING(Kernel, "(STUBBED) called");
- return 0x400000;
+ return 0xBE000000;
}
u64 VMManager::GetTotalHeapUsage() {
LOG_WARNING(Kernel, "(STUBBED) called");
- return 0x10000;
+ return 0x0;
}
VAddr VMManager::GetAddressSpaceBaseAddr() {