Method for resetting processor and computer device

By setting specific and reference spaces in the random access memory, the co-processor is allowed to be reset independently, which solves the problem of the co-processor being unable to be reset independently and improves the flexibility and reliability of the system.

CN118796009APending Publication Date: 2024-10-18ASPEED TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310398264.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-14
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

When the existing technology resets the processor on the system single-chip, the co-processor cannot operate independently, causing the processing unit to be unable to access peripheral devices, thereby aborting tasks, and the static memory only allows one processor to access, causing other processing The device cannot be reset successfully.

Method used

By setting a specific space and a reference space in the random access memory, the coprocessor uses the image file in the specific space when a reset is needed, and the controller and the main processor verify the integrity of the image file and release the reset signal to Allow coprocessors to be reset independently.

Benefits of technology

It realizes independent reset and image update of co-processors, avoids system freezes caused by static memory usage, and improves system flexibility and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796009A_ABST
    Figure CN118796009A_ABST
Patent Text Reader

Abstract

The invention provides a method for resetting a processor and a computer device. The method comprises the following steps of: obtaining an image file corresponding to the coprocessor by a first component of the computer device, and loading the image file into a reference space in a random access memory by the first component; in response to determining that the coprocessor needs to be reset, loading, by a second component of the computer device, the image file stored in the reference space into a specific space corresponding to the coprocessor, and verifying, by the second component, the image file stored in the specific space; and in response to the second component determining that the image file stored in the specific space passes the verification, resetting, by the second component, the coprocessor based on the image file stored in the specific space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a technology for controlling a processor, and more particularly to a method for resetting a processor and a computer device. Background Art

[0002] Please refer to Figure 1 , which is a computer device architecture diagram according to an embodiment of the present invention. Figure 1 In the embodiment, the computer device 100 may include a controller 105 , a system on a chip (SoC) 110 (such as a baseboard management controller (BMC)), a processing unit 120 , a random access memory (RAM) 130 , a static memory 140 , and a peripheral device 150 .

[0003] The system-on-chip 110 may include a memory 111, a main processor 112, and a coprocessor 113. In some embodiments, the controller 105 may be implemented as a microcontroller unit (MCU), a complex programmable logic device (CPLD), or an MCU disposed in the system-on-chip 110, but is not limited thereto.

[0004] The memory 111 is, for example, a hardware read-only memory (HW ROM), which may record modules / program codes / firmware executable by the controller 105. In some embodiments, the controller 105 and the memory 111 may be implemented based on an Opentitan or Caliptra framework, but is not limited thereto.

[0005] In different embodiments, the main processor 112 and the coprocessor 113 may be implemented using different components. For example, assuming that the selected processor architecture is an ARM architecture, the main processor 112 may be implemented as a CA35 processor, and the coprocessor 113 may be implemented as a CM4 processor, but is not limited thereto.

[0006] The CA35 processor can be used to perform the most complex operations in the system, and it can support security functions by operating in secure mode or non-secure mode. In some embodiments, the system single chip 110 may also include other coprocessors (such as I / O MCU), but is not limited thereto.

[0007] In different application requirements, the usage of the CM4 processor may depend on the user's requirements, and the security permission of the CM4 processor may be higher or lower than the security permission of the CA35 processor (this needs to be configured in advance and cannot be changed after the computer device 100 is started).

[0008] If the security privilege of the CM4 processor is lower than the security mode of the CA35 processor, the CM4 processor can be configured to be accessed only in the CA35 security mode. Otherwise, the CA35 processor can access or control the CM4 processor in both the non-security mode and the security mode. In addition, the above-mentioned I / O MCU can be designed to offload the I / O tasks of the CA35 processor or the CM4 processor as required, but is not limited thereto.

[0009] In some embodiments, RAM 130 may be implemented as dynamic RAM (DRAM) or the like. Static memory 140 may be implemented as NOR flash memory or NAND flash memory, but is not limited thereto.

[0010] The processing unit 120 is, for example, a host central processing unit (CPU) implemented based on the X86 concept, and can access the peripheral device 150 (such as an I3C device, an I2C device, etc.) through the coprocessor 113. That is, the coprocessor 113 can be used as a bridge between the processing unit 120 and the peripheral device 150.

[0011] In the existing secure boot or platform security specification, it is usually stated that if any processor on the system single chip 110 (such as the main processor 112 and / or the coprocessor 113) needs to be reset, all processors on the system single chip 110 should be reset at the same time, and the corresponding image file needs to be reloaded and verified before each processor operates. However, this approach lacks flexibility for some applications.

[0012] For example, in Figure 1 In the architecture, since the coprocessor 113 is used as a bridge between the processing unit 120 and the peripheral device 150, the coprocessor 113 must be able to operate independently. Otherwise, when all processors on the system single chip 110 are reset at the same time, the processing unit 120 will not be able to access the peripheral device 150, thereby terminating some tasks executed by the processing unit 120.

[0013] However, even though the CM4 processor has the capability of independent operation (eg, independent reset), there are still several problems in the prior art.

[0014] For example, after the CA35 processor is started, it will periodically or irregularly access the static memory 140 to perform read or write operations. Generally speaking, the static memory 140 only allows one processor to access it at a time. In addition, after receiving a write request, the static memory 140 may be in a busy state for a period of time, and other access requests will be ignored during this period of time. In other words, when the CA35 is accessing the static memory 140, since the controller 105 (of the memory 111) cannot successfully read the correct CM4 processor image file from the static memory 140 during the process of resetting the CM4 processor, the CM4 processor cannot be successfully reset. Summary of the invention

[0015] In view of this, the present invention provides a method for resetting a processor and a computer device, which can be used to solve the above technical problems.

