CN-116089134-B - Power management method and power management device
Abstract
The invention provides a power management method and a power management device. The method comprises the steps of reading a specific memory, wherein the specific memory comprises a plurality of fault data records, selecting the specific data records based on the use state indicators of the fault data records, sequentially sending enabling signals to the hardware devices, responding to the judgment that no enabling successful response corresponding to the enabling signals is received from the specific hardware devices or a start-up alarm is received, at least obtaining a low pin value and a power management state, recording the low pin value and the power management state in the specific data records, and correspondingly updating the use state indicators of the specific data records. Therefore, the related maintenance personnel can know what kind of faults possibly occur on the electronic device by checking the content of the specific memory, and further the subsequent debugging/maintenance efficiency is improved.
Inventors
- WANG YUMIN
- ZHANG ZHICHAO
- Lai Yingxiu
Assignees
- 优达科技股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20211213
- Priority Date
- 20211108
Claims (16)
- 1. A power management method, a power management device adapted to control a plurality of hardware devices, comprising: Reading a specific memory in the power management device, wherein the specific memory comprises a plurality of fault data records, wherein each fault data record is provided with a use state indicator, wherein each fault data record at least comprises a first part, a second part and a third part, wherein the first part stores a low pin number value, the second part stores a power management state, and the third part stores a power-on alarm, and the length of each of the first part, the second part and the third part is set according to requirements; Selecting a particular data record from the plurality of fault data records based on the usage status indicators of each of the fault data records, wherein the usage status indicators of each of the fault data records indicate a used status indicating that a corresponding one of the fault data records has been used or an unused status indicating that a corresponding one of the fault data records has not been used, wherein selecting the particular data record from the plurality of fault data records based on the usage status indicators of each of the fault data records comprises: selecting at least one candidate data record from the plurality of fault data records, wherein the usage status indicator of each of the candidate data records indicates the unused status; selecting one of at least one candidate data record as the specific data record; sequentially sending an enabling signal to each hardware device, wherein the enabling signal is used for enabling each hardware device; Responsive to determining that an enable success response corresponding to the enable signal has not been received from a particular hardware device of the plurality of hardware devices, or the power-on alert has been received, obtaining at least the low pin value and the power management state; the low pin value and the power management state are recorded in the particular data record, and the usage status indicator of the particular data record is updated accordingly.
- 2. The method of claim 1, further comprising: In response to failing to find any candidate data record from the plurality of fault data records, altering the usage status indicator of each of the fault data records to indicate the unused status, and again selecting at least one candidate data record from the plurality of fault data records.
- 3. The method of claim 1, further comprising: and in response to determining that the startup alarm is received, recording the startup alarm in the specific data record.
- 4. The method of claim 1, wherein the step of choosing the particular data record from the plurality of fault data records based on the usage status indicator for each fault data record comprises: (a1) Acquiring an ith fault data record in the plurality of fault data records and the use state indicator of the ith fault data record, wherein the initial value of i is 1; (a2) In response to determining that the usage status indicator of the ith failure data record indicates that the ith failure data record is not used, determining that the ith failure data record is the particular data record.
- 5. The method of claim 4, further comprising: (a3) In response to determining that the usage status indicator of the ith failure data record indicates that the ith failure data record has been used, incrementing i, and performing step (a 1) again.
- 6. The method of claim 4, further comprising: in response to determining that the usage status indicator of an nth failure data record of the plurality of failure data records indicates that the nth failure data record has been used, the usage status of each of the failure data records is indicated Fu Chongzhi, and step (a 1) is returned, where N is the number of the plurality of failure data records.
- 7. The method of claim 1, wherein sequentially sending the enable signal to each of the hardware devices comprises: (b1) Transmitting the enabling signal to an ith hardware device in the plurality of hardware devices, wherein the initial value of i is 1; (b2) In response to determining that the enable successful response corresponding to the enable signal is received from the ith hardware device, incrementing i, and performing step (b 1) again.
- 8. The method of claim 7, further comprising: And in response to determining that the enable successful response corresponding to the enable signal is not received from the ith hardware device within a specified time, determining that the ith hardware device is the specific hardware device.
- 9. A power management apparatus that controls a plurality of hardware devices, the power management apparatus comprising: A specific memory, wherein the specific memory comprises a plurality of fault data records, and each fault data record has a use state indicator, wherein each fault data record at least comprises a first part, a second part and a third part, wherein the first part stores a low pin number value, the second part stores a power management state, and the third part stores a power-on alarm, and the length of each of the first part, the second part and the third part is set according to requirements; a power management circuit coupled to the specific memory and configured to: Reading the specific memory in the power management device; picking a particular data record from the plurality of fault data records based on the usage status indicators for each of the fault data records, wherein the usage status indicators for each of the fault data records indicate a used status indicating that a corresponding one of the fault data records has been used or an unused status indicating that a corresponding one of the fault data records has not been used; selecting at least one candidate data record from the plurality of fault data records, wherein the usage status indicator of each of the candidate data records indicates the unused status; selecting one of at least one candidate data record as the specific data record; sequentially sending an enabling signal to each hardware device, wherein the enabling signal is used for enabling each hardware device; Responsive to determining that an enable success response corresponding to the enable signal has not been received from a particular hardware device of the plurality of hardware devices, or the power-on alert has been received, obtaining at least the low pin value and the power management state; the low pin value and the power management state are recorded in the particular data record, and the usage status indicator of the particular data record is updated accordingly.
- 10. The power management device of claim 9, wherein the power management circuit is further configured to: In response to failing to find any candidate data record from the plurality of fault data records, altering the usage status indicator of each of the fault data records to indicate the unused status, and again selecting at least one candidate data record from the plurality of fault data records.
- 11. The power management device of claim 9, wherein the power management circuit is further configured to: and in response to determining that the startup alarm is received, recording the startup alarm in the specific data record.
- 12. The power management device of claim 9, wherein the power management circuit is configured to: (a1) Acquiring an ith fault data record in the plurality of fault data records and the use state indicator of the ith fault data record, wherein the initial value of i is 1; (a2) In response to determining that the usage status indicator of the ith failure data record indicates that the ith failure data record is not used, determining that the ith failure data record is the particular data record.
- 13. The power management device of claim 12, wherein the power management circuit is further configured to: (a3) In response to determining that the usage status indicator of the ith failure data record indicates that the ith failure data record has been used, incrementing i, and performing step (a 1) again.
- 14. The power management device of claim 12, wherein the power management circuit is further configured to: in response to determining that the usage status indicator of an nth failure data record of the plurality of failure data records indicates that the nth failure data record has been used, the usage status of each of the failure data records is indicated Fu Chongzhi, and step (a 1) is returned, where N is the number of the plurality of failure data records.
- 15. The power management device of claim 9, wherein the step of sequentially sending the enable signal to each hardware device comprises: (b1) Transmitting the enabling signal to an ith hardware device in the plurality of hardware devices, wherein the initial value of i is 1; (b2) In response to determining that the enable successful response corresponding to the enable signal is received from the ith hardware device, incrementing i, and performing step (b 1) again.
- 16. The power management device of claim 15, wherein the power management circuit is further configured to: And in response to determining that the enable successful response corresponding to the enable signal is not received from the ith hardware device within a specified time, determining that the ith hardware device is the specific hardware device.
Description
Power management method and power management device Technical Field The present invention relates to a power management mechanism, and more particularly, to a power management method and a power management apparatus suitable for a Central Processing Unit (CPU). Background Generally, in the process of powering on a computer, a related start/enable program is executed on a CPU. Since the CPU includes various hardware devices/components, these hardware devices/components are sequentially enabled according to the specifications of the related CPU circuit specifications when the CPU is started. However, if a hardware device/component fails during the power-on process, maintenance personnel cannot know the failure, which makes maintenance difficult. Disclosure of Invention In view of the above, the present invention provides a power management method and a power management device, which can be used to solve the above-mentioned technical problems. The invention provides a power management method, which is suitable for controlling a power management device of a plurality of hardware devices and comprises the steps of reading a specific memory in the power management device, wherein the specific memory comprises a plurality of fault data records, each fault data record is provided with a use state indicator, selecting a specific data record from the fault data records based on the use state indicator of each fault data record, sequentially sending an enabling signal to each hardware device, responding to judging that an enabling success response corresponding to the enabling signal is not received from the specific hardware device in the hardware devices, or receiving a starting alarm, at least obtaining a low pin number value and a power management state, recording the low pin number value and the power management state in the specific data record, and correspondingly updating the use state indicator of the specific data record. The invention provides a power management device which controls a plurality of hardware devices. The power management device comprises a specific memory and a power management circuit. The specific memory includes a plurality of fault data records, and each fault data record has a use status indicator. The power management circuit is coupled to the specific memory and configured to read the specific memory in the power management device, select a specific data record from the plurality of fault data records based on the usage status indicator of each fault data record, sequentially send an enable signal to each hardware device, obtain at least a low pin value and a power management status in response to determining that an enable success response corresponding to the enable signal is not received from a specific hardware device of the plurality of hardware devices or a power-on alarm is received, record the low pin value and the power management status in the specific data record, and update the usage status indicator of the specific data record accordingly. Drawings The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention. Fig. 1 is a schematic diagram of a power management apparatus according to an embodiment of the invention. FIG. 2 is a diagram illustrating a plurality of fault data records according to an embodiment of the present invention. FIG. 3 is a flowchart of a power management method according to an embodiment of the invention. Detailed Description Reference will now be made in detail to the exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts. Fig. 1 is a schematic diagram of a power management apparatus according to an embodiment of the invention. In an embodiment of the present invention, the power management device 100 may include, for example, a power management circuit 101 and a specific memory 102, wherein the power management circuit 101 is coupled to the specific memory 102, and the specific memory 102 may be, for example, a non-volatile memory. In some embodiments, the power management device 100 may be disposed in the same electronic device (e.g., various intelligent devices and/or computer devices) as a processor (e.g., a CPU) for performing power management on a plurality of hardware devices 111-11K (K is the number of hardware devices) in the processor. In some embodiments, the power management device 100 may further include a Low Pin Count (LPC) interface 103, a state machine 104, and an alarm interface 105, each connected to the power management circuit 101. In one embodiment, LPC interface 103 may be used to obtain relevant LPC values/data fr