mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-16 13:48:29 +00:00
hv: Use architectural ACTLR_EL12 on M2+ for secondary init
Fixes: 99571e5
("hv: Use architectural ACTLR_EL12 on M2+")
Signed-off-by: Janne Grunau <j@jannau.net>
This commit is contained in:
parent
5c8c3ccc7b
commit
2ef60e6360
1 changed files with 8 additions and 2 deletions
10
src/hv.c
10
src/hv.c
|
@ -137,7 +137,10 @@ void hv_start(void *entry, u64 regs[4])
|
|||
hv_secondary_info.apvmkeyhi = mrs(SYS_IMP_APL_APVMKEYHI_EL2);
|
||||
hv_secondary_info.apsts = mrs(SYS_IMP_APL_APSTS_EL12);
|
||||
hv_secondary_info.actlr_el2 = mrs(ACTLR_EL2);
|
||||
hv_secondary_info.actlr_el1 = mrs(SYS_IMP_APL_ACTLR_EL12);
|
||||
if (cpufeat_actlr_el2)
|
||||
hv_secondary_info.actlr_el1 = mrs(SYS_ACTLR_EL12);
|
||||
else
|
||||
hv_secondary_info.actlr_el1 = mrs(SYS_IMP_APL_ACTLR_EL12);
|
||||
hv_secondary_info.cnthctl = mrs(CNTHCTL_EL2);
|
||||
hv_secondary_info.sprr_config = mrs(SYS_IMP_APL_SPRR_CONFIG_EL1);
|
||||
hv_secondary_info.gxf_config = mrs(SYS_IMP_APL_GXF_CONFIG_EL1);
|
||||
|
@ -198,7 +201,10 @@ static void hv_init_secondary(struct hv_secondary_info_t *info)
|
|||
msr(SYS_IMP_APL_APVMKEYHI_EL2, info->apvmkeyhi);
|
||||
msr(SYS_IMP_APL_APSTS_EL12, info->apsts);
|
||||
msr(ACTLR_EL2, info->actlr_el2);
|
||||
msr(SYS_IMP_APL_ACTLR_EL12, info->actlr_el1);
|
||||
if (cpufeat_actlr_el2)
|
||||
msr(SYS_ACTLR_EL12, info->actlr_el1);
|
||||
else
|
||||
msr(SYS_IMP_APL_ACTLR_EL12, info->actlr_el1);
|
||||
msr(CNTHCTL_EL2, info->cnthctl);
|
||||
msr(SYS_IMP_APL_SPRR_CONFIG_EL1, info->sprr_config);
|
||||
msr(SYS_IMP_APL_GXF_CONFIG_EL1, info->gxf_config);
|
||||
|
|
Loading…
Add table
Reference in a new issue