2006-06-02 05:36:31 -05:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2005 by Dominic Rath *
|
|
|
|
* Dominic.Rath@gmx.de *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
|
***************************************************************************/
|
|
|
|
#ifndef ARM920T_H
|
|
|
|
#define ARM920T_H
|
|
|
|
|
2009-12-13 14:52:23 -06:00
|
|
|
#include "arm9tdmi.h"
|
|
|
|
#include "armv4_5_mmu.h"
|
2006-06-02 05:36:31 -05:00
|
|
|
|
|
|
|
#define ARM920T_COMMON_MAGIC 0xa920a920
|
|
|
|
|
2009-11-13 10:36:02 -06:00
|
|
|
struct arm920t_common
|
2006-06-02 05:36:31 -05:00
|
|
|
{
|
2009-11-17 03:09:50 -06:00
|
|
|
struct arm7_9_common arm7_9_common;
|
2009-06-18 02:08:52 -05:00
|
|
|
uint32_t common_magic;
|
2009-11-13 10:41:27 -06:00
|
|
|
struct armv4_5_mmu_common armv4_5_mmu;
|
2009-06-18 02:08:52 -05: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 07:41:49 -05:00
|
|
|
int preserve_cache;
|
2009-11-13 10:36:02 -06:00
|
|
|
};
|
2006-06-02 05:36:31 -05:00
|
|
|
|
2009-11-13 10:36:02 -06:00
|
|
|
static inline struct arm920t_common *
|
2009-11-13 12:11:13 -06:00
|
|
|
target_to_arm920(struct target *target)
|
2009-11-05 23:59:39 -06:00
|
|
|
{
|
2009-11-13 10:36:02 -06:00
|
|
|
return container_of(target->arch_info, struct arm920t_common,
|
2009-11-17 03:09:50 -06:00
|
|
|
arm7_9_common.armv4_5_common);
|
2009-11-05 23:59:39 -06:00
|
|
|
}
|
|
|
|
|
2009-11-13 10:40:09 -06:00
|
|
|
struct arm920t_cache_line
|
2006-08-31 07:41:49 -05:00
|
|
|
{
|
2009-06-18 02:08:52 -05:00
|
|
|
uint32_t cam;
|
|
|
|
uint32_t data[8];
|
2009-11-13 10:40:09 -06:00
|
|
|
};
|
2006-08-31 07:41:49 -05:00
|
|
|
|
2009-11-13 10:40:12 -06:00
|
|
|
struct arm920t_tlb_entry
|
2006-08-31 07:41:49 -05:00
|
|
|
{
|
2009-06-18 02:08:52 -05:00
|
|
|
uint32_t cam;
|
|
|
|
uint32_t ram1;
|
|
|
|
uint32_t ram2;
|
2009-11-13 10:40:12 -06:00
|
|
|
};
|
2006-08-31 07:41:49 -05:00
|
|
|
|
2009-11-13 12:11:13 -06:00
|
|
|
int arm920t_arch_state(struct target *target);
|
|
|
|
int arm920t_soft_reset_halt(struct target *target);
|
|
|
|
int arm920t_read_memory(struct target *target,
|
2009-11-05 22:35:37 -06:00
|
|
|
uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer);
|
2009-11-13 12:11:13 -06:00
|
|
|
int arm920t_write_memory(struct target *target,
|
2009-11-05 22:35:37 -06:00
|
|
|
uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer);
|
2009-11-13 12:11:13 -06:00
|
|
|
void arm920t_post_debug_entry(struct target *target);
|
|
|
|
void arm920t_pre_restore_context(struct target *target);
|
|
|
|
uint32_t arm920t_get_ttb(struct target *target);
|
|
|
|
void arm920t_disable_mmu_caches(struct target *target,
|
2009-11-05 22:35:37 -06:00
|
|
|
int mmu, int d_u_cache, int i_cache);
|
2009-11-13 12:11:13 -06:00
|
|
|
void arm920t_enable_mmu_caches(struct target *target,
|
2009-11-05 22:35:37 -06:00
|
|
|
int mmu, int d_u_cache, int i_cache);
|
2009-11-23 10:17:01 -06:00
|
|
|
|
|
|
|
extern const struct command_registration arm920t_command_handlers[];
|
2009-06-19 17:39:35 -05:00
|
|
|
|
2006-06-02 05:36:31 -05:00
|
|
|
#endif /* ARM920T_H */
|