[0016] An embodiment of the present invention provides a method for resetting a processor, which is suitable for a computer device including a controller, a main processor, a coprocessor and a random access memory. The method includes: obtaining an image file corresponding to the coprocessor by a first component of the computer device, and loading the image file into a reference space in the random access memory by the first component, wherein the random access memory includes a specific space corresponding to the coprocessor, the first component is one of the main processor and the controller, and when obtaining an updated image, the coprocessor can also be the first component; in response to determining that the coprocessor needs to be reset, enabling a reset signal of the coprocessor by a second component of the computer device and loading the image file stored in the reference space into the specific space corresponding to the coprocessor, and verifying the image file stored in the specific space by the second component, wherein the second component is one of the controller and the main processor; and in response to the second component determining that the image file stored in the specific space passes the verification, the second component releases the reset signal of the coprocessor based on the image file stored in the specific space.

[0017] An embodiment of the present invention provides a computer device, which includes a controller, a main processor, a coprocessor, and a random access memory. A first component of the computer device obtains an image file corresponding to the coprocessor, and the first component loads the image file into a reference space in the random access memory, wherein the random access memory includes a specific space corresponding to the coprocessor, and the first component is one of the main processor, the coprocessor, and the controller. In response to determining that the coprocessor needs to be reset, a second component of the computer device enables the reset signal of the coprocessor and loads the image file stored in the reference space into the specific space corresponding to the coprocessor, and the second component verifies the image file stored in the specific space, wherein the second component is one of the controller and the main processor. In response to the second component determining that the image file stored in the specific space passes the verification, the second component releases the reset signal of the coprocessor based on the image file stored in the specific space. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings are included to provide a further understanding of the present invention and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the present invention and together with the description serve to explain the principles of the present invention.

[0019] Figure 1 is a diagram of a computer device architecture according to an embodiment of the present invention.

[0020] Figure 2 is based on Figure 1 A schematic diagram of a computer device is shown.

[0021] Figure 3 is a flow chart of a method for resetting a processor according to an embodiment of the present invention.

[0022] Figure 4A is a flow chart of resetting the coprocessor according to the first scenario of the first embodiment of the present invention.

[0023] Figure 4B and Figure 4C is based on Figure 2 and Figure 4A A schematic diagram of the operation is shown.

[0024] Figure 5A is a flow chart of resetting the coprocessor according to the second scenario of the first embodiment of the present invention.

[0025] Figure 5B is based on Figure 2 and Figure 5A A schematic diagram of the operation is shown.

[0026] Fig. 6A is a flow chart of resetting the coprocessor according to the third scenario of the first embodiment of the present invention.

[0027] Figure 6B and Figure 6C is based on Figure 2 and Fig. 6A A schematic diagram of the operation is shown.

[0028] Fig. 7A is a flow chart of resetting the coprocessor according to the fourth scenario of the first embodiment of the present invention.

[0029] Figure 7B is based on Figure 2 and Fig. 7A A schematic diagram of the operation is shown.

[0030] Fig. 8A is a flow chart of resetting the coprocessor according to the first scenario of the second embodiment of the present invention.

[0031] Figure 8B and Figure 8C is based on Figure 2 and Fig. 8A A schematic diagram of the operation is shown. DETAILED DESCRIPTION

[0032] Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and the description to refer to the same or like parts.

[0033] Please refer to Figure 2 , which is based on Figure 1 A schematic diagram of a computer device is shown. Figure 2 In the computer device 200, it is assumed that the controller 105 is an MCU disposed in the system single chip 110, and it can perform the required operations based on the module / program code / firmware in the memory 111 (such as hardware ROM). In addition, when the system single chip 110 is powered on or the system is restarted, compared with the main processor 112 and the coprocessor 113, the controller 105 is the first component to be released by the reset signal.

[0034] For ease of explanation, it is assumed that the main processor 112 and the coprocessor 113 in the computer device 200 are implemented using the ARM architecture. Therefore, the main processor 112 is, for example, a CA35 processor, and the coprocessor 113 is, for example, a CM4 processor, but is not limited thereto. For ease of explanation, in this specification, whether it is a single processor reboot or a whole system reboot, it is included in the concept of processor / system reset.

[0035] In addition, in the embodiment of the present invention, the random access memory 130 includes a specific space 130a and a reference space 130b, wherein the specific space 130a is, for example, a dedicated space / storage area for storing various image files corresponding to the coprocessor 113 (such as updated image files or image files for reset).

[0036] That is, when the coprocessor 113 needs to be reset or the executable image is updated, the coprocessor 113 will only execute the executable file (e.g., image file) stored in the specific space 130a after the reset signal is released, and will not execute the files stored in other areas / spaces in the random access memory 130. In other words, the specific space 130a is the executable space of the coprocessor 113.

[0037] In the embodiment of the present invention, the random access memory 130 further includes a reference space 130b, which is, for example, a backup space / storage area that can be used to store various image files (such as update image files or image files for reset) corresponding to the coprocessor 113. However, in the embodiment of the present invention, the coprocessor 113 will not be directly reset or executable image updated based on the content stored in the reference space 130b.

[0038] In summary, the method of the embodiment of the present invention can use the reference space 130b as another type of static memory, and when the coprocessor 113 needs to reset or perform an executable image update based on the file stored in the specific space 130a, the file stored in the reference space 130b can be loaded into the specific space 130a for use by the coprocessor 113. In this way, regardless of whether the static memory 140 is occupied (for example, being accessed by the main processor 112), the coprocessor 113 can complete / reset or perform an executable image update process. This will be further described below.

[0039] Please refer to Figure 3 , which is a flowchart of a method for resetting a processor according to an embodiment of the present invention. The method of this embodiment can be performed by Figure 2 The computer device 200 executes the following: Figure 2 Description of components shown Figure 3 Details of each step.

[0040] First, in step S310, a first component of the computer device 200 obtains an image file (hereinafter referred to as IM) corresponding to the coprocessor 113, and loads the image file IM into the reference space 130b in the random access memory 130, wherein the first component is one of the main processor 112 and the coprocessor 113.

[0041] In an embodiment of the present invention, the image file IM is, for example, an update image file for updating the coprocessor 113 or an image file for resetting the coprocessor 113, which can be stored in the reference space 130b after being obtained by the first component (such as the main processor 112 or the coprocessor 113) from the network and / or various sources.

