diff options
author | AlmuHS <almuhs@github.com> | 2019-05-13 21:21:22 +0200 |
---|---|---|
committer | AlmuHS <almuhs@github.com> | 2019-05-13 21:21:22 +0200 |
commit | b3b57ac8bfe7e1c956aa148e8ea14007002a8d7e (patch) | |
tree | ef21d6327d6bf76e092f0403aab41db8baa645c9 | |
parent | 1b761f3de2295fa90254904bdef4b92bd73f6bac (diff) |
Revert "experiment: enable pagging in AP"
undone failed experiment
This reverts commit 4a3c2034436a02bd4f6e4178e370e882aa12e5e6.
-rw-r--r-- | i386/i386/mp_desc.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/i386/i386/mp_desc.c b/i386/i386/mp_desc.c index 1c8ca47d..7117a96f 100644 --- a/i386/i386/mp_desc.c +++ b/i386/i386/mp_desc.c @@ -51,7 +51,6 @@ #include <string.h> #include <include/stdint.h> //uint16_t, uint32_t_t... #include <imps/apic.h> -#include <i386/locore.h> /* * The i386 needs an interrupt stack to keep the PCB stack from being @@ -294,7 +293,7 @@ void startup_cpu(uint32_t apic_id) int cpu_setup() { - extern pt_entry_t *kernel_page_dir; + int i = 1; while(i < ncpu && (machine_slot[i].running == TRUE)) i++; @@ -346,30 +345,9 @@ cpu_setup() break; } -#if PAE - set_cr3((unsigned)_kvtophys(kernel_pmap->pdpbase)); -#ifndef MACH_HYP - if (!CPU_HAS_FEATURE(CPU_FEATURE_PAE)) - panic("CPU doesn't have support for PAE."); - set_cr4(get_cr4() | CR4_PAE); -#endif /* MACH_HYP */ -#else - set_cr3((unsigned)_kvtophys(kernel_page_dir)); -#endif /* PAE */ -#ifndef MACH_HYP - /* Turn paging on. - * Also set the WP bit so that on 486 or better processors - * page-level write protection works in kernel mode. - */ - set_cr0(get_cr0() | CR0_PG | CR0_WP); - set_cr0(get_cr0() & ~(CR0_CD | CR0_NW)); - if (CPU_HAS_FEATURE(CPU_FEATURE_PGE)) - set_cr4(get_cr4() | CR4_PGE); -#endif /* MACH_HYP */ - //slave_main(i); - printf("cpu %d enabled\n", cpu_number()); + //printf("cpu %d enabled\n", cpu_number()); return 0; } |