[Kernel] Improved TUs Support

- Changed name of config option to apply_title_update to better reflect what that option does
- Mount TU package to UPDATE: partition
- Simplified UserModule::title_id()
- Splitted loading module into two parts to allow applying TUs and custom patches
This commit is contained in:
Gliniak
2022-04-30 14:38:42 +02:00
parent 0fd578cafd
commit c65f240c0b
8 changed files with 132 additions and 59 deletions

View File

@@ -134,6 +134,8 @@ class KernelState {
void SetExecutableModule(object_ref<UserModule> module);
object_ref<UserModule> LoadUserModule(const std::string_view name,
bool call_entry = true);
X_RESULT FinishLoadingUserModule(const object_ref<UserModule> module,
bool call_entry = true);
void UnloadUserModule(const object_ref<UserModule>& module,
bool call_entry = true);
@@ -150,6 +152,7 @@ class KernelState {
return object_ref<T>(reinterpret_cast<T*>(module.release()));
}
X_RESULT ApplyTitleUpdate(const object_ref<UserModule> module);
// Terminates a title: Unloads all modules, and kills all guest threads.
// This DOES NOT RETURN if called from a guest thread!
void TerminateTitle();