1
0
Fork 0
forked from suyu/suyu
suyu/src/core
Lioncash 32a6ceb4e5 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.
2019-04-11 22:11:41 -04:00
..
arm core/cpu_core_manager: Create threads separately from initialization. 2019-04-11 22:11:40 -04:00
crypto core: Port current uses of RegisteredCache to ContentProvider 2019-03-26 22:05:37 -04:00
file_sys Merge pull request #1957 from DarkLordZach/title-provider 2019-04-09 19:16:37 -04:00
frontend general: Use deducation guides for std::lock_guard and std::unique_lock 2019-04-01 12:53:47 -04:00
gdbstub gdbstub: Fix some bugs in IsMemoryBreak() and ServeBreak. Add workaround to let watchpoints break into GDB. (#4651) 2019-03-15 16:31:06 +01:00
hle core/process: Remove unideal page table setting from LoadFromMetadata() 2019-04-11 22:11:41 -04:00
loader Merge pull request #1957 from DarkLordZach/title-provider 2019-04-09 19:16:37 -04:00
tracer Port #4182 from Citra: "Prefix all size_t with std::" 2018-09-15 15:21:06 +02:00
CMakeLists.txt core: Do not link LZ4 to core. Use common/data_compression for nso segment decompression instead. 2019-03-29 16:42:34 +01:00
core.cpp core/core: Move main process creation into Load() 2019-04-11 22:11:40 -04:00
core.h core: Store system-wide ContentProvider for the emulator 2019-03-26 22:05:37 -04:00
core_cpu.cpp kernel/svc: Deglobalize the supervisor call handlers 2019-04-07 20:30:05 -04:00
core_cpu.h kernel/scheduler: Pass in system instance in constructor 2019-03-04 17:01:37 -05:00
core_timing.cpp core/core_timing: Make callback parameters consistent 2019-03-24 18:12:17 -04:00
core_timing.h core/core_timing: Make callback parameters consistent 2019-03-24 18:12:17 -04:00
core_timing_util.cpp Corrections, documenting and fixes. 2019-02-16 16:52:24 -04:00
core_timing_util.h Use u128 on Clock Cycles calculation. 2019-02-15 22:57:16 -04:00
cpu_core_manager.cpp core/cpu_core_manager: Create threads separately from initialization. 2019-04-11 22:11:40 -04:00
cpu_core_manager.h core/cpu_core_manager: Create threads separately from initialization. 2019-04-11 22:11:40 -04:00
memory.cpp core/cpu_core_manager: Create threads separately from initialization. 2019-04-11 22:11:40 -04:00
memory.h core/cpu_core_manager: Create threads separately from initialization. 2019-04-11 22:11:40 -04:00
memory_setup.h core: Move PageTable struct into Common. 2019-03-16 22:05:40 -04:00
perf_stats.cpp general: Use deducation guides for std::lock_guard and std::unique_lock 2019-04-01 12:53:47 -04:00
perf_stats.h core/core: Replace includes with forward declarations where applicable 2018-08-31 16:30:14 -04:00
settings.cpp core/yuzu: Remove enable_nfc setting 2019-03-29 15:02:28 +01:00
settings.h core/yuzu: Remove enable_nfc setting 2019-03-29 15:02:28 +01:00
telemetry_session.cpp settings: Add new graphics setting for use_asynchronous_gpu_emulation. 2019-03-06 21:09:09 -05:00
telemetry_session.h compatdb: Use a seperate endpoint for testcase submission 2018-10-28 13:23:02 +01:00