hw: unify architectural kernel interface header

Fix genodelabs/genode#4345
This commit is contained in:
Stefan Kalkowski 2022-02-17 15:57:50 +01:00 committed by Christian Helmuth
parent b5e327e3e9
commit b5b958c276
10 changed files with 10 additions and 112 deletions

View File

@ -16,7 +16,6 @@
/* base-hw includes */
#include <kernel/types.h>
#include <kernel/interface_support.h>
namespace Kernel {

View File

@ -14,8 +14,8 @@
#ifndef _KERNEL__TYPES_H_
#define _KERNEL__TYPES_H_
/* base-hw includes */
#include <kernel/interface_support.h>
/* Genode includes */
#include <base/stdint.h>
namespace Kernel {
@ -25,6 +25,11 @@ namespace Kernel {
using time_t = Genode::uint64_t;
using timeout_t = Genode::uint32_t;
using Call_arg = Genode::umword_t;
using Call_ret = Genode::umword_t;
using Call_ret_64 = Genode::uint64_t;
constexpr capid_t cap_id_invalid() { return 0; }
}

View File

@ -1,26 +0,0 @@
/*
* \brief Interface between kernel and userland
* \author Martin Stein
* \date 2011-11-30
*/
/*
* Copyright (C) 2011-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__SPEC__ARM__KERNEL__INTERFACE_SUPPORT_H_
#define _INCLUDE__SPEC__ARM__KERNEL__INTERFACE_SUPPORT_H_
/* Genode includes */
#include <base/stdint.h>
namespace Kernel {
typedef Genode::uint32_t Call_arg;
typedef Genode::uint32_t Call_ret;
typedef Genode::uint64_t Call_ret_64;
}
#endif /* _INCLUDE__SPEC__ARM__KERNEL__INTERFACE_SUPPORT_H_ */

View File

@ -1,26 +0,0 @@
/*
* \brief Interface between kernel and userland
* \author Stefan Kalkowski
* \date 2019-05-09
*/
/*
* Copyright (C) 2019 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__SPEC__ARM_64__KERNEL__INTERFACE_SUPPORT_H_
#define _INCLUDE__SPEC__ARM_64__KERNEL__INTERFACE_SUPPORT_H_
/* Genode includes */
#include <base/stdint.h>
namespace Kernel {
typedef Genode::uint64_t Call_arg;
typedef Genode::uint64_t Call_ret;
typedef Genode::uint64_t Call_ret_64;
}
#endif /* _INCLUDE__SPEC__ARM_64__KERNEL__INTERFACE_SUPPORT_H_ */

View File

@ -1,26 +0,0 @@
/*
* \brief Interface between kernel and userland
* \author Sebastian Sumpf
* \date 2015-06-02
*/
/*
* Copyright (C) 2015-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _KERNEL__INTERFACE_SUPPORT_H_
#define _KERNEL__INTERFACE_SUPPORT_H_
/* Genode includes */
#include <base/stdint.h>
namespace Kernel {
typedef Genode::uint64_t Call_arg;
typedef Genode::uint64_t Call_ret;
typedef Genode::uint64_t Call_ret_64;
}
#endif /* _KERNEL__INTERFACE_SUPPORT_H_ */

View File

@ -1,26 +0,0 @@
/*
* \brief Interface between kernel and userland
* \author Reto Buerki
* \date 2015-02-06
*/
/*
* Copyright (C) 2015-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__SPEC__X86_64__KERNEL__INTERFACE_SUPPORT_H_
#define _INCLUDE__SPEC__X86_64__KERNEL__INTERFACE_SUPPORT_H_
/* Genode includes */
#include <base/stdint.h>
namespace Kernel {
typedef Genode::uint64_t Call_arg;
typedef Genode::uint64_t Call_ret;
typedef Genode::uint64_t Call_ret_64;
}
#endif /* _INCLUDE__SPEC__X86_64__KERNEL__INTERFACE_SUPPORT_H_ */

View File

@ -25,9 +25,8 @@
/* base-hw internal includes */
#include <hw/spec/arm/cpu.h>
/* base-hw Core includes */
/* base-hw core includes */
#include <spec/arm/address_space_id_allocator.h>
#include <kernel/interface_support.h>
#include <util.h>
namespace Kernel { struct Thread_fault; }

View File

@ -82,7 +82,7 @@ extern Genode::addr_t _kernel_entry;
** Kernel calls **
******************/
Call_ret Kernel::call64(Call_arg arg_0)
Call_ret_64 Kernel::call64(Call_arg arg_0)
{
CALL_1_FILL_ARG_REGS
asm volatile(CALL_1_SWI : "ra");

View File

@ -19,7 +19,6 @@
/* base includes */
#include <util/register.h>
#include <kernel/interface_support.h>
#include <cpu/cpu_state.h>
/* base-hw internal includes */

View File

@ -51,7 +51,7 @@ using namespace Kernel;
** Kernel calls **
******************/
Call_ret Kernel::call64(Call_arg arg_0)
Call_ret_64 Kernel::call64(Call_arg arg_0)
{
CALL_1_FILL_ARG_REGS
asm volatile(CALL_1_SWI);