OpenOCD
arm_coresight.h File Reference
Include dependency graph for arm_coresight.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ARM_CS_ALIGN   (0x1000)
 
#define ARM_CS_C1_MEMTYPE   ARM_CS_C9_DEVTYPE
 
#define ARM_CS_C1_MEMTYPE_SYSMEM_MASK   BIT(0)
 
#define ARM_CS_C9_DEVARCH   (0xFBC)
 
#define ARM_CS_C9_DEVARCH_ARCHID_MASK   (0x0000FFFF)
 
#define ARM_CS_C9_DEVARCH_ARCHID_SHIFT   (0)
 
#define ARM_CS_C9_DEVARCH_ARCHITECT(devarch)    (((devarch) & ARM_CS_C9_DEVARCH_ARCHITECT_MASK) >> ARM_CS_C9_DEVARCH_ARCHITECT_SHIFT)
 
#define ARM_CS_C9_DEVARCH_ARCHITECT_MASK   (0xFFE00000)
 
#define ARM_CS_C9_DEVARCH_ARCHITECT_SHIFT   (21)
 
#define ARM_CS_C9_DEVARCH_PRESENT   BIT(20)
 
#define ARM_CS_C9_DEVARCH_REVISION(devarch)    (((devarch) & ARM_CS_C9_DEVARCH_REVISION_MASK) >> ARM_CS_C9_DEVARCH_REVISION_SHIFT)
 
#define ARM_CS_C9_DEVARCH_REVISION_MASK   (0x000F0000)
 
#define ARM_CS_C9_DEVARCH_REVISION_SHIFT   (16)
 
#define ARM_CS_C9_DEVID   (0xFC8)
 
#define ARM_CS_C9_DEVID_CP_MASK   BIT(5)
 
#define ARM_CS_C9_DEVID_FORMAT_32BIT   (0)
 
#define ARM_CS_C9_DEVID_FORMAT_64BIT   (1)
 
#define ARM_CS_C9_DEVID_FORMAT_MASK   (0x0000000F)
 
#define ARM_CS_C9_DEVID_PRR_MASK   BIT(5)
 
#define ARM_CS_C9_DEVID_SYSMEM_MASK   BIT(4)
 
#define ARM_CS_C9_DEVTYPE   (0xFCC)
 
#define ARM_CS_C9_DEVTYPE_CORE_DEBUG   (0x00000015)
 
#define ARM_CS_C9_DEVTYPE_MAJOR_MASK   (0x0000000F)
 
#define ARM_CS_C9_DEVTYPE_MAJOR_SHIFT   (0)
 
#define ARM_CS_C9_DEVTYPE_MASK   (0x000000FF)
 
#define ARM_CS_C9_DEVTYPE_SUB_MASK   (0x000000F0)
 
#define ARM_CS_C9_DEVTYPE_SUB_SHIFT   (4)
 
#define ARM_CS_CIDR0   (0xFF0)
 
#define ARM_CS_CIDR1   (0xFF4)
 
#define ARM_CS_CIDR2   (0xFF8)
 
#define ARM_CS_CIDR3   (0xFFC)
 
#define ARM_CS_CIDR_CLASS(cidr)   (((cidr) >> 12) & 0x000F)
 
#define ARM_CS_CIDR_CLASS_MASK   (0x0000F000)
 
#define ARM_CS_CLASS_0X1_ROM_TABLE   (0x1)
 
#define ARM_CS_CLASS_0X9_CS_COMPONENT   (0x9)
 
#define ARM_CS_PIDR0   (0xFE0)
 
#define ARM_CS_PIDR1   (0xFE4)
 
#define ARM_CS_PIDR2   (0xFE8)
 
#define ARM_CS_PIDR3   (0xFEC)
 
#define ARM_CS_PIDR4   (0xFD0)
 
#define ARM_CS_PIDR5   (0xFD4)
 
#define ARM_CS_PIDR6   (0xFD8)
 
#define ARM_CS_PIDR7   (0xFDC)
 
#define ARM_CS_PIDR_DESIGNER(pidr)
 
#define ARM_CS_PIDR_JEDEC   BIT(19)
 
#define ARM_CS_PIDR_PART(pidr)   ((pidr) & 0x0FFF)
 
#define ARM_CS_PIDR_SIZE(pidr)   (((pidr) >> 36) & 0x000F)
 
#define ARM_CS_ROMENTRY_OFFSET_MASK   (0xFFFFF000U)
 
#define ARM_CS_ROMENTRY_PRESENT   BIT(0)
 

Functions

static bool is_valid_arm_cs_cidr (uint32_t cidr)
 

Macro Definition Documentation

◆ ARM_CS_ALIGN

#define ARM_CS_ALIGN   (0x1000)

Definition at line 16 of file arm_coresight.h.

◆ ARM_CS_C1_MEMTYPE

