git: c7a1776752ec - main - bhyve/tpm_ppi_qemu: Cast address of the TPP3 field to uint32_t

From: Bojan Novković <bnovkov_at_FreeBSD.org>
Date: Sun, 27 Jul 2025 16:32:21 UTC
The branch main has been updated by bnovkov:

URL: https://cgit.FreeBSD.org/src/commit/?id=c7a1776752ec01af741e3a8715ede72f61b313d6

commit c7a1776752ec01af741e3a8715ede72f61b313d6
Author:     Bojan Novković <bnovkov@FreeBSD.org>
AuthorDate: 2025-07-25 18:00:54 +0000
Commit:     Bojan Novković <bnovkov@FreeBSD.org>
CommitDate: 2025-07-27 16:31:49 +0000

    bhyve/tpm_ppi_qemu: Cast address of the TPP3 field to uint32_t
    
    Fix a format specifier issue when building 'tpm_ppi_qemu.c' with
    'dsdt_line' marked as 'printflike'.
    
    Reviewed by:    markj, imp
    Differential Revision:  https://reviews.freebsd.org/D51535
---
 usr.sbin/bhyve/tpm_ppi_qemu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/bhyve/tpm_ppi_qemu.c b/usr.sbin/bhyve/tpm_ppi_qemu.c
index 01b8493e7273..6974b574b983 100644
--- a/usr.sbin/bhyve/tpm_ppi_qemu.c
+++ b/usr.sbin/bhyve/tpm_ppi_qemu.c
@@ -207,7 +207,7 @@ tpm_ppi_write_dsdt_regions(void *sc __unused)
 	 * Used for TCG Platform Reset Attack Mitigation
 	 */
 	dsdt_line("OperationRegion(TPP3, SystemMemory, 0x%8x, 1)",
-	    TPM_PPI_ADDRESS + sizeof(struct tpm_ppi_qemu));
+	    TPM_PPI_ADDRESS + (uint32_t)sizeof(struct tpm_ppi_qemu));
 	dsdt_line("Field(TPP3, ByteAcc, NoLock, Preserve)");
 	dsdt_line("{");
 	dsdt_line("  MOVV, 8,");