summaryrefslogtreecommitdiff
path: root/include/sysjump.h
diff options
context:
space:
mode:
authorPatryk Duda <pdk@semihalf.com>2020-08-28 13:44:59 +0200
committerCommit Bot <commit-bot@chromium.org>2020-09-09 06:11:24 +0000
commit2187da39745e802fa89539ed28a9cf3fa9661876 (patch)
tree681322be139b896fdbd2d87af032421bcfe5d277 /include/sysjump.h
parente09ef0fdb5445b8994298cdee4c991b2dd0bbbac (diff)
downloadchrome-ec-2187da39745e802fa89539ed28a9cf3fa9661876.tar.gz
Introduce functions that provide safe pointer to panic data
panic_get_data() function should always return pointer to panic_data structure that can be safely interpreted. When structure layout left by previous EC is different than ours then panic_get_data() should return NULL. Difference in layout can occur when we are jumping from old RO, this happens in eve. Introduce two new functions: get_panic_data_start() - It can be used to obtain beginning of panic data, eg. when copying raw data or when determining where jump data is. get_panic_data_write() - It can be used to obtain pointer to panic_data structure that can be safely written. This function moves jump data and jump tags if necessary. Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: If5f73c86e2176a0169b0be4b890e399c2c259740 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2379845 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include/sysjump.h')
-rw-r--r--include/sysjump.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sysjump.h b/include/sysjump.h
index a75351a016..0b0bb0ec6b 100644
--- a/include/sysjump.h
+++ b/include/sysjump.h
@@ -18,6 +18,7 @@
#define JUMP_DATA_MAGIC 0x706d754a /* "Jump" */
#define JUMP_DATA_VERSION 3
+#define JUMP_DATA_SIZE_V1 12 /* Size of version 1 jump data struct */
#define JUMP_DATA_SIZE_V2 16 /* Size of version 2 jump data struct */
struct jump_data {