3421e1617e
process: Add method to mirror a memory region.
2017-12-28 21:35:49 -05:00
3597650f22
service: Return proper result code for IPC::CommandType::Close.
2017-10-31 19:30:05 -04:00
34571f4d2e
hle: Use Switch formatted result codes.
2017-10-31 19:26:11 -04:00
dcd6bb82f7
hle: Fix QueryMemory response for MemoryInfo.
2017-10-19 23:00:46 -04:00
654fae29c1
hle_ipc: Only copy necessary fields for outgoing command buffer.
2017-10-18 21:39:48 -04:00
b283cf7348
hle_ipc: Parse out buffer X/A/B/B descriptors from incoming command buffer.
2017-10-18 21:38:01 -04:00
4fb1b24d68
hle: Implement ConvertSessionToDomain, various cleanups.
2017-10-15 01:24:22 -04:00
960a1416de
hle: Initial implementation of NX service framework and IPC.
2017-10-14 22:18:42 -04:00
b1d5db1cf6
Merge remote-tracking branch 'upstream/master' into nx
...
# Conflicts:
# src/core/CMakeLists.txt
# src/core/arm/dynarmic/arm_dynarmic.cpp
# src/core/arm/dyncom/arm_dyncom.cpp
# src/core/hle/kernel/process.cpp
# src/core/hle/kernel/thread.cpp
# src/core/hle/kernel/thread.h
# src/core/hle/kernel/vm_manager.cpp
# src/core/loader/3dsx.cpp
# src/core/loader/elf.cpp
# src/core/loader/ncch.cpp
# src/core/memory.cpp
# src/core/memory.h
# src/core/memory_setup.h
2017-10-09 23:56:20 -04:00
23ce4f5afc
loader: Various improvements for NSO/NRO loaders.
2017-10-09 21:39:32 -04:00
15c7641bef
Merge pull request #2977 from Subv/shmem_create
...
SharedMemory: Don't take over and unmap the source memory block when creating a shared memory, just reference it
2017-10-03 16:21:49 -04:00
b18589ecf7
Kernel/SharedMemory: Don't take over and unmap the source memory block when creating a shared memory, just reference it.
...
Also reference the right offset into the backing block for the requested address.
2017-10-02 15:16:16 -05:00
30fabc41c6
Merge pull request #2971 from Subv/per_process_memops
...
Memory: Add overloads for ReadBlock and WriteBlock that operate on a specific process.
2017-10-01 14:44:06 -05:00
8217ed7acb
Kernel/Thread: Added a helper function to get a thread's command buffer VAddr.
2017-10-01 14:18:35 -05:00
8c92435ded
nso: Refactor and allocate .bss section.
2017-09-30 14:33:58 -04:00
fa1c7c7ee1
process: Support loading multiple codesets.
2017-09-30 14:33:11 -04:00
c5ce5c06e4
kernel: Various threading fixes to support 64-bit addressing.
2017-09-30 14:28:54 -04:00
f01472a5ff
core: Various changes to support 64-bit addressing.
2017-09-30 14:28:54 -04:00
db752b52e8
Merge pull request #2967 from Subv/thread_wakeup_callbacks
...
Kernel/Threads: When putting a thread to wait, specify a function to execute when it is awoken
2017-09-30 09:12:18 -05:00
a13ab958cb
Fixed type conversion ambiguity
2017-09-30 09:34:35 +01:00
8432749db7
Kernel/Threads: When putting a thread to wait, specify a function to execute when it is awoken.
...
This change makes for a clearer (less confusing) path of execution in the scheduler, now the code to execute when a thread awakes is closer to the code that puts the thread to sleep (WaitSynch1, WaitSynchN). It also allows us to implement the special wake up behavior of ReplyAndReceive without hacking up WaitObject::WakeupAllWaitingThreads.
If savestates are desired in the future, we can change this implementation to one similar to the CoreTiming event system, where we first register the callback functions at startup and assign their identifiers to the Thread callback variable instead of directly assigning a lambda to the wake up callback variable.
2017-09-28 11:53:32 -05:00
3165466b66
Kernel/Thread: Allow specifying which process a thread belongs to when creating it.
...
Don't automatically assume that Thread::Create will only be called when the parent process is currently scheduled. This assumption will be broken when applets or system modules are loaded.
2017-09-26 17:40:49 -05:00
c02bbb7030
memory: Add GetCurrentPageTable/SetCurrentPageTable
...
Don't expose Memory::current_page_table as a global.
2017-09-24 22:42:42 +01:00
813837c5cf
Merge pull request #2842 from Subv/switchable_page_table
...
Kernel/Memory: Give each process its own page table and allow switching the current page table upon reschedule
2017-09-15 22:41:45 +02:00
b178089251
Kernel/Threads: Don't clear the CPU instruction cache when performing a context switch from an idle thread into a thread in the same process.
...
We were unnecessarily clearing the cache when going from Process A -> Idle -> Process A, this caused extreme performance regressions.
2017-09-15 14:26:15 -05:00
214150f00c
Kernel/Memory: Changed GetPhysicalPointer so that it doesn't go through the current process' page table to obtain a pointer.
2017-09-15 14:26:13 -05:00
c34ec5e77c
Kernel/Memory: Switch the current page table when a new process is scheduled.
2017-09-10 15:14:31 -05:00
6d2734a074
Kernel/Memory: Give each Process its own page table.
...
The loader is in charge of setting the newly created process's page table as the main one during the loading process.
2017-09-10 15:13:41 -05:00
61442d6afb
Merge pull request #2839 from Subv/global_kernel_lock
...
Kernel/HLE: Use a mutex to synchronize access to the HLE kernel state between the cpu thread and any other possible threads that might touch the kernel (network thread, etc).
2017-08-23 18:17:44 -06:00
2bbff9fa96
Merge pull request #2893 from Subv/not_schedule_main_thread
...
Kernel/Threads: Don't immediately switch to the new main thread when loading a new process.
2017-08-22 17:45:47 -04:00
bca8916cea
Kernel/HLE: Use a mutex to synchronize access to the HLE kernel state between the cpu thread and any other possible threads that might touch the kernel (network thread, etc).
...
This mutex is acquired in SVC::CallSVC, ie, as soon as the guest application enters the HLE kernel, and should be acquired by the aforementioned threads before modifying kernel structures.
2017-08-22 09:30:55 -05:00
fa228ca637
Kernel/Threads: Don't immediately switch to the new main thread when loading a new process.
...
This is necessary for loading multiple processes at the same time.
The main thread will be automatically scheduled when necessary once the scheduler runs.
2017-08-21 20:54:29 -05:00
65f19b51c4
Warnings: Add UNREACHABLE macros to switches that contemplate all possible values.
2017-08-21 08:34:28 -05:00
045d0b5bbd
Merge pull request #2799 from yuriks/virtual-cached-range-flush
...
Add address conversion functions returning optional, Add function to flush virtual region from rasterizer cache
2017-07-22 10:15:52 +03:00
56d718b2a1
Merge pull request #2793 from Subv/replyandreceive
...
Kernel/SVC: Partially implemented svcReplyAndReceive
2017-06-29 17:05:22 -05:00
b53fa9514f
Kernel/SVC: Pass the current thread as a parameter to ClientSession::SendSyncRequest.
2017-06-29 12:30:34 -05:00
c3c9175a1c
Kernel/Sessions: Clean up the list of pending request threads of a session when the client endpoint is closed.
2017-06-25 23:38:29 -05:00
8feeb81af2
Kernel/ServerSession: Keep track of which threads have issued sync requests.
2017-06-25 14:47:25 -05:00
e192d417ec
Kernel: Implement AcceptSession SVC
2017-06-23 11:26:37 -07:00
326e7c7020
Memory: Make PhysicalToVirtualAddress return a boost::optional
...
And fix a few places in the code to take advantage of that.
2017-06-21 22:55:17 -07:00
f64d0b3f26
Kernel/IPC: Support translation of null handles
...
Missed this in my first implementation. Thanks to @wwylele for pointing
out that this was missing.
2017-06-21 14:27:03 -07:00
c4f0927a62
Merge pull request #2789 from yuriks/misc-kernel
...
Trivial no-op additions
2017-06-21 20:34:12 +03:00
b21dfbb295
Merge pull request #2790 from yuriks/remove-movefrom
...
Remove ResultVal::MoveFrom
2017-06-20 22:04:09 -07:00
723dc644fa
ResultVal: Remove MoveFrom()
...
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in
case you already have an rvalue.
2017-06-18 19:03:15 -07:00
90b8d4dd36
Kernel: Add comment about the extended linear heap area
2017-06-18 18:38:40 -07:00
0dfafdbe59
Kernel/IPC: Make HLERequestContext usable from outside kernel
2017-06-18 16:05:12 -07:00
d8f6000f54
Kernel/IPC: Use boost::small_vector for HLE context objects
2017-06-11 16:34:13 -07:00
92ca422088
Kernel: Allow clearing request_objects to re-use buffer space
...
Reduces the necessary allocation to max(in_handles, out_handles) rather
than (in_handles + out_handles).
2017-06-11 13:10:21 -07:00
8cb65fe65a
Kernel: Basic support for IPC translation for HLE services
2017-06-11 13:10:21 -07:00
05fee70211
Kernel: Add methods in HLERequestContext abstracting handle creation
2017-06-11 13:07:33 -07:00