[0042] In step S320, in response to determining that the coprocessor 113 needs to be reset, the second component of the computer device 200 controls (holds) the reset signal of the coprocessor and loads the image file IM stored in the reference space 130b into the specific space 130a corresponding to the coprocessor 113, and the second component verifies the image file IM stored in the specific space 130a, wherein the second component is one of the controller 105 and the main processor 112.

[0043] In different embodiments, the second component (such as the controller 105 or the main processor 112) can verify the image file IM stored in the specific space 130a based on the method required by the designer. For example, the second component can verify the data integrity of the image file IM stored in the specific space 130a, and when it is determined that the data integrity of the image file IM stored in the specific space 130a is legal (valid), it can be determined that the image file IM stored in the specific space 130a has passed the verification, otherwise it can be determined that the image file IM stored in the specific space 130a has not passed the verification, but it is not limited to this.

[0044] In one embodiment, the image file IM stored in the specific space 130a may have two parts: image file content and signature, and the second component may decrypt the signature into a first hash value based on a public key, and calculate a second hash value corresponding to the image file content. If the first hash value matches the second hash value, the second component may determine that the image file IM has passed the verification, otherwise, the image file IM may be determined to have failed the verification, but it is not limited thereto.

[0045] In step S330 , in response to the second component determining that the image file IM stored in the specific space 130 a passes the verification, the second component resets the coprocessor 113 based on the image file IM stored in the specific space 130 a .

[0046] In one embodiment, the second component may release a reset signal corresponding to the coprocessor 113 to trigger the coprocessor 113 to perform a reset operation based on the image file IM stored in the specific space 130a, but is not limited thereto.

[0047] Generally speaking, the embodiments of the present invention can be divided into a first embodiment and a second embodiment. In the first embodiment, the security authority of the main processor 112 is higher than the security authority of the coprocessor 113, while in the second embodiment, the security authority of the main processor 112 is lower than the security authority of the coprocessor 113. It should be understood that the security authority of the controller 105 in this case is higher than the security authority of the main processor 112 and the coprocessor 113.

[0048] Based on this, the following diagrams corresponding to different situations are used to further explain the concept of this case. FIG. 4A to FIG. 7B Corresponding to the first embodiment, FIG. 8A to FIG. 8B This corresponds to the second embodiment.

[0049] Please refer to FIG. 4A to FIG. 4C ,in Figure 4A is a flowchart of resetting the coprocessor according to the first scenario of the first embodiment of the present invention. Figure 4B and Figure 4C is based on Figure 2 and Figure 4AA schematic diagram of the operation is shown.

[0050] First, in Figure 4A (and other figures of the present invention), the operations performed by each component are arranged in the corresponding dotted box for easy reference. For example, Figure 4A Steps S411 to S417 executed by the controller 105 are drawn in the dotted box corresponding to the controller 105; step S421 (and step S424) executed by the main processor 112 in non-secure mode are drawn in the dotted box corresponding to the main processor 112 in non-secure mode; steps S422 to S428 executed by the main processor 112 in secure mode are drawn in the dotted box corresponding to the main processor 112 in secure mode; step S430 executed by the coprocessor 113 is drawn in the dotted box corresponding to the coprocessor 113.

[0051] exist Figure 4A and Figure 4B In the embodiment of the present invention, when the computer device 200 is turned on, the controller 105 controls (holds) the reset signal corresponding to the coprocessor 113 in step S411 so that the coprocessor 113 will not perform the reset operation temporarily. It should be noted that when the reset signal corresponding to the coprocessor 113 is controlled (held), it means that the coprocessor 113 cannot perform any operation, including the reset operation. Only after the reset signal corresponding to the coprocessor 113 is released later, the coprocessor 113 can perform the operation. In step S412, the controller 105 loads the image file IM corresponding to the coprocessor 113 from the static memory 140 to the specific space 130a. In step S413, the controller 105 can verify the image file IM stored in the specific space 130a in the manner previously taught, and determine in step S414 whether the image file IM stored in the specific space 130a passes the verification.

[0052] If the image file IM stored in the specific space 130a passes the verification, it means that the image file IM stored in the specific space 130a has legal data integrity, so the controller 105 can continue to execute step S415 to enable the write protection function of the specific space 130a, and release the reset signal corresponding to the coprocessor 113 in step S417 so that the coprocessor 113 can perform a reset operation.

[0053] Accordingly, the coprocessor 113 can execute Figure 3 In step S330, the coprocessor 113 performs a reset operation based on the image file IM stored in the specific space 130a in response to the corresponding reset signal.

[0054] On the other hand, if the image file IM stored in the specific space 130a fails to pass the verification, it means that the image file IM stored in the specific space 130a does not have legal data integrity, so the controller 105 can continue to execute step S416 to control the reset signal corresponding to the coprocessor 113. Based on this, the coprocessor 113 will not perform the reset operation and / or other operations based on the image file IM stored in the specific space 130a, but it is not limited thereto.

[0055] In addition, Figure 4A and Figure 4C In the embodiment, when the reset of the coprocessor 113 is triggered, the main processor 112 (e.g., a CA35 processor under the ARM architecture) in the non-secure mode may first switch to the secure mode in step S421. It should be understood that in the embodiment where the main processor 112 is assumed to operate under the ARM CPU architecture, the main processor 112 must first switch from the non-secure mode to the secure mode through step S421 before continuing to execute step S422. However, in the embodiment where the main processor 112 operates in other processor architectures, step S421 may not be executed, but is not limited thereto. Therefore, step S421 is represented by a dotted line.

[0056] Afterwards, the main processor 112 in the safe mode can control (hold) the reset signal corresponding to the coprocessor 113 in step S422, disable the write protection function of the specific space 130a in step S423, and load the image file IM corresponding to the coprocessor 113 from the static memory 140 to the specific space 130a in step S424.

