From 232d95b56e4d634e21bc6d496cff6b3dae32dc14 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 22 Nov 2018 01:27:23 -0500 Subject: core: Relocate CPU core management to its own class Keeps the CPU-specific behavior from being spread throughout the main System class. This will also act as the home to contain member functions that perform operations on all cores. The reason for this being that the following pattern is sort of prevalent throughout sections of the codebase: If clearing the instruction cache for all 4 cores is necessary: Core::System::GetInstance().ArmInterface(0).ClearInstructionCache(); Core::System::GetInstance().ArmInterface(1).ClearInstructionCache(); Core::System::GetInstance().ArmInterface(2).ClearInstructionCache(); Core::System::GetInstance().ArmInterface(3).ClearInstructionCache(); This is kind of... well, silly to copy around whenever it's needed. especially when it can be reduced down to a single line. This change also puts the basics in place to begin "ungrafting" all of the forwarding member functions from the System class that are used to access CPU state or invoke CPU-specific behavior. As such, this change itself makes no changes to the direct external interface of System. This will be covered by another changeset. --- src/core/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/CMakeLists.txt') diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index a355eaca6..3d2e0767a 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -12,6 +12,8 @@ add_library(core STATIC core_timing.h core_timing_util.cpp core_timing_util.h + cpu_core_manager.cpp + cpu_core_manager.h crypto/aes_util.cpp crypto/aes_util.h crypto/encryption_layer.cpp -- cgit v1.2.3