diff options
Diffstat (limited to 'board/cr50/usb_spi.c')
-rw-r--r-- | board/cr50/usb_spi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/board/cr50/usb_spi.c b/board/cr50/usb_spi.c index a16c2df3e5..68533ed286 100644 --- a/board/cr50/usb_spi.c +++ b/board/cr50/usb_spi.c @@ -709,6 +709,10 @@ int usb_spi_sha256_update(struct sha256_ctx *ctx, uint32_t offset, { uint8_t data[SPI_HASH_CHUNK_SIZE]; + if (get_spi_bus_user() != SPI_BUS_USER_HASH) { + CPRINTS("%s: disabled", __func__); + return VENDOR_RC_NOT_ALLOWED; + } if (print_range) { CPRINTS("%s: %x:%x", __func__, offset, size); /* Make sure the message gets out before verification starts. */ |