diff --git a/src/system/libroot/os/arch/arm/Jamfile b/src/system/libroot/os/arch/arm/Jamfile index 52b5f241fb..2ebb171b6d 100644 --- a/src/system/libroot/os/arch/arm/Jamfile +++ b/src/system/libroot/os/arch/arm/Jamfile @@ -9,6 +9,7 @@ MergeObject os_arch_$(TARGET_ARCH).o : atomic.S byteorder.S system_time.c + stack_frame.c thread.c time.c tls.c diff --git a/src/system/libroot/os/arch/arm/stack_frame.c b/src/system/libroot/os/arch/arm/stack_frame.c new file mode 100644 index 0000000000..30223cbcea --- /dev/null +++ b/src/system/libroot/os/arch/arm/stack_frame.c @@ -0,0 +1,27 @@ +/* + * Copyright 2012, Haiku, Inc. + * Distributed under the terms of the MIT License. + * + * Authors: + * François Revol + */ + +#include + +#include + + +void* +get_stack_frame(void) +{ + // TODO: Implement! + return NULL; +} + + +void* +__arch_get_caller(void) +{ + // TODO: Implement! + return NULL; +} diff --git a/src/system/libroot/os/arch/arm/system_time.c b/src/system/libroot/os/arch/arm/system_time.c index 7fd1fd4dd1..6514ae92e4 100644 --- a/src/system/libroot/os/arch/arm/system_time.c +++ b/src/system/libroot/os/arch/arm/system_time.c @@ -1,6 +1,9 @@ /* - * Copyright 2006, Ingo Weinhold . - * All rights reserved. Distributed under the terms of the MIT License. + * Copyright 2012, Haiku, Inc. + * Distributed under the terms of the MIT License. + * + * Authors: + * François Revol */ #include @@ -9,10 +12,29 @@ #include #include +static vint32 *sConversionFactor; + +void +__arm_setup_system_time(vint32 *cvFactor) +{ + sConversionFactor = cvFactor; +} + + +//XXX: this is a hack +// remove me when platform code works +static int64 +__arm_get_time_base(void) +{ + static uint64 time_dilation_field = 0; + return time_dilation_field++; +} bigtime_t system_time(void) { -#warning ARM:WRITEME - return 0; + uint64 timeBase = __arm_get_time_base(); + + uint32 cv = *sConversionFactor; + return (timeBase >> 32) * cv + (((timeBase & 0xffffffff) * cv) >> 32); }