From 9d2b73c6cb9a8734b114d037e2d81447d6d235a9 Mon Sep 17 00:00:00 2001 From: stefan Date: Wed, 5 Jan 2011 20:12:07 +0000 Subject: [PATCH] - add a workaround to use paging and the apic at the same time (we don't use __attribute__((optimize(0)))) git-svn-id: http://svn.lfbs.rwth-aachen.de/svn/scc/trunk/MetalSVM@366 315a16e6-25f9-4109-90ae-ca3045a26c18 --- arch/x86/kernel/apic.c | 4 ++-- kernel/main.c | 2 +- kernel/tests.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c index 8583bc61..740355ed 100644 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic.c @@ -35,7 +35,7 @@ /* disable optimization for the following functions */ //static int apic_send_ipi(uint32_t id, uint32_t mode, uint32_t vector) __attribute__((optimize(0))); static int wakeup_all_aps(uint32_t start_eip) __attribute__((optimize(0))); -int apic_calibration(void) __attribute__((optimize(0))); +//int apic_calibration(void) __attribute__((optimize(0))); //int ioapic_intoff(uint8_t irq, uint8_t apicid) __attribute__((optimize(0))); //int ioapic_inton(uint8_t irq, uint8_t apicid) __attribute__((optimize(0))); @@ -311,7 +311,7 @@ int apic_calibration(void) irq_disable(); #if MAX_CORES > 1 - smp_init(); + //smp_init(); #endif if (ioapic) { diff --git a/kernel/main.c b/kernel/main.c index dcad1ab9..ea0cba17 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -97,7 +97,7 @@ int main(void) kprintf("Kernel starts at %p and ends at %p\n", &kernel_start, &kernel_end); system_calibration(); - //network_init(); + network_init(); kprintf("Processor frequency: %u MHz\n", get_cpu_frequency()); kprintf("Total memory: %u MBytes\n", atomic_int32_read(&total_pages)/((1024*1024)/PAGE_SIZE)); diff --git a/kernel/tests.c b/kernel/tests.c index b256c385..e448af64 100644 --- a/kernel/tests.c +++ b/kernel/tests.c @@ -105,11 +105,11 @@ int test_init(void) sem_init(&consuming, 0); mailbox_int32_init(&mbox); - //create_kernel_task(&id1, foo, "Hello from foo1\n"); + create_kernel_task(&id1, foo, "Hello from foo1\n"); //create_kernel_task(&id2, join_test, NULL); //create_kernel_task(&id3, producer, NULL); //create_kernel_task(&id4, consumer, NULL); - create_user_task(&id5, 8192, "/bin/hello", 1, argv); + //create_user_task(&id5, 8192, "/bin/hello", 1, argv); return 0; }