Sebastian Valle 
								
							 
						 
						
							
							
							
							
								
							
							
								2e30398e7a 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Huw Pascoe 
								
							 
						 
						
							
							
							
							
								
							
							
								da1c8d1522 
								
							 
						 
						
							
							
								
								Fixed type conversion ambiguity  
							
							
							
						 
						
							2017-09-30 09:34:35 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								a0054d695e 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								2e78c05d91 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									MerryMage 
								
							 
						 
						
							
							
							
							
								
							
							
								6b8ad273fc 
								
							 
						 
						
							
							
								
								memory: Add GetCurrentPageTable/SetCurrentPageTable  
							
							... 
							
							
							
							Don't expose Memory::current_page_table as a global. 
							
						 
						
							2017-09-24 22:42:42 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									B3n30 
								
							 
						 
						
							
							
							
							
								
							
							
								ccdc31ca9f 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								9200465e55 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								71281c2114 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								23ad87098d 
								
							 
						 
						
							
							
								
								Kernel/Memory: Switch the current page table when a new process is scheduled.  
							
							
							
						 
						
							2017-09-10 15:14:31 -05:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								36100ec791 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									James Rowe 
								
							 
						 
						
							
							
							
							
								
							
							
								35e185309b 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									bunnei 
								
							 
						 
						
							
							
							
							
								
							
							
								add21dee2f 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								9cf64ca2cf 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								733dfe220e 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								f94bd67a0d 
								
							 
						 
						
							
							
								
								Warnings: Add UNREACHABLE macros to switches that contemplate all possible values.  
							
							
							
						 
						
							2017-08-21 08:34:28 -05:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Weiyi Wang 
								
							 
						 
						
							
							
							
							
								
							
							
								c40c9bf285 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Sebastian Valle 
								
							 
						 
						
							
							
							
							
								
							
							
								4f7e8c6f1e 
								
							 
						 
						
							
							
								
								Merge pull request  #2793  from Subv/replyandreceive  
							
							... 
							
							
							
							Kernel/SVC: Partially implemented svcReplyAndReceive 
							
						 
						
							2017-06-29 17:05:22 -05:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								4a8de6bb00 
								
							 
						 
						
							
							
								
								Kernel/SVC: Pass the current thread as a parameter to ClientSession::SendSyncRequest.  
							
							
							
						 
						
							2017-06-29 12:30:34 -05:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								44f4737f99 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								d7538409fb 
								
							 
						 
						
							
							
								
								Kernel/ServerSession: Keep track of which threads have issued sync requests.  
							
							
							
						 
						
							2017-06-25 14:47:25 -05:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								afa851d0a4 
								
							 
						 
						
							
							
								
								Kernel: Implement AcceptSession SVC  
							
							
							
						 
						
							2017-06-23 11:26:37 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								1dd91e371b 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								b3e13d653f 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Weiyi Wang 
								
							 
						 
						
							
							
							
							
								
							
							
								d910f9cc85 
								
							 
						 
						
							
							
								
								Merge pull request  #2789  from yuriks/misc-kernel  
							
							... 
							
							
							
							Trivial no-op additions 
							
						 
						
							2017-06-21 20:34:12 +03:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								03964e9cd2 
								
							 
						 
						
							
							
								
								Merge pull request  #2790  from yuriks/remove-movefrom  
							
							... 
							
							
							
							Remove ResultVal::MoveFrom 
							
						 
						
							2017-06-20 22:04:09 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								c27dad4cd1 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								41376f050a 
								
							 
						 
						
							
							
								
								Kernel: Add comment about the extended linear heap area  
							
							
							
						 
						
							2017-06-18 18:38:40 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								6382e341f8 
								
							 
						 
						
							
							
								
								Kernel/IPC: Make HLERequestContext usable from outside kernel  
							
							
							
						 
						
							2017-06-18 16:05:12 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								48b7e2b061 
								
							 
						 
						
							
							
								
								Kernel/IPC: Use boost::small_vector for HLE context objects  
							
							
							
						 
						
							2017-06-11 16:34:13 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								192a95390e 
								
							 
						 
						
							
							
								
								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 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								e639024013 
								
							 
						 
						
							
							
								
								Kernel: Basic support for IPC translation for HLE services  
							
							
							
						 
						
							2017-06-11 13:10:21 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								ccba9e903f 
								
							 
						 
						
							
							
								
								Kernel: Add methods in HLERequestContext abstracting handle creation  
							
							
							
						 
						
							2017-06-11 13:07:33 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								1e8c1ed676 
								
							 
						 
						
							
							
								
								ServiceFramework: Use separate copy of command buffer  
							
							... 
							
							
							
							Copy the IPC command buffer to/from the request context before/after the