#define ARM_CS_C1_MEMTYPE   ARM_CS_C9_DEVTYPE

Definition at line 91 of file arm_coresight.h.

◆ ARM_CS_C1_MEMTYPE_SYSMEM_MASK

#define ARM_CS_C1_MEMTYPE_SYSMEM_MASK   BIT(0)

Definition at line 93 of file arm_coresight.h.

◆ ARM_CS_C9_DEVARCH

#define ARM_CS_C9_DEVARCH   (0xFBC)

Definition at line 57 of file arm_coresight.h.

◆ ARM_CS_C9_DEVARCH_ARCHID_MASK

#define ARM_CS_C9_DEVARCH_ARCHID_MASK   (0x0000FFFF)

Definition at line 59 of file arm_coresight.h.

◆ ARM_CS_C9_DEVARCH_ARCHID_SHIFT

#define ARM_CS_C9_DEVARCH_ARCHID_SHIFT   (0)

Definition at line 60 of file arm_coresight.h.

◆ ARM_CS_C9_DEVARCH_ARCHITECT

#define ARM_CS_C9_DEVARCH_ARCHITECT (   devarch)     (((devarch) & ARM_CS_C9_DEVARCH_ARCHITECT_MASK) >> ARM_CS_C9_DEVARCH_ARCHITECT_SHIFT)

Definition at line 68 of file arm_coresight.h.

◆ ARM_CS_C9_DEVARCH_ARCHITECT_MASK

#define ARM_CS_C9_DEVARCH_ARCHITECT_MASK   (0xFFE00000)

Definition at line 64 of file arm_coresight.h.

◆ ARM_CS_C9_DEVARCH_ARCHITECT_SHIFT

#define ARM_CS_C9_DEVARCH_ARCHITECT_SHIFT   (21)

Definition at line 65 of file arm_coresight.h.

◆ ARM_CS_C9_DEVARCH_PRESENT

#define ARM_CS_C9_DEVARCH_PRESENT   BIT(20)

Definition at line 63 of file arm_coresight.h.

◆ ARM_CS_C9_DEVARCH_REVISION

#define ARM_CS_C9_DEVARCH_REVISION (   devarch)     (((devarch) & ARM_CS_C9_DEVARCH_REVISION_MASK) >> ARM_CS_C9_DEVARCH_REVISION_SHIFT)

Definition at line 66 of file arm_coresight.h.

◆ ARM_CS_C9_DEVARCH_REVISION_MASK

#define ARM_CS_C9_DEVARCH_REVISION_MASK   (0x000F0000)

Definition at line 61 of file arm_coresight.h.

◆ ARM_CS_C9_DEVARCH_REVISION_SHIFT

#define ARM_CS_C9_DEVARCH_REVISION_SHIFT   (16)

Definition at line 62 of file arm_coresight.h.

◆ ARM_CS_C9_DEVID

#define ARM_CS_C9_DEVID   (0xFC8)

Definition at line 71 of file arm_coresight.h.

◆ ARM_CS_C9_DEVID_CP_MASK

#define ARM_CS_C9_DEVID_CP_MASK   BIT(5)

Definition at line 78 of file arm_coresight.h.

◆ ARM_CS_C9_DEVID_FORMAT_32BIT

#define ARM_CS_C9_DEVID_FORMAT_32BIT   (0)

Definition at line 74 of file arm_coresight.h.

◆ ARM_CS_C9_DEVID_FORMAT_64BIT

#define ARM_CS_C9_DEVID_FORMAT_64BIT   (1)

Definition at line 75 of file arm_coresight.h.

◆ ARM_CS_C9_DEVID_FORMAT_MASK

#define ARM_CS_C9_DEVID_FORMAT_MASK   (0x0000000F)

Definition at line 73 of file arm_coresight.h.

◆ ARM_CS_C9_DEVID_PRR_MASK

#define ARM_CS_C9_DEVID_PRR_MASK   BIT(5)

Definition at line 77 of file arm_coresight.h.

◆ ARM_CS_C9_DEVID_SYSMEM_MASK

#define ARM_CS_C9_DEVID_SYSMEM_MASK   BIT(4)

Definition at line 76 of file arm_coresight.h.

◆ ARM_CS_C9_DEVTYPE

#define ARM_CS_C9_DEVTYPE   (0xFCC)

Definition at line 80 of file arm_coresight.h.

◆ ARM_CS_C9_DEVTYPE_CORE_DEBUG

#define ARM_CS_C9_DEVTYPE_CORE_DEBUG   (0x00000015)

Definition at line 88 of file arm_coresight.h.

◆ ARM_CS_C9_DEVTYPE_MAJOR_MASK

#define ARM_CS_C9_DEVTYPE_MAJOR_MASK   (0x0000000F)

Definition at line 82 of file arm_coresight.h.

◆ ARM_CS_C9_DEVTYPE_MAJOR_SHIFT

