1 /*
2  * Copyright 2018 The Hafnium Authors.
3  *
4  * Use of this source code is governed by a BSD-style
5  * license that can be found in the LICENSE file or at
6  * https://opensource.org/licenses/BSD-3-Clause.
7  */
8 
9 #include "hf/arch/vm/state.h"
10 
11 #include "msr.h"
12 
per_cpu_ptr_set(uintptr_t v)13 void per_cpu_ptr_set(uintptr_t v)
14 {
15 	write_msr(tpidr_el1, v);
16 }
17 
per_cpu_ptr_get(void)18 uintptr_t per_cpu_ptr_get(void)
19 {
20 	return read_msr(tpidr_el1);
21 }
22