handler is invoked. This is part of a move away from using global data
for handling IPC requests. 
							
						 
						
							2017-06-11 13:07:33 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								74aaf0d5c7 
								
							 
						 
						
							
							
								
								Merge pull request  #2756  from yuriks/service-framework  
							
							... 
							
							
							
							New service framework 
							
						 
						
							2017-06-08 21:03:03 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								5a6d4a2f19 
								
							 
						 
						
							
							
								
								Session: Remove/add some forward declarations  
							
							
							
						 
						
							2017-06-08 00:33:57 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								82a355b3cd 
								
							 
						 
						
							
							
								
								Kernel: Ensure objects are kept alive during ClientSession disconnection  
							
							... 
							
							
							
							Fixes  #2760  
						
							2017-06-08 00:33:24 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								0a7f4f531f 
								
							 
						 
						
							
							
								
								Service: Add new ServiceFramework framework for writing HLE services  
							
							... 
							
							
							
							The old "Interface" class had a few problems such as using free
functions (Which didn't allow you to write the service handler as if it
were a regular class.) which weren't very extensible. (Only received one
parameter with a pointer to the Interface object.)
The new ServiceFramework aims to solve these problems by working with
member functions and passing a generic context struct as parameter. This
struct can be extended in the future without having to update all
existing service implementations. 
							
						 
						
							2017-06-08 00:11:37 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								1e267fd653 
								
							 
						 
						
							
							
								
								Kernel: Remove some unnecessary namespace qualifications  
							
							
							
						 
						
							2017-06-06 14:51:42 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								8a35f3634e 
								
							 
						 
						
							
							
								
								Kernel: Add a dedicated SetHleHandler method to ServerPort/ServerSession  
							
							... 
							
							
							
							This allows attaching a HLE handle to a ServerPort at any point after it
is created, allowing port/session creation to be generic between HLE and
regular services. 
							
						 
						
							2017-06-06 02:56:32 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								41a3feea66 
								
							 
						 
						
							
							
								
								HLE: Move SessionRequestHandler from Service:: to Kernel::  
							
							... 
							
							
							
							Most of the code that works with this is or will be in the kernel, so
it's a more appropriate place for it to be. 
							
						 
						
							2017-06-05 23:40:11 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								ecfda5317e 
								
							 
						 
						
							
							
								
								Kernel: Move HandleTable to a separate file  
							
							
							
						 
						
							2017-05-29 17:34:39 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								6f662625d3 
								
							 
						 
						
							
							
								
								Kernel: Move WaitObject to a separate file  
							
							... 
							
							
							
							Now that HandleTable doesn't directly depend on WaitObject anymore, this
can be separated from the main kernel.h header. 
							
						 
						
							2017-05-29 16:16:46 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								ddbf9cec1b 
								
							 
						 
						
							
							
								
								Kernel: Removed HandleTable::GetWaitObject  
							
							... 
							
							
							
							This isn't necessary anymore since plain Get works correctly for
WaitObjects. 
							
						 
						
							2017-05-29 15:10:06 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								74aa9efe3e 
								
							 
						 
						
							
							
								
								Kernel: Extract dynamic Object pointer cast into its own function  
							
							
							
						 
						
							2017-05-29 14:42:27 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								467545ed48 
								
							 
						 
						
							
							
								
								Kernel: Centralize error definitions in errors.h  
							
							
							
						 
						
							2017-05-24 21:06:00 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								464dc927af 
								
							 
						 
						
							
							
								
								Merge pull request  #2406  from Subv/session_disconnect  
							
							... 
							
							
							
							Kernel: Properly update port counters on session disconnection. 
							
						 
						
							2017-05-21 17:18:16 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								8e4b05c22a 
								
							 
						 
						
							
							
								
								Kernel/Sessions: Remove the ClientSession::Create function.  
							
							... 
							
							
							
							It is not meant to be used by anything other than CreateSessionPair. 
							
						 
						
							2017-05-21 18:52:42 -05:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								f98eb7d315 
								
							 
						 
						
							
							
								
								Kernel: Remove a now unused enum and variable regarding a session's status.  
							
							
							
						 
						
							2017-05-15 11:22:16 -05:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Subv 
								
							 
						 
						
							
							
							
							
								
							
							
								9c496013b3 
								
							 
						 
						
							
							
								
								Kernel: Use a Session object to keep track of the status of a Client/Server session pair.  
							
							... 
							
							
							
							Reduce the associated port's connection count when a ServerSession is destroyed. 
							
						 
						
							2017-05-15 11:22:15 -05:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Yuri Kunde Schlesner 
								
							 
						 
						
							
							
							
							
								
							
							
								2668c26a68 
								
							 
						 
						
							
							
								
								Kernel: Map special regions according to ExHeader  
							
							... 
							
							
							
							This replaces the hardcoded VRAM/DSP mappings with ones made based on
the ExHeader ARM11 Kernel caps list. While this has no visible effect
for most applications (since they use a standard set of mappings) it
does improve support for system modules and n3DS exclusives. 
							
						 
						
							2017-05-09 21:44:00 -07:00