2012-06-20 08:42:16 +02:00
|
|
|
/**
|
|
|
|
* \brief Platform specific code
|
|
|
|
* \author Sebastian Sumpf
|
|
|
|
* \date 2012-06-10
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2013-01-10 21:44:47 +01:00
|
|
|
* Copyright (C) 2012-2013 Genode Labs GmbH
|
2012-06-20 08:42:16 +02:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
|
|
* under the terms of the GNU General Public License version 2.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ARM__PLATFORM_H_
|
|
|
|
#define _ARM__PLATFORM_H_
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static inline
|
|
|
|
void platform_execute(void *sp, void *func, void *arg)
|
|
|
|
{
|
|
|
|
asm volatile ("mov r0, %2;" /* set arg */
|
|
|
|
"mov sp, %0;" /* set stack */
|
|
|
|
"mov pc, %1;" /* call func */
|
|
|
|
""
|
|
|
|
: : "r"(sp), "r"(func), "r"(arg) : "r0");
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _ARM__PLATFORM_H_ */
|