2022-06-26 23:24:07 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
|
2006-06-02 10:36:31 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2005 by Dominic Rath *
|
|
|
|
* Dominic.Rath@gmx.de *
|
|
|
|
***************************************************************************/
|
2012-02-05 12:03:04 +00:00
|
|
|
|
2015-09-21 19:07:46 +00:00
|
|
|
#ifndef OPENOCD_TARGET_ARM920T_H
|
|
|
|
#define OPENOCD_TARGET_ARM920T_H
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2009-12-13 20:52:23 +00:00
|
|
|
#include "arm9tdmi.h"
|
|
|
|
#include "armv4_5_mmu.h"
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2022-05-26 08:01:45 +00:00
|
|
|
#define ARM920T_COMMON_MAGIC 0xa920a920U
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2012-02-05 12:03:04 +00:00
|
|
|
struct arm920t_common {
|
2022-05-26 08:01:45 +00:00
|
|
|
unsigned int common_magic;
|
|
|
|
|
2009-11-17 09:09:50 +00:00
|
|
|
struct arm7_9_common arm7_9_common;
|
2009-11-13 16:41:27 +00:00
|
|
|
struct armv4_5_mmu_common armv4_5_mmu;
|
2009-06-18 07:08:52 +00:00
|
|
|
uint32_t cp15_control_reg;
|
|
|
|
uint32_t d_fsr;
|
|
|
|
uint32_t i_fsr;
|
|
|
|
uint32_t d_far;
|
|
|
|
uint32_t i_far;
|
2006-08-31 12:41:49 +00:00
|
|
|
int preserve_cache;
|
2009-11-13 16:36:02 +00:00
|
|
|
};
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2012-02-05 12:03:04 +00:00
|
|
|
static inline struct arm920t_common *target_to_arm920(struct target *target)
|
2009-11-06 05:59:39 +00:00
|
|
|
{
|
2012-02-05 12:03:04 +00:00
|
|
|
return container_of(target->arch_info, struct arm920t_common, arm7_9_common.arm);
|
2009-11-06 05:59:39 +00:00
|
|
|
}
|
|
|
|
|
2012-02-05 12:03:04 +00:00
|
|
|
struct arm920t_cache_line {
|
2009-06-18 07:08:52 +00:00
|
|
|
uint32_t cam;
|
|
|
|
uint32_t data[8];
|
2009-11-13 16:40:09 +00:00
|
|
|
};
|
2006-08-31 12:41:49 +00:00
|
|
|
|
2012-02-05 12:03:04 +00:00
|
|
|
struct arm920t_tlb_entry {
|
2009-06-18 07:08:52 +00:00
|
|
|
uint32_t cam;
|
|
|
|
uint32_t ram1;
|
|
|
|
uint32_t ram2;
|
2009-11-13 16:40:12 +00:00
|
|
|
};
|
2006-08-31 12:41:49 +00:00
|
|
|
|
2009-11-13 18:11:13 +00:00
|
|
|
int arm920t_arch_state(struct target *target);
|
|
|
|
int arm920t_soft_reset_halt(struct target *target);
|
|
|
|
int arm920t_read_memory(struct target *target,
|
2013-09-23 08:27:03 +00:00
|
|
|
target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer);
|
2009-11-13 18:11:13 +00:00
|
|
|
int arm920t_write_memory(struct target *target,
|
2013-09-23 08:27:03 +00:00
|
|
|
target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer);
|
2010-07-19 10:34:54 +00:00
|
|
|
int arm920t_post_debug_entry(struct target *target);
|
2009-11-13 18:11:13 +00:00
|
|
|
void arm920t_pre_restore_context(struct target *target);
|
2010-07-19 06:45:45 +00:00
|
|
|
int arm920t_get_ttb(struct target *target, uint32_t *result);
|
2010-07-19 08:58:07 +00:00
|
|
|
int arm920t_disable_mmu_caches(struct target *target,
|
2009-11-06 04:35:37 +00:00
|
|
|
int mmu, int d_u_cache, int i_cache);
|
2010-07-19 08:58:07 +00:00
|
|
|
int arm920t_enable_mmu_caches(struct target *target,
|
2009-11-06 04:35:37 +00:00
|
|
|
int mmu, int d_u_cache, int i_cache);
|
2009-11-23 16:17:01 +00:00
|
|
|
|
|
|
|
extern const struct command_registration arm920t_command_handlers[];
|
2009-06-19 22:39:35 +00:00
|
|
|
|
2015-09-21 19:07:46 +00:00
|
|
|
#endif /* OPENOCD_TARGET_ARM920T_H */
|