summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRushikesh S Kadam <rushikesh.s.kadam@intel.com>2018-11-03 15:35:06 +0530
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-12-18 22:54:35 +0000
commit2f0c45ff52c4433d6529e44456254a130e26d0af (patch)
tree2b9479a772a23940e7a7b5e7f0ad37a62e514b10
parent598bfd01447a0d14f4a09cde1ce583bc17fd82b1 (diff)
downloadchrome-ec-2f0c45ff52c4433d6529e44456254a130e26d0af.tar.gz
core/minute-ia: Reset Task-switched flag during init
It is observed that CRO.TS may be set prior to main ISH FW entry. In such case, an ESC instruction such as fninit assembly instruction for FPU initialization, will cause a fault. The execution handlers are not setup this early in FW initialization phase, and will lead to ISH CPU reset. This patch resets the TS flag in early FW initilization. BRANCH=none BUG=b:120051132 TEST=Test host FW loading for main ISH FW. Change-Id: I7e330e2d1f39cc4a349f308ec0d046c19db281de Signed-off-by: Rushikesh S Kadam <rushikesh.s.kadam@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1316702 Commit-Ready: Caveh Jalali <caveh@google.com> Reviewed-by: Caveh Jalali <caveh@google.com> (cherry picked from commit 4dd9607ff06416f09b5d91dc531a23c9c54d14ec) Reviewed-on: https://chromium-review.googlesource.com/c/1365153 Commit-Queue: Caveh Jalali <caveh@google.com> Tested-by: Caveh Jalali <caveh@google.com>
-rw-r--r--core/minute-ia/init.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/minute-ia/init.S b/core/minute-ia/init.S
index 5ba0cbf581..67340f343c 100644
--- a/core/minute-ia/init.S
+++ b/core/minute-ia/init.S
@@ -348,6 +348,10 @@ reset:
# Load IDT
lidt __idt_ptr
+ # Reset Task-Switched flag to prevent an ESC instruction such
+ # as fninit, from triggering a Device-not-available fault
+ clts
+
#ifdef CONFIG_FPU
fninit
#endif