mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
cr50: add reset extension command
While USB updates have a mechanism to trigger the target reset, SPI
updates do not have it.
This patch adds an extension command to cause the device reset.
BRANCH=none
BUG=chrome-os-partner:58226
TEST=with the rest of the patches applied verified that the system
gets reset and the new image version kicks in on both gru (over
SPI) and reef (over USB).
Change-Id: I498538670e2c43d17b13510288eb9ae75eb7b761
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/395628
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
36b39b5fc9
commit
0ff799bb75
@@ -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
|
||||
|
||||
20
board/cr50/tpm2/post_reset.c
Normal file
20
board/cr50/tpm2/post_reset.c
Normal file
@@ -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);
|
||||
@@ -53,6 +53,7 @@ enum {
|
||||
EXTENSION_FW_UPGRADE = 4,
|
||||
EXTENSION_HKDF = 5,
|
||||
EXTENSION_ECIES = 6,
|
||||
EXTENSION_POST_RESET = 7,
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user