[0057] In other embodiments, since the write protection function of the specific space 130a is not necessarily in an enabled state, the second component under consideration (such as the main processor 112 or the controller 105) may accordingly skip the relevant steps of disabling the write protection function of the specific space 130a (including the corresponding steps in the subsequent figures), but is not limited to this.

[0058] In some embodiments, before executing any of steps S423 to S426, the main processor 112 may first determine whether the image file IM stored in the specific space 130a has been reorganized (e.g., whether its content has been adjusted / edited). If so, the main processor 112 may continue to execute steps S423 to S426; if not, the main processor 112 may not need to execute steps S423 to S425, and may directly execute subsequent operations, but is not limited thereto.

[0059] exist Figure 4AIn the figure, since step S424 can be executed by the main processor 112 in the secure mode or the non-secure mode, step S424 is drawn as straddling the two dashed boxes shown, and steps with similar concepts in other figures are also drawn in this way.

[0060] Next, the processor 112 in the safe mode may enable the write protection function of the specific space 130a in step S425, verify the image file IM stored in the specific space 130a in step S426, and determine whether the image file IM stored in the specific space 130a passes the verification in step S427. If yes, the processor 112 in the safe mode may continue to execute step S428 to release the reset signal corresponding to the coprocessor 113, and execute step S430 to perform a reset operation based on the executable image file IM stored in the specific space 130a in response to the corresponding reset signal; if no, the processor 112 in the safe mode may continue to execute step S429 to control (hold) the reset signal corresponding to the coprocessor 113 (or it can be understood as terminating the reset process of the coprocessor 113). The concepts of steps S422 to S429 can refer to the relevant descriptions of steps S411 to S417, and will not be repeated here.

[0061] Please refer to Figure 5A and Figure 5B ,in Figure 5A is a flowchart of resetting the coprocessor according to the second scenario of the first embodiment of the present invention. Figure 5B is based on Figure 2 and Figure 5A A schematic diagram of the operation is shown.

[0062] exist Figure 5A and Figure 5B In the embodiment, when the update of the executable image of the coprocessor 113 is triggered, the main processor 112 (e.g., the CA35 processor under the ARM architecture) in the non-secure mode may first receive the image file IM (e.g., the update image file) of the coprocessor 113 in step S511. In the second scenario of the first embodiment (the security authority of the main processor 112 is higher than the security authority of the coprocessor 113), the first component considered is, for example, the main processor 112, which may obtain the image file IM in step S310 and load the image file IM into the reference space 130b.

[0063] Afterwards, the processor 112 in the safe mode may control (hold) the reset signal corresponding to the coprocessor 113 in step S512, disable the write protection function of the specific space 130a in step S513, and load the image file IM corresponding to the coprocessor 113 into the specific space 130a in step S514.

[0064] exist Figure 5AIn the figure, since step S514 can be executed by the main processor 112 in the secure mode or the non-secure mode, step S514 is drawn as straddling the two dashed boxes shown, and steps with similar concepts in other figures are also drawn in this way.

[0065] Next, the processor 112 in the safe mode may enable the write protection function of the specific space 130a in step S515, verify the image file IM stored in the specific space 130a in step S516, and determine whether the image file IM stored in the specific space 130a passes the verification in step S517. If so, the processor 112 in the safe mode may continue to execute step S518 to load the image file IM into the static memory 140, and release the reset signal corresponding to the coprocessor 113 in step S520. Accordingly, the coprocessor 113 may perform a reset operation based on the image file IM stored in the specific space 130a in response to the corresponding reset signal in step S530 and execute the updated executable image file IM.

[0066] On the other hand, if the image file IM stored in the specific space 130a fails to pass the verification, the processor 112 in the safe mode may continue to execute step S519 to control the reset signal corresponding to the coprocessor 113 (or it can be understood as stopping the update of the coprocessor 113). The concepts of steps S512 to S519 can be referred to Figure 4A The relevant instructions for the corresponding steps in are not repeated here.

[0067] Please refer to FIG. 6A to FIG. 6C ,in Fig. 6A is a flowchart of resetting the coprocessor according to the third scenario of the first embodiment of the present invention. Figure 6B and Figure 6C is based on Figure 2 and Fig. 6A A schematic diagram of the operation is shown.

