mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
sel4: import parent cap into non-core components
This commit is contained in:
parent
1ea22f82fa
commit
3259185bfc
10
repos/base-sel4/lib/mk/x86_32/startup.mk
Normal file
10
repos/base-sel4/lib/mk/x86_32/startup.mk
Normal file
@ -0,0 +1,10 @@
|
||||
#
|
||||
# Make the includes of src/base/internal/ available to the startup lib. This is
|
||||
# needed because the seL4-specific src/platform/_main_parent_cap.h as included
|
||||
# by the startup lib depends on the internal/capability_space_sel4.h.
|
||||
#
|
||||
INC_DIR += $(REP_DIR)/src/base
|
||||
|
||||
include $(BASE_DIR)/lib/mk/startup.inc
|
||||
|
||||
vpath crt0.s $(BASE_DIR)/src/platform/x86_32
|
39
repos/base-sel4/src/platform/_main_parent_cap.h
Normal file
39
repos/base-sel4/src/platform/_main_parent_cap.h
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* \brief Obtain parent capability
|
||||
* \author Norman Feske
|
||||
* \date 2015-05-12
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2015 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
#ifndef _PLATFORM__MAIN_PARENT_CAP_H_
|
||||
#define _PLATFORM__MAIN_PARENT_CAP_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <util/string.h>
|
||||
|
||||
/* base-internal includes */
|
||||
#include <internal/capability_space_sel4.h>
|
||||
|
||||
namespace Genode {
|
||||
|
||||
/**
|
||||
* Return constructed parent capability
|
||||
*/
|
||||
Parent_capability parent_cap()
|
||||
{
|
||||
Capability_space::Ipc_cap_data const
|
||||
ipc_cap_data(Rpc_obj_key(), INITIAL_SEL_PARENT);
|
||||
|
||||
Native_capability cap = Capability_space::import(ipc_cap_data);
|
||||
|
||||
return reinterpret_cap_cast<Parent>(cap);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* _PLATFORM__MAIN_PARENT_CAP_H_ */
|
Loading…
x
Reference in New Issue
Block a user