From f70172129c94e4d53b56fc10a7d859679b581bd2 Mon Sep 17 00:00:00 2001 From: kaashoek Date: Thu, 7 Sep 2006 01:37:58 +0000 Subject: run without lapic and ioapic, if they are not present if no lapic available, use 8253pit for clock now xv6 runs both on qemu (uniprocessor) and bochs (uniprocessor and MP) --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index dba8bdd..876c20a 100644 --- a/main.c +++ b/main.c @@ -71,8 +71,11 @@ main0(void) // start other CPUs mp_startthem(); - // turn on timer and enable interrupts on the local APIC - lapic_timerinit(); + // turn on timer + if (ismp) lapic_timerinit(); + else pit8253_timerinit(); + + // enable interrupts on the local APIC lapic_enableintr(); // Enable interrupts on this processor. -- cgit v1.2.3