# US 12,222,867 B2 · Processor, computer system, and method for flushing hierarchical cache structure based on a designated key identification code and a designated address

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

- Number: US 12,222,867 B2
- Document ID: US12222867B2
- Status: Granted
- Kind: B2
- Application number: 18/046,642
- Filed: 2022-10-14
- Published: 2023-05-25
- Granted: 2025-02-11
- Earliest claimed: 2021-11-19
- Assignees: Shanghai Zhaoxin Semiconductor Co., Ltd.
- Applicants: Shanghai Zhaoxin Semiconductor Co., Ltd.
- Inventors: Weilin Wang; Yingbing Guan; Minfang Zhu
- Web page: https://patentgrep.com/patent/US12222867B2

## CPC

- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0833: {in combination with broadcast means (e.g. for invalidation or updating)}
- G06F 12/1408: {by using cryptography (for digital transmission H04L9/00)}
- G06F 12/1441: {for a range}
- G06F 21/602: {Providing cryptographic facilities or services}
- G06F 12/0804: with main memory updating (G06F12/0806 takes precedence)
- G06F 2212/1052: Security improvement
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A technology flushing a hierarchical cache structure based on a designated key identification code and a designated address. A processor includes a first core and a last level cache (LLC). The first core includes a decoder, a memory ordering buffer, and a first in-core cache module. In response to an Instruction Set Architecture (ISA) instruction that requests to flush a hierarchical cache structure according to a designated key identification code and a designated address, the decoder outputs at least one microinstruction. According to the at least one microinstruction, a flushing request with the designated key identification code and the designated address is provided to the first in-core cache module through the memory ordering buffer, and then the first in-core cache module provides the LLC with the flushing request, so that the LLC flushes its matching cache line which matches the designated key identification code and the designated address.

## Claims

### Claim 1

A computer system, flushing a hierarchical cache structure based on a designated key identification code and a designated address, comprising:
a first processor fabricated on a first die, comprising a first core, wherein the first core comprises a decoder, a memory ordering buffer, and a first in-core cache module; and
a first last-level cache, fabricated in the first processor;
wherein:
in response to an instruction of an instruction set architecture that is provided to flush the hierarchical cache structure based on the designated key identification code and the designated address, the decoder outputs at least one microinstruction;
according to the at least one microinstruction, a flushing request with the designated key identification code and the designated address is provided to the first in-core cache module through the memory ordering buffer, and then is provided to the first last-level cache by the first in-core cache module;
in response to the flushing request, the first last-level cache searches the first last-level cache for a matching cache line that matches the designated key identification code and the designated address, and flushes the matching cache line.

### Claim 2 (depends on 1)

The computer system as claimed in claim 1, further comprising:
a first snoop filter, fabricated in the first processor;
wherein:
the first last-level cache provides a first snoop request to the first snoop filter, and the first snoop filter provides the first snoop request to the first in-core cache module;
the first snoop request carries a matching symbol;
in the first in-core cache module and the first last-level cache, cache lines matching the designated key identification code and the designated address all carry the matching symbol; and
first in-core cache module searches the first in-core cache module based on the matching symbol carried in the first snoop request to find and flush matching cache lines matching the designated key identification code and the designated address in the first in-core cache module.

### Claim 3 (depends on 2)

The computer system as claimed in claim 2, wherein:
the first processor further comprises a second core, and the second core comprises a second in-core cache module;
the first snoop filter further provides the first snoop request to the second in-core cache module;
the second in-core cache module searches the second in-core cache module based on the matching symbol carried in the first snoop request to find and flush matching cache lines matching the designated key identification code and the designated address in the second in-core cache module.

### Claim 4 (depends on 1)

The computer system as claimed in claim 1, wherein:
the first last-level cache generates a tag and an index according to a physical address corresponding to the designated address; and
in the first last-level cache, the matching cache line has cache line information matching the designated key identification code, the tag and the index.

### Claim 5 (depends on 1)

