rand_log(__PRETTY_FUNCTION__);
assert(useARMTime != -1);
- if (useARMTime) {
- lastTime = ARM_time(lastTime);
- } else {
+ switch(useARMTime)
+ {
+ case 1: // T|C
+ lastTime = ARM_time(lastTime);
+ break;
+ case 2: // Treo650
+ lastTime = ARM_time2(lastTime);
+ break;
+ default:
lastTime = TimGetTicks();
}
return lastTime;
uint32_t value32;
uint8_t value8;
uint32_t warned = 0;
+ uint32_t t1 = 0;
+ uint32_t t2 = 0;
if (!rng) rng = fortuna_create();
uint32_t deviceID = 0;
FtrGet(sysFtrCreator, sysFtrNumOEMCompanyID, &companyID);
FtrGet(sysFtrCreator, sysFtrNumOEMDeviceID, &deviceID);
- useARMTime = (companyID == 'palm' && deviceID == 'MT64'); // T|C
+ if (companyID == 'palm' && deviceID == 'MT64')// T|C
+ {
+ useARMTime = 1;
+ }
+ else if (deviceID == 'H102')
+ {
+ useARMTime = 2;
+ }
+ else
+ {
+ useARMTime = 0;
+ }
+
+ // check if ARM time is working
+ RAND_time();
+ t1 = RAND_time();
+ t2 = RAND_time();
+ if (t1 == t2)
+ {
+ useARMTime = 0;
+ }
if (!useARMTime) {
// Entropy sources suck - complain
mcreq p14, 0, r2, c0, c0, 0 // enable timer
mov r0, r1 // return new time
bx lr // return to caller (ARM or Thumb)
+
+
+.global ARM_time2
+.thumb_func
+ARM_time2:
+ // switch to ARM
+ mov r3, pc
+ bx r3
+
+.code 32
+ mrc p14, 0, r1, c1, c1, 0 // read timer
+ cmp r1, r0 // if (time == oldtime) {
+ ldreq r2, =0x00000005 // enable timer
+ mcreq p14, 0, r2, c0, c1, 0 // enable timer
+ mov r0, r1 // return new time
+ bx lr // return to caller (ARM or Thumb)
#include "includes.h"
uint32_t ARM_time(uint32_t param);
+uint32_t ARM_time2(uint32_t param);
#endif
"Alex Pruss: sf.net/projects/palmresize\n\n" \
"Lauri Aarnio: www.nixu.fi/~lauri/\n\n" \
"Walter Francis, Ton van Overbeek, David Carrel, Brian Wingerter, David Nolan, Jason Perry, Dan Vollmer, Olaf Kolling, Chris Weiss, Alexander Burke, Andreas Amann, Duncan Hudson, Jon Winters, Brian Parker, Ronny Hippler, Guy Davies, Thomas Arendsen Hein, Stefan Braunstein, Michael Bongartz, Olaf Ippisch, Michael Frotscher, Daniel Arvesen, and everyone else who has reported bugs and tested bug fixes\n\n" \
+ "Treo 650 RNG customizations by Daniel Grobe Sachs <dgsachs@nekito.net>\n" \
+ "Treo 650 Keyboard (ALT) customizations by Jeffrey Hutzelman\n" \
+ "Treo 650 features combined by Alejandro Sedeno\n"\
"---\n\n" \
"This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\n" \
"This product contains cryptographic software written by Eric Young (eay@cryptsoft.com)"
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********/
-#define PSSH_VERSION "2005-06-23-asedeno1"
-#define PSSH_UVERSION "2005_06_23-asedeno1"
+#define PSSH_VERSION "2006-09-18-asedeno1"
+#define PSSH_UVERSION "2006_09_18-asedeno1"
#define PSSH_CREATOR 'GPss'