summary refs log tree commit diff stats
path: root/include/hw/misc/aspeed_hace.h
diff options
context:
space:
mode:
authorJamin Lin <jamin_lin@aspeedtech.com>2025-05-15 16:09:46 +0800
committerCédric Le Goater <clg@redhat.com>2025-05-25 23:39:11 +0200
commit7e65aa39b37cb189c4d0bc923d4d778bdd626f4b (patch)
tree24ec9ac55ef68443c77325f87b3f5c0a48795857 /include/hw/misc/aspeed_hace.h
parent6262c8addc8ed586dfa5f11606f1598fca45b3eb (diff)
downloadfocaccia-qemu-7e65aa39b37cb189c4d0bc923d4d778bdd626f4b.tar.gz
focaccia-qemu-7e65aa39b37cb189c4d0bc923d4d778bdd626f4b.zip
hw/misc/aspeed_hace: Support DMA 64 bits dram address
According to the AST2700 design, the data source address is 64-bit, with
R_HASH_SRC_HI storing bits [63:32] and R_HASH_SRC storing bits [31:0].

Similarly, the digest address is 64-bit, with R_HASH_DEST_HI storing bits
[63:32] and R_HASH_DEST storing bits [31:0].

To maintain compatibility with older SoCs such as the AST2600, the AST2700 HW
automatically set bit 34 of the 64-bit sg_addr. As a result, the firmware
only needs to provide a 32-bit sg_addr containing bits [31:0]. This is
sufficient for the AST2700, as it uses a DRAM offset rather than a DRAM
address.

Introduce a has_dma64 class attribute and set it to true for the AST2700.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250515081008.583578-15-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include/hw/misc/aspeed_hace.h')
-rw-r--r--include/hw/misc/aspeed_hace.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/misc/aspeed_hace.h b/include/hw/misc/aspeed_hace.h
index 9945b61863..d5d07c6c02 100644
--- a/include/hw/misc/aspeed_hace.h
+++ b/include/hw/misc/aspeed_hace.h
@@ -53,6 +53,7 @@ struct AspeedHACEClass {
     uint32_t src_hi_mask;
     uint32_t dest_hi_mask;
     uint32_t key_hi_mask;
+    bool has_dma64;
 };
 
 #endif /* ASPEED_HACE_H */