2013-01-22 22:53:24 +04:00
|
|
|
#ifndef __CR_ASM_RESTORE_H__
|
|
|
|
#define __CR_ASM_RESTORE_H__
|
|
|
|
|
2013-11-05 12:32:55 +04:00
|
|
|
#include "asm/restorer.h"
|
|
|
|
|
|
|
|
#include "protobuf/core.pb-c.h"
|
|
|
|
|
2013-12-11 14:03:12 -08:00
|
|
|
#define JUMP_TO_RESTORER_BLOB(new_sp, restore_task_exec_start, \
|
2013-01-22 22:53:24 +04:00
|
|
|
task_args) \
|
|
|
|
asm volatile( \
|
|
|
|
"mov %%sp, %%%0 \n" \
|
|
|
|
"mov %%r1, %%%1 \n" \
|
|
|
|
"mov %%r0, %%%2 \n" \
|
2013-12-11 14:03:12 -08:00
|
|
|
"bx %%r1 \n" \
|
2013-01-22 22:53:24 +04:00
|
|
|
: \
|
|
|
|
: "r"(new_sp), \
|
|
|
|
"r"(restore_task_exec_start), \
|
|
|
|
"r"(task_args) \
|
|
|
|
: "sp", "r0", "r1", "memory")
|
|
|
|
|
|
|
|
static inline void core_get_tls(CoreEntry *pcore, u32 *ptls)
|
|
|
|
{
|
|
|
|
*ptls = pcore->ti_arm->tls;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-06-01 17:37:12 +04:00
|
|
|
int restore_fpu(struct rt_sigframe *sigframe, CoreEntry *core);
|
2013-01-22 22:53:24 +04:00
|
|
|
|
|
|
|
#endif
|