jitterentropy: ARM 64-Bit version

issue #3407
This commit is contained in:
Sebastian Sumpf 2019-05-29 13:28:47 +02:00 committed by Christian Helmuth
parent 59347d2560
commit e43b848ac8
4 changed files with 33 additions and 1 deletions

View File

@ -6,6 +6,8 @@ else ifeq ($(filter-out $(SPECS),arm_v6),)
TARGET_CPUARCH=arm_v6
else ifeq ($(filter-out $(SPECS),arm_v7),)
TARGET_CPUARCH=arm_v7
else ifeq ($(filter-out $(SPECS),arm_v8),)
TARGET_CPUARCH=arm_v8
endif
ifeq ($(CONTRIB_DIR),)

View File

@ -0,0 +1,5 @@
INC_DIR += $(REP_DIR)/src/lib/jitterentropy/spec/arm_v8
include $(REP_DIR)/lib/mk/jitterentropy.inc
CC_CXX_WARN_STRICT =

View File

@ -1,6 +1,6 @@
MIRROR_FROM_REP_DIR := lib/mk/jitterentropy.inc \
lib/import/import-jitterentropy.mk \
$(foreach SPEC,arm_v6 arm_v7 x86_32 x86_64,\
$(foreach SPEC,arm_v6 arm_v7 arm_v8 x86_32 x86_64,\
lib/mk/spec/$(SPEC)/jitterentropy.mk) \
src/lib/jitterentropy

View File

@ -0,0 +1,25 @@
/*
* \brief Time backend for jitterentropy library
* \author Sebastian Sumpf
* \date 2014-05-29
*/
/*
* 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 _JITTERENTROPY_ARM_V8__BASE_GENODE_NSTIME_H_
#define _JITTERENTROPY_ARM_V8__BASE_GENODE_NSTIME_H_
static inline void jent_get_nstime(__u64 *out)
{
uint64_t t;
/* cycle counter */
asm volatile("mrs %0, pmccntr_el0" : "=r" (t));
*out = t;
}
#endif /* _JITTERENTROPY_ARM_V8_BASE_GENODE_NSTIME_H */