# US 2017/0255569 A1 · Write-allocation for a cache based on execute permissions

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

- Number: US 2017/0255569 A1
- Document ID: US20170255569A1
- Status: Published application
- Kind: A1
- Application number: 15/057,121
- Filed: 2016-03-01
- Published: 2017-09-07
- Earliest claimed: 2016-03-01
- Assignees: QUALCOMM Incorporated
- Applicants: QUALCOMM Incorporated
- Inventors: Thomas Andrew SARTORIUS; James Norris DIEFFENDERFER; Michael William MORROW; Jeffrey Todd BRIDGES; Michael Scott MCILVAINE; Rodney Wayne SMITH; Kenneth Alan DOCKSER; Thomas Philip SPEIER
- Web page: https://patentgrep.com/patent/US20170255569A1

## CPC

- G06F 12/123: with age lists, e.g. queue, most recently used [MRU] list or least recently used [LRU] list
- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0831: using a bus scheme, e.g. with bus monitoring or watching means
- G06F 12/0871: Allocation or management of cache space
- G06F 12/0888: using selective caching, e.g. bypass
- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 12/0895: of parts of caches, e.g. directory or tag array
- G06F 12/0897: with two or more cache hierarchy levels (with multilevel cache hierarchies G06F12/0811)
- G06F 12/1009: using page tables, e.g. page table structures
- G06F 12/1027: using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F 12/12: Replacement control
- G06F 2212/604: Details relating to cache allocation
- G06F 2212/6046: Using a specific cache allocation policy other than replacement policy
- G06F 2212/621: Coherency control relating to peripheral accessing, e.g. from DMA or I/O device
- G06F 2212/684: TLB miss handling
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems and methods for managing access to a cache relate to determining one or more execute permissions associated with a write-address of a write-request to the cache. The cache may be a unified cache for storing data as well as instructions. If there is a write-miss in the cache for the write-request, a cache controller may determine whether to implement a write-allocate policy or a write-no-allocate policy for servicing the write-miss, based on the one or more execute permissions. The one or more execute permissions can relate to a privilege level associated with the write-address. Execute permissions of a producing agent which generated the write-request and an execute permission of a consuming agent which can execute from the write-address may be based on the privilege levels of the producing agent and the consuming agent, respectively.

## Claims

### Claim 1

A method for managing a cache, the method comprising:
determining one or more execute permissions associated with a write-address of a write-request to the cache, wherein an instruction stored at the write-address is executable based on the one or more execute permissions; and
if there is a write-miss in the cache for the write-request, determining whether to implement a write-allocate policy or a write-no-allocate policy for servicing the write-miss, based on the one or more execute permissions.

### Claim 2 (depends on 1)

The method of claim 1, wherein the cache is a unified cache configured to store data and instructions.

### Claim 3 (depends on 1)

The method of claim 1, wherein the one or more execute permissions associated with the write-address are based on one or more execute permissions associated with a memory page comprising the write-address.

### Claim 4 (depends on 1)

The method of claim 1, wherein the one or more execute permissions comprise execute permissions for one or more privilege levels associated with the write-address.

### Claim 5 (depends on 4)

The method of claim 4, wherein an execute permission of a producing agent which generated the write-request is based on a privilege level of the producing agent and an execute permission of a consuming agent configured to execute from the write-address is based on a privilege level of the consuming agent.

### Claim 6 (depends on 5)

The method of claim 5, wherein the producing agent and the consuming agent are processes of a processor configured to access the cache.

### Claim 7 (depends on 5)

The method of claim 5, wherein the one or more privilege levels comprise a user privilege level and a supervisor privilege level.

### Claim 8 (depends on 5)

The method of claim 5, further comprising determining whether the producing agent has write permission for the write-address before accessing the cache for the write-request.

### Claim 9 (depends on 1)

The method of claim 1, wherein determining the one or more execute permissions associated with the write-address comprises retrieving the one or more execute permissions from a page table entry (PTE) of a translation lookaside buffer (TLB) comprising an address translation for the write-address and the one or more execute permissions associated with the write-address.

### Claim 10 (depends on 1)

The method of claim 1, wherein determining whether to write-allocate or write-no-allocate in the cache for servicing the write-miss comprises overriding an existing write-allocation policy for the cache.

