diff --git a/headers/private/kernel/arch/x86/stage2_priv.h b/headers/private/kernel/arch/x86/stage2_priv.h index b5a8ecadcd..867b5af7d8 100755 --- a/headers/private/kernel/arch/x86/stage2_priv.h +++ b/headers/private/kernel/arch/x86/stage2_priv.h @@ -11,7 +11,7 @@ extern void clearscreen(void); extern void kputs(const char *str); extern int dprintf(const char *fmt, ...); -extern void sleep(uint64 time); +extern void spin(uint64 microseconds); extern void execute_n_instructions(int count); void system_time_setup(long a); uint64 rdtsc(); diff --git a/src/kernel/boot/arch/x86/smp_boot.c b/src/kernel/boot/arch/x86/smp_boot.c index 7a8d6601d2..a5c7be4287 100644 --- a/src/kernel/boot/arch/x86/smp_boot.c +++ b/src/kernel/boot/arch/x86/smp_boot.c @@ -398,7 +398,7 @@ smp_boot_all_cpus(kernel_args *ka) ; /* wait 10ms */ - sleep(10000); + spin(10000); /* is this a local apic or an 82489dx ? */ num_startups = (ka->arch_args.cpu_apic_version[i] & 0xf0) ? 2 : 0; @@ -416,7 +416,7 @@ smp_boot_all_cpus(kernel_args *ka) apic_write(APIC_ICR1, config); /* wait */ - sleep(200); + spin(200); while ((apic_read(APIC_ICR1)& 0x00001000) == 0x00001000) ; diff --git a/src/kernel/boot/arch/x86/stage2.c b/src/kernel/boot/arch/x86/stage2.c index 6c1edcce92..583df0a154 100644 --- a/src/kernel/boot/arch/x86/stage2.c +++ b/src/kernel/boot/arch/x86/stage2.c @@ -598,11 +598,11 @@ check_cpu(void) void -sleep(uint64 time) +spin(uint64 microseconds) { uint64 start = system_time(); - while(system_time() - start <= time) + while (system_time() - start <= microseconds) ; }