2016-02-11 10:59:31 +00:00
|
|
|
/*
|
|
|
|
* \brief Constants definitions for the RISCV architecture.
|
|
|
|
* \author Sebastian Sumpf
|
|
|
|
* \date 2015-06-01
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 12:23:52 +00:00
|
|
|
* Copyright (C) 2015-2017 Genode Labs GmbH
|
2016-02-11 10:59:31 +00:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 12:23:52 +00:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2016-02-11 10:59:31 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INCLUDE__RISCV__CPU__CONSTS_H_
|
|
|
|
#define _INCLUDE__RISCV__CPU__CONSTS_H_
|
|
|
|
|
|
|
|
/* Genode includes */
|
|
|
|
#include <base/stdint.h>
|
|
|
|
|
|
|
|
namespace Abi {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* On RISC-V we align the stack top to 16-byte. As a call (or branch) will
|
|
|
|
* not change the stack pointer, we need no further stack adjustment.
|
|
|
|
*/
|
2016-04-21 07:10:44 +00:00
|
|
|
inline Genode::addr_t stack_align(Genode::addr_t addr) {
|
2016-02-11 10:59:31 +00:00
|
|
|
return (addr & ~0xf); }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Do ABI specific initialization to a freshly created stack
|
|
|
|
*/
|
|
|
|
inline void init_stack(Genode::addr_t) { }
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _INCLUDE__RISCV__CPU__CONSTS_H_ */
|