From nobody Fri Jun 26 23:14:33 2026 X-Original-To: dev-commits-src-main@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 4gnBMY5bmFz6j6vn for ; Fri, 26 Jun 2026 23:14:33 +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 4gnBMY4lx8z3yfZ for ; Fri, 26 Jun 2026 23:14:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782515673; 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=LW8K4sh3nfVLpEcYT/G6Rdr4PjjfQ16x0bxgV+cyEw+WVtbPC8L618vx48hRMJx2//TeOx Uw7RQeJBDKamAr8R/BhxCg02w4N2jx5w4IW0qs55M6AwITJX6GBi5ewFmL/GGMJdCq26wS 4HbwvUqF7Xr4iCi86uTw+Hms+3QIgv5rEtIUoHjmZ7NrqIqzZlC/oDViC349Vzjb9idO/5 73EW5Or8Y5dfrJmufBus0/Ss3wJpRvqZ9rGno2jDfjx1eiHLNP3fUUJjXTK2HO6PU6/mef zfVfaCSF+6V0GZ2mro+38pXgpABAoLh2FIVnc4LjeeL4JxkAGNGFXv+QxoHk3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782515673; a=rsa-sha256; cv=none; b=QEumQNvkWKI4HYZ9JEY6LcN5O+GI83UnRYkjGBk9w9Njid3ynUxSX0Th4CmsgaI5iyVbY9 Ww4XUCFig59S89KWKBNNxt+VSsLBfPqsTTY4XKK2y3L3SYAWDgsa3vy3tTAI2VSTlhB01T nLshm7R+P6k46ynjhCvGqKAZRCw/rm6uMk6auQO0Nv3KJ6o+eOfwAyIGlaXwtj5JFfbew6 qrNe86TKNFB4t5E25Kx+8TzlNGcXeJ9f/QiSqR9op1rq4/l9grtVxrbY3agH0JNDvAjNdS 1yWiLtu+xbsfpjGMaGvGz4qB1Yup5nKm91M3GvnU2htcHUGWrZV/Y0vqjzRwtA== 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=1782515673; 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=axdkVFLxWBsjL9RDlHUAkAQOcgP2QGuMHVgHWvRFUaf4roHt/vrp914byHVyqGB3+bc8K3 tt6hqZY0OZ55T0aX/+U9i1CVMqXcZXoSPPCzjp/Lm9J3RCVY2SrvtbR+aITdAgDgwDrqTo hRFRvwuADCyZ/IvA58g5iImJDqmX8QMk742dQt/+gE9N073hkTMwCxv0xPLVH733NPWDqt ia7oog2HJxXaVZDqNYDsp/db9lB+9GlEh97+zHqyhnaeZ3qmPqX8lKtLBXuTon8CsKyIGA OFPAa36OUAS77HESaVul61FI9yoogIn7nBzf8+/HwrBYmeSd4SL7ZoxyVbtvQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gnBMY3jrwzyW1 for ; Fri, 26 Jun 2026 23:14:33 +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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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); }