# US 2020/0394119 A1 · An apparatus and method for accessing metadata when debugging a device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2020/0394119 A1
- Document ID: US20200394119A1
- Status: Published application
- Kind: A1
- Application number: 16/966,981
- Filed: 2019-01-17
- Published: 2020-12-17
- Earliest claimed: 2018-02-27
- Assignees: Arm Limited
- Applicants: Arm Limited
- Inventors: Michael John WILLIAMS; John Michael HORLEY
- Web page: https://patentgrep.com/patent/US20200394119A1

## CPC

- G06F 11/3656: {using a specific debug interface}
- G06F 11/1435: {using file system or storage system metadata}
- G06F 11/3037: {where the computing system component is a memory, e.g. virtual memory, cache (accessing, addressing or allocating within memory systems or architectures G06F12/00; checking stores for correct operation G11C29/00)}
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F 13/4068: {Electrical coupling}
- G06F 13/4221: {being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An apparatus and method are provided for accessing metadata when debugging a device. In particular, debug access port circuitry is provided that comprises a debug interface to receive commands from a debugger, and a bus interface to couple to a bus to enable the debugger to access a memory system of the device. The device operates on data formed of data granules having associated metadata items, and the bus interface enables communication of both the data granules and the metadata items over the bus between the memory system and the bus interface. The debug access port circuitry further has a plurality of storage elements accessible via the commands issued from the debugger, such that the accesses performed within the memory system via the bus interface are controlled in dependence on the storage elements accessed by the commands. At least one of the storage elements comprises a metadata storage element to store a plurality of metadata items, and the debug access port circuitry is responsive to at least one command from the debugger to perform an access to the memory system in order to transfer at least one of the plurality of metadata items between the metadata storage element and the memory system. This provides an efficient mechanism for enabling a debugger to directly access metadata items within a memory system of the device being debugged.

## Claims

### Claim 1

Debug access port circuitry comprising:
a debug interface to receive commands from a debugger;
a bus interface to couple to a bus to enable the debugger to access a memory system of a device, the device operating on data formed of data granules having associated metadata items, and the bus interface enabling communication of both the data granules and the metadata items over the bus between the memory system and the bus interface;
a plurality of storage elements accessible via the commands issued from the debugger, such that the accesses performed within the memory system via the bus interface are controlled in dependence on the storage elements accessed by the commands;
at least one of the storage elements comprising a metadata storage element to store a plurality of metadata items; and
wherein the debug access port circuitry is responsive to at least one command from the debugger to perform an access to the memory system in order to transfer at least one of the plurality of metadata items between the metadata storage element and the memory system.

### Claim 2 (depends on 1)

Debug access port circuitry as claimed in claim 1, wherein:
at least one of the storage elements comprises a memory address storage element to store an indication of a memory address to be accessed; and
the debug access port circuitry is arranged to reference the memory address storage element to determine a location within the memory system at which to access the at least one of the plurality of metadata items.

### Claim 3 (depends on 2)

Debug access port circuitry as claimed in claim 2, wherein the debug access port circuitry is further arranged to reference the memory address storage element to determine a location within the metadata storage element used for the at least one of the plurality of metadata items.

### Claim 4 (depends on 3)

Debug access port circuitry as claimed in claim 3, wherein a specified number of low order address bits of the memory address are used to determine the location within the metadata storage element.

### Claim 5 (depends on 3)

Debug access port circuitry as claimed in claim 3, wherein during a read access from the memory system the metadata item retrieved from the memory system is written to the determined location within the metadata storage element whilst leaving content of other locations within the metadata storage element unchanged.

### Claim 6 (depends on 1)

Debug access port circuitry as claimed in claim 1, wherein the metadata storage element is arranged as a shift register structure such that shift operations are used to add metadata items into the metadata storage element during read accesses from the memory system, and to output metadata items from the metadata storage element during write accesses to the memory system.

### Claim 7 (depends on 1)

Debug access port circuitry as claimed in claim 1, wherein the plurality of storage elements further comprises one or more access trigger elements which, when accessed via a command from the debugger, cause an access to the memory system to be initiated by the debug access port circuitry.

### Claim 8 (depends on 7)

Debug access port circuitry as claimed in claim 7, wherein the plurality of storage elements further comprises a mode control storage element accessible via a command from the debugger to identify a type of access operation to be performed when said one or more access trigger elements are accessed.

### Claim 9 (depends on 7)

Debug access port circuitry as claimed in claim 7, wherein said one or more access trigger elements comprise a plurality of access trigger elements, each access trigger element being associated with a different type of access operation, and the debugger is arranged, when issuing a command to initiate an access operation to the memory system, to identify within the command the appropriate access trigger element for the type of access operation to be initiated.

### Claim 10 (depends on 1)

Debug access port circuitry as claimed in claim 1, wherein the debug access port circuitry is arranged to initiate, via the bus interface, access operations from a set of supported access operations, in dependence on the commands received from the debugger.

### Claim 11 (depends on 10)

Debug access port circuitry as claimed in claim 10, wherein the set of supported access operations comprises one or more of the following write operations:
a write operation to update a value of a metadata item using a value obtained from the metadata storage element, and to update a current value of at least a portion of the associated data granule using a data value provided by a command from the debugger;
a write operation to update a value of a metadata item using a value obtained from the metadata storage element, whilst preserving a current value of the associated data granule;
a write operation to update a value of a metadata item using a value obtained from the metadata storage element, and to update a value of at least a portion of the associated data granule to a known value;
a write operation to write at least a portion of a data granule to the memory system, preserving a current value of the associated metadata item;
a write operation to write at least a portion of a data granule to the memory system, updating a value of the associated metadata item to a default value.

### Claim 12 (depends on 10)

Debug access port circuitry as claimed in claim 10, wherein the set of supported access operations comprises one or more of the following read operations:
a read operation to read a metadata item from the memory system and to store the value of that read metadata item in the metadata storage element, and to additionally read at least a portion of the associated data granule from the memory system;
a read operation to read a metadata item from the memory system and to store the value of that read metadata item in the metadata storage element, without additionally reading the associated data granule;
a read operation to read at least a portion of a data granule from the memory system, without reading the associated metadata item.

### Claim 13 (depends on 1)

Debug access port circuitry as claimed in claim 1, wherein each metadata item comprises one or more bits.

### Claim 14 (depends on 1)

Debug access port circuitry as claimed in claim 1, wherein each metadata item is a capability tag identifying whether the associated data granule specifies a capability.

### Claim 15 (depends on 1)

A method as claimed in claim 1, wherein each metadata item is an allocation tag identifying an allocation policy of the associated data granule.

### Claim 16 (depends on 1)

Debug access port circuitry as claimed in claim 1, wherein the debug interface is one of a JTAG, serial wire, or PCI interface.

### Claim 17 (depends on 1)

Debug access port circuitry as claimed in claim 1, wherein the plurality of storage elements exist within an address space, and a command received at the debug interface identifies a storage element to which that command relates by specifying an address within the address space.

### Claim 18 (depends on 1)

Debug access port circuitry as claimed in claim 1, wherein the plurality of storage elements comprise a plurality of registers.

### Claim 19 (depends on 2)

Debug access port circuitry as claimed in claim 2, wherein the debug access port circuitry is responsive to commands from the debugger to initiate, via the bus interface, multiple iterations of an access operation, for each iteration the memory address indication stored in the memory address storage element being incremented.

### Claim 20 (depends on 19)

Debug access port circuitry as claimed in claim 19, wherein:
when the access operation requires both metadata items and the data to be accessed, the memory address indication is incremented based on an amount of data accessed in a current iteration, in order to provide an address indication for a next iteration; and
when the access operation requires only metadata items to be accessed, the memory address indication is incremented by n times a data granule size, where n is equal to the number of metadata items accessed in the current iteration, in order to provide an address indication for the next iteration.

### Claim 21

A method of operating debug access port circuitry comprising:
receiving commands from a debugger;
providing a bus interface to couple to a bus to enable the debugger to access a memory system of a device, the device operating on data formed of data granules having associated metadata items, and the bus interface enabling communication of both the data granules and the metadata items over the bus between the memory system and the bus interface;
providing a plurality of storage elements accessible via the commands issued from the debugger, such that the accesses performed within the memory system via the bus interface are controlled in dependence on the storage elements accessed by the commands;
providing at least one of the storage elements as a metadata storage element to store a plurality of metadata items; and
performing, in response to at least one command from the debugger, an access to the memory system in order to transfer at least one of the plurality of metadata items between the metadata storage element and the memory system.

### Claim 22

Debug access port circuitry comprising:
debug interface means for receiving commands from a debugger;
bus interface means for coupling to a bus to enable the debugger to access a memory system of a device, the device operating on data formed of data granules having associated metadata items, and the bus interface means enabling communication of both the data granules and the metadata items over the bus between the memory system and the bus interface means;
a plurality of storage element means accessible via the commands issued from the debugger, such that the accesses performed within the memory system via the bus interface means are controlled in dependence on the storage element means accessed by the commands;
at least one of the storage element means comprising a metadata storage element means for storing a plurality of metadata items; and
wherein the debug access port circuitry is responsive to at least one command from the debugger to perform an access to the memory system in order to transfer at least one of the plurality of metadata items between the metadata storage element means and the memory system.
