summaryrefslogtreecommitdiff
path: root/chip/ish/aontaskfw/ish_aon_share.h
diff options
context:
space:
mode:
authorHu, Hebo <hebo.hu@intel.com>2019-03-08 15:34:21 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-04-08 02:51:29 -0700
commit6a184d5019f0b45fe692da09a14e9ce7c853d68c (patch)
tree541192356148342f09bacebb75bea95027e98e7d /chip/ish/aontaskfw/ish_aon_share.h
parentd0a350e6691a9d93138051e2aa00e0d6c26151b5 (diff)
downloadchrome-ec-6a184d5019f0b45fe692da09a14e9ce7c853d68c.tar.gz
ish/ish5: implement AON low power management framework
AON PM framework including: 1: AON task skeleton 2: task switching between main FW and AON task 3: 'idlestats' console command for D0ix statistic information 4: D0ix entrance in idle task BUG=b:122364080 BRANCH=none TEST=tested on arcada Change-Id: Iefa9e067892d5c42d9f0c795275fe88e5a36115b Signed-off-by: Hu, Hebo <hebo.hu@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1510518 Commit-Ready: Rushikesh S Kadam <rushikesh.s.kadam@intel.com> Commit-Ready: Hebo Hu <hebo.hu@intel.corp-partner.google.com> Tested-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Hebo Hu <hebo.hu@intel.corp-partner.google.com>
Diffstat (limited to 'chip/ish/aontaskfw/ish_aon_share.h')
-rw-r--r--chip/ish/aontaskfw/ish_aon_share.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/chip/ish/aontaskfw/ish_aon_share.h b/chip/ish/aontaskfw/ish_aon_share.h
new file mode 100644
index 0000000000..3a5c1bd06b
--- /dev/null
+++ b/chip/ish/aontaskfw/ish_aon_share.h
@@ -0,0 +1,42 @@
+/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef __CROS_EC_ISH_AON_SHARE_H
+#define __CROS_EC_ISH_AON_SHARE_H
+
+#include "ia_structs.h"
+
+/* magic ID for valid aontask image sanity check */
+#define AON_MAGIC_ID 0x544E4F41 /*"AONT"*/
+
+/* aontask error code */
+#define AON_SUCCESS 0
+#define AON_ERROR_NOT_SUPPORT_POWER_MODE 1
+#define AON_ERROR_DMA_FAILED 2
+
+
+/* shared data structure between main FW and aontask */
+struct ish_aon_share {
+ /* magic ID */
+ uint32_t magic_id;
+ /* last error */
+ /* error counter */
+ uint32_t error_count;
+ /* last error */
+ int last_error;
+ /* aontask's TSS segment entry */
+ struct tss_entry *aon_tss;
+ /* aontask's LDT start address */
+ ldt_entry *aon_ldt;
+ /* aontask's LDT's limit size */
+ uint32_t aon_ldt_size;
+ /* current power state, see chip/ish/power_mgt.h */
+ int pm_state;
+ /* for store/restore main FW's IDT */
+ struct idt_header main_fw_idt_hdr;
+
+} __packed;
+
+#endif /* __CROS_EC_ISH_AON_SHARE_H */