Skip to contentSkip to conversation

aspeed/hace: Accumulative mode supported

PATCH In review Joel Stanley 2 participants 2 messages Jun 27, 2022 Arm/Aspeed machine support

lore
Share & tools
lore

Joel Stanley

author maintainer
#0 lore raw

PATCH 1/1 aspeed/hace: Accumulative mode supported

While the HMAC mode is not modelled, the accumulative mode is.

Accumulative mode is enabled by setting one of the bits in the HMAC engine command mode part of the register, so fix the unimplemented check to only look at the upper of the two bits.

Fixes 5cd7d8564a8b ("aspeed/hace: Support AST2600 HACE")
---
 hw/misc/aspeed_hace.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
hw/misc/aspeed_hace.c +3 -3
index 731234b78c4c..ac21be306c69 100644
@@ -338,10 +338,10 @@ static void aspeed_hace_write(void *opaque, hwaddr addr, uint64_t data,
         int algo;
         data &= ahc->hash_mask;
 
-        if ((data & HASH_HMAC_MASK)) {
+        if ((data & HASH_DIGEST_HMAC)) {
             qemu_log_mask(LOG_UNIMP,
-                          "%s: HMAC engine command mode %"PRIx64" not implemented\n",
-                          __func__, (data & HASH_HMAC_MASK) >> 8);
+                          "%s: HMAC mode not implemented\n",
+                          __func__);
         }
         if (data & BIT(1)) {
             qemu_log_mask(LOG_UNIMP,
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Joel Stanley

While the HMAC mode is not modelled, the accumulative mode is.

Accumulative mode is enabled by setting one of the bits in the HMAC engine command mode part of the register, so fix the unimplemented check to only look at the upper of the two bits.

Fixes 5cd7d8564a8b ("aspeed/hace: Support AST2600 HACE")

---

Thanks,

C.

Quoted 21 lines
  hw/misc/aspeed_hace.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
hw/misc/aspeed_hace.c +3 -3
index 731234b78c4c..ac21be306c69 100644
@@ -338,10 +338,10 @@ static void aspeed_hace_write(void *opaque, hwaddr addr, uint64_t data,
          int algo;
          data &= ahc->hash_mask;
 
-        if ((data & HASH_HMAC_MASK)) {
+        if ((data & HASH_DIGEST_HMAC)) {
              qemu_log_mask(LOG_UNIMP,
-                          "%s: HMAC engine command mode %"PRIx64" not implemented\n",
-                          __func__, (data & HASH_HMAC_MASK) >> 8);
+                          "%s: HMAC mode not implemented\n",
+                          __func__);
          }
          if (data & BIT(1)) {
              qemu_log_mask(LOG_UNIMP,