### Claim 11

An apparatus comprising:
a cache;
a memory management unit (MMU) configured to provide one or more execute permissions associated with a write-address of a write-request to the cache, wherein an instruction stored at the write-address is executable based on the one or more execute permissions; and
a cache controller configured to implement a write-allocate or a write-no-allocate policy for the write-request based on the one or more execute permissions, if there is a write-miss in the cache for the write-request.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein the cache is a unified cache configured to store data and instructions.

### Claim 13 (depends on 11)

The apparatus of claim 11, wherein the one or more execute permissions associated with the write-address are based on one or more execute permissions associated with a memory page comprising the write-address.

### Claim 14 (depends on 11)

The apparatus of claim 11, wherein the one or more execute permissions comprise execute permissions for one or more privilege levels associated with the write-address.

### Claim 15 (depends on 14)

The apparatus of claim 14, comprising a producing agent configured to generate the write-request and a consuming agent configured to execute from the write-address, wherein an execute permission of the producing agent is based on a privilege level of the producing agent and an execute permission of the consuming agent is based on a privilege level of the consuming agent.

### Claim 16 (depends on 15)

The apparatus of claim 15 further comprising a processor configured to access the cache, wherein the producing agent and the consuming agent are processes executable by the processor.

### Claim 17 (depends on 14)

The apparatus of claim 14, wherein the one or more privilege levels comprise a user privilege level and a supervisor privilege level.

### Claim 18 (depends on 11)

The apparatus of claim 11, wherein the MMU comprises a translation lookaside buffer (TLB), wherein the TLB comprises a page table entry (PTE) configured to store an address translation for the write-address and the one or more execute permissions associated with the write-address.

### Claim 19 (depends on 11)

The apparatus of claim 11, wherein the cache controller is configured to override an existing write-allocation policy to implement the write-allocate or write-no-allocate policy for the write-request based on the one or more execute permissions.

### Claim 20 (depends on 11)

The apparatus of claim 11, integrated into a device, selected from the group consisting of a set top box, a music player, a video player, an entertainment unit, a server, a navigation device, a personal digital assistant (PDA), a fixed location data unit, a computer, a laptop, a tablet, a communications device, and a mobile phone.

### Claim 21

An apparatus comprising:
means for determining one or more execute permissions associated with a write-address of a write-request to a cache, wherein an instruction stored at the write-address is executable based on the one or more execute permissions; and
means for implementing a write-allocate or a write-no-allocate policy for the write-request based on the one or more execute permissions, if there is a write-miss in the cache for the write-request.

### Claim 22 (depends on 21)

The apparatus of claim 21, wherein the cache comprises means for storing data and instructions.

### Claim 23 (depends on 21)

The apparatus of claim 21, comprising means for generating the write-request and means for executing from the write-address, wherein execute permissions of the means for generating and the means for executing are based on privilege levels of the means for generating and the means for executing.

### Claim 24 (depends on 21)

The apparatus of claim 21, further comprising means for storing an address translation for the write-address and the one or more execute permissions associated with the write-address.

### Claim 25 (depends on 21)

The apparatus of claim 21, comprising means for overriding an existing write-allocation policy.

### Claim 26

A non-transitory computer-readable storage medium comprising code, which, when executed by a processor, causes the processor to perform operations for managing a cache, the non-transitory computer-readable storage medium comprising:
code for determining one or more execute permissions associated with a write-address of a write-request to the cache, wherein an instruction stored at the write-address is executable based on the one or more execute permissions; and
code for implementing a write-allocate or a write-no-allocate policy for the write-request based on the one or more execute permissions, if there is a write-miss in the cache for the write-request.

### Claim 27 (depends on 26)

The non-transitory computer-readable storage medium of claim 26, comprising code for generating the write-request and code for executing from the write-address.

### Claim 28 (depends on 26)

The non-transitory computer-readable storage medium of claim 26, wherein the one or more execute permissions comprise execute permissions for one or more privilege levels associated with the write-address.

### Claim 29 (depends on 26)

The non-transitory computer-readable storage medium of claim 26, further comprising code for overriding an existing write-allocation policy.
