From nobody Fri Jun 26 23:14:33 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gnBMf5zt7z6j6j0 for ; Fri, 26 Jun 2026 23:14:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gnBMf59n3z3ynT for ; Fri, 26 Jun 2026 23:14:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782515678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zdb/r3vltOTdIzBN0hQjO+SvfOgDwSUNN3XVfJWFcrE=; b=dAqsmTZFjePJki9Z/jdba1fTnbt1dBAAG52WsIW8LyD3DTHRGhR6J1AOc1ZD8ySm91dWuD 3LXRDyAYXePF0qMilHNqNaf5Rllewg5mJ6gurzaD+B//QXsibv9Iy6RO8Nn9WZjwcD6+bA n6L/ooWMjSGMAqtIwGEYY15S+kSnKMNjh02eofZ8lIAFT5Ai1ZCSyZN4iICciJWDV7fu1t XvJv1kMtuZOfJDUkwU9BykMVILvcV/ycTCi8/hqCueB0f3iULruL5nUYxEENt9NfKY5hit A8gAAJ8nnVurwycnV5FzZ0n4WZmFR5iEHSIRewCMmIoAZCiGESSq/PujqRsoYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782515678; a=rsa-sha256; cv=none; b=fU0RRJE3n8FllnbPbN1whJiDgja4+TOJ6U1v0ATbH40SMBYuKfHK3wolanR6rSWVTrwZOB NxSwuQG4w9PosWawKNtDPPxjmYUNMiSnxJtwDQ7uZOqJAwD8lLi7jZbCwhyYT8XiSH+Tbb LoqUC4zvPiODCtQFZI0jJn/iw4k36bn8CfyGr/ibOJgLU/yAu6UFzs79rtySsUYkdAfkaD 1w6D5W8HqNkUD9LnZ/M8iB7nhmXH9Dhj0LRFRdtSTM56h8s2OR69T9A23JablourvsWJOj mJAwSkw5zTRUh8aG+voKRbWnfMEbrLlm0Tb7DlM3RPIyY3I0XtliJ4/T+HixIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782515678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zdb/r3vltOTdIzBN0hQjO+SvfOgDwSUNN3XVfJWFcrE=; b=RrKeoL2Noevrg39OtrSI4S3q7YbwOQ8yBxErROzONlr9m5+3yZTliz3vPem8KqVDwG5i+r zzgCvdZ3J7DtEKRCMWiZUGz5GRVm6ij3GaDVWBGSosyz2eQJlyyajAe77rnm0+3pLqPZS/ qtrGn1VQFcsyuWe1Kg5brdxkRB9Esi3Q0jj5xQw/DPbjz0FGwLWzvU85jzNsWwNl0zB65u K8jjTLYxiosp8bkvitMqSKjMyDmsiuK7NLftYjdLI/DdYNR5pynU2S4wzU59OkbcZYM3ne /lUQ+dKYekNGE6x58zvYOyecnjI0Wq3oeHDMO3Kk1kj+k9tIipgEWbSa1irstA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gnBMf3gyGzyXl for ; Fri, 26 Jun 2026 23:14:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34350 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 26 Jun 2026 23:14:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9cb1459633a1 - main - loader.efi: Fix build with gcc due to pointer / int issues on 32-bit build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9cb1459633a1f96ed2fd5bd37530be3c4f6ae9e6 Auto-Submitted: auto-generated Date: Fri, 26 Jun 2026 23:14:33 +0000 Message-Id: <6a3f07d9.34350.2219162f@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9cb1459633a1f96ed2fd5bd37530be3c4f6ae9e6 commit 9cb1459633a1f96ed2fd5bd37530be3c4f6ae9e6 Author: Warner Losh AuthorDate: 2026-06-26 23:12:48 +0000 Commit: Warner Losh CommitDate: 2026-06-26 23:12:48 +0000 loader.efi: Fix build with gcc due to pointer / int issues on 32-bit build Use (uintptr_t) casts to cast the EFI_PHYSICAL_ADDDRESS to a pointer. Fixes: afee781523e4 ("loader.efi: Recognize new memdisk= and memcd= options") Sponsored by: Netflix Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D57893 --- stand/efi/loader/decompress.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/stand/efi/loader/decompress.c b/stand/efi/loader/decompress.c index 1f44d1000f11..1e18618db6f2 100644 --- a/stand/efi/loader/decompress.c +++ b/stand/efi/loader/decompress.c @@ -80,9 +80,9 @@ alloc_buffer(decomp_state *dctx, size_t size) printf("Failed to allocate memory for %llu bytes\n", ULL(dctx->alloc_size)); return (status); } - BS->SetMem((void *)dctx->buf, dctx->alloc_size, 0); - dctx->buf_cur = (uint8_t *)dctx->buf; - dctx->buf_end = (uint8_t *)dctx->buf + dctx->alloc_size; + BS->SetMem((void *)(uintptr_t)dctx->buf, dctx->alloc_size, 0); + dctx->buf_cur = (uint8_t *)(uintptr_t)dctx->buf; + dctx->buf_end = (uint8_t *)(uintptr_t)dctx->buf + dctx->alloc_size; return (EFI_SUCCESS); } @@ -100,12 +100,12 @@ grow_buffer(decomp_state *dctx) printf("Failed to allocate memory for %llu bytes\n", ULL(newsz)); return (status); } - memcpy((void *)newbuf, (void *)dctx->buf, dctx->alloc_size); + memcpy((void *)(uintptr_t)newbuf, (void *)(uintptr_t)dctx->buf, dctx->alloc_size); BS->FreePages(dctx->buf, dctx->pages); dctx->buf = newbuf; dctx->pages = newpages; - dctx->buf_cur = (uint8_t *)dctx->buf + dctx->alloc_size; - dctx->buf_end = (uint8_t *)dctx->buf + newsz; + dctx->buf_cur = (uint8_t *)(uintptr_t)dctx->buf + dctx->alloc_size; + dctx->buf_end = (uint8_t *)(uintptr_t)dctx->buf + newsz; BS->SetMem(dctx->buf_cur, newsz - dctx->alloc_size, 0); dctx->alloc_size = newsz; return (EFI_SUCCESS); @@ -337,7 +337,7 @@ null_step(decomp_state *dctx, uint8_t *buf, size_t len, size_t offset) } CHAR8 *src = buf; - CHAR8 *dst = (void*)(dctx->buf + offset); + CHAR8 *dst = (void*)(uintptr_t)(dctx->buf + offset); BS->CopyMem(dst, src, len); return (end == dctx->size ? done : ok); } @@ -417,5 +417,5 @@ decomp_buffer_length(decomp_state *dctx) { if (dctx == NULL) return (0); - return ((void *)dctx->buf_cur - (void *)dctx->buf); + return ((uintptr_t)dctx->buf_cur - (uintptr_t)dctx->buf); }