[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/2] aspeed: Add Scater-Gather support for HACE Hash
From: |
Cédric Le Goater |
Subject: |
Re: [PATCH v3 1/2] aspeed: Add Scater-Gather support for HACE Hash |
Date: |
Mon, 29 Mar 2021 10:10:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 |
On 3/26/21 8:37 PM, Klaus Heinrich Kiwi wrote:
> Complement the Aspeed HACE support with Scatter-Gather hash support for
> sha256 and sha512. Scatter-Gather is only supported on AST2600-series.
...
> static uint64_t aspeed_hace_read(void *opaque, hwaddr addr, unsigned int
> size)
> {
> @@ -187,11 +303,6 @@ static void aspeed_hace_write(void *opaque, hwaddr addr,
> uint64_t data,
> "%s: HMAC engine command mode %"PRIx64" not
> implemented",
> __func__, (data & HASH_HMAC_MASK) >> 8);
> }
> - if (data & HASH_SG_EN) {
> - qemu_log_mask(LOG_UNIMP,
> - "%s: Hash scatter gather mode not implemented",
> - __func__);
> - }
Could we check the SoC type and emit an error if not ast2600 ?
> if (data & BIT(1)) {
> qemu_log_mask(LOG_UNIMP,
> "%s: Cascaded mode not implemented",
> @@ -204,7 +315,10 @@ static void aspeed_hace_write(void *opaque, hwaddr addr,
> uint64_t data,
> __func__, data & ahc->hash_mask);
> break;
> }
> - do_hash_operation(s, algo);
> + if (data & HASH_SG_EN)
> + do_hash_sg_operation(s, algo);
> + else
> + do_hash_operation(s, algo);
patchew should complain for the lack of { }.
Thanks,
C.
> if (data & HASH_IRQ_EN) {
> qemu_irq_raise(s->irq);
>