summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2018-01-02 22:24:12 -0500
committerGravatar bunnei2018-01-02 22:24:12 -0500
commitb172f0d770486d4367fbea22906a5e908ef621e8 (patch)
tree6a564c23ed8f52c16c50942803f4a69fd0047f6c /src/core/hle/kernel/svc.cpp
parentvm_manager: Use a more reasonable MAX_ADDRESS size. (diff)
downloadyuzu-b172f0d770486d4367fbea22906a5e908ef621e8.tar.gz
yuzu-b172f0d770486d4367fbea22906a5e908ef621e8.tar.xz
yuzu-b172f0d770486d4367fbea22906a5e908ef621e8.zip
arm: Remove SkyEye/Dyncom code that is ARMv6-only.
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp28
1 files changed, 9 insertions, 19 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 1e5218000..debaa82e5 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -26,8 +26,8 @@ namespace Kernel {
26static ResultCode SetHeapSize(VAddr* heap_addr, u64 heap_size) { 26static ResultCode SetHeapSize(VAddr* heap_addr, u64 heap_size) {
27 LOG_TRACE(Kernel_SVC, "called, heap_size=0x%llx", heap_size); 27 LOG_TRACE(Kernel_SVC, "called, heap_size=0x%llx", heap_size);
28 auto& process = *g_current_process; 28 auto& process = *g_current_process;
29 CASCADE_RESULT(*heap_addr, process.HeapAllocate(Memory::HEAP_VADDR, heap_size, 29 CASCADE_RESULT(*heap_addr,
30 VMAPermission::ReadWrite)); 30 process.HeapAllocate(Memory::HEAP_VADDR, heap_size, VMAPermission::ReadWrite));
31 return RESULT_SUCCESS; 31 return RESULT_SUCCESS;
32} 32}
33 33
@@ -95,8 +95,7 @@ static ResultCode SendSyncRequest(Handle handle) {
95static ResultCode GetThreadId(u32* thread_id, Handle thread_handle) { 95static ResultCode GetThreadId(u32* thread_id, Handle thread_handle) {
96 LOG_TRACE(Kernel_SVC, "called thread=0x%08X", thread_handle); 96 LOG_TRACE(Kernel_SVC, "called thread=0x%08X", thread_handle);
97 97
98 const SharedPtr<Thread> thread = 98 const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle);
99 g_handle_table.Get<Thread>(thread_handle);
100 if (!thread) { 99 if (!thread) {
101 return ERR_INVALID_HANDLE; 100 return ERR_INVALID_HANDLE;
102 } 101 }
@@ -109,8 +108,7 @@ static ResultCode GetThreadId(u32* thread_id, Handle thread_handle) {
109static ResultCode GetProcessId(u32* process_id, Handle process_handle) { 108static ResultCode GetProcessId(u32* process_id, Handle process_handle) {
110 LOG_TRACE(Kernel_SVC, "called process=0x%08X", process_handle); 109 LOG_TRACE(Kernel_SVC, "called process=0x%08X", process_handle);
111 110
112 const SharedPtr<Process> process = 111 const SharedPtr<Process> process = g_handle_table.Get<Process>(process_handle);
113 g_handle_table.Get<Process>(process_handle);
114 if (!process) { 112 if (!process) {
115 return ERR_INVALID_HANDLE; 113 return ERR_INVALID_HANDLE;
116 } 114 }
@@ -135,10 +133,8 @@ static ResultCode LockMutex(Handle holding_thread_handle, VAddr mutex_addr,
135 "requesting_current_thread_handle=0x%08X", 133 "requesting_current_thread_handle=0x%08X",
136 holding_thread_handle, mutex_addr, requesting_thread_handle); 134 holding_thread_handle, mutex_addr, requesting_thread_handle);
137 135
138 SharedPtr<Thread> holding_thread = 136 SharedPtr<Thread> holding_thread = g_handle_table.Get<Thread>(holding_thread_handle);
139 g_handle_table.Get<Thread>(holding_thread_handle); 137 SharedPtr<Thread> requesting_thread = g_handle_table.Get<Thread>(requesting_thread_handle);
140 SharedPtr<Thread> requesting_thread =
141 g_handle_table.Get<Thread>(requesting_thread_handle);
142 138
143 ASSERT(holding_thread); 139 ASSERT(holding_thread);
144 ASSERT(requesting_thread); 140 ASSERT(requesting_thread);
@@ -302,8 +298,7 @@ static ResultCode QueryMemory(MemoryInfo* memory_info, PageInfo* page_info, VAdd
302static void ExitProcess() { 298static void ExitProcess() {
303 LOG_INFO(Kernel_SVC, "Process %u exiting", g_current_process->process_id); 299 LOG_INFO(Kernel_SVC, "Process %u exiting", g_current_process->process_id);
304 300
305 ASSERT_MSG(g_current_process->status == ProcessStatus::Running, 301 ASSERT_MSG(g_current_process->status == ProcessStatus::Running, "Process has already exited");
306 "Process has already exited");
307 302
308 g_current_process->status = ProcessStatus::Exited; 303 g_current_process->status = ProcessStatus::Exited;
309 304
@@ -369,11 +364,7 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V
369 364
370 CASCADE_RESULT(SharedPtr<Thread> thread, 365 CASCADE_RESULT(SharedPtr<Thread> thread,
371 Thread::Create(name, entry_point, priority, arg, processor_id, stack_top, 366 Thread::Create(name, entry_point, priority, arg, processor_id, stack_top,
372 g_current_process)); 367 g_current_process));
373
374 thread->context.fpscr =
375 FPSCR_DEFAULT_NAN | FPSCR_FLUSH_TO_ZERO | FPSCR_ROUND_TOZERO; // 0x03C00000
376
377 CASCADE_RESULT(thread->guest_handle, g_handle_table.Create(thread)); 368 CASCADE_RESULT(thread->guest_handle, g_handle_table.Create(thread));
378 *out_handle = thread->guest_handle; 369 *out_handle = thread->guest_handle;
379 370
@@ -391,8 +382,7 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V
391static ResultCode StartThread(Handle thread_handle) { 382static ResultCode StartThread(Handle thread_handle) {
392 LOG_TRACE(Kernel_SVC, "called thread=0x%08X", thread_handle); 383 LOG_TRACE(Kernel_SVC, "called thread=0x%08X", thread_handle);
393 384
394 const SharedPtr<Thread> thread = 385 const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle);
395 g_handle_table.Get<Thread>(thread_handle);
396 if (!thread) { 386 if (!thread) {
397 return ERR_INVALID_HANDLE; 387 return ERR_INVALID_HANDLE;
398 } 388 }