2012-06-20 08:42:16 +02:00
|
|
|
/**
|
|
|
|
* \brief Platform specific code
|
|
|
|
* \author Sebastian Sumpf
|
2013-02-27 12:05:44 +01:00
|
|
|
* \author Alexander Boettcher
|
2012-06-20 08:42:16 +02:00
|
|
|
* \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.
|
|
|
|
*/
|
|
|
|
|
2013-02-27 12:05:44 +01:00
|
|
|
#ifndef _X86_64__PLATFORM_H_
|
|
|
|
#define _X86_64__PLATFORM_H_
|
2012-06-20 08:42:16 +02:00
|
|
|
|
2012-06-25 16:31:04 +02:00
|
|
|
#include <platform.h>
|
|
|
|
|
2012-06-20 08:42:16 +02:00
|
|
|
static inline
|
|
|
|
void platform_execute(void *sp, void *func, void *arg)
|
|
|
|
{
|
2013-02-27 12:05:44 +01:00
|
|
|
asm volatile ("movq %2, %%rdi;"
|
|
|
|
"movq %1, 0(%0);"
|
|
|
|
"movq %0, %%rsp;"
|
|
|
|
"call *0(%%rsp);"
|
|
|
|
: "+r" (sp), "+r" (func), "+r" (arg) : : "memory");
|
2012-06-20 08:42:16 +02:00
|
|
|
}
|
|
|
|
|
2013-02-27 12:05:44 +01:00
|
|
|
#endif /* _X86_64__PLATFORM_H_ */
|