Detecting warm and cold boot from qnx with i386 ?

How to detect with qnx that an i386 compatible board has been reseted ? That is, implementing a way to know if the computer has been cold booted, or not.

I understand that a technique consists in writing a magic number in a given memory position, and check if this number is here when the application starts, before to write the magic number. I am not able to apply this technique to Qnx.

I have also tested to read the RESET_FLAG bios register, at the 0x472 memory address, with no success.

Are this solutions possible in the Qnx 6.3SP2 environment, or should I try another ones ??

Best regards,

Julián

Finally I have succeeded in having a “signature string” in the ram, using something like:

registro_bios2=(unsigned short *)mmap64(0, 2, PROT_READ|PROT_WRITE|PROT_NOCACHE, MAP_PHYS|MAP_SHARED, NOFD, MEMORY_TRACE_ADDRESS );

Note that this does not work using MAP_PRIVATE instead of MAP_SHARED, because then it seems that Qnx wash the memory area when the process finish.

Note that finally it was not possible to do it this way, because the watchdog reset provoqued a cleaning of the ram. So I had to use a persitence mechanism (writting a timestamp into a file).