From nobody Fri Sep 20 14:59:18 2024 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 4X9FsM3cCmz5XSw9; Fri, 20 Sep 2024 14:59:19 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X9FsM0KXWz4NW9; Fri, 20 Sep 2024 14:59:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726844359; 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=nd8f+lWPv4WMl7ktoqSHxl6L0u14XDuEzrYk36DOdQY=; b=UPVE5U00OYj8kEDzSj2EgXRhwovtBKejPjLS9kUgW1MyuLCzn7h2LuZ7DploWu3hWAsLap Q8KTSwXvA5Xltfad1NMQr9DdNFv5fToe+VYmjfGFZEMt7DZoIP4YktfHvxhUdjqsU5MHvj gopJK2AIxbMMMDsKAwUL5cwznNUV4fYOvW1bvjf06D8e5lwYqmoTiKxm87COYmv0XfvsTc GO0XL0RFyEYuUEdEqeEeBiznrwdwWQRgIX23qPTDDOuBB/AMQ5wN40+vcHqoIvooC8Zamy 9KMu05TbQxFdNu/X3JhoyZmhbyFC5vL3Y8NlfzKwgDCT3LZaQ2nZP8Tgf/0fQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726844359; a=rsa-sha256; cv=none; b=NsCFjT6guNFa/9YBQrVpBpFffN9cfh1LNuIbKyR57CZNLkweubFDGkOajH5INSd8I14m/f 2KQm3Sylb3oMPQO0LGO2I6YgGNaI7Sh+fpGHqtISSx14wJHIl3A1KvD0WiebYaag2ai6Xw ElnnYt0WJllpZ5sGHFpprRbhlrjdWh3BKLnEgev2Rvvgv42+fEqlaTvnKdLkOkQU7aV9lA 6D4OU/6He22YZIUQ/KiwpU4cRgBA5X7MjnWV2T+AfYzAn/iPdZqB+ykDNJtGinMUMmjl1E 2p7t+0c3hZ5IBXF45k2F8dKG1cWxkpebHW6YyHAgUTlz6KWrlfKZOaUoL8wgTg== 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=1726844359; 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=nd8f+lWPv4WMl7ktoqSHxl6L0u14XDuEzrYk36DOdQY=; b=mDpGql3kK39yVFvqd9Y20zMBnWvCBnZmeHJ0Xd5LMFZ0l1KNhypCrWFl773/Dg/Da6ucFI epK/vRVCVIwr44H9ldP2P4+YQmUyDedboBzG84SsVclGnxmsDqi0AqZZ7Hm7FZEhN7woh8 j9HDxPEYVCLn1qVKrxsKJoh/H6YWe+oD1iZ3ay+BOK7OuNkiesUqzH9DjJ9oZ2glN04k4w b8Gd88Wj9c76nMwZa3xsrFtJDOPqG5KRIsX4ejcr2IicxegF56LdbtSwN02N7MpB1Lvbbp Z6Jn57Mz8wVRRDCMsu5ZtiOnKbNA3GZ+2/hwrd9gjII8P8G+7uRVs7kUYUKH0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X9FsL6wVnzv54; Fri, 20 Sep 2024 14:59:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48KExIaU046662; Fri, 20 Sep 2024 14:59:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48KExIZV046659; Fri, 20 Sep 2024 14:59:18 GMT (envelope-from git) Date: Fri, 20 Sep 2024 14:59:18 GMT Message-Id: <202409201459.48KExIZV046659@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 95f75b0e6e5f - main - loader: Fix shadow_fb allocation 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 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: 95f75b0e6e5f71d34e4eef151f43822e33838663 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=95f75b0e6e5f71d34e4eef151f43822e33838663 commit 95f75b0e6e5f71d34e4eef151f43822e33838663 Author: Ahmad Khalifa AuthorDate: 2024-05-31 09:41:32 +0000 Commit: Warner Losh CommitDate: 2024-09-20 14:45:06 +0000 loader: Fix shadow_fb allocation Using AllocateMaxAddress here means that gfx_state->tg_shadow_fb is treated as the highest address we can receive. Since gfx_state->tg_shadow_fb is NULL, we never receive anything. Use AllocateAnyPages instead. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098 --- stand/efi/loader/framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index 2f580309c2f3..c954a2471340 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -656,7 +656,7 @@ efi_find_framebuffer(teken_gfx_t *gfx_state) gfx_state->tg_shadow_sz = EFI_SIZE_TO_PAGES(efifb.fb_height * efifb.fb_width * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); - status = BS->AllocatePages(AllocateMaxAddress, EfiLoaderData, + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, gfx_state->tg_shadow_sz, (EFI_PHYSICAL_ADDRESS *)&gfx_state->tg_shadow_fb); if (status != EFI_SUCCESS)