bunnei
834fa5db65
kernel: Add SyncObject primitive, use it for ClientSession.
8 years ago
bunnei
3421e1617e
process: Add method to mirror a memory region.
8 years ago
bunnei
3597650f22
service: Return proper result code for IPC::CommandType::Close.
8 years ago
bunnei
34571f4d2e
hle: Use Switch formatted result codes.
8 years ago
bunnei
dcd6bb82f7
hle: Fix QueryMemory response for MemoryInfo.
8 years ago
bunnei
654fae29c1
hle_ipc: Only copy necessary fields for outgoing command buffer.
8 years ago
bunnei
b283cf7348
hle_ipc: Parse out buffer X/A/B/B descriptors from incoming command buffer.
8 years ago
bunnei
4fb1b24d68
hle: Implement ConvertSessionToDomain, various cleanups.
8 years ago
bunnei
960a1416de
hle: Initial implementation of NX service framework and IPC.
8 years ago
bunnei
23ce4f5afc
loader: Various improvements for NSO/NRO loaders.
8 years ago
Subv
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.
8 years ago
Subv
8217ed7acb
Kernel/Thread: Added a helper function to get a thread's command buffer VAddr.
8 years ago
bunnei
8c92435ded
nso: Refactor and allocate .bss section.
8 years ago
bunnei
fa1c7c7ee1
process: Support loading multiple codesets.
8 years ago
bunnei
c5ce5c06e4
kernel: Various threading fixes to support 64-bit addressing.
8 years ago
bunnei
f01472a5ff
core: Various changes to support 64-bit addressing.
8 years ago
Huw Pascoe
a13ab958cb
Fixed type conversion ambiguity
8 years ago
Subv
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.
8 years ago
Subv
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.
8 years ago
MerryMage
c02bbb7030
memory: Add GetCurrentPageTable/SetCurrentPageTable
Don't expose Memory::current_page_table as a global.
8 years ago
Subv
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.
9 years ago
Subv
214150f00c
Kernel/Memory: Changed GetPhysicalPointer so that it doesn't go through the current process' page table to obtain a pointer.
9 years ago
Subv
c34ec5e77c
Kernel/Memory: Switch the current page table when a new process is scheduled.
9 years ago
Subv
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.
9 years ago
Subv
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.
9 years ago
Subv
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.
9 years ago
Subv
65f19b51c4
Warnings: Add UNREACHABLE macros to switches that contemplate all possible values.
9 years ago
Subv
b53fa9514f
Kernel/SVC: Pass the current thread as a parameter to ClientSession::SendSyncRequest.
9 years ago
Subv
c3c9175a1c
Kernel/Sessions: Clean up the list of pending request threads of a session when the client endpoint is closed.
9 years ago
Subv
8feeb81af2
Kernel/ServerSession: Keep track of which threads have issued sync requests.
9 years ago
Yuri Kunde Schlesner
e192d417ec
Kernel: Implement AcceptSession SVC
9 years ago
Yuri Kunde Schlesner
326e7c7020
Memory: Make PhysicalToVirtualAddress return a boost::optional
And fix a few places in the code to take advantage of that.
9 years ago
Yuri Kunde Schlesner
f64d0b3f26
Kernel/IPC: Support translation of null handles
Missed this in my first implementation. Thanks to @wwylele for pointing
out that this was missing.
9 years ago
Yuri Kunde Schlesner
723dc644fa
ResultVal: Remove MoveFrom()
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in
case you already have an rvalue.
9 years ago
Yuri Kunde Schlesner
90b8d4dd36
Kernel: Add comment about the extended linear heap area
9 years ago
Yuri Kunde Schlesner
0dfafdbe59
Kernel/IPC: Make HLERequestContext usable from outside kernel
9 years ago
Yuri Kunde Schlesner
d8f6000f54
Kernel/IPC: Use boost::small_vector for HLE context objects
9 years ago
Yuri Kunde Schlesner
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).
9 years ago
Yuri Kunde Schlesner
8cb65fe65a
Kernel: Basic support for IPC translation for HLE services
9 years ago
Yuri Kunde Schlesner
05fee70211
Kernel: Add methods in HLERequestContext abstracting handle creation
9 years ago
Yuri Kunde Schlesner
20e5abb308
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.
9 years ago
Yuri Kunde Schlesner
838faf147e
Session: Remove/add some forward declarations
9 years ago
Yuri Kunde Schlesner
d666e01cdf
Kernel: Ensure objects are kept alive during ClientSession disconnection
Fixes #2760
9 years ago
Yuri Kunde Schlesner
84c497292a
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.
9 years ago
Yuri Kunde Schlesner
6dc133c24a
Kernel: Remove some unnecessary namespace qualifications
9 years ago
Yuri Kunde Schlesner
6354d08359
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.
9 years ago
Yuri Kunde Schlesner
e626a520ca
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.
9 years ago
Yuri Kunde Schlesner
be031989ee
Kernel: Move HandleTable to a separate file
9 years ago
Yuri Kunde Schlesner
64ecf81a3c
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.
9 years ago
Yuri Kunde Schlesner
9453223075
Kernel: Removed HandleTable::GetWaitObject
This isn't necessary anymore since plain Get works correctly for
WaitObjects.
9 years ago