diff options
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/system.cc | 14 | ||||
-rw-r--r-- | src/arch/x86/utility.cc | 15 | ||||
-rw-r--r-- | src/arch/x86/utility.hh | 2 |
3 files changed, 14 insertions, 17 deletions
diff --git a/src/arch/x86/system.cc b/src/arch/x86/system.cc index 096f10f5e..b0dab7bed 100644 --- a/src/arch/x86/system.cc +++ b/src/arch/x86/system.cc @@ -43,6 +43,7 @@ #include "arch/x86/bios/intelmp.hh" #include "arch/x86/bios/smbios.hh" +#include "arch/x86/faults.hh" #include "arch/x86/isa_traits.hh" #include "base/loader/object_file.hh" #include "cpu/thread_context.hh" @@ -107,6 +108,19 @@ X86System::initState() { System::initState(); + for (auto *tc: threadContexts) { + X86ISA::InitInterrupt(0).invoke(tc); + + if (tc->contextId() == 0) { + tc->activate(); + } else { + // This is an application processor (AP). It should be initialized + // to look like only the BIOS POST has run on it and put then put + // it into a halted state. + tc->suspend(); + } + } + if (!kernel) fatal("No kernel to load.\n"); diff --git a/src/arch/x86/utility.cc b/src/arch/x86/utility.cc index 21765ceae..6f91a176e 100644 --- a/src/arch/x86/utility.cc +++ b/src/arch/x86/utility.cc @@ -72,21 +72,6 @@ getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp) } void -initCPU(ThreadContext *tc, int cpuId) -{ - InitInterrupt(0).invoke(tc); - - if (cpuId == 0) { - tc->activate(); - } else { - // This is an application processor (AP). It should be initialized to - // look like only the BIOS POST has run on it and put then put it into - // a halted state. - tc->suspend(); - } -} - -void copyMiscRegs(ThreadContext *src, ThreadContext *dest) { // This function assumes no side effects other than TLB invalidation diff --git a/src/arch/x86/utility.hh b/src/arch/x86/utility.hh index 88c7a17e4..7559b4bca 100644 --- a/src/arch/x86/utility.hh +++ b/src/arch/x86/utility.hh @@ -69,8 +69,6 @@ namespace X86ISA } } - void initCPU(ThreadContext *tc, int cpuId); - void copyRegs(ThreadContext *src, ThreadContext *dest); void copyMiscRegs(ThreadContext *src, ThreadContext *dest); |