# US 2021/0342234 A1 · Error recovery method and apparatus

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

- Number: US 2021/0342234 A1
- Document ID: US20210342234A1
- Status: Published application
- Kind: A1
- Application number: 17/376,442
- Filed: 2021-07-15
- Published: 2021-11-04
- Earliest claimed: 2019-05-31
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Dongjiu GENG; Shuo LI; Yongxiang LIANG; Qiangmin LIN
- Web page: https://patentgrep.com/patent/US20210342234A1

## CPC

- G06F 11/0772: {Means for error signaling, e.g. using interrupts, exception flags, dedicated error registers}
- G06F 11/1687: {at event level, e.g. by interrupt or result of polling}
- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F 11/1629: {Error detection by comparing the output of redundant processing systems}
- G06F 11/1641: {where the comparison is not performed by the redundant processing components}
- G06F 11/1658: {Data re-synchronization of a redundant component, or initial sync of replacement, additional or spare unit}
- G06F 2201/82: Solving problems relating to consistency
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An error recovery method and apparatus, and a system are disclosed. At least two CPUs in a lockstep mode can exit the lockstep mode when an error occurs in at least one CPU, and the CPU in which the error occurs and a type of the error are determined. When the error can be recovered, the CPU in which the error occurs can be recovered according to a correctly running CPU. This helps the at least two CPUs run again at a position at which a service program is interrupted.

## Claims

### Claim 1

A lockstep system, comprising:
a first central processing unit (CPU);
a second CPU;
an interrupt controller; and
a comparison circuit configured to:
determine that outputs of the first CPU and the second CPU are inconsistent when the first CPU and the second CPU are operating in a lockstep mode, and
send a first signal to the interrupt controller according to the inconsistent outputs of the first CPU and the second CPU;
wherein the interrupt controller is configured to send an interrupt to the the first CPU and the second CPU in response to the first signal, and the interrupt is used to indicate that an error occurs in at least one of the first CPU and the second CPU, and
wherein the first CPU and the second CPU exit the lockstep mode and operate in a split mode in response to the interrupt.

### Claim 2 (depends on 1)

The lockstep system according to claim 1, wherein the outputs of the first CPU and the second CPU include at least one of an internal bus output of each of the first CPU and the second CPU, an external bus output of each of the first CPU and the second CPU, or an L3 cache control logic output of first CPU and the second CPU.

### Claim 3 (depends on 1)

The lockstep system according to claim 1, wherein the comparison circuit is a comparison circuit at a CPU clock cycle level.

### Claim 4 (depends on 1)

The lockstep system according to claim 1, wherein the comparison circuit shares a clock source with the first CPU and the second CPU when the first CPU and the second CPU are operating in the lockstep mode.

### Claim 5 (depends on 1)

The lockstep system according to claim 1, wherein the first CPU comprises a primary CPU and at least one secondary CPU.

### Claim 6 (depends on 5)

The lockstep system according to claim 5, wherein the comparison circuit comprises:
a CPU internal output comparator configured to compare an internal bus output of the primary CPU with an internal bus output of the at least one secondary CPU;
a CPU external output comparator configured to compare an external bus output of the primary CPU with an external bus output of the at least one secondary CPU; and
an L3 cache control logic output comparator configured to compare an L3 cache control logic output (L3_CTRL0) of the primary CPU with an L3 cache control logic output (L3_CTRL0′) of the at least one secondary CPU.

### Claim 7

A method for recovering errors, comprising:
determining, by a comparison circuit, that outputs of a first central processing unit (CPU) and a second CPU are inconsistent when the first CPU and the second CPU are operating in a lockstep mode;
sending, by the comparison circuit, a first signal to an interrupt controller according to the inconsistent outputs of the first CPU and the second CPU;
sending, by the interrupt controller, an interrupt to the the first CPU and the second CPU in response to the first signal, wherein the interrupt is used to indicate that an error occurs in at least one of the first CPU and the second CPU, and
exiting, by the first CPU and the second CPU, the lockstep mode and operating in a split mode in response to the interrupt.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the outputs of the first CPU and the second CPU include at least one of an internal bus output of each of the first CPU and the second CPU, an external bus output of each of the first CPU and the second CPU, or an L3 cache control logic output of first CPU and the second CPU.

### Claim 9 (depends on 7)

The method according to claim 7, wherein the comparison circuit is a comparison circuit at a CPU clock cycle level.

### Claim 10 (depends on 7)

The method according to claim 7, wherein the comparison circuit shares a clock source with the first CPU and the second CPU when the first CPU and the second CPU are operating in the lockstep mode.

### Claim 11 (depends on 7)

The method according to claim 7, wherein the first CPU comprises a primary CPU and at least one secondary CPU.

### Claim 12 (depends on 11)

The method according to claim 11, further comprising:
comparing an internal bus output of the primary CPU with an internal bus output of the at least one secondary CPU;
comparing an external bus output of the primary CPU with an external bus output of the at least one secondary CPU; and
comparing an L3 cache control logic output (L3_CTRL0) of the primary CPU with an L3 cache control logic output (L3_CTRL0′) of the at least one secondary CPU.
