The present invention relates to methods for power supply monitoring and for devices having power supply monitoring capabilities.
Real time clock generators have various applications. They can be used for providing timing information for operating systems, for enforcing policies for time-sensitive data, for assisting in positioning calculations and the like. U.S patent application serial number 2002/0083284 of Matsubara et al., titled “Data reproduction system, data recorder and data reader preventing fraudulent usage by monitoring reproducible time limit”, U.S. Pat. No. 5,920,727 of Kikinis et al., titled “Timer-controlled computer system shutdown and startup”, U.S patent application serial number 2004/0128528 of Poisner titled “Trusted real time clock” and U.S patent application serial number 2004/0225439 of Gronemeyer, titled “Method and apparatus for real time clock (RTC) brownout detection, all being incorporated herein by reference, illustrate some usages of real time clocks.
Real time clock signals can be tampered for various reasons including copyrighting piracy, concealing hacking or tampering attempts, reducing the functionality of a device and the like.
One tampering method involves repetitive alterations of the power supply level provided to the real time clock generator, in order to force the real time clock generator to reset or to get stuck.
There is a need to provide efficient methods and devices for performing voltage supply monitoring.
A device and a method for monitoring power supply and devices having power supply monitoring capabilities, as described in the accompanying claims.
The present invention will be understood and appreciated more fully from the following detailed description taken in conjunction with the drawings in which:
Embodiments of the present invention illustrated in the accompanying drawings provide an information processing apparatus such as a mobile phone, a personal data accessory or a media player that includes a device that is capable of monitoring a power supply provided to a real time clock.
By comparing between a fixed value stored in a fixed value storage circuit and between a value stored in a volatile storage unit an indication about a voltage supply drop or supply unit failure can be generated. The fixed value storage circuit can be a one time programmable circuit that is set during a configuration of the integrated circuit, or can be a circuit that is defined by the mask of the integrated circuit. The fixed value can be set per each integrated circuit or can be set per multiple integrated circuits (for example per an integrated circuit batch).
Conveniently, a device is provided. The device includes: (i) a power supply unit; (ii) at least one real time clock generator counter adapted to receive a supply voltage from the power supply unit; (iii) a fixed value storage circuit that is un-accessible to software executed by a processor; wherein the first fixed value storage circuit stores a fixed value; wherein the fixed value includes multiple bits; (iv) a volatile storage unit, being accessible to the processor; wherein the volatile storage unit is adapted to: store a reset value after being reset; receive the fixed value during an initialization state; and store the fixed value until being reset; wherein the volatile storage unit is designed such that there is a low probability that the reset value equals the fixed value; and (v) a comparator adapted to provide a tamper indication if the fixed value stored at the fixed value storage circuit differs from a value stored at the volatile storage unit.
A method for power supply monitoring is provided. The method includes: (i) storing 310 a fixed value at a fixed value storage circuit that is un-accessible to software executed by a processor; wherein the fixed value includes multiple bits; (ii) providing a supply voltage to a real time clock generator counter; (iii) providing to a volatile storage unit, during an initialization stage, the fixed value; wherein the volatile storage unit is accessible to the processor; and (iv) storing the fixed value at the volatile storage unit, until being reset; wherein the volatile storage unit is designed such that there is a low probability that the reset value equals the fixed value; and (v) generating a tamper indication if the fixed value stored at the fixed value storage circuit differs from a value stored at the volatile storage unit.
Device 10 includes a power supply unit 60 that supplied a voltage supply to various components of device 10. Some components (such as processor 130) receive a supply voltage during non-idle modes while other components (such as volatile storage unit 30) can receive a supply voltage in a constant uninterrupted manner.
Conveniently, processor 130 can be powered by primary battery 80 of power supply unit 60 while volatile storage unit 30 can receive a supply voltage from primary battery 80 or from secondary battery 70, in response to the state of primary battery 80.
Volatile storage unit 30 is connected between processor 130 and comparator 40. Processor 130 is also connected to instruction read only memory unit (IROM) 180, to real time clock registers (RTC register) 160.
RTC state machine is connected to second one time programmable (OTP) array 110 that indicate the security mode (out of a plurality of security modes) of real time clock generator 12. There are three security modes—high security mode, medium security mode and low security mode. These modes will be further illustrated in reference to
Conveniently, the security modes differ from each other by a security condition that if fulfilled allows writing a fixed value to volatile storage unit 30. A fixed value storage circuit 20 stores the fixed value while the volatile storage unit 30 can store the fixed value or a reset value. The reset value usually differs from the fixed value. Conveniently, during a high security mode the fixed value is written to volatile storage unit 30 under a control of a code fetched from IROM 180 that is accessible to processor 130.
Conveniently, during a medium security mode the fixed value is written to volatile storage unit 30 under a control of a secure software executed by the processor 130. A secure software can be executed by processor 130 during a supervisor more or any high security level execution mode indicated by a hard signal from the processor to the real time clock.
According to an embodiment of the invention the fixed value is written to the volatile storage unit 30 only once during a lifetime of the device. Thus, if both primary and secondary batteries 80 and 70 are empty the device 10 will be disabled. Such a configuration is illustrated in
Device 10 and especially volatile storage unit 30 are designed such that there is only a very small chance that the reset value of volatile storage unit 30 will equal the fixed value. It is noted that the reset value can differ from one reset to another and that it can be determined in a random or semi-random manner. It is further notes that the fixed value includes multiple digits.
For example, first volatile storage unit 30 may includes multiple flip flops that are not connected to a power on reset signal and are not reset during power drops. After a power drop occurs the value stored in volatile storage unit 30 can be random or can be set by pull up and alternatively or additionally, pull down circuits. When pull up or pull down circuits are used the writing process should be designed such as to allow overwriting the values that are forced by the pull up or the pull down circuits. For example, first volatile storage unit 20 can includes multiple flip flops that have inputs that are “open” after device 10 recovers from a reset situation. Yet for another example, volatile storage unit 30 can includes multiple flip-flops that have a tendency to have a certain reset value. This can be achieved by using stronger NMOS transistors or stronger PMOS transistors.
Comparator 40 compares between the fixed value stored at fixed value storage circuit 20 and between the value (reset value or fixed value) stored at volatile storage unit 30. A voltage supply tamper alarm 101 can be generated if the fixed value stored at fixed value storage circuit 20 differs from the value (reset value or fixed value) stored at volatile storage unit 30. According to an embodiment of the invention, illustrated in
Real time clock generator 12 also includes at least one real time clock counter 150 and a real time clock monitor 170. Real time clock monitor 170 can monitors the real time clock signal outputted by real time clock counter 150, for example by monitoring the DC level of the real time clock signal, by measuring the frequency of the real time clock signal and the like. Real time clock monitor 170 can be adapted to determine the frequency of a real time clock signal, during a short monitoring period and conveniently during a single real time clock cycle. It can include a sampling circuit that samples the real time clock signal during multiple points in time during one (or few) real time clock cycles. It can include a high frequency oscillator that is connected to a counter whereas the number of oscillations during one or few real time clock cycles indicates the frequency of the real time clock signal.
It is further notes that is a real time clock failure is detected (for example real time clock tamper alarm 102 or voltage supply tamper alarm 101 were generated than a failure indication can be stored at real time clock register 160.
Power supply unit 60 includes primary battery 80, secondary battery 70, primary battery power monitor 90, first switch 100 and second switch 110. Primary battery power monitor 90 monitors primary battery 80 and while the primary battery 80 is full enough it allows volatile storage unit 30 and secondary battery 70 to be powered by primary battery. It is implemented by closing second switch 110 and connecting volatile storage unit 30 to primary battery 80 via first switch 100. When the primary battery 80 is not full enough then primary battery power monitor 90 disconnects secondary battery 70 from primary battery 80 and connects secondary battery 70 to volatile storage unit 30.
State diagram 200 illustrates four states of RCT state machine 120: initialization state 202, non-valid state 204, valid state 208 and fault state 206. Real time clock generator 12 is in initialization state 202 after being powered for the first time or after device 10 is powered on reset (POR). During non-valid state 204 the real time clock counter 150 is not set and a real time clock signal outputted from this counter is regarded as invalid. During valid state 208 the real time clock generator counts time and the real time clock signal outputted from real time clock counter 150 is regarded as valid. Faults states 206 indicates that a failure (power supply failure, real time clock generator failure was detected).
During initialization state 202 a tamper protected software stored at IROM 180 or a software that authenticated by a tamper protected software stored at IROM 180 can write the fixed value to volatile storage unit 30. The HAB routine can also clear a failure record within real time clock register 160.
RTC can exit initialization state 202 in control of a code fetched from IROM 180 and executed by processor 130. If RTC register 160 stores a failure indication that state 202 is followed by fault state 206, else initialization state 202 is followed by non-valid state 204.
Valid state 208 can follow non-valid state 204 under the control of a code fetched from IROM 180 and executed by processor 130 or under the control of a HAB routine. Initialization state 204 and valid state 208 are followed by fault state 206 if a failure is detected. Fault state 206 is followed by initialization state when a power on reset occurs.
State diagram 220 illustrates four states of RCT state machine 120: initialization state 202′, non-valid state 204, valid state 208 and fault state 206.
During initialization state 202′ the HAB routine or a secure software executed by processor 130 can write the fixed value to volatile storage unit 30 and can clear a failure record within real time clock register 160.
Valid state 208 can follow non-valid state 204 under the control of secure software executed by processor 130.
State diagram 240 illustrates four states of RCT state machine 120: initialization state 202″, non-valid state 204, valid state 208 and fault state 206.
During initialization state 202″ even non-secure software executed by processor 130 can write the fixed value to volatile storage unit 30 and can clear a failure record within real time clock register 160.
Valid state 208 can follow non-valid state 204 even under the control of non-secure software executed by processor 130.
In device 11 the fixed value is written to volatile storage unit 30 (conveniently, by connecting volatile storage unit 30 to fixed value storage circuit 20) and the disconnecting the connection between fixed value storage circuit 20 and volatile storage unit 30. This can be done by altering a value stored in OTP switch array control 65 after the writing of the fixed value takes place. This alteration can be done by the manufacture of device 10, that can burn a fuse within OTP switch array control 60 such as to disconnect the volatile storage unit 30 from fixed value storage circuit 20 and to prevent future writing of the fixed value to volatile storage unit 30.
Method 300 starts by storing 310 a fixed value at a fixed value storage circuit that is un-accessible to software executed by a processor. The fixed value includes multiple bits. It is noted that the first OTP can not be read by the processor.
Stage 310 is followed by stage 320 of determining a security mode of the real time clock generator in response to a control value stored at a second one time programmable array.
Stage 320 is followed by stage 330 of providing a power supply to a real time clock generator counter.
Conveniently, stage 330 includes providing a supply voltage to the volatile storage unit during idle mode of the processor.
Conveniently, stage 330 includes constantly providing a supply voltage to the volatile storage unit until both a primary battery and a secondary battery of a power supply unit are emptied.
Stage 330 is followed by stage 340 of providing to a volatile storage unit, during an initialization stage, the fixed value. The volatile storage unit is accessible to the processor.
Conveniently, stage 340 of providing is responsive to a fulfillment of a security condition. Conveniently, one security mode of the real time clock generator differs from another security mode of the real time clock generator by their associated security conditions.
According to various embodiments of the invention stage 340 of providing is controlled by one or more of the following: (i) a code fetched from an instruction read only memory unit accessible to the processor; (ii) a secure software executed by the processor; (iii) a HAB routine; (iv) a non-secure software program; or (v) a OTP switch control array.
According to another embodiment of the invention stage 340 is executed only once during a lifetime of the device.
Stage 340 is followed by stage 350 of storing the fixed value at the volatile storage unit, until being reset. The volatile storage unit is designed such that there is a low probability that the reset value equals the fixed value.
Stage 350 is followed by stage 370 of generating a tamper indication if the fixed value stored at the fixed value storage circuit differs from a value stored at the volatile storage unit. Conveniently, stage 370 includes stage 375 of comparing between the fixed value stored at the fixed value storage circuit.
Conveniently, stage 370 includes stage 378 of determining whether to generate a tamper alert in response to a result of the comparison and in response to a state of a real time clock generator that includes the real time clock generator counter.
Variations, modifications, and other implementations of what is described herein will occur to those of ordinary skill in the art without departing from the spirit and the scope of the invention as claimed. Accordingly, the invention is to be defined not by the preceding illustrative description but instead by the spirit and scope of the following claims.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/IB2006/053968 | 10/27/2006 | WO | 00 | 4/27/2009 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2008/050180 | 5/2/2008 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
5577220 | Combs et al. | Nov 1996 | A |
5596512 | Wong et al. | Jan 1997 | A |
5920727 | Kikinis et al. | Jul 1999 | A |
6351220 | Gunther et al. | Feb 2002 | B1 |
6814297 | Mueller | Nov 2004 | B2 |
20020083284 | Matsubara et al. | Jun 2002 | A1 |
20040128528 | Poisner | Jul 2004 | A1 |
20040225439 | Gronemeyer | Nov 2004 | A1 |
20050218939 | Ma | Oct 2005 | A1 |
20060007616 | Pan et al. | Jan 2006 | A1 |
Number | Date | Country |
---|---|---|
59109876 | Jun 1984 | JP |
Number | Date | Country | |
---|---|---|---|
20100070791 A1 | Mar 2010 | US |