You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/09/21 21:14:22 UTC

[GitHub] ccollins476ad opened a new pull request #1417: sys/reboot: Add info to log entries and limit writes to one per boot

ccollins476ad opened a new pull request #1417: sys/reboot: Add info to log entries and limit writes to one per boot
URL: https://github.com/apache/mynewt-core/pull/1417
 
 
   This PR introduces two changes to the reboot log.
   
   #### 1. Add info to reboot log entries
   
   Prior to this commit, a reboot entry contained the following information:
   
   * reason (`rsn`)
   * count (`cnt`)
   * image version (`img`)
   
   This commit adds the following:
   
   * image hash (`hash`)
   * file:line, if available
   * value of PC register, if available
   
   #### 2. Limit log writes to one per boot
   
   Prior to this PR, some crashes would result in two entries being written to the reboot log.  For example, on a failed assert, an entry gets logged with the die file and die line.  `__assert_func()` then triggers a nonmaskable interrupt in order to generate a core, which results in a second entry being written to the reboot log.
   
   Finally, after resetting, an additional entry would often (always?) get written to the log.
   
   This PR changes the reboot log semantics as follows:
   * When the system resets or crashes, a single entry gets written.  Subsequent faults do not generate an additional log entry.
   * Upon booting, the system only records a new log entry if it detects that it did not write one for the previous reset.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services