diff mbox

[10/16] target-arm: Implement cpu_get_phys_page_asidx_debug

Message ID 1446747358-18214-11-git-send-email-peter.maydell@linaro.org
State New
Headers show

Commit Message

Peter Maydell Nov. 5, 2015, 6:15 p.m. UTC
Implement cpu_get_phys_page_asidx_debug instead of cpu_get_phys_page_debug.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 target-arm/cpu-qom.h | 2 +-
 target-arm/cpu.c     | 2 +-
 target-arm/helper.c  | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)

Comments

Edgar E. Iglesias Nov. 6, 2015, 2:23 p.m. UTC | #1
On Thu, Nov 05, 2015 at 06:15:52PM +0000, Peter Maydell wrote:
> Implement cpu_get_phys_page_asidx_debug instead of cpu_get_phys_page_debug.


Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>


> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  target-arm/cpu-qom.h | 2 +-
>  target-arm/cpu.c     | 2 +-
>  target-arm/helper.c  | 3 ++-
>  3 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/target-arm/cpu-qom.h b/target-arm/cpu-qom.h
> index 25fb1ce..53d3129 100644
> --- a/target-arm/cpu-qom.h
> +++ b/target-arm/cpu-qom.h
> @@ -216,7 +216,7 @@ bool arm_cpu_exec_interrupt(CPUState *cpu, int int_req);
>  void arm_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf,
>                          int flags);
>  
> -hwaddr arm_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
> +hwaddr arm_cpu_get_phys_page_asidx_debug(CPUState *cpu, vaddr addr, int *asidx);
>  
>  int arm_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg);
>  int arm_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
> diff --git a/target-arm/cpu.c b/target-arm/cpu.c
> index 30739fc..7789d50 100644
> --- a/target-arm/cpu.c
> +++ b/target-arm/cpu.c
> @@ -1417,7 +1417,7 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)
>      cc->handle_mmu_fault = arm_cpu_handle_mmu_fault;
>  #else
>      cc->do_interrupt = arm_cpu_do_interrupt;
> -    cc->get_phys_page_debug = arm_cpu_get_phys_page_debug;
> +    cc->get_phys_page_asidx_debug = arm_cpu_get_phys_page_asidx_debug;
>      cc->vmsd = &vmstate_arm_cpu;
>      cc->virtio_is_big_endian = arm_cpu_is_big_endian;
>  #endif
> diff --git a/target-arm/helper.c b/target-arm/helper.c
> index 242928d..db7e81a 100644
> --- a/target-arm/helper.c
> +++ b/target-arm/helper.c
> @@ -7327,7 +7327,7 @@ bool arm_tlb_fill(CPUState *cs, vaddr address,
>      return ret;
>  }
>  
> -hwaddr arm_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
> +hwaddr arm_cpu_get_phys_page_asidx_debug(CPUState *cs, vaddr addr, int *asidx)
>  {
>      ARMCPU *cpu = ARM_CPU(cs);
>      CPUARMState *env = &cpu->env;
> @@ -7346,6 +7346,7 @@ hwaddr arm_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
>          return -1;
>      }
>  
> +    *asidx = arm_asidx(cs, attrs.secure);
>      return phys_addr;
>  }
>  
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/target-arm/cpu-qom.h b/target-arm/cpu-qom.h
index 25fb1ce..53d3129 100644
--- a/target-arm/cpu-qom.h
+++ b/target-arm/cpu-qom.h
@@ -216,7 +216,7 @@  bool arm_cpu_exec_interrupt(CPUState *cpu, int int_req);
 void arm_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf,
                         int flags);
 
-hwaddr arm_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
+hwaddr arm_cpu_get_phys_page_asidx_debug(CPUState *cpu, vaddr addr, int *asidx);
 
 int arm_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg);
 int arm_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index 30739fc..7789d50 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -1417,7 +1417,7 @@  static void arm_cpu_class_init(ObjectClass *oc, void *data)
     cc->handle_mmu_fault = arm_cpu_handle_mmu_fault;
 #else
     cc->do_interrupt = arm_cpu_do_interrupt;
-    cc->get_phys_page_debug = arm_cpu_get_phys_page_debug;
+    cc->get_phys_page_asidx_debug = arm_cpu_get_phys_page_asidx_debug;
     cc->vmsd = &vmstate_arm_cpu;
     cc->virtio_is_big_endian = arm_cpu_is_big_endian;
 #endif
diff --git a/target-arm/helper.c b/target-arm/helper.c
index 242928d..db7e81a 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -7327,7 +7327,7 @@  bool arm_tlb_fill(CPUState *cs, vaddr address,
     return ret;
 }
 
-hwaddr arm_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
+hwaddr arm_cpu_get_phys_page_asidx_debug(CPUState *cs, vaddr addr, int *asidx)
 {
     ARMCPU *cpu = ARM_CPU(cs);
     CPUARMState *env = &cpu->env;
@@ -7346,6 +7346,7 @@  hwaddr arm_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
         return -1;
     }
 
+    *asidx = arm_asidx(cs, attrs.secure);
     return phys_addr;
 }