From e895246966e3aa6e78f9d0816c72c6fbb9160122 Mon Sep 17 00:00:00 2001 From: Øyvind Harboe Date: Wed, 21 Oct 2009 13:10:32 +0200 Subject: Retire obsolete and superfluous implementations of virt2phys in each target. This is done in a polymorphic implementation in target.c --- src/target/armv4_5_mmu.c | 45 --------------------------------------------- 1 file changed, 45 deletions(-) (limited to 'src/target/armv4_5_mmu.c') diff --git a/src/target/armv4_5_mmu.c b/src/target/armv4_5_mmu.c index e64021e8..33800122 100644 --- a/src/target/armv4_5_mmu.c +++ b/src/target/armv4_5_mmu.c @@ -170,51 +170,6 @@ int armv4_5_mmu_write_physical(target_t *target, armv4_5_mmu_common_t *armv4_5_m return retval; } -int armv4_5_mmu_handle_virt2phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc, target_t *target, armv4_5_mmu_common_t *armv4_5_mmu) -{ - uint32_t va; - uint32_t pa; - int type; - uint32_t cb; - int domain; - uint32_t ap; - - if (target->state != TARGET_HALTED) - { - command_print(cmd_ctx, "target must be stopped for \"virt2phys\" command"); - return ERROR_OK; - } - - if (argc == 0) - { - command_print(cmd_ctx, "usage: virt2phys "); - return ERROR_OK; - } - - if (argc == 1) - { - va = strtoul(args[0], NULL, 0); - pa = armv4_5_mmu_translate_va(target, armv4_5_mmu, va, &type, &cb, &domain, &ap); - if (type == -1) - { - switch (pa) - { - case ERROR_TARGET_TRANSLATION_FAULT: - command_print(cmd_ctx, "no valid translation for 0x%8.8" PRIx32 "", va); - break; - default: - command_print(cmd_ctx, "unknown translation error"); - } - return ERROR_OK; - } - - command_print(cmd_ctx, "0x%8.8" PRIx32 " -> 0x%8.8" PRIx32 ", type: %s, cb: %i, domain: %d, ap: %2.2x", - va, pa, armv4_5_mmu_page_type_names[type], (int)cb, domain, (int)ap); - } - - return ERROR_OK; -} - int armv4_5_mmu_handle_md_phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc, target_t *target, armv4_5_mmu_common_t *armv4_5_mmu) { int count = 1; -- cgit v1.2.3