Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
enable_ccr.c
Go to the documentation of this file.
1
#include <linux/module.h>
2
#include <linux/kernel.h>
3
4
void
enable_ccr
(
void
*info)
5
{
6
#ifdef __aarch64__
7
asm
volatile
(
"MSR PMUSERENR_EL0, %0"
::
"r"
(1));
8
asm
volatile
(
"MSR PMCR_EL0, %0"
::
"r"
(1));
9
asm
volatile
(
"MSR PMCNTENSET_EL0, %0"
::
"r"
(0x80000000));
10
#else
11
asm
volatile
(
"mcr p15, 0, %0, c9, c14, 0"
::
"r"
(1));
12
asm
volatile
(
"mcr p15, 0, %0, c9, c12, 0"
::
"r"
(1 | 16));
13
asm
volatile
(
"mcr p15, 0, %0, c9, c12, 1"
::
"r"
(0x8000000f));
14
#endif
15
}
16
17
int
init_module
(
void
)
18
{
19
on_each_cpu(
enable_ccr
, NULL, 0);
20
printk(KERN_INFO
"Userspace access to CCR enabled\n"
);
21
return
0;
22
}
23
24
MODULE_LICENSE
(
"CC0"
);
enable_ccr
void enable_ccr(void *info)
Definition
enable_ccr.c:4
MODULE_LICENSE
MODULE_LICENSE("CC0")
init_module
int init_module(void)
Definition
enable_ccr.c:17
E:
pqc-engineering-ssec-23
c-code
benchmarks
enable_ccr
enable_ccr.c
Generated by
1.14.0