The computer system as claimed in claim 1, further comprising:
a second processor fabricated on a second die, comprising a third core, wherein the third core comprises a third in-core cache module; and
a second last-level cache module fabricated in the second processor;
wherein:
through a channel between the first die and the second die, the first last-level cache provides the flushing request received from the first in-core cache module to the second last-level cache;
in response to the flushing request, the second last-level cache searches the second last-level cache for a matching cache line that matches the designated key identification code and the designated address in the second last-level cache, and flushes it the matching cache line found from the second last-level cache.

### Claim 6 (depends on 5)

The computer system as claimed in claim 5, further comprising:
a second snoop filter, fabricated in the second processor;
wherein:
the second last-level cache provides the second snoop filter with a second snoop request, and the second snoop filter provides the second snoop request to the third in-core cache module;
the second snoop request carries a matching symbol;
in the third in-core cache module and the second last-level cache, cache lines matching the designated key identification code and the designated address all carry the matching symbol; and
the third in-core cache module searches the third in-core cache module based on the matching symbol carried in the second snoop request to find and flush matching cache lines matching the designated key identification code and the designated address in the third in-core cache module.

### Claim 7

A processor, flushing a hierarchical cache structure based on a designated key identification code and a designated address, comprising:
a first core, including a decoder, a memory ordering buffer, and a first in-core cache module; and
a last-level cache;
wherein:
in response to an instruction of an instruction set architecture that is provided to flush the hierarchical cache structure based on the designated key identification code and the designated address, the decoder outputs at least one microinstruction;
according to the at least one microinstruction, a flushing request with the designated key identification code and the designated address is provided to the first in-core cache module through the memory ordering buffer, and then is provided to the last-level cache by the first in-core cache module;
in response to the flushing request, the last-level cache searches itself the last-level cache for a matching cache line that matches the designated key identification code and the designated address, and flushes the matching cache line.

### Claim 8 (depends on 7)

The processor as claimed in claim 7, further comprising:
a snoop filter;
wherein:
the last-level cache provides a snoop request to the snoop filter, and the snoop filter provides the snoop request to the first in-core cache module;
the snoop request carries a matching symbol;
in the first in-core cache module and the last-level cache, cache lines matching the designated key identification code and the designated address all carry the matching symbol; and
the first in-core cache module searches the first in-core cache module based on the matching symbol carried in the snoop request to find and flush matching cache lines matching the designated key identification code and the designated address in the first in-core cache module.

### Claim 9 (depends on 8)

The processor as claimed in claim 8, wherein:
the first in-core cache includes a level 1 cache and a level 2 cache, and the last-level cache is a level 3 cache; and
the level 2 cache receives the snoop request from the snoop filter and provides the snoop request to the level 1 cache.

### Claim 10 (depends on 9)

The processor as claimed in claim 9, wherein:
the level 2 cache searches the level 2 cache based on the matching symbol carried in the snoop request to find and flush a matching cache line matching the designated key identification code and the designated address in the level 2 cache; and
the level 1 cache searches the level 1 cache based on the matching symbol carried in the snoop request to find and flush a matching cache line matching the designated key identification code and the designated address in the first-level cache.

### Claim 11 (depends on 8)

The processor as claimed in claim 8, further comprising:
a second core, including a second in-core cache module;
wherein:
the snoop filter further provides the snoop request to the second in-core cache module;
the second in-core cache module searches the second in-core cache module based on the matching symbol carried in the snoop request to find and flush matching cache lines matching the designated key identification code and the designated address in the second in-core cache module.

### Claim 12 (depends on 7)

The processor as claimed in claim 7, wherein:
the first in-core cache includes a level 1 cache and a level 2 cache; and
the last-level cache is a level 3 cache.

### Claim 13 (depends on 12)

The processor as claimed in claim 12, wherein:
the flushing request is provided to the level 2 cache by the level 1 cache, and then is further provided to the level 3 cache by the level 2 cache.

### Claim 14 (depends on 7)

The processor as claimed in claim 7, wherein:
the last-level cache generates a tag and an index according to a physical address corresponding to the designated address; and
in the last-level cache, the matching cache line has cache line information matching the designated key identification code, the tag and the index.

### Claim 15

