From: David B. <dbr...@us...> - 2009-11-10 10:37:27
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 508e5c803fcc49ffe16a2e539545081df65633f7 (commit) via 65e3471d7849b4c1515ca1a71f7b46111ea5b934 (commit) via 0df56714a006540b398132dfef044c2bd6b2ed72 (commit) from 031591ead57807c4a23141d8141ea579b8deb2a0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 508e5c803fcc49ffe16a2e539545081df65633f7 Author: David Brownell <dbr...@us...> Date: Tue Nov 10 01:36:59 2009 -0800 ARM920: implement basic MMU ops mmu() works; virt2phys() fails and logs an error. Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/arm920t.c b/src/target/arm920t.c index dd9fae3..e043aee 100644 --- a/src/target/arm920t.c +++ b/src/target/arm920t.c @@ -460,6 +460,25 @@ int arm920t_arch_state(struct target_s *target) return ERROR_OK; } +static int arm920_mmu(struct target_s *target, int *enabled) +{ + if (target->state != TARGET_HALTED) { + LOG_ERROR("%s: target not halted", __func__); + return ERROR_TARGET_INVALID; + } + + *enabled = target_to_arm920(target)->armv4_5_mmu.mmu_enabled; + return ERROR_OK; +} + +static int arm920_virt2phys(struct target_s *target, + uint32_t virt, uint32_t *phys) +{ + /** @todo Implement this! */ + LOG_ERROR("%s: not implemented", __func__); + return ERROR_FAIL; +} + /** Reads a buffer, in the specified word size, with current MMU settings. */ int arm920t_read_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer) { @@ -1389,6 +1408,9 @@ target_type_t arm920t_target = .write_memory = arm920t_write_memory, .read_phys_memory = arm920t_read_phys_memory, .write_phys_memory = arm920t_write_phys_memory, + .mmu = arm920_mmu, + .virt2phys = arm920_virt2phys, + .bulk_write_memory = arm7_9_bulk_write_memory, .checksum_memory = arm7_9_checksum_memory, .blank_check_memory = arm7_9_blank_check_memory, commit 65e3471d7849b4c1515ca1a71f7b46111ea5b934 Author: David Brownell <dbr...@us...> Date: Tue Nov 10 01:35:50 2009 -0800 ARM720: implement basic MMU ops mmu() works; virt2phys() fails and logs an error. Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/arm720t.c b/src/target/arm720t.c index 673296e..728e197 100644 --- a/src/target/arm720t.c +++ b/src/target/arm720t.c @@ -247,6 +247,25 @@ static int arm720t_arch_state(struct target_s *target) return ERROR_OK; } +static int arm720_mmu(struct target_s *target, int *enabled) +{ + if (target->state != TARGET_HALTED) { + LOG_ERROR("%s: target not halted", __func__); + return ERROR_TARGET_INVALID; + } + + *enabled = target_to_arm720(target)->armv4_5_mmu.mmu_enabled; + return ERROR_OK; +} + +static int arm720_virt2phys(struct target_s *target, + uint32_t virt, uint32_t *phys) +{ + /** @todo Implement this! */ + LOG_ERROR("%s: not implemented", __func__); + return ERROR_FAIL; +} + static int arm720t_read_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer) { @@ -512,6 +531,9 @@ target_type_t arm720t_target = .write_memory = arm7_9_write_memory, .read_phys_memory = arm720t_read_phys_memory, .write_phys_memory = arm720t_write_phys_memory, + .mmu = arm720_mmu, + .virt2phys = arm720_virt2phys, + .bulk_write_memory = arm7_9_bulk_write_memory, .checksum_memory = arm7_9_checksum_memory, .blank_check_memory = arm7_9_blank_check_memory, commit 0df56714a006540b398132dfef044c2bd6b2ed72 Author: David Brownell <dbr...@us...> Date: Tue Nov 10 01:33:59 2009 -0800 Target: fix bad error messages And shrink a few too-long lines. Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/target.c b/src/target/target.c index 66e8699..b7df1d8 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -663,13 +663,13 @@ void target_reset_examined(struct target_s *target) static int default_mrc(struct target_s *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t *value) { - LOG_ERROR("Not implemented"); + LOG_ERROR("Not implemented: %s", __func__); return ERROR_FAIL; } static int default_mcr(struct target_s *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t value) { - LOG_ERROR("Not implemented"); + LOG_ERROR("Not implemented: %s", __func__); return ERROR_FAIL; } @@ -737,19 +737,22 @@ int target_mcr(struct target_s *target, int cpnum, uint32_t op1, uint32_t op2, u return target->type->mcr(target, cpnum, op1, op2, CRn, CRm, value); } -static int default_read_phys_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer) +static int +default_read_phys_memory(struct target_s *target, uint32_t address, + uint32_t size, uint32_t count, uint8_t *buffer) { - LOG_ERROR("Not implemented"); + LOG_ERROR("Not implemented: %s", __func__); return ERROR_FAIL; } -static int default_write_phys_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer) +static int +default_write_phys_memory(struct target_s *target, uint32_t address, + uint32_t size, uint32_t count, uint8_t *buffer) { - LOG_ERROR("Not implemented"); + LOG_ERROR("Not implemented: %s", __func__); return ERROR_FAIL; } - int target_init(struct command_context_s *cmd_ctx) { target_t *target = all_targets; ----------------------------------------------------------------------- Summary of changes: src/target/arm720t.c | 22 ++++++++++++++++++++++ src/target/arm920t.c | 22 ++++++++++++++++++++++ src/target/target.c | 17 ++++++++++------- 3 files changed, 54 insertions(+), 7 deletions(-) hooks/post-receive -- Main OpenOCD repository |