# US 2021/0334019 A1 · Programmable mapping of guard tag storage locations

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

- Number: US 2021/0334019 A1
- Document ID: US20210334019A1
- Status: Published application
- Kind: A1
- Application number: 17/370,291
- Filed: 2021-07-08
- Published: 2021-10-28
- Earliest claimed: 2018-01-22
- Assignees: Arm Limited
- Applicants: Arm Limited
- Inventors: Richard Roy GRISENTHWAITE; Graeme Peter BARNES
- Web page: https://patentgrep.com/patent/US20210334019A1

## CPC

- G06F 3/0622: {in relation to access}
- G06F 8/30: Creation or generation of source code
- G06F 3/0655: {Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices}
- G06F 3/0673: {Single storage device}
- G06F 9/455: Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An apparatus comprises processing circuitry to perform data processing in response to instructions, and memory access circuitry to perform a tag-guarded memory access operation in response to a target address. The tag-guarded memory access operation comprises comparing an address tag associated with the target address with a guard tag stored in a memory system in association with a block of one or more memory locations comprising an addressed location identified by the target address, and generating an indication of whether a match is detected between the guard tag and the address tag. The memory access circuitry determines, according to a programmable mapping, a mapping of guard tag storage locations for storing guard tags for corresponding blocks of memory locations.

## Claims

### Claim 1

An apparatus comprising:
processing circuitry to perform data processing in response to instructions; and
memory access circuitry to perform a tag-guarded memory access operation in response to a target address, the tag-guarded memory access operation comprising:
comparing an address tag associated with the target address with a guard tag stored in a memory system in association with a block of one or more memory locations comprising an addressed location identified by the target address; and
generating an indication of whether a match is detected between the guard tag and the address tag; in which:
the memory access circuitry is configured to determine, according to a programmable mapping, a mapping of guard tag storage locations for storing guard tags for corresponding blocks of memory locations.

### Claim 2 (depends on 1)

The apparatus according to claim 1, in which an amount of address space allocated for the guard tag storage locations is variable depending on the programmable mapping.

### Claim 3 (depends on 1)

The apparatus according to claim 1, in which the programmable mapping supports at least:
a first configuration in which a given portion of address space is allocated for the guard tag storage locations; and
a second configuration in which the given portion of the address space is allocated for blocks of one or more memory locations for storing data or instructions.

### Claim 4 (depends on 1)

The apparatus according to claim 1, in which in response to a non-guard-tag-setting store instruction executed by the processing circuitry, the memory access circuitry is configured to trigger at least one memory access to update data stored in a memory location other than the guard tag storage locations, without updating the guard tag storage locations; and
in response to a guard tag setting instruction executed by the processing circuitry, the memory access circuitry is configured to trigger at least one memory access to update at least one guard tag stored in at least one guard tag storage location; and
the guard tag setting instruction and the non-guard-tag-setting store instruction are different instructions of an instruction set architecture supported by the processing circuitry.

### Claim 5 (depends on 1)

The apparatus according to claim 1, in which the memory access circuitry is configured to control access to the guard tag storage locations and to other memory locations other than the guard tag storage locations, where a minimum data size for a memory access to the guard tag storage locations is different to a minimum data size for a memory access to the other memory locations.

### Claim 6 (depends on 1)

The apparatus according to claim 1, in which the processing circuitry is configured to support a software coherence scheme to maintain coherence of guard tags cached in at least one cache.

### Claim 7 (depends on 1)

The apparatus according to claim 1, in which the processing circuitry is configured to support at least one type of tag cache maintenance operation requestable by software to trigger cleaning or invalidation of guard tags cached in at least one cache.

### Claim 8 (depends on 1)

The apparatus according to claim 1, comprising hardware coherence management circuitry to support a hardware coherence scheme to maintain coherence of data or guard tags cached in at least one cache.

### Claim 9 (depends on 1)

The apparatus according to claim 1, in which the memory access circuitry is configured to determine, according to the programmable mapping, whether a given memory location other than a guard tag storage location is a tagged location associated with a corresponding guard tag storage location or an untagged location not having a corresponding guard tag storage location.