#define ARM_CS_C9_DEVTYPE_MAJOR_SHIFT   (0)

Definition at line 83 of file arm_coresight.h.

◆ ARM_CS_C9_DEVTYPE_MASK

#define ARM_CS_C9_DEVTYPE_MASK   (0x000000FF)

Definition at line 87 of file arm_coresight.h.

◆ ARM_CS_C9_DEVTYPE_SUB_MASK

#define ARM_CS_C9_DEVTYPE_SUB_MASK   (0x000000F0)

Definition at line 84 of file arm_coresight.h.

◆ ARM_CS_C9_DEVTYPE_SUB_SHIFT

#define ARM_CS_C9_DEVTYPE_SUB_SHIFT   (4)

Definition at line 85 of file arm_coresight.h.

◆ ARM_CS_CIDR0

#define ARM_CS_CIDR0   (0xFF0)

Definition at line 41 of file arm_coresight.h.

◆ ARM_CS_CIDR1

#define ARM_CS_CIDR1   (0xFF4)

Definition at line 42 of file arm_coresight.h.

◆ ARM_CS_CIDR2

#define ARM_CS_CIDR2   (0xFF8)

Definition at line 43 of file arm_coresight.h.

◆ ARM_CS_CIDR3

#define ARM_CS_CIDR3   (0xFFC)

Definition at line 44 of file arm_coresight.h.

◆ ARM_CS_CIDR_CLASS

#define ARM_CS_CIDR_CLASS (   cidr)    (((cidr) >> 12) & 0x000F)

Definition at line 47 of file arm_coresight.h.

◆ ARM_CS_CIDR_CLASS_MASK

#define ARM_CS_CIDR_CLASS_MASK   (0x0000F000)

Definition at line 46 of file arm_coresight.h.

◆ ARM_CS_CLASS_0X1_ROM_TABLE

#define ARM_CS_CLASS_0X1_ROM_TABLE   (0x1)

Definition at line 48 of file arm_coresight.h.

◆ ARM_CS_CLASS_0X9_CS_COMPONENT

#define ARM_CS_CLASS_0X9_CS_COMPONENT   (0x9)

Definition at line 49 of file arm_coresight.h.

◆ ARM_CS_PIDR0

#define ARM_CS_PIDR0   (0xFE0)

Definition at line 19 of file arm_coresight.h.

◆ ARM_CS_PIDR1

#define ARM_CS_PIDR1   (0xFE4)

Definition at line 20 of file arm_coresight.h.

◆ ARM_CS_PIDR2

#define ARM_CS_PIDR2   (0xFE8)

Definition at line 21 of file arm_coresight.h.

◆ ARM_CS_PIDR3

#define ARM_CS_PIDR3   (0xFEC)

Definition at line 22 of file arm_coresight.h.

◆ ARM_CS_PIDR4

#define ARM_CS_PIDR4   (0xFD0)

Definition at line 23 of file arm_coresight.h.

◆ ARM_CS_PIDR5

#define ARM_CS_PIDR5   (0xFD4)

Definition at line 24 of file arm_coresight.h.

◆ ARM_CS_PIDR6

#define ARM_CS_PIDR6   (0xFD8)

Definition at line 25 of file arm_coresight.h.

◆ ARM_CS_PIDR7

#define ARM_CS_PIDR7   (0xFDC)

Definition at line 26 of file arm_coresight.h.

◆ ARM_CS_PIDR_DESIGNER

#define ARM_CS_PIDR_DESIGNER (   pidr)
Value:
({ \
typeof(pidr) _x = (pidr); \
((_x >> 25) & 0x780) | ((_x >> 12) & 0x7F); \
})

Definition at line 33 of file arm_coresight.h.

◆ ARM_CS_PIDR_JEDEC

#define ARM_CS_PIDR_JEDEC   BIT(19)

Definition at line 38 of file arm_coresight.h.

◆ ARM_CS_PIDR_PART

#define ARM_CS_PIDR_PART (   pidr)    ((pidr) & 0x0FFF)

Definition at line 32 of file arm_coresight.h.

◆ ARM_CS_PIDR_SIZE

#define ARM_CS_PIDR_SIZE (   pidr)    (((pidr) >> 36) & 0x000F)

Definition at line 39 of file arm_coresight.h.

◆ ARM_CS_ROMENTRY_OFFSET_MASK

#define ARM_CS_ROMENTRY_OFFSET_MASK   (0xFFFFF000U)

Definition at line 98 of file arm_coresight.h.

◆ ARM_CS_ROMENTRY_PRESENT

#define ARM_CS_ROMENTRY_PRESENT   BIT(0)

Definition at line 97 of file arm_coresight.h.

Function Documentation

◆ is_valid_arm_cs_cidr()

static bool is_valid_arm_cs_cidr ( uint32_t  cidr)
inlinestatic