diff options
author | Vic Yang <victoryang@chromium.org> | 2013-05-09 00:27:13 +0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-05-08 13:24:20 -0700 |
commit | 5df7913825f426935e3fabc1b03ddc9d66ac947e (patch) | |
tree | 1cde305d353d6661c1a377e4c9dbfd6430f98060 /include/host_command.h | |
parent | a0bfc0c6698c01f722ed56bee8871f0620142db3 (diff) | |
download | chrome-ec-5df7913825f426935e3fabc1b03ddc9d66ac947e.tar.gz |
Fix host command in 64-bit executable
On 64-bit platform, arrays should be aligned to 8 bytes. Also, change
the order of host_command fields so that it's packed on both 32-bit and
64-bit platforms.
BUG=chrome-os-partner:19257
TEST=Pass all tests. Print out and check the content of host commands.
BRANCH=None
Change-Id: I350a903bc11562d6d205c402548942f8967b75a5
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/50467
Diffstat (limited to 'include/host_command.h')
-rw-r--r-- | include/host_command.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/host_command.h b/include/host_command.h index 3afca62908..b7d70896ce 100644 --- a/include/host_command.h +++ b/include/host_command.h @@ -54,13 +54,13 @@ struct host_cmd_handler_args { /* Host command */ struct host_command { - /* Command code */ - int command; /* * Handler for the command. Args points to context for handler. * Returns result status (EC_RES_*). */ int (*handler)(struct host_cmd_handler_args *args); + /* Command code */ + int command; /* Mask of supported versions */ int version_mask; }; @@ -133,6 +133,6 @@ void host_command_received(struct host_cmd_handler_args *args); #define DECLARE_HOST_COMMAND(command, routine, version_mask) \ const struct host_command __host_cmd_##command \ __attribute__((section(".rodata.hcmds"))) \ - = {command, routine, version_mask} + = {routine, command, version_mask} #endif /* __CROS_EC_HOST_COMMAND_H */ |