US 12,487,777 B2
Apparatus for a first device MMIO mapped with a second device and a method of performing data processing operations therebetween
Chuanning Cheng, Shenzhen (CN); Zhongwu Cheng, Shenzhen (CN); and Jiwu Dai, Shenzhen (CN)
Assigned to Huawei Technologies Co., Ltd., Shenzhen (CN)
Filed by Huawei Technologies Co., Ltd., Shenzhen (CN)
Filed on Jun. 20, 2023, as Appl. No. 18/338,055.
Application 18/338,055 is a continuation of application No. PCT/CN2020/138049, filed on Dec. 21, 2020.
Prior Publication US 2023/0342086 A1, Oct. 26, 2023
Int. Cl. G06F 3/06 (2006.01)
CPC G06F 3/0659 (2013.01) [G06F 3/0611 (2013.01); G06F 3/067 (2013.01)] 18 Claims
OG exemplary drawing
 
1. An apparatus, wherein the apparatus is used in a first device, and the apparatus comprises:
a processor; and
a storage controller;
wherein storage space of a second device is mapped to memory-mapped input/output (MMIO) address space of the first device, and N MMIO addresses in the MMIO address space of the first device are in a one-to-one correspondence with N first storage addresses in the storage space of the second device;
wherein the processor is configured to send a first instruction to the storage controller, wherein the first instruction comprises a target MMIO address, the target MMIO address is comprised in the N MMIO addresses, and N is an integer greater than or equal to 1, and wherein the target MMIO address is a source operand address or a destination operand address in the first instruction; and
wherein the storage controller is configured to:
receive the first instruction;
determine a first storage address of the second device corresponding to the target MMIO address; and
send a first operation instruction to the second device, wherein the first operation instruction corresponds to the first instruction, and the first operation instruction comprises the first storage address; and
when the target MMIO address is the source operand address, and the first operation instruction is a read operation instruction, perform the following:
attempt to receive data sent by the second device, wherein the data corresponds to the first storage address and is read by the second device based on the first operation instruction;
in response to receiving data sent by the second device, write the data into the destination operand address, and send a first message to the processor, wherein the destination operand address is comprised in M second storage addresses in storage space of the first device, M is an integer greater than or equal to 1, and the first message indicates that execution of the first instruction succeeds;
when the data sent by the second device is not received within a preset time range, resend the first operation instruction to the second device at least once within a preset time range; and
when the data sent by the second device is not received after the first operation instruction is resent at least once, send a second message to the processor, wherein the second message indicates that execution of the first instruction fails; and
wherein a processor core of the processor that sends the first instruction is in a blocked state and cannot execute another task between sending the first instruction and receiving the first message, or between sending the first instruction and receiving the second message.