[0068] In the third scenario of the first embodiment, the first component under consideration is, for example, the main processor 112, and the second component is, for example, the controller 105, wherein the main processor 112 can obtain the image file IM in step S310 and load the image file IM into the reference space 130b. In addition, in a variation of the third scenario of the first embodiment, the first component under consideration can also be the coprocessor 113, and it can obtain the image file IM in step S310 and load the image file IM into the reference space 130b (i.e., Figure 6B and Figure 6C (corresponding to step S310 of the dotted line).

[0069] First, in step S610, in response to determining that the coprocessor 113 needs to be reset, the controller 105 determines whether the main processor 112 needs to be reset as well. In different embodiments, the coprocessor 113 may need to be reset due to one of the following reasons: (1) updating the coprocessor 113; (2) restarting the coprocessor 113; (3) system restart (the coprocessor 113 is restarted together with the main processor 112), but is not limited thereto.

[0070] Therefore, when the above three reasons occur, the controller 105 (ie, the second component) can execute the determination of step S610.

[0071] exist Figure 6B In the scenario (corresponding to steps S611 - S619 ), when the controller 105 determines in step S610 that the main processor 112 needs to be reset, the controller 105 may continue to execute step S611 to control (hold) a plurality of reset signals corresponding to the main processor 112 and the coprocessor 113 .

[0072] Then, in step S612, the controller 105 determines whether the image file IM (eg, the update image file) has been loaded into the static memory 140. If not, the controller 105 may continue to execute step S613, otherwise, the controller 105 may continue to execute step S621.

[0073] In step S613, the controller 105 disables the write protection function of the specific space 103a; in step S614, the controller 105 loads the image file IM from the reference space 103b into the specific space 103a; in step S615, the controller 105 enables the write protection function of the specific space; in step S616, the controller 105 verifies the image file IM stored in the specific space 130a.

[0074] In step S617, the controller 105 determines whether the image file IM stored in the specific space 130a passes the verification. If so, the controller 105 executes step S618 to load the image file IM stored in the specific space 130a into the static memory 140, and releases the reset signal corresponding to the main processor 112 and the coprocessor 113 in step S619, and the coprocessor 113 can correspondingly execute step S640 to perform a reset operation based on the executable image file IM stored in the specific space 130a in response to the corresponding reset signal; if not, the controller 105 executes step S620 to control the reset signal corresponding to the coprocessor 113 (which can be understood as terminating the update of the coprocessor 113).

[0075] In step S621, the controller 105 disables the write protection function of the specific space; in step S622, the controller 105 loads the image file IM from the static memory 140 into the specific space 130a; in step S623, the controller 105 enables the write protection function of the specific space 130a; in step S624, the controller 105 verifies the image file IM stored in the specific space 130a.

[0076] In step S625, the controller 105 determines whether the image file IM stored in the specific space 130a passes the verification. If so, the controller 105 executes step S627 to release the reset signal corresponding to the main processor 112 and the coprocessor 113, and the coprocessor 113 can correspondingly execute step S640 to perform a reset operation based on the image file IM stored in the specific space 130a in response to the corresponding reset signal; if not, the controller 105 executes step S626 to control the reset signal corresponding to the coprocessor 113 (which can be understood as terminating the reset of the coprocessor 113).

[0077] In one embodiment, when the controller 105 determines in step S610 that the main processor 112 does not need to be reset, the controller 105 may Figure 6C In the scenario (which corresponds to steps S628 to S635 ), step S628 is executed to hold the reset signal corresponding to the coprocessor 113 .

[0078] Next, in step S629 , the controller 105 disables the write protection function of the specific space; in step S630 , the controller 105 loads the image file IM from the reference space 130 b into the specific space 130 a .

[0079] In some embodiments, before executing any of steps S629 to S631, the controller 105 may first determine whether the image file IM stored in the specific space 130a has been reorganized (e.g., whether its content has been adjusted / edited). If so, the controller 105 may continue to execute steps S629 to S631; if not, the controller 105 may not need to execute steps S629 to S631, and may directly execute subsequent operations, but is not limited thereto.

[0080] In step S631 , the controller 105 enables the write protection function of the specific space 130 a . In step S632 , the controller 105 verifies the image file IM stored in the specific space 130 a .

[0081] In step S633, the controller 105 determines whether the image file IM stored in the specific space 130a passes the verification. If so, the controller 105 executes step S635 to release the reset signal corresponding to the coprocessor 113, and the coprocessor 113 can correspondingly execute step S640 to perform a reset operation based on the image file IM stored in the specific space 130a in response to the corresponding reset signal; if not, the controller 105 executes step S634 to control the reset signal corresponding to the coprocessor 113 (which can be understood as terminating the reset of the coprocessor 113).

[0082] Please refer to Fig. 7A and Figure 7B ,in Fig. 7A is a flowchart of resetting the coprocessor according to the fourth scenario of the first embodiment of the present invention. Figure 7B is based on Figure 2 and Fig. 7A A schematic diagram of the operation is shown.

[0083] exist Fig. 7A In the fourth scenario of the first embodiment, the first component and the second component considered are, for example, the coprocessor 113 and the main processor 112, respectively. Fig. 7A In step S310 , the coprocessor 113 may obtain the image file IM and load the image file IM into the reference space 130 b. Next, the coprocessor 113 may notify the main processor 112 that the executable image file of the coprocessor 113 needs to be updated in step S710 .

[0084] Then, the main processor 112 (i.e., the second component) may execute step S711 and subsequent steps in the secure mode. It should be understood that in the embodiment where the main processor 112 is assumed to operate under the ARM architecture, the main processor 112 must first switch from the non-secure mode to the secure mode through step S710' before continuing to execute step S711. However, in the embodiment where the main processor 112 operates under other processor architectures, step S710' may not be executed, but is not limited thereto.

[0085] In step S711, the main processor 112 controls (holds) a reset signal corresponding to the coprocessor 113; in step S712, the main processor 112 disables the write protection function of the specific space 130a; in step S713, the main processor 112 loads the image file IM from the reference space 130b into the specific space 130a; in step S714, the main processor 112 enables the write protection function of the specific space 130a; in step S715, the main processor 112 verifies the image file IM stored in the specific space 130a.

[0086] In step S716, the main processor 112 determines whether the image file IM stored in the specific space 130a passes the verification. If so, the main processor 112 executes step S717 to load the image file IM stored in the specific space 130a into the static memory 140 of the computer device 200, and executes step S719 to release the reset signal corresponding to the coprocessor 113, and the coprocessor 113 can correspondingly execute step S720 to perform a reset operation based on the image file IM stored in the specific space 130a in response to the corresponding reset signal; if not, the main processor 112 executes step S718 to control (hold) the reset signal corresponding to the coprocessor 113 (which can be understood as terminating the update of the coprocessor 113).

[0087] Please refer to FIG. 8A to FIG. 8C ,in Fig. 8A is a flowchart of resetting the coprocessor according to the first scenario of the second embodiment of the present invention, Figure 8B and Figure 8C is based on Figure 2 and Fig. 8A A schematic diagram of the operation is shown.

[0088] exist Figure 8A to Figure 8C In the embodiment, the controller 105 can be used as the first component and the second component at the same time, but is not limited to this. Figure 8B The content of FIG. 1 shows an example of the computer device 200 starting up, and Figure 8B Corresponds to Fig. 8A Steps S811 to S817 in Fig. 8A and Figure 8B In step S811, the controller 105 may control the reset signal corresponding to the coprocessor 113. Then, in step S812, the controller 105 loads the image file IM from the static memory 140 of the computer device 200 to the reference space 130b and the specific space 130a. In one embodiment, step S812 may be understood as a way for the controller 105 to perform step S310 as a first component, but is not limited thereto. Then, in step S813, the controller 105 verifies the image file IM stored in the specific space 130a.

[0089] In step S814, the controller 105 determines whether the image file IM stored in the specific space 130a passes the verification. If so, the controller 105 executes step S815 to enable the write protection function of the specific space 130a, and executes step S816 to release the reset signal corresponding to the coprocessor 113, and the coprocessor 113 can correspondingly execute step S830 to perform a reset operation based on the image file IM stored in the specific space 130a in response to the corresponding reset signal; if not, the controller 105 executes step S817 to control the reset signal corresponding to the coprocessor 113 (which can be understood as stopping the restart of the coprocessor 113).

[0090] Figure 8C The content of illustrates an embodiment in which the coprocessor 113 is triggered to reset, and Figure 8C Corresponds to Fig. 8A Steps S821 to S829 in Fig. 8A and Figure 8C In step S821, the controller 105 may hold the reset signal corresponding to the coprocessor 113. Then, in step S822, the controller 105 determines whether the specific space 130a has been reorganized (for example, whether the content of the specific space 130a has been changed / edited). If so, the controller 105 may continue to execute steps S823 to S825; if not, the controller 105 may continue to execute step S826 to maintain the write protection function of the specific space 130a.

[0091] In step S823 , the controller 105 disables the write protection function of the specific space 130 a . In step S824 , the controller 105 loads the image file IM from the reference space 130 b into the specific space 130 a . In step S825 , the controller 105 enables the write protection function of the specific space 130 a .

[0092] After step S825 and step S826 , the controller 105 may continue to execute step S827 to verify the image file IM stored in the specific space 130 a .

[0093] In step S828, the controller 105 determines whether the image file IM stored in the specific space 130a passes the verification. If so, the controller 105 executes step S829 to release the reset signal corresponding to the coprocessor 113, and the coprocessor 113 can correspondingly execute step S830 to perform a reset operation based on the image file IM stored in the specific space 130a in response to the corresponding reset signal; if not, the controller 105 executes step S817 to control (hold) the reset signal corresponding to the coprocessor 113 (which can be understood as terminating the reset of the coprocessor 113).

[0094] In the second embodiment, since the security authority of the main processor 112 is lower than the security authority of the coprocessor 113, the main processor 112 cannot Fig. 7A and Figure 7B The mechanism described above operates to control the reset / update of the coprocessor 113. In this case, only the controller 105 with a higher security authority can be used to control the reset / update of the coprocessor 113.

[0095] Further, in the first embodiment, since the security privileges of the main processor 112 and the controller 105 are higher than the security privileges of the coprocessor 113, both the main processor 112 and the controller 105 can be used to control the reset signal corresponding to the coprocessor 113. However, in the second embodiment, since the security privileges of the main processor 112 are lower than the security privileges of the coprocessor 113, only the controller 105 with a higher security privilege can be used to control the reset signal corresponding to the coprocessor 113.

[0096] Based on this, in the second embodiment, the controller 105 can still be based on FIG. 6A to FIG. 6C The mechanism described is operated to control the resetting / updating of the coprocessor 113 , and the related descriptions thereof can refer to the related contents of the previous embodiments, which will not be described in detail herein.

[0097] In summary, the method proposed in the embodiment of the present invention can use the reference space in the random access memory as another type of static memory, and when the coprocessor needs to reset / reset / update based on the file (e.g., image file) stored in the specific space, the file stored in the reference space can be loaded into the specific space for use by the coprocessor. In this way, regardless of whether the static memory is occupied (e.g., being accessed by the main processor), the coprocessor can independently complete the update / reset. In this case, the situation where the entire system freezes due to the inability of a processor to reset smoothly can be avoided.

[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for resetting a processor, suitable for a computer device including a controller, a main processor, a coprocessor and a random access memory, the method comprising: The first component of the computer device obtains an image file corresponding to the coprocessor, and the first component loads the image file into a reference space in the random access memory, wherein the random access memory includes a specific space corresponding to the coprocessor, and the first component is one of the main processor, the coprocessor and the controller; In response to determining that the coprocessor needs to be reset, a second component of the computer device loads the image file stored in the reference space into the specific space corresponding to the coprocessor, and verifies the image file stored in the specific space by the second component, wherein the second component is one of the controller and the main processor; as well as In response to the second component determining that the image file stored in the specific space passes verification, the second component resets the coprocessor based on the image file stored in the specific space.

2. The method according to claim 1, wherein the first component is the main processor or the coprocessor, the second component is the controller, the security authority of the main processor is higher than the security authority of the coprocessor, and before the step of verifying the image file by the second component, the method further comprises: In response to determining that the coprocessor needs to be reset and the main processor needs to be reset, the controller controls a plurality of reset signals corresponding to the main processor and the coprocessor; In response to determining that the image file has not been loaded into the static memory of the computer device, the controller disables the write protection function of the specific space, loads the image file from the reference space into the specific space, and enables the write protection function of the specific space; In response to the second component determining that the image file stored in the specific space passes verification, the step of resetting the coprocessor based on the image file stored in the specific space by the second component includes: The controller loads the image file stored in the specific space into the static memory and releases the multiple reset signals corresponding to the main processor and the coprocessor, wherein the coprocessor performs a reset operation based on the image file stored in the specific space in response to the corresponding reset signals.

3. The method according to claim 2, wherein after the step of controlling the plurality of reset signals corresponding to the main processor and the coprocessor by the second component, the method further comprises: In response to determining that the image file has been loaded into the static memory of the computer device, the controller disables the write protection function of the specific space, loads the image file from the static memory into the specific space, and enables the write protection function of the specific space.

4. The method according to claim 1, wherein the first component is the main processor or the coprocessor, the second component is the controller, the security authority of the main processor is higher than the security authority of the coprocessor, and before the step of verifying the image file stored in the specific space by the second component, the method further comprises: In response to determining that the coprocessor needs to be reset but the main processor does not need to be reset, the controller controls a reset signal corresponding to the coprocessor; The controller disables the write protection function of the specific space, loads the image file from the reference space into the specific space, and enables the write protection function of the specific space; In response to the second component determining that the image file stored in the specific space passes verification, the step of resetting the coprocessor based on the image file stored in the specific space by the second component includes: The controller releases the reset signal corresponding to the coprocessor, wherein the coprocessor performs a reset operation based on the image file stored in the specific space in response to the corresponding reset signal.

5. The method according to claim 1, wherein the first component is the coprocessor, the second component is the main processor, the security permission of the main processor is higher than the security permission of the coprocessor, and before the step of verifying the image file stored in the specific space by the second component, the method further comprises: In response to determining that the coprocessor needs to be reset, the main processor controls a reset signal corresponding to the coprocessor; The main processor disables the write protection function of the specific space, loads the image file from the reference space into the specific space, and enables the write protection function of the specific space; In response to the second component determining that the image file stored in the specific space passes verification, the step of resetting the coprocessor based on the image file stored in the specific space by the second component includes: The main processor loads the image file stored in the specific space into the static memory of the computer device and releases the reset signal corresponding to the coprocessor, wherein the coprocessor performs a reset operation based on the image file stored in the specific space in response to the corresponding reset signal.

6. The method according to claim 1, further comprising: In response to determining that the computer device is activated or a reset operation of the coprocessor is triggered, it is determined that the coprocessor needs to be reset.

7. The method according to claim 6, wherein the first component and the second component are both the controller, the security privilege of the main processor is lower than the security privilege of the coprocessor, and before the step of verifying the image file stored in the specific space by the second component, the method further comprises: In response to determining that the computer device is activated, controlling, by the controller, a reset signal corresponding to the coprocessor; The controller loads the image file from the static memory of the computer device into the reference space and the specific space; In response to the second component determining that the image file stored in the specific space passes verification, the step of resetting the coprocessor based on the image file stored in the specific space by the second component includes: The controller enables a write protection function of the specific space and releases the reset signal corresponding to the coprocessor, wherein the coprocessor performs a reset operation based on the image file stored in the specific space in response to the corresponding reset signal.

8. The method according to claim 6, wherein the first component and the second component are both the controller, the security privilege of the main processor is lower than the security privilege of the coprocessor, and before the step of verifying the image file stored in the specific space by the second component, the method further comprises: In response to determining that the computer device is activated, controlling, by the controller, a reset signal corresponding to the coprocessor; determining whether the specific space has been reorganized; In response to the specific space being reorganized, the controller disables a write protection function of the specific space, loads the image file from the reference space into the specific space, and enables the write protection function of the specific space; In response to the specific space not being reorganized, the controller maintains the write protection function of the specific space; In response to the second component determining that the image file stored in the specific space passes verification, the step of resetting the coprocessor based on the image file stored in the specific space by the second component includes: The controller releases the reset signal corresponding to the coprocessor, wherein the coprocessor performs a reset operation based on the image file stored in the specific space in response to the corresponding reset signal.

9. The method according to claim 1, wherein the first component is the main processor or the coprocessor, the second component is the controller, the security privilege of the main processor is lower than the security privilege of the coprocessor, and before the step of verifying the image file by the second component, the method further comprises: In response to determining that the coprocessor needs to be reset and the main processor needs to be reset, the controller controls a plurality of reset signals corresponding to the main processor and the coprocessor; In response to determining that the image file has not been loaded into the static memory of the computer device, the controller disables the write protection function of the specific space, loads the image file from the reference space into the specific space, and enables the write protection function of the specific space; In response to the second component determining that the image file stored in the specific space passes verification, the step of resetting the coprocessor based on the image file stored in the specific space by the second component includes: The controller loads the image file stored in the specific space into the static memory and releases the multiple reset signals corresponding to the main processor and the coprocessor, wherein the coprocessor performs a reset operation based on the image file stored in the specific space in response to the corresponding reset signals.

10. The method according to claim 9, wherein after the step of controlling the plurality of reset signals corresponding to the main processor and the coprocessor by the second component, the method further comprises: In response to determining that the image file has been loaded into the static memory of the computer device, the controller disables the write protection function of the specific space, loads the image file from the static memory into the specific space, and enables the write protection function of the specific space.

11. The method according to claim 1, wherein the first component is the main processor or the coprocessor, the second component is the controller, the security privilege of the main processor is lower than the security privilege of the coprocessor, and before the step of verifying the image file stored in the specific space by the second component, the method further comprises: In response to determining that the coprocessor needs to be reset but the main processor does not need to be reset, the controller controls a reset signal corresponding to the coprocessor; The controller disables the write protection function of the specific space, loads the image file from the reference space into the specific space, and enables the write protection function of the specific space; In response to the second component determining that the image file stored in the specific space passes verification, the step of resetting the coprocessor based on the image file stored in the specific space by the second component includes: The controller releases the reset signal corresponding to the coprocessor, wherein the coprocessor performs a reset operation based on the image file stored in the specific space in response to the corresponding reset signal.

12. A computer device comprising: Controller; Main processor; Coprocessor; as well as Random Access Memory, wherein a first component of the computer device obtains an image file corresponding to the coprocessor, and the first component loads the image file into a reference space in the random access memory, wherein the random access memory includes a specific space corresponding to the coprocessor, and the first component is one of the main processor, the coprocessor and the controller; In response to determining that the coprocessor needs to be reset, a second component of the computer device loads the image file stored in the reference space into the specific space corresponding to the coprocessor, and the second component verifies the image file stored in the specific space, wherein the second component is one of the controller and the main processor; as well as In response to the second component determining that the image file stored in the specific space passes verification, the second component resets the coprocessor based on the image file stored in the specific space.

13. The computer device according to claim 12, wherein the first component is the main processor or the coprocessor, the second component is the controller, the security authority of the main processor is higher than the security authority of the coprocessor, and before the second component verifies the image file, the controller further executes: In response to determining that the coprocessor needs to be reset and the main processor needs to be reset, controlling a plurality of reset signals corresponding to the main processor and the coprocessor; In response to determining that the image file has not been loaded into the static memory of the computer device, disabling a write protection function of the specific space, loading the image file from the reference space into the specific space, and enabling the write protection function of the specific space; in, In response to the second component determining that the image file stored in the specific space passes the verification, the controller executes: The image file stored in the specific space is loaded into the static memory, and the multiple reset signals corresponding to the main processor and the coprocessor are released, wherein the coprocessor performs a reset operation based on the image file stored in the specific space in response to the corresponding reset signals.

14. The computer device according to claim 13, wherein after the second component controls the plurality of reset signals corresponding to the main processor and the coprocessor, the controller further executes: In response to determining that the image file has been loaded into the static memory of the computer device, the write protection function of the specific space is disabled, the image file is loaded from the static memory into the specific space, and the write protection function of the specific space is enabled.

15. The computer device according to claim 12, wherein the first component is the main processor or the coprocessor, the second component is the controller, the security authority of the main processor is higher than the security authority of the coprocessor, and before the second component verifies the image file stored in the specific space, the controller further executes: In response to determining that the coprocessor needs to be reset but the main processor does not need to be reset, controlling a reset signal corresponding to the coprocessor; disabling a write protection function of the specific space, loading the image file from the reference space into the specific space, and enabling the write protection function of the specific space; in, In response to the second component determining that the image file stored in the specific space passes the verification, the controller executes: The reset signal corresponding to the coprocessor is released, wherein the coprocessor performs a reset operation based on the image file stored in the specific space in response to the corresponding reset signal.

16. The computer device according to claim 12, wherein the first component is the coprocessor, the second component is the main processor, the security permission of the main processor is higher than the security permission of the coprocessor, and before the second component verifies the image file stored in the specific space, the main processor further executes: In response to determining that the coprocessor needs to be reset, controlling a reset signal corresponding to the coprocessor; disabling a write protection function of the specific space, loading the image file from the reference space into the specific space, and enabling the write protection function of the specific space; in, In response to the second component determining that the image file stored in the specific space passes the verification, the main processor executes: The image file stored in the specific space is loaded into the static memory of the computer device, and the reset signal corresponding to the coprocessor is released, wherein the coprocessor performs a reset operation based on the image file stored in the specific space in response to the corresponding reset signal.

17. The computer device according to claim 12, wherein in response to determining that the computer device is activated or a reset operation of the coprocessor is triggered, it is determined that the coprocessor needs to be reset.

18. The computer device according to claim 17, wherein the first component and the second component are both the controller, the security privilege of the main processor is lower than the security privilege of the coprocessor, and before the second component verifies the image file stored in the specific space, the controller further executes: In response to determining that the computer device is activated, controlling a reset signal corresponding to the coprocessor; Loading the image file from the static memory of the computer device into the reference space and the specific space; in, In response to the second component determining that the image file stored in the specific space passes the verification, the controller executes: The write protection function of the specific space is enabled, and the reset signal corresponding to the coprocessor is released, wherein the coprocessor performs a reset operation based on the image file stored in the specific space in response to the corresponding reset signal.

19. The computer device according to claim 17, wherein the first component and the second component are both the controller, the security privilege of the main processor is lower than the security privilege of the coprocessor, and before the second component verifies the image file stored in the specific space, the controller further executes: In response to determining that the computer device is activated, controlling a reset signal corresponding to the coprocessor; determining whether the specific space has been reorganized; In response to the specific space having been reorganized, disabling a write protection function of the specific space, loading the image file from the reference space into the specific space, and enabling the write protection function of the specific space; In response to the specific space not being reorganized, maintaining the write protection function of the specific space; In response to the second component determining that the image file stored in the specific space passes the verification, the controller executes: The reset signal corresponding to the coprocessor is released, wherein the coprocessor performs a reset operation based on the image file stored in the specific space in response to the corresponding reset signal.

20. The computer device according to claim 12, wherein the first component is the main processor or the coprocessor, the second component is the controller, the security privilege of the main processor is lower than the security privilege of the coprocessor, and before the second component verifies the image file, the controller further executes: In response to determining that the coprocessor needs to be reset and the main processor needs to be reset, controlling a plurality of reset signals corresponding to the main processor and the coprocessor; In response to determining that the image file has not been loaded into the static memory of the computer device, disabling a write protection function of the specific space, loading the image file from the reference space into the specific space, and enabling the write protection function of the specific space; in, In response to the second component determining that the image file stored in the specific space passes the verification, the controller executes: The image file stored in the specific space is loaded into the static memory, and the multiple reset signals corresponding to the main processor and the coprocessor are released, wherein the coprocessor performs a reset operation based on the image file stored in the specific space in response to the corresponding reset signals.

21. The computer device according to claim 20, wherein after the second component controls the plurality of reset signals corresponding to the main processor and the coprocessor, the controller further executes: In response to determining that the image file has been loaded into the static memory of the computer device, the write protection function of the specific space is disabled, the image file is loaded from the static memory into the specific space, and the write protection function of the specific space is enabled.

22. The computer device according to claim 12, wherein the first component is the main processor or the coprocessor, the second component is the controller, the security privilege of the main processor is lower than the security privilege of the coprocessor, and before the second component verifies the image file stored in the specific space, the controller further executes: In response to determining that the coprocessor needs to be reset but the main processor does not need to be reset, controlling a reset signal corresponding to the coprocessor; disabling a write protection function of the specific space, loading the image file from the reference space into the specific space, and enabling the write protection function of the specific space; in, In response to the second component determining that the image file stored in the specific space passes the verification, the controller executes: The reset signal corresponding to the coprocessor is released, wherein the coprocessor performs a reset operation based on the image file stored in the specific space in response to the corresponding reset signal.