diff options
author | Rajesh Kumar <rajesh3.kumar@intel.com> | 2022-07-29 15:19:37 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-12-02 22:55:39 +0000 |
commit | c8325ba18b9f4d5b1f3f3bc739e83d8f591308cf (patch) | |
tree | 48ee272334e7febcd979d0086b46940a1f74fd13 /include/system_boot_time.h | |
parent | 9f6d6ca10611cd1af3d81534baa674db335a4dc0 (diff) | |
download | chrome-ec-c8325ba18b9f4d5b1f3f3bc739e83d8f591308cf.tar.gz |
ec: Support logging system boot time info
This CL add support logging system boot time and hostcommand to get
boot time info.
EC logs elapsed time (in micro second) info since boot for different
signal events,that can be used to calculate system boot time in cold
boot and warm boot scenarios.
Below are the events when EC logs time info
ARAIL EC turns on A-RAIL
RSMRST EC releases RSMRST#
ESPIRST ESPIRST received
PLTRST_LOW PLTRST# asserted
PLTRST_HIGH PLTRST# deasserted
EC_CUR_TIME EC current time
cnt increments on every warm reboot and reset to 0 on
cold reboot
BUG=b:249163956
BRANCH=none
TEST='ectool boottime' AP console command is used to fetch data
'reboot' on AP console to trigger warm reboot
'apshutdown' on EC console to trigger cold reboot
Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com>
Change-Id: I15fedbde252e0452270ef0e3fd4391bf624169f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3794612
Reviewed-by: Boris Mittelberg <bmbm@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Diffstat (limited to 'include/system_boot_time.h')
-rw-r--r-- | include/system_boot_time.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/system_boot_time.h b/include/system_boot_time.h new file mode 100644 index 0000000000..e57d73d2d7 --- /dev/null +++ b/include/system_boot_time.h @@ -0,0 +1,18 @@ +/* Copyright 2022 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __CROS_EC_SYSTEM_BOOT_TIME_H +#define __CROS_EC_SYSTEM_BOOT_TIME_H + +#include "ec_commands.h" + +/** + * Updates ap boot time data. + * + * @param boot time param needs to be updated + */ +void update_ap_boot_time(enum boot_time_param param); + +#endif /* __CROS_EC_SYSTEM_BOOT_TIME_H */ |