remove uc->cpus
This commit is contained in:
@@ -284,45 +284,33 @@ static void tlbimvaa_write(CPUARMState *env, const ARMCPRegInfo *ri,
|
||||
static void tlbiall_is_write(CPUARMState *env, const ARMCPRegInfo *ri,
|
||||
uint64_t value)
|
||||
{
|
||||
CPUState *other_cs;
|
||||
struct uc_struct *uc = env->uc;
|
||||
|
||||
CPU_FOREACH(other_cs) {
|
||||
tlb_flush(other_cs, 1);
|
||||
}
|
||||
// TODO: issue #642
|
||||
// tlb_flush(other_cpu, 1);
|
||||
}
|
||||
|
||||
static void tlbiasid_is_write(CPUARMState *env, const ARMCPRegInfo *ri,
|
||||
uint64_t value)
|
||||
{
|
||||
CPUState *other_cs;
|
||||
struct uc_struct *uc = env->uc;
|
||||
|
||||
CPU_FOREACH(other_cs) {
|
||||
tlb_flush(other_cs, value == 0);
|
||||
}
|
||||
// TODO: issue #642
|
||||
// tlb_flush(other_cpu, value == 0);
|
||||
}
|
||||
|
||||
static void tlbimva_is_write(CPUARMState *env, const ARMCPRegInfo *ri,
|
||||
uint64_t value)
|
||||
{
|
||||
CPUState *other_cs;
|
||||
struct uc_struct *uc = env->uc;
|
||||
|
||||
CPU_FOREACH(other_cs) {
|
||||
tlb_flush_page(other_cs, value & TARGET_PAGE_MASK);
|
||||
}
|
||||
// TODO: issue #642
|
||||
// tlb_flush(other_cpu, value & TARGET_PAGE_MASK);
|
||||
}
|
||||
|
||||
static void tlbimvaa_is_write(CPUARMState *env, const ARMCPRegInfo *ri,
|
||||
uint64_t value)
|
||||
{
|
||||
CPUState *other_cs;
|
||||
struct uc_struct *uc = env->uc;
|
||||
|
||||
CPU_FOREACH(other_cs) {
|
||||
tlb_flush_page(other_cs, value & TARGET_PAGE_MASK);
|
||||
}
|
||||
// TODO: issue #642
|
||||
// tlb_flush(other_cpu, value & TARGET_PAGE_MASK);
|
||||
}
|
||||
|
||||
static const ARMCPRegInfo cp_reginfo[] = {
|
||||
@@ -1874,37 +1862,28 @@ static void tlbi_aa64_asid_write(CPUARMState *env, const ARMCPRegInfo *ri,
|
||||
static void tlbi_aa64_va_is_write(CPUARMState *env, const ARMCPRegInfo *ri,
|
||||
uint64_t value)
|
||||
{
|
||||
CPUState *other_cs;
|
||||
uint64_t pageaddr = sextract64(value << 12, 0, 56);
|
||||
struct uc_struct *uc = env->uc;
|
||||
|
||||
CPU_FOREACH(other_cs) {
|
||||
tlb_flush_page(other_cs, pageaddr);
|
||||
}
|
||||
// TODO: issue #642
|
||||
// tlb_flush(other_cpu, pageaddr);
|
||||
}
|
||||
|
||||
static void tlbi_aa64_vaa_is_write(CPUARMState *env, const ARMCPRegInfo *ri,
|
||||
uint64_t value)
|
||||
{
|
||||
CPUState *other_cs;
|
||||
uint64_t pageaddr = sextract64(value << 12, 0, 56);
|
||||
struct uc_struct *uc = env->uc;
|
||||
|
||||
CPU_FOREACH(other_cs) {
|
||||
tlb_flush_page(other_cs, pageaddr);
|
||||
}
|
||||
// TODO: issue #642
|
||||
// tlb_flush(other_cpu, pageaddr);
|
||||
}
|
||||
|
||||
static void tlbi_aa64_asid_is_write(CPUARMState *env, const ARMCPRegInfo *ri,
|
||||
uint64_t value)
|
||||
{
|
||||
CPUState *other_cs;
|
||||
int asid = extract64(value, 48, 16);
|
||||
struct uc_struct *uc = env->uc;
|
||||
|
||||
CPU_FOREACH(other_cs) {
|
||||
tlb_flush(other_cs, asid == 0);
|
||||
}
|
||||
// TODO: issue #642
|
||||
// tlb_flush(other_cpu, asid == 0);
|
||||
}
|
||||
|
||||
static CPAccessResult aa64_zva_access(CPUARMState *env, const ARMCPRegInfo *ri)
|
||||
|
||||
@@ -34,7 +34,7 @@ void arm64_release(void* ctx)
|
||||
|
||||
void arm64_reg_reset(struct uc_struct *uc)
|
||||
{
|
||||
CPUArchState *env = first_cpu->env_ptr;
|
||||
CPUArchState *env = uc->cpu->env_ptr;
|
||||
memset(env->xregs, 0, sizeof(env->xregs));
|
||||
|
||||
env->pc = 0;
|
||||
@@ -42,7 +42,7 @@ void arm64_reg_reset(struct uc_struct *uc)
|
||||
|
||||
int arm64_reg_read(struct uc_struct *uc, unsigned int *regs, void **vals, int count)
|
||||
{
|
||||
CPUState *mycpu = first_cpu;
|
||||
CPUState *mycpu = uc->cpu;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
@@ -74,7 +74,7 @@ int arm64_reg_read(struct uc_struct *uc, unsigned int *regs, void **vals, int co
|
||||
|
||||
int arm64_reg_write(struct uc_struct *uc, unsigned int *regs, void* const* vals, int count)
|
||||
{
|
||||
CPUState *mycpu = first_cpu;
|
||||
CPUState *mycpu = uc->cpu;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
|
||||
@@ -38,7 +38,7 @@ void arm_reg_reset(struct uc_struct *uc)
|
||||
(void)uc;
|
||||
CPUArchState *env;
|
||||
|
||||
env = first_cpu->env_ptr;
|
||||
env = uc->cpu->env_ptr;
|
||||
memset(env->regs, 0, sizeof(env->regs));
|
||||
|
||||
env->pc = 0;
|
||||
@@ -49,7 +49,7 @@ int arm_reg_read(struct uc_struct *uc, unsigned int *regs, void **vals, int coun
|
||||
CPUState *mycpu;
|
||||
int i;
|
||||
|
||||
mycpu = first_cpu;
|
||||
mycpu = uc->cpu;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
unsigned int regid = regs[i];
|
||||
@@ -84,7 +84,7 @@ int arm_reg_read(struct uc_struct *uc, unsigned int *regs, void **vals, int coun
|
||||
|
||||
int arm_reg_write(struct uc_struct *uc, unsigned int *regs, void* const* vals, int count)
|
||||
{
|
||||
CPUState *mycpu = first_cpu;
|
||||
CPUState *mycpu = uc->cpu;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
@@ -135,7 +135,7 @@ static bool arm_stop_interrupt(int intno)
|
||||
|
||||
static uc_err arm_query(struct uc_struct *uc, uc_query_type type, size_t *result)
|
||||
{
|
||||
CPUState *mycpu = first_cpu;
|
||||
CPUState *mycpu = uc->cpu;
|
||||
uint32_t mode;
|
||||
|
||||
switch(type) {
|
||||
|
||||
Reference in New Issue
Block a user