1 /* 2 * Copyright 2004-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7 #include "cpu.h" 8 9 #include <OS.h> 10 #include <boot/platform.h> 11 #include <boot/stdio.h> 12 #include <boot/kernel_args.h> 13 #include <boot/stage2.h> 14 #include <arch/cpu.h> 15 #include <arch_kernel.h> 16 #include <arch_system_info.h> 17 18 #include <string.h> 19 20 21 //#define TRACE_CPU 22 #ifdef TRACE_CPU 23 # define TRACE(x) dprintf x 24 #else 25 # define TRACE(x) ; 26 #endif 27 28 29 extern "C" void 30 spin(bigtime_t microseconds) 31 { 32 #warning U-Boot:TODO!! 33 // TODO: use API if available 34 35 // fallback to arch-specific code 36 arch_spin(microseconds); 37 } 38 39 40 extern "C" void 41 cpu_init() 42 { 43 gKernelArgs.num_cpus = 1; 44 // this will eventually be corrected later on 45 46 if (boot_arch_cpu_init() != B_OK) 47 panic("You need a 6502 or higher in order to boot!\n"); 48 } 49 50