mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
hw: implement Pd_session::managing_system for ATF
To access the ARM Trusted Firmware from the platform driver fill the new `managing_system` call of the PD session with life resp. do a SMC call on behalf of the client. Fix #3816
This commit is contained in:
parent
06edc0d52b
commit
70f98fcc44
@ -1,18 +1,9 @@
|
||||
INC_DIR += $(REP_DIR)/src/core/spec/imx8q_evk
|
||||
INC_DIR += $(REP_DIR)/src/core/spec/arm_v8
|
||||
INC_DIR += $(REP_DIR)/src/core/spec/arm/virtualization
|
||||
|
||||
# add C++ sources
|
||||
SRC_CC += kernel/cpu_mp.cc
|
||||
SRC_CC += kernel/vm_thread_on.cc
|
||||
SRC_CC += spec/64bit/memory_map.cc
|
||||
SRC_CC += spec/arm/generic_timer.cc
|
||||
SRC_CC += spec/arm/gicv3.cc
|
||||
SRC_CC += spec/arm/kernel/lock.cc
|
||||
SRC_CC += spec/arm/platform_support.cc
|
||||
SRC_CC += spec/arm_v8/cpu.cc
|
||||
SRC_CC += spec/arm_v8/kernel/cpu.cc
|
||||
SRC_CC += spec/arm_v8/kernel/thread.cc
|
||||
SRC_CC += spec/arm_v8/virtualization/kernel/vm.cc
|
||||
SRC_CC += spec/arm/virtualization/platform_services.cc
|
||||
SRC_CC += spec/arm/virtualization/vm_session_component.cc
|
||||
@ -20,13 +11,9 @@ SRC_CC += vm_session_common.cc
|
||||
SRC_CC += vm_session_component.cc
|
||||
|
||||
#add assembly sources
|
||||
SRC_S += spec/arm_v8/exception_vector.s
|
||||
SRC_S += spec/arm_v8/crt0.s
|
||||
SRC_S += spec/arm_v8/virtualization/exception_vector.s
|
||||
|
||||
vpath spec/64bit/memory_map.cc $(REP_DIR)/src/lib/hw
|
||||
|
||||
NR_OF_CPUS = 4
|
||||
|
||||
# include less specific configuration
|
||||
include $(REP_DIR)/lib/mk/core-hw.inc
|
||||
include $(REP_DIR)/lib/mk/spec/arm_v8/core-hw.inc
|
||||
|
@ -1,26 +1,11 @@
|
||||
INC_DIR += $(REP_DIR)/src/core/spec/rpi3
|
||||
INC_DIR += $(REP_DIR)/src/core/spec/arm_v8
|
||||
|
||||
# add C++ sources
|
||||
SRC_CC += kernel/cpu_mp.cc
|
||||
SRC_CC += kernel/vm_thread_off.cc
|
||||
SRC_CC += platform_services.cc
|
||||
SRC_CC += spec/64bit/memory_map.cc
|
||||
SRC_CC += spec/arm/bcm2837_pic.cc
|
||||
SRC_CC += spec/arm/generic_timer.cc
|
||||
SRC_CC += spec/arm/kernel/lock.cc
|
||||
SRC_CC += spec/arm/platform_support.cc
|
||||
SRC_CC += spec/arm_v8/cpu.cc
|
||||
SRC_CC += spec/arm_v8/kernel/cpu.cc
|
||||
SRC_CC += spec/arm_v8/kernel/thread.cc
|
||||
|
||||
#add assembly sources
|
||||
SRC_S += spec/arm_v8/exception_vector.s
|
||||
SRC_S += spec/arm_v8/crt0.s
|
||||
|
||||
vpath spec/64bit/memory_map.cc $(REP_DIR)/src/lib/hw
|
||||
|
||||
NR_OF_CPUS = 4
|
||||
|
||||
# include less specific configuration
|
||||
include $(REP_DIR)/lib/mk/core-hw.inc
|
||||
include $(REP_DIR)/lib/mk/spec/arm_v8/core-hw.inc
|
||||
|
@ -1,18 +1,9 @@
|
||||
INC_DIR += $(REP_DIR)/src/core/spec/virt_qemu_64
|
||||
INC_DIR += $(REP_DIR)/src/core/spec/arm_v8
|
||||
INC_DIR += $(REP_DIR)/src/core/spec/arm/virtualization
|
||||
|
||||
# add C++ sources
|
||||
SRC_CC += kernel/cpu_mp.cc
|
||||
SRC_CC += kernel/vm_thread_on.cc
|
||||
SRC_CC += spec/64bit/memory_map.cc
|
||||
SRC_CC += spec/arm/generic_timer.cc
|
||||
SRC_CC += spec/arm/gicv3.cc
|
||||
SRC_CC += spec/arm/kernel/lock.cc
|
||||
SRC_CC += spec/arm/platform_support.cc
|
||||
SRC_CC += spec/arm_v8/cpu.cc
|
||||
SRC_CC += spec/arm_v8/kernel/cpu.cc
|
||||
SRC_CC += spec/arm_v8/kernel/thread.cc
|
||||
SRC_CC += spec/arm_v8/virtualization/kernel/vm.cc
|
||||
SRC_CC += spec/arm/virtualization/platform_services.cc
|
||||
SRC_CC += spec/arm/virtualization/vm_session_component.cc
|
||||
@ -20,13 +11,9 @@ SRC_CC += vm_session_common.cc
|
||||
SRC_CC += vm_session_component.cc
|
||||
|
||||
#add assembly sources
|
||||
SRC_S += spec/arm_v8/exception_vector.s
|
||||
SRC_S += spec/arm_v8/crt0.s
|
||||
SRC_S += spec/arm_v8/virtualization/exception_vector.s
|
||||
|
||||
vpath spec/64bit/memory_map.cc $(REP_DIR)/src/lib/hw
|
||||
|
||||
NR_OF_CPUS = 4
|
||||
|
||||
# include less specific configuration
|
||||
include $(REP_DIR)/lib/mk/core-hw.inc
|
||||
include $(REP_DIR)/lib/mk/spec/arm_v8/core-hw.inc
|
||||
|
22
repos/base-hw/lib/mk/spec/arm_v8/core-hw.inc
Normal file
22
repos/base-hw/lib/mk/spec/arm_v8/core-hw.inc
Normal file
@ -0,0 +1,22 @@
|
||||
INC_DIR += $(REP_DIR)/src/core/spec/arm_v8
|
||||
|
||||
# add C++ sources
|
||||
SRC_CC += kernel/cpu_mp.cc
|
||||
SRC_CC += spec/64bit/memory_map.cc
|
||||
SRC_CC += spec/arm/generic_timer.cc
|
||||
SRC_CC += spec/arm/kernel/lock.cc
|
||||
SRC_CC += spec/arm/platform_support.cc
|
||||
SRC_CC += spec/arm_v8/cpu.cc
|
||||
SRC_CC += spec/arm_v8/kernel/cpu.cc
|
||||
SRC_CC += spec/arm_v8/kernel/thread.cc
|
||||
|
||||
#add assembly sources
|
||||
SRC_S += spec/arm_v8/exception_vector.s
|
||||
SRC_S += spec/arm_v8/crt0.s
|
||||
|
||||
vpath pd_session_support.cc $(REP_DIR)/src/core/spec/arm_v8
|
||||
vpath spec/64bit/memory_map.cc $(REP_DIR)/src/lib/hw
|
||||
|
||||
# include less specific configuration
|
||||
include $(REP_DIR)/lib/mk/core-hw.inc
|
||||
|
36
repos/base-hw/src/core/spec/arm_v8/pd_session_support.cc
Normal file
36
repos/base-hw/src/core/spec/arm_v8/pd_session_support.cc
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* \brief Core implementation of the PD session interface
|
||||
* \author Stefan Kalkowski
|
||||
* \date 2020-07-10
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2020 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.
|
||||
*/
|
||||
|
||||
#include <cpu/cpu_state.h>
|
||||
#include <hw/spec/arm_64/psci_call.h>
|
||||
#include <pd_session_component.h>
|
||||
|
||||
using namespace Genode;
|
||||
using State = Genode::Pd_session::Managing_system_state;
|
||||
|
||||
State Pd_session_component::managing_system(State const & s)
|
||||
{
|
||||
State ret;
|
||||
ret.r[0] = Hw::Psci_smc_functor::call(s.r[0], s.r[1], s.r[2], s.r[3]);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/***************************
|
||||
** Dummy implementations **
|
||||
***************************/
|
||||
|
||||
bool Pd_session_component::assign_pci(addr_t, uint16_t) { return true; }
|
||||
|
||||
void Pd_session_component::map(addr_t, addr_t) { }
|
||||
|
Loading…
Reference in New Issue
Block a user