diff --git a/src/system/boot/platform/u-boot/arch/arm/Jamfile b/src/system/boot/platform/u-boot/arch/arm/Jamfile index a81e46bc90..f8b00e7826 100644 --- a/src/system/boot/platform/u-boot/arch/arm/Jamfile +++ b/src/system/boot/platform/u-boot/arch/arm/Jamfile @@ -15,7 +15,7 @@ KernelMergeObject boot_platform_u-boot_arm.o : #arch_mmu.cpp #arch_cpu_asm.S arch_start_kernel.S - #cpu.cpp + arch_cpu.cpp #mmu.cpp : -fno-pic ; diff --git a/src/system/boot/platform/u-boot/arch/arm/arch_cpu.cpp b/src/system/boot/platform/u-boot/arch/arm/arch_cpu.cpp new file mode 100644 index 0000000000..676191803d --- /dev/null +++ b/src/system/boot/platform/u-boot/arch/arm/arch_cpu.cpp @@ -0,0 +1,84 @@ +/* + * Copyright 2004-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved. + * Distributed under the terms of the MIT License. + * + * calculate_cpu_conversion_factor() was written by Travis Geiselbrecht and + * licensed under the NewOS license. + */ + + +#include "cpu.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +//#define TRACE_CPU +#ifdef TRACE_CPU +# define TRACE(x) dprintf x +#else +# define TRACE(x) ; +#endif + +//uint32 gTimeConversionFactor; + + +static void +calculate_cpu_conversion_factor() +{ + #warning U-Boot:TODO! +} + + +static status_t +check_cpu_features() +{ + + #warning U-Boot:TODO! + return B_OK; +} + + +// #pragma mark - + + +extern "C" void +arch_spin(bigtime_t microseconds) +{ + for(bigtime_t i=0;i +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +//#define TRACE_CPU +#ifdef TRACE_CPU +# define TRACE(x) dprintf x +#else +# define TRACE(x) ; +#endif + +//uint32 gTimeConversionFactor; + + +static void +calculate_cpu_conversion_factor() +{ + #warning U-Boot:TODO! +} + + +static status_t +check_cpu_features() +{ + uint32 msr; + + // we do need an FPU + // on Sam460ex at least U-Boot doesn't enable the FPU for us + msr = get_msr(); + msr |= MSR_FP_AVAILABLE; + msr = set_msr(msr); + + if ((msr & MSR_FP_AVAILABLE) == 0) { + // sadly panic uses vsnprintf which fails without FPU anyway + panic("no FPU!"); + return B_ERROR; + } + + return B_OK; +} + + +// #pragma mark - + + +extern "C" void +arch_spin(bigtime_t microseconds) +{ + for(bigtime_t i=0;i