aboutsummaryrefslogtreecommitdiff
path: root/src/core/loader/nax.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-04-09 15:36:29 -0400
committerLioncash <mathew1800@gmail.com>2019-04-11 22:11:41 -0400
commit67744e08c9c9c15e4e7e5dbe007d0c39968eab26 (patch)
tree56ecfd188540c0e061b4fc7cdf804ebd8481cc3b /src/core/loader/nax.cpp
parent3cfaddba857ebf24507b9c4dd50d47c88f5ddaef (diff)
core/process: Remove unideal page table setting from LoadFromMetadata()
Initially required due to the split codepath with how the initial main process instance was initialized. We used to initialize the process like: Init() { main_process = Process::Create(...); kernel.MakeCurrentProcess(main_process.get()); } Load() { const auto load_result = loader.Load(*kernel.GetCurrentProcess()); if (load_result != Loader::ResultStatus::Success) { // Handle error here. } ... } which presented a problem. Setting a created process as the main process would set the page table for that process as the main page table. This is fine... until we get to the part that the page table can have its size changed in the Load() function via NPDM metadata, which can dictate either a 32-bit, 36-bit, or 39-bit usable address space. Now that we have full control over the process' creation in load, we can simply set the initial process as the main process after all the loading is done, reflecting the potential page table changes without any special-casing behavior. We can also remove the cache flushing within LoadModule(), as execution wouldn't have even begun yet during all usages of this function, now that we have the initialization order cleaned up.
Diffstat (limited to 'src/core/loader/nax.cpp')
0 files changed, 0 insertions, 0 deletions