]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/misc/aspeed_hace: Support DMA 64 bits dram address
authorJamin Lin <jamin_lin@aspeedtech.com>
Thu, 15 May 2025 08:09:46 +0000 (16:09 +0800)
committerCédric Le Goater <clg@redhat.com>
Sun, 25 May 2025 21:39:11 +0000 (23:39 +0200)
commit7e65aa39b37cb189c4d0bc923d4d778bdd626f4b
tree24ec9ac55ef68443c77325f87b3f5c0a48795857
parent6262c8addc8ed586dfa5f11606f1598fca45b3eb
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>
hw/misc/aspeed_hace.c
include/hw/misc/aspeed_hace.h