A method for flushing a hierarchical cache structure based on a designated key identification code and a designated address, comprising:
in response to an instruction of an instruction set architecture that is provided to flush the hierarchical cache structure based on the designated key identification code and the designated address, operating a decoder to output at least one microinstruction, wherein the decoder is provided by a first core of a first processor on a first die, and the first core further comprises a memory ordering buffer and a first in-core cache module; and
according to the at least one microinstruction, providing a flushing request that carries the designated key identification code and the designated address to the first in-core cache module through the memory ordering buffer, and then operating the first in-core cache module to provide the flushing request to a first last-level cache shared by a plurality of cores of the first processor; and
in response to the flushing request, operating the first last-level cache to search itself the first last-level cache for a matching cache line that matches the designated key identification code and the designated address, and flush the matching cache line.

### Claim 16 (depends on 15)

The method as claimed in claim 15, further comprising:
operating the first last-level cache to provide a first snoop request to a first snoop filter of the first processor, and operating the first snoop filter to provide the first snoop request to the first in-core cache module, wherein the first snoop request carries a matching symbol, and, in the first in-core cache module and the first last-level cache, cache lines matching the designated key identification code and the designated address all carry the matching symbol; and
operating the first in-core cache module to search the first in-core cache module based on the matching symbol carried in the first snoop request to find and flush matching cache lines matching the designated key identification code and the designated address in the first in-core cache module.

### Claim 17 (depends on 16)

The method as claimed in claim 16, further comprising:
operating a level 2 cache of the first in-core cache module to receive the first snoop request from the first snoop filter; and
operating the level 2 cache to provide the first snoop request to a level 1 cache of the first in-core cache module.

### Claim 18 (depends on 17)

The method as claimed in claim 17, further comprising:
operating the level 2 cache to search the level 2 cache based on the matching symbol carried in the first snoop request to find and flush a matching cache line matching the designated key identification code and the designated address in the level 2 cache; and
operating the level 1 cache to search the level 1 cache based on the matching symbol carried in the first snoop request to find and flush a matching cache line matching the designated key identification code and the designated address in the level 1 cache.

### Claim 19 (depends on 16)

The method as claimed in claim 16, further comprising:
operating the first snoop filter to provide the first snoop request to a second in-core cache module of a second core, wherein the second core is fabricated in the first processor;
operating the second in-core cache module to search the second in-core cache module based on the matching symbol carried in the first snoop request to find and flush matching cache lines matching the designated key identification code and the designated address in the second in-core cache module.

### Claim 20 (depends on 15)

The method as claimed in claim 15, wherein:
the first in-core cache module comprises a level 1 cache and a level 2 cache;
the first last-level cache is a level 3 cache; and
the flushing request is provided to the level 2 cache by the level 1 cache, and then is further provided to the level 3 cache by the level 2 cache.

### Claim 21 (depends on 15)

The method as claimed in claim 15, wherein:
the first last-level cache generates a tag and an index according to a physical address corresponding to the designated address; and
in the first last-level cache, the matching cache line has cache line information matching the designated key identification code, the tag and the index.

### Claim 22 (depends on 15)

The method as claimed in claim 15, further comprising:
operating the first last-level cache to provide the flushing request received from the first in-core cache module to a second last-level cache shared by a plurality of cores of a second processor on a second die, wherein a channel between the first die and the second die is used to transfer the flushing request; and
in response to the flushing request, operating the second last-level cache to search the second last-level cache to find and flush a matching cache line matching the designated key identification code and the designated address.

### Claim 23 (depends on 22)

The method as claimed in claim 22, further comprising:
operating the second last-level cache to provide a second snoop request to a second snoop filter of the second processor;
operating the second snoop filter to provide the second snoop request to a third in-core cache module of a third core of the second processor, wherein the second snoop request carries a matching symbol and, in the third in-core cache module and the second last-level cache, cache lines matching the designated key identification code and the designated address all carry the matching symbol; and
operating the third in-core cache module to search the third in-core cache module based on the matching symbol carried in the second snoop request to find and flush matching cache lines matching the designated key identification code and the designated address in the third in-core cache module.
