diff --git a/repos/libports/lib/import/import-jitterentropy.mk b/repos/libports/lib/import/import-jitterentropy.mk index a0b5140527..9fb6b5703b 100644 --- a/repos/libports/lib/import/import-jitterentropy.mk +++ b/repos/libports/lib/import/import-jitterentropy.mk @@ -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),) diff --git a/repos/libports/lib/mk/spec/arm_v8/jitterentropy.mk b/repos/libports/lib/mk/spec/arm_v8/jitterentropy.mk new file mode 100644 index 0000000000..9b3dc833c5 --- /dev/null +++ b/repos/libports/lib/mk/spec/arm_v8/jitterentropy.mk @@ -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 = diff --git a/repos/libports/recipes/api/jitterentropy/content.mk b/repos/libports/recipes/api/jitterentropy/content.mk index 0567c222fe..9a355ec0c8 100644 --- a/repos/libports/recipes/api/jitterentropy/content.mk +++ b/repos/libports/recipes/api/jitterentropy/content.mk @@ -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 diff --git a/repos/libports/src/lib/jitterentropy/spec/arm_v8/jitterentropy-base-genode-nstime.h b/repos/libports/src/lib/jitterentropy/spec/arm_v8/jitterentropy-base-genode-nstime.h new file mode 100644 index 0000000000..1baa46406f --- /dev/null +++ b/repos/libports/src/lib/jitterentropy/spec/arm_v8/jitterentropy-base-genode-nstime.h @@ -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 */