diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2020-09-19 10:30:14 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-09-22 06:22:32 +0000 |
commit | d945d6dfec09880be4aa2a8f67f3577fc9f344d4 (patch) | |
tree | 5d9b3b92b22bccc5a55e33cb07d5c0a62f78a325 /include | |
parent | aa66f469cf4be213014d3e16440861e08ee57bca (diff) | |
download | chrome-ec-d945d6dfec09880be4aa2a8f67f3577fc9f344d4.tar.gz |
host_event_commands: Return access denied for prohibited access
Currently, EC_CMD_HOST_EVENT returns the same error code for
non-existing masks and prohibited access to the existing masks.
This patch makes the command return ACCESS_DENIED for the latter case
so that the host can distinguish the two cases.
ToT BIOS won't be affected because the EC's return codes are collapsed
to -1 or -(request size).
$ ectool hostevent set 1 0
Set isn't permitted for mask 1.
BUG=b:168939843
BRANCH=None
TEST=Verified on Atlas. See above.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: Ia346dbffd459985d5eea8a955e22822d402d5388
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2422805
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/ec_commands.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 0bb9fc9e23..14b3ab6fd7 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -3920,6 +3920,10 @@ struct ec_response_host_event_mask { /* * Unified host event programming interface - Should be used by newer versions * of BIOS/OS to program host events and masks + * + * EC returns: + * - EC_RES_INVALID_PARAM: Action or mask type is unknown. + * - EC_RES_ACCESS_DENIED: Action is prohibited for specified mask type. */ struct ec_params_host_event { |