debugfs-cros-ec 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. What: /sys/kernel/debug/<cros-ec-device>/console_log
  2. Date: September 2017
  3. KernelVersion: 4.13
  4. Description:
  5. If the EC supports the CONSOLE_READ command type, this file
  6. can be used to grab the EC logs. The kernel polls for the log
  7. and keeps its own buffer but userspace should grab this and
  8. write it out to some logs.
  9. What: /sys/kernel/debug/<cros-ec-device>/panicinfo
  10. Date: September 2017
  11. KernelVersion: 4.13
  12. Description:
  13. This file dumps the EC panic information from the previous
  14. reboot. This file will only exist if the PANIC_INFO command
  15. type is supported by the EC.
  16. What: /sys/kernel/debug/<cros-ec-device>/pdinfo
  17. Date: June 2018
  18. KernelVersion: 4.17
  19. Description:
  20. This file provides the port role, muxes and power debug
  21. information for all the USB PD/type-C ports available. If
  22. the are no ports available, this file will be just an empty
  23. file.
  24. What: /sys/kernel/debug/<cros-ec-device>/uptime
  25. Date: June 2019
  26. KernelVersion: 5.3
  27. Description:
  28. A u32 providing the time since EC booted in ms. This is
  29. is used for synchronizing the AP host time with the EC
  30. log. An error is returned if the command is not supported
  31. by the EC or there is a communication problem.
  32. What: /sys/kernel/debug/<cros-ec-device>/last_resume_result
  33. Date: June 2019
  34. KernelVersion: 5.3
  35. Description:
  36. Some ECs have a feature where they will track transitions to
  37. the (Intel) processor's SLP_S0 line, in order to detect cases
  38. where a system failed to go into S0ix. When the system resumes,
  39. an EC with this feature will return a summary of SLP_S0
  40. transitions that occurred. The last_resume_result file returns
  41. the most recent response from the AP's resume message to the EC.
  42. The bottom 31 bits contain a count of the number of SLP_S0
  43. transitions that occurred since the suspend message was
  44. received. Bit 31 is set if the EC attempted to wake the
  45. system due to a timeout when watching for SLP_S0 transitions.
  46. Callers can use this to detect a wake from the EC due to
  47. S0ix timeouts. The result will be zero if no suspend
  48. transitions have been attempted, or the EC does not support
  49. this feature.
  50. Output will be in the format: "0x%08x\n".