summaryrefslogtreecommitdiff
path: root/common/host_command.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-08-01 10:27:33 -0700
committerChromeBot <chrome-bot@google.com>2013-08-01 14:22:44 -0700
commitbebfb9431ed973703df03c8e2da11cf280315272 (patch)
tree8bf468e22ac06fd4593aa11061026c8dc44b0fd6 /common/host_command.c
parent8e28efa7ac4bc6cec969a928d1b34b6d423d582f (diff)
downloadchrome-ec-bebfb9431ed973703df03c8e2da11cf280315272.tar.gz
Word-align the host memory map
This fixes unaligned access exceptions when totally-unrelated code changes happen to move around host_command.c's global variables. BUG=chrome-os-partner:21578 BRANCH=none TEST=add a ccprintf() call to host_command.c; no longer causes an exception Change-Id: I5407e5631a08ea647dc40e5bd9c7bd101868ced0 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/64233 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'common/host_command.c')
-rw-r--r--common/host_command.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/host_command.c b/common/host_command.c
index c6f7ff1dc4..489ae7b35f 100644
--- a/common/host_command.c
+++ b/common/host_command.c
@@ -28,7 +28,11 @@
static struct host_cmd_handler_args *pending_args;
#ifndef CONFIG_LPC
-static uint8_t host_memmap[EC_MEMMAP_SIZE];
+/*
+ * Simulated memory map. Must be word-aligned, because some of the elements
+ * in the memory map are words.
+ */
+static uint8_t host_memmap[EC_MEMMAP_SIZE] __aligned(4);
#endif
static enum {