/* SPDX-License-Identifier: GPL-2.0-or-later *//*************************************************************************** * Copyright (C) 2009 by David Brownell * ***************************************************************************//* ... */#ifndefOPENOCD_TARGET_ARMV7A_H#defineOPENOCD_TARGET_ARMV7A_H#include"arm_adi_v5.h"#include"armv7a_cache.h"#include"arm.h"#include"armv4_5_mmu.h"#include"armv4_5_cache.h"#include"arm_dpm.h"6 includesenum{ARM_PC=15,ARM_CPSR=16...};#defineARMV7_COMMON_MAGIC0x0A450999U/* VA to PA translation operations opc2 values*/#defineV2PCWPR0#defineV2PCWPW1#defineV2PCWUR2#defineV2PCWUW3#defineV2POWPR4#defineV2POWPW5#defineV2POWUR6#defineV2POWUW79 defines/* L210/L220 cache controller support */structarmv7a_l2x_cache{uint32_tbase;uint32_tway;...};structarmv7a_cachesize{/* cache dimensioning */uint32_tlinelen;uint32_tassociativity;uint32_tnsets;uint32_tcachesize;/* info for set way operation on cache */uint32_tindex;uint32_tindex_shift;uint32_tway;uint32_tway_shift;...};/* information about one architecture cache at any level */structarmv7a_arch_cache{intctype;/* cache type, CLIDR encoding */structarmv7a_cachesized_u_size;/* data cache */structarmv7a_cachesizei_size;/* instruction cache */...};/* common cache information */structarmv7a_cache_common{intinfo;/* -1 invalid, else valid */intloc;/* level of coherency */uint32_tdminline;/* minimum d-cache linelen */uint32_timinline;/* minimum i-cache linelen */structarmv7a_arch_cachearch[6];/* cache info, L1 - L7 */inti_cache_enabled;intd_u_cache_enabled;/* outer unified cache if some */void*outer_cache;int(*flush_all_data_cache)(structtarget*target);...};structarmv7a_mmu_common{/* following field mmu working way */int32_tcached;/* 0: not initialized, 1: initialized */uint32_tttbcr;/* cache for ttbcr register */uint32_tttbr[2];uint32_tttbr_mask[2];uint32_tttbr_range[2];int(*read_physical_memory)(structtarget*target,target_addr_taddress,uint32_tsize,uint32_tcount,uint8_t*buffer);structarmv7a_cache_commonarmv7a_cache;uint32_tmmu_enabled;...};structarmv7a_common{unsignedintcommon_magic;structarmarm;structreg_cache*core_cache;/* Core Debug Unit */structarm_dpmdpm;target_addr_tdebug_base;structadiv5_ap*debug_ap;/* mdir */uint8_tmulti_processor_system;uint8_tmulti_threading_processor;uint8_tlevel2_id;uint8_tcluster_id;uint8_tcpu_id;boolis_armv7r;uint32_trev;uint32_tpartnum;uint32_tarch;uint32_tvariant;uint32_timplementor;/* cache specific to V7 Memory Management Unit compatible with v4_5*/structarmv7a_mmu_commonarmv7a_mmu;int(*examine_debug_reason)(structtarget*target);int(*post_debug_entry)(structtarget*target);void(*pre_restore_context)(structtarget*target);...};staticinlinestructarmv7a_common*target_to_armv7a(structtarget*target){returncontainer_of(target->arch_info,structarmv7a_common,arm);}{ ... }staticinlineboolis_armv7a(structarmv7a_common*armv7a){returnarmv7a->common_magic==ARMV7_COMMON_MAGIC;}{ ... }/* register offsets from armv7a.debug_base *//* See ARMv7a arch spec section C10.2 */#defineCPUDBG_DIDR0x000/* See ARMv7a arch spec section C10.3 */#defineCPUDBG_WFAR0x018/* PCSR at 0x084 -or- 0x0a0 -or- both ... based on flags in DIDR */#defineCPUDBG_DSCR0x088#defineCPUDBG_DRCR0x090#defineCPUDBG_PRCR0x310#defineCPUDBG_PRSR0x314/* See ARMv7a arch spec section C10.4 */#defineCPUDBG_DTRRX0x080#defineCPUDBG_ITR0x084#defineCPUDBG_DTRTX0x08c/* See ARMv7a arch spec section C10.5 */#defineCPUDBG_BVR_BASE0x100#defineCPUDBG_BCR_BASE0x140#defineCPUDBG_WVR_BASE0x180#defineCPUDBG_WCR_BASE0x1C0#defineCPUDBG_VCR0x01C/* See ARMv7a arch spec section C10.6 */#defineCPUDBG_OSLAR0x300#defineCPUDBG_OSLSR0x304#defineCPUDBG_OSSRR0x308#defineCPUDBG_ECR0x024/* See ARMv7a arch spec section C10.7 */#defineCPUDBG_DSCCR0x028#defineCPUDBG_DSMCR0x02C/* See ARMv7a arch spec section C10.8 */#defineCPUDBG_AUTHSTATUS0xFB8/* See ARMv7a arch spec DDI 0406C C11.10 */#defineCPUDBG_ID_PFR10xD24/* Masks for Vector Catch register */#defineDBG_VCR_FIQ_MASK((1<<31)|(1<<7))#defineDBG_VCR_IRQ_MASK((1<<30)|(1<<6))#defineDBG_VCR_DATA_ABORT_MASK((1<<28)|(1<<4))#defineDBG_VCR_PREF_ABORT_MASK((1<<27)|(1<<3))#defineDBG_VCR_SVC_MASK((1<<26)|(1<<2))/* Masks for Multiprocessor Affinity Register */#defineMPIDR_MP_EXT(1UL<<31)28 definesintarmv7a_arch_state(structtarget*target);intarmv7a_identify_cache(structtarget*target);intarmv7a_init_arch_info(structtarget*target,structarmv7a_common*armv7a);intarmv7a_handle_cache_info_command(structcommand_invocation*cmd,structarmv7a_cache_common*armv7a_cache);intarmv7a_read_ttbcr(structtarget*target);externconststructcommand_registrationarmv7a_command_handlers[];/* ... */#endif/* OPENOCD_TARGET_ARMV7A_H */
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
Click anywhere in the source to view detailed information here...