### Claim 10 (depends on 9)

The apparatus according to claim 9, in which, in the tag-guarded memory access operation, when the addressed location is determined to be an untagged location, the memory access circuitry is configured to:
generate an error indication; or
treat the addressed location as being associated with a guard tag having a default value.

### Claim 11 (depends on 1)

The apparatus according to claim 1, in which the programmable mapping provides a variable mapping between an address of a given memory location and an address of a corresponding guard tag storage location for storing the guard tag associated with the given memory location.

### Claim 12 (depends on 1)

The apparatus according to claim 1, in which:
for a first portion of an address space, the programmable mapping is configured according to a first configuration mechanism; and
for a second portion of the address space, the programmable mapping is configured according to a second configuration mechanism different to the first configuration mechanism.

### Claim 13 (depends on 1)

The apparatus according to claim 1, in which:
for at least one portion of an address space, the memory access circuitry is configured to determine the mapping of guard tag storage locations based on tagged/untagged indicators each corresponding to a corresponding region of the at least one portion and indicating whether the corresponding region is a tagged region or an untagged region; and
for a given region indicated as a tagged region, the guard tags associated with memory locations with addresses in the given region are stored in guard tag storage locations having addresses in a designated guard tag storage region of the address space corresponding to the given region.

### Claim 14 (depends on 13)

The apparatus according to claim 13, in which a mapping between the given region and the designated guard tag storage region is non-programmable.

### Claim 15 (depends on 1)

The apparatus according to claim 1, in which:
for at least one portion of an address space, the memory access circuitry is configured to determine the mapping of guard tag storage locations based on a programmable base address indicative of a start of a guard tag storage region of address space allocated for the guard tag storage locations.

### Claim 16 (depends on 1)

The apparatus according to claim 1, in which:
for at least one portion of an address space, the memory access circuitry is configured to determine the mapping of guard tag storage locations based on a plurality of sets of programmable range configuration information, each set of programmable range configuration information for specifying a range of addresses designated for tagged memory locations and specifying a guard tag storage region of address space designated for the guard tag storage locations associated with the tagged memory locations.

### Claim 17 (depends on 16)

The apparatus according to claim 16, in which the memory access circuitry is configured to treat, as an untagged location not having an associated guard tag storage region, a memory location having an address in said at least one portion of the address space that lies outside any valid range defined by the plurality of sets of programmable range configuration information.

### Claim 18 (depends on 1)

The apparatus according to claim 1, in which:
for at least one portion of an address space, the memory access circuitry is configured to determine the mapping of guard tag storage locations in dependence on a hierarchical mapping structure comprising a plurality of levels of mapping table, where the memory access circuitry is configured to identify an address of a guard tag storage location corresponding to a given memory location by performing a table walk through the hierarchical mapping structure based on an address of the given memory location.

### Claim 19

A method comprising:
performing a tag-guarded memory access operation in response to a target address, the tag-guarded memory access operation comprising:
comparing an address tag associated with the target address with a guard tag stored in a memory system in association with a block of one or more memory locations comprising an addressed location identified by the target address; and
generating an indication of whether a match is detected between the guard tag and the address tag; and
determining, according to a programmable mapping, a mapping of guard tag storage locations for storing guard tags for corresponding blocks of memory locations.

### Claim 20

A non-transitory storage medium storing a computer program for controlling a host data processing apparatus to provide an instruction execution environment for execution of instructions of target program code, comprising:
processing program logic to perform data processing in response to the instructions of the target program code; and
memory access program logic to perform a tag-guarded memory access operation in response to a target address, the tag-guarded memory access operation comprising:
comparing an address tag associated with the target address with a guard tag stored in a memory system in association with a block of one or more memory locations comprising an addressed location identified by the target address; and
generating an indication of whether a match is detected between the guard tag and the address tag; in which:
the memory access program logic is configured to determine, according to a programmable mapping, a mapping of guard tag storage locations for storing guard tags for corresponding blocks of memory locations.
