[V2,0/3] soc: qcom: boot_stats: Add driver support for boot_stats

Message ID cover.1680874520.git.quic_schowdhu@quicinc.com
Headers
Series soc: qcom: boot_stats: Add driver support for boot_stats |

Message

Souradeep Chowdhury April 7, 2023, 2:04 p.m. UTC
  Qualcomm's proprietary Android boot-loaders capture boot time
stats, like the time when the bootloader started execution and at what
point the bootloader handed over control to the kernel etc. in the IMEM
region. This information is captured in a specific format by this driver
by mapping a structure to the IMEM memory region and then accessing the
members of the structure to print the information. This information is
useful in verifying if existing boot KPIs have regressed or not.
A sample log in SM8450(waipio) device is as follows:-

KPI: Pre ABL Time = 3s
KPI: ABL Time = 14s
KPI: Kernel MPM timestamp = 890206

The Module Power Manager(MPM) sleep counter starts ticking at the PBL
stage and the timestamp generated by the sleep counter is logged by
the Qualcomm proprietary bootloader(ABL) at two points-> First when it
starts execution which is logged here as "Pre ABL Time" and the second
when it is about to load the kernel logged as "ABL Time". Both these
values are read up by the driver from IMEM region and printed as above.
The current sleep counter timestamp is also logged by the driver.

Changes in V2

*Implemented comments on version 1 of the patch

*Changed the boot_stats driver to module_platform_driver

*Dropped the DT binding for mpm sleep counter

Souradeep Chowdhury (3):
  dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM
  soc: qcom: boot_stat: Add Driver Support for Boot Stats
  MAINTAINERS: Add the entry for boot_stats driver support

 .../devicetree/bindings/sram/qcom,imem.yaml        | 21 +++++
 MAINTAINERS                                        |  6 ++
 drivers/soc/qcom/Kconfig                           |  7 ++
 drivers/soc/qcom/Makefile                          |  1 +
 drivers/soc/qcom/boot_stats.c                      | 95 ++++++++++++++++++++++
 5 files changed, 130 insertions(+)
 create mode 100644 drivers/soc/qcom/boot_stats.c
  

Comments

Bjorn Andersson April 7, 2023, 3:44 p.m. UTC | #1
On Fri, Apr 07, 2023 at 07:34:34PM +0530, Souradeep Chowdhury wrote:
> Qualcomm's proprietary Android boot-loaders capture boot time
> stats, like the time when the bootloader started execution and at what
> point the bootloader handed over control to the kernel etc. in the IMEM
> region. This information is captured in a specific format by this driver
> by mapping a structure to the IMEM memory region and then accessing the
> members of the structure to print the information. This information is
> useful in verifying if existing boot KPIs have regressed or not.
> A sample log in SM8450(waipio) device is as follows:-
> 
> KPI: Pre ABL Time = 3s
> KPI: ABL Time = 14s
> KPI: Kernel MPM timestamp = 890206
> 
> The Module Power Manager(MPM) sleep counter starts ticking at the PBL
> stage and the timestamp generated by the sleep counter is logged by
> the Qualcomm proprietary bootloader(ABL) at two points-> First when it
> starts execution which is logged here as "Pre ABL Time" and the second
> when it is about to load the kernel logged as "ABL Time". Both these
> values are read up by the driver from IMEM region and printed as above.
> The current sleep counter timestamp is also logged by the driver.
> 
> Changes in V2
> 
> *Implemented comments on version 1 of the patch

This doesn't give a particular good indication of what you actually
changed. So please spell it out going forward.

Thanks,
Bjorn

> 
> *Changed the boot_stats driver to module_platform_driver
> 
> *Dropped the DT binding for mpm sleep counter
> 
> Souradeep Chowdhury (3):
>   dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM
>   soc: qcom: boot_stat: Add Driver Support for Boot Stats
>   MAINTAINERS: Add the entry for boot_stats driver support
> 
>  .../devicetree/bindings/sram/qcom,imem.yaml        | 21 +++++
>  MAINTAINERS                                        |  6 ++
>  drivers/soc/qcom/Kconfig                           |  7 ++
>  drivers/soc/qcom/Makefile                          |  1 +
>  drivers/soc/qcom/boot_stats.c                      | 95 ++++++++++++++++++++++
>  5 files changed, 130 insertions(+)
>  create mode 100644 drivers/soc/qcom/boot_stats.c
> 
> -- 
> 2.7.4
>