summaryrefslogtreecommitdiff
path: root/zephyr/app
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-02-15 22:37:09 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-18 00:03:26 +0000
commitc0efec9de427981f9c971cad7264f11caf780f6f (patch)
treec1f4913ab5258ab9702f9739b043fa0ef9191f9d /zephyr/app
parent717b8cb62ba1d15ce070ffb35474184672ed8010 (diff)
downloadchrome-ec-c0efec9de427981f9c971cad7264f11caf780f6f.tar.gz
zephyr: initialize the system code
At present the data pointer is not valid and we're not able to store any data between jumps. Fix this by adding a call to system_common_pre_init(). Add an empty test implementation so that tests still pass BRANCH=none BUG=b:167392037 TEST=zmake testall TEST=build/flash volteer, make sure that jdata was set up correctly (it is at the end of the data RAM address). Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I8e948b68484927fa0da9f7d4db00ff339c22bae2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2695957 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/app')
-rw-r--r--zephyr/app/ec/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/zephyr/app/ec/main.c b/zephyr/app/ec/main.c
index 5be4f2d031..9311aa60be 100644
--- a/zephyr/app/ec/main.c
+++ b/zephyr/app/ec/main.c
@@ -10,6 +10,7 @@
#include "ec_tasks.h"
#include "hooks.h"
#include "keyboard_scan.h"
+#include "system.h"
#include "zephyr_espi_shim.h"
void main(void)
@@ -18,6 +19,8 @@ void main(void)
printk(" BOARD=%s\n", CONFIG_BOARD);
printk(" ACTIVE_COPY=%s\n", CONFIG_CROS_EC_ACTIVE_COPY);
+ system_common_pre_init();
+
/*
* Initialize reset logs. This needs to be done before any updates of
* reset logs because we need to verify if the values remain the same