File: arm_user_sysreg.h

package info (click to toggle)
optee-os 4.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,960 kB
  • sloc: ansic: 444,388; asm: 12,922; python: 3,719; makefile: 1,681; sh: 238
file content (35 lines) | stat: -rw-r--r-- 552 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* SPDX-License-Identifier: BSD-2-Clause */
/*
 * Copyright (c) 2019, Linaro Limited
 */
#ifndef ARM_USER_SYSREG_H
#define ARM_USER_SYSREG_H

#include <util.h>

#ifdef ARM32
#include <arm32_user_sysreg.h>
#endif

#ifdef ARM64
#include <arm64_user_sysreg.h>
#endif

#ifndef __ASSEMBLER__
static inline __noprof void isb(void)
{
	asm volatile ("isb");
}

static inline __noprof uint64_t barrier_read_counter_timer(void)
{
	isb();
#ifdef CFG_CORE_SEL2_SPMC
	return read_cntvct();
#else
	return read_cntpct();
#endif
}
#endif

#endif /*ARM_USER_SYSREG_H*/