base-hw: clean up native_types.h

This commit is contained in:
Norman Feske 2016-03-10 19:09:38 +01:00
parent 84bfb4c04c
commit dc0ebba1ec
3 changed files with 23 additions and 30 deletions

View File

@ -28,11 +28,6 @@ namespace Genode
typedef int Native_connection_state;
/**
* Information that a thread creator hands out to a new thread
*/
class Start_info;
/**
* Coherent address region
*/
@ -47,29 +42,5 @@ struct Genode::Native_thread
};
/**
* Coherent address region
*/
struct Genode::Native_region
{
addr_t base;
size_t size;
};
namespace Genode
{
static constexpr addr_t VIRT_ADDR_SPACE_START = 0x1000;
static constexpr size_t VIRT_ADDR_SPACE_SIZE = 0xfffee000;
/**
* The main thread's UTCB, used during bootstrap of the main thread before it
* allocates its stack area, needs to be outside the virtual memory area
* controlled by the RM session, because it is needed before the main
* thread can access its RM session.
*/
static constexpr Native_utcb * utcb_main_thread() {
return (Native_utcb *) (VIRT_ADDR_SPACE_START + VIRT_ADDR_SPACE_SIZE); }
}
#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */

View File

@ -23,6 +23,12 @@
namespace Genode
{
struct Native_region
{
addr_t base;
size_t size;
};
enum {
ACTIVITY_TABLE_ON_FAULTS = 0,
};

View File

@ -25,7 +25,23 @@
/* kernel includes */
#include <kernel/interface.h>
namespace Genode { struct Native_utcb; }
namespace Genode {
struct Native_utcb;
static constexpr addr_t VIRT_ADDR_SPACE_START = 0x1000;
static constexpr size_t VIRT_ADDR_SPACE_SIZE = 0xfffee000;
/**
* The main thread's UTCB, used during bootstrap of the main thread before it
* allocates its stack area, needs to be outside the virtual memory area
* controlled by the RM session, because it is needed before the main
* thread can access its RM session.
*/
static constexpr Native_utcb * utcb_main_thread() {
return (Native_utcb *) (VIRT_ADDR_SPACE_START + VIRT_ADDR_SPACE_SIZE); }
}
class Genode::Native_utcb
{