mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
target-arm: rename arm_current_pl to arm_current_el
Renamed the arm_current_pl CPU function to more accurately represent that it returns the ARMv8 EL rather than ARMv7 PL. Signed-off-by: Greg Bellows <greg.bellows@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1413910544-20150-5-git-send-email-greg.bellows@linaro.org [PMM: fixed a minor merge resolution error in a couple of hunks] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
027fc52704
commit
dcbff19bd0
8 changed files with 50 additions and 47 deletions
|
@ -361,7 +361,7 @@ void HELPER(msr_i_pstate)(CPUARMState *env, uint32_t op, uint32_t imm)
|
|||
* Note that SPSel is never OK from EL0; we rely on handle_msr_i()
|
||||
* to catch that case at translate time.
|
||||
*/
|
||||
if (arm_current_pl(env) == 0 && !(env->cp15.c1_sys & SCTLR_UMA)) {
|
||||
if (arm_current_el(env) == 0 && !(env->cp15.c1_sys & SCTLR_UMA)) {
|
||||
raise_exception(env, EXCP_UDEF);
|
||||
}
|
||||
|
||||
|
@ -388,7 +388,7 @@ void HELPER(clear_pstate_ss)(CPUARMState *env)
|
|||
void HELPER(pre_hvc)(CPUARMState *env)
|
||||
{
|
||||
ARMCPU *cpu = arm_env_get_cpu(env);
|
||||
int cur_el = arm_current_pl(env);
|
||||
int cur_el = arm_current_el(env);
|
||||
/* FIXME: Use actual secure state. */
|
||||
bool secure = false;
|
||||
bool undef;
|
||||
|
@ -428,7 +428,7 @@ void HELPER(pre_hvc)(CPUARMState *env)
|
|||
void HELPER(pre_smc)(CPUARMState *env, uint32_t syndrome)
|
||||
{
|
||||
ARMCPU *cpu = arm_env_get_cpu(env);
|
||||
int cur_el = arm_current_pl(env);
|
||||
int cur_el = arm_current_el(env);
|
||||
/* FIXME: Use real secure state. */
|
||||
bool secure = false;
|
||||
bool smd = env->cp15.scr_el3 & SCR_SMD;
|
||||
|
@ -463,7 +463,7 @@ void HELPER(pre_smc)(CPUARMState *env, uint32_t syndrome)
|
|||
|
||||
void HELPER(exception_return)(CPUARMState *env)
|
||||
{
|
||||
int cur_el = arm_current_pl(env);
|
||||
int cur_el = arm_current_el(env);
|
||||
unsigned int spsr_idx = aarch64_banked_spsr_index(cur_el);
|
||||
uint32_t spsr = env->banked_spsr[spsr_idx];
|
||||
int new_el, i;
|
||||
|
@ -580,7 +580,7 @@ static bool linked_bp_matches(ARMCPU *cpu, int lbn)
|
|||
|
||||
switch (bt) {
|
||||
case 3: /* linked context ID match */
|
||||
if (arm_current_pl(env) > 1) {
|
||||
if (arm_current_el(env) > 1) {
|
||||
/* Context matches never fire in EL2 or (AArch64) EL3 */
|
||||
return false;
|
||||
}
|
||||
|
@ -660,7 +660,7 @@ static bool bp_wp_matches(ARMCPU *cpu, int n, bool is_wp)
|
|||
* rely on this behaviour currently.
|
||||
* For breakpoints we do want to use the current CPU state.
|
||||
*/
|
||||
switch (arm_current_pl(env)) {
|
||||
switch (arm_current_el(env)) {
|
||||
case 3:
|
||||
case 2:
|
||||
if (!hmc) {
|
||||
|
@ -747,7 +747,7 @@ void arm_debug_excp_handler(CPUState *cs)
|
|||
cs->watchpoint_hit = NULL;
|
||||
if (check_watchpoints(cpu)) {
|
||||
bool wnr = (wp_hit->flags & BP_WATCHPOINT_HIT_WRITE) != 0;
|
||||
bool same_el = arm_debug_target_el(env) == arm_current_pl(env);
|
||||
bool same_el = arm_debug_target_el(env) == arm_current_el(env);
|
||||
|
||||
env->exception.syndrome = syn_watchpoint(same_el, 0, wnr);
|
||||
if (extended_addresses_enabled(env)) {
|
||||
|
@ -763,7 +763,7 @@ void arm_debug_excp_handler(CPUState *cs)
|
|||
}
|
||||
} else {
|
||||
if (check_breakpoints(cpu)) {
|
||||
bool same_el = (arm_debug_target_el(env) == arm_current_pl(env));
|
||||
bool same_el = (arm_debug_target_el(env) == arm_current_el(env));
|
||||
env->exception.syndrome = syn_breakpoint(same_el);
|
||||
if (extended_addresses_enabled(env)) {
|
||||
env->exception.fsr = (1 << 9) | 0x22;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue