Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2024 14:59:18 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 95f75b0e6e5f - main - loader: Fix shadow_fb allocation
Message-ID:  <202409201459.48KExIZV046659@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

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

commit 95f75b0e6e5f71d34e4eef151f43822e33838663
Author:     Ahmad Khalifa <ahmadkhalifa570@gmail.com>
AuthorDate: 2024-05-31 09:41:32 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409201459.48KExIZV046659>