diff options
-rw-r--r-- | board/cr50/build.mk | 1 | ||||
-rw-r--r-- | board/cr50/tpm2/post_reset.c | 20 | ||||
-rw-r--r-- | include/extension.h | 1 |
3 files changed, 22 insertions, 0 deletions
diff --git a/board/cr50/build.mk b/board/cr50/build.mk index 6028e34de2..379e5e26de 100644 --- a/board/cr50/build.mk +++ b/board/cr50/build.mk @@ -42,6 +42,7 @@ board-y += tpm2/hash_data.o board-y += tpm2/hkdf.o board-y += tpm2/manufacture.o board-y += tpm2/platform.o +board-y += tpm2/post_reset.o board-y += tpm2/rsa.o board-y += tpm2/stubs.o board-y += tpm2/trng.o diff --git a/board/cr50/tpm2/post_reset.c b/board/cr50/tpm2/post_reset.c new file mode 100644 index 0000000000..549eaec4f8 --- /dev/null +++ b/board/cr50/tpm2/post_reset.c @@ -0,0 +1,20 @@ +/* Copyright 2016 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + + +#include "config.h" +#include "board.h" +#include "extension.h" + +void post_reset_command_handler(void *body, + size_t cmd_size, + size_t *response_size) +{ + *response_size = 1; + ((uint8_t *)body)[0] = 0; + post_reboot_request(); +} + +DECLARE_EXTENSION_COMMAND(EXTENSION_POST_RESET, post_reset_command_handler); diff --git a/include/extension.h b/include/extension.h index 92a8c28ab7..d3001934da 100644 --- a/include/extension.h +++ b/include/extension.h @@ -53,6 +53,7 @@ enum { EXTENSION_FW_UPGRADE = 4, EXTENSION_HKDF = 5, EXTENSION_ECIES = 6, + EXTENSION_POST_RESET = 7, }; |