xref: /openbmc/qemu/bsd-user/aarch64/target_arch_cpu.c (revision 029e13a8a56a2931e7c24c0db52ae7256b932cb0)
1*8cbb4fc1SStacey Son /*
2*8cbb4fc1SStacey Son  * ARM AArch64 specific CPU for bsd-user
3*8cbb4fc1SStacey Son  *
4*8cbb4fc1SStacey Son  * Copyright (c) 2015 Stacey Son
5*8cbb4fc1SStacey Son  *
6*8cbb4fc1SStacey Son  * This library is free software; you can redistribute it and/or
7*8cbb4fc1SStacey Son  * modify it under the terms of the GNU Lesser General Public
8*8cbb4fc1SStacey Son  * License as published by the Free Software Foundation; either
9*8cbb4fc1SStacey Son  * version 2 of the License, or (at your option) any later version.
10*8cbb4fc1SStacey Son  *
11*8cbb4fc1SStacey Son  * This library is distributed in the hope that it will be useful,
12*8cbb4fc1SStacey Son  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13*8cbb4fc1SStacey Son  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14*8cbb4fc1SStacey Son  * Lesser General Public License for more details.
15*8cbb4fc1SStacey Son  *
16*8cbb4fc1SStacey Son  * You should have received a copy of the GNU Lesser General Public
17*8cbb4fc1SStacey Son  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
18*8cbb4fc1SStacey Son  */
19*8cbb4fc1SStacey Son #include "qemu/osdep.h"
20*8cbb4fc1SStacey Son #include "target_arch.h"
21*8cbb4fc1SStacey Son 
22*8cbb4fc1SStacey Son /* See cpu_set_user_tls() in arm64/arm64/vm_machdep.c */
target_cpu_set_tls(CPUARMState * env,target_ulong newtls)23*8cbb4fc1SStacey Son void target_cpu_set_tls(CPUARMState *env, target_ulong newtls)
24*8cbb4fc1SStacey Son {
25*8cbb4fc1SStacey Son     env->cp15.tpidr_el[0] = newtls;
26*8cbb4fc1SStacey Son }
27*8cbb4fc1SStacey Son 
target_cpu_get_tls(CPUARMState * env)28*8cbb4fc1SStacey Son target_ulong target_cpu_get_tls(CPUARMState *env)
29*8cbb4fc1SStacey Son {
30*8cbb4fc1SStacey Son     return env->cp15.tpidr_el[0];
31*8cbb4fc1SStacey Son }
32