History log of /src/stand/efi/loader/framebuffer.c (Results 1 – 25 of 74)
Revision Date Author Comments
# be6ba97a 27-Jan-2025 Frank Hilgendorf <frank.hilgendorf@posteo.de>

loader.efi: add stride & offset for MacBookPro3,1

Note that there are three variants of this MacBook. We only have the
stride and offset values for the 17" 1680x1050 model.

Reviewed by: vexeduxr
Pu

loader.efi: add stride & offset for MacBookPro3,1

Note that there are three variants of this MacBook. We only have the
stride and offset values for the 17" 1680x1050 model.

Reviewed by: vexeduxr
Pull Request: https://github.com/freebsd/freebsd-src/pull/1584

show more ...


# 5d85dde2 04-Jan-2026 Ahmad Khalifa <vexeduxr@FreeBSD.org>

loader.efi: probe for UGA if GOP isn't found

Probe for UGA instead of returning early if we can't find GOP.

Reviewed by: tsoome
PR: 291935
MFC after: 1 week
Differential Revision: https://reviews.

loader.efi: probe for UGA if GOP isn't found

Probe for UGA instead of returning early if we can't find GOP.

Reviewed by: tsoome
PR: 291935
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54431

show more ...


# 43b8edb3 16-Nov-2025 Warner Losh <imp@FreeBSD.org>

stand: Cut over to using the EDK2 files

Remove the old EFI SDK files that we've been nursing along for too many
years. Replace them with files from EDK2 edk2-stable202502 and tweak the
interfaces we

stand: Cut over to using the EDK2 files

Remove the old EFI SDK files that we've been nursing along for too many
years. Replace them with files from EDK2 edk2-stable202502 and tweak the
interfaces we need to tweak. Mostly include different things or change
the names of the protocols that no longer have old-school compat names.

I gave up in the middle of env.c, too damn tedious to find all those new
GUIDs. Also, many of the guids were mystery meat, most likely from the
EDK2 sources, but just not the Include subdirectory. Need to investigate
those. And the memory info? Is it just an oboslete thing, or embedded
knowledge of EDK2.

Delete the now-redundant copies of things in Guid and Protocol. I
debated keeping ZeroGuid.h, but EDK2 has moved on from when I snagged it
years ago (or maybe I just invented it out of whole cloth: edk2 does
radically different things today and I didn't do the git deep-dive to
find out).

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D53655

show more ...


# 87795c6e 16-Nov-2025 Warner Losh <imp@FreeBSD.org>

stand: Rename EFI_ERROR_CODE to DECODE_ERROR to avoid Edk2 Clash

This follows what Illumos has done.

Sponsored by: Netflix
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D

stand: Rename EFI_ERROR_CODE to DECODE_ERROR to avoid Edk2 Clash

This follows what Illumos has done.

Sponsored by: Netflix
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D53656

show more ...


# cd9b43ed 09-Sep-2025 Ahmad Khalifa <vexeduxr@FreeBSD.org>

loader/efi: return error from efi_find_framebuffer

Also return actual errno values in other code paths.
(suggested by tsoome)

Reviewed by: tsoome, imp
Differential Revision: https://reviews.freebsd

loader/efi: return error from efi_find_framebuffer

Also return actual errno values in other code paths.
(suggested by tsoome)

Reviewed by: tsoome, imp
Differential Revision: https://reviews.freebsd.org/D52432

show more ...


# 21b5b8b3 20-Feb-2025 Toomas Soome <tsoome@FreeBSD.org>

loader.efi: add "gop blt <on|off>" command

Some systems have very slow console output and it may be about either
wrong memory attributes are set or gop->Blt() implementation is bad.

We do not have

loader.efi: add "gop blt <on|off>" command

Some systems have very slow console output and it may be about either
wrong memory attributes are set or gop->Blt() implementation is bad.

We do not have good way to set memory attributes, but we can
choose which Blt() to use (or we can set "gop off" to fall back on
use of SimpleTextOutput protocol).

This update adds argument for "gop" command to switch gop->Blt() use.
Note, this update does not fix the problem, but allows us to try to
understand the possible cause.

PR: 254381
Reported by: Michael Galassi

Reviewed by: manu, imp
Differential Revision: https://reviews.freebsd.org/D49073

show more ...


# 6818ff77 14-May-2024 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

loader: Fix 32-bit compatibility

main.c - Fix rsdp cast.
framebuffer.c -
- Use temp variable instead of directly passing pointer when
EFI_PHYSICAL_ADDRESS is expected.
Also fix FreePa

loader: Fix 32-bit compatibility

main.c - Fix rsdp cast.
framebuffer.c -
- Use temp variable instead of directly passing pointer when
EFI_PHYSICAL_ADDRESS is expected.
Also fix FreePages cast.
- Mask framebuffer address given to us by UEFI.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098

show more ...


# 95f75b0e 31-May-2024 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

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 re

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

show more ...


# 3e15b01d 22-Feb-2024 Warner Losh <imp@FreeBSD.org>

libsa: Remove redundant sys/cdefs.h

Sponsored by: Netflix


# 7edbf69b 23-Jan-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

stand: Add 1440p to the list of known resolutions.

MFC after: 1 week
Reviewed by: manu, kevans, imp
Differential Revision: https://reviews.freebsd.org/D43391


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# df065f69 26-Aug-2022 Warner Losh <imp@FreeBSD.org>

stand: More sensible defaults when ConOut is missing

When ConOut is missing, we used to default to serial. Except we did it
in the worst way possible by just setting the howto bits and not
updating

stand: More sensible defaults when ConOut is missing

When ConOut is missing, we used to default to serial. Except we did it
in the worst way possible by just setting the howto bits and not
updating the console setting, which lead to weird behavior where we'd
get some things on the video port, others on serial.

Instead, set console to "efi,comconsole" for this case. Also set
RB_MULTIPLE always (so we get dual consoles from the kernel) and or in
RB_SERIAL when we can't find GOPs that suggest the precense of a video
console. This will put output in the most places and have a sensible
default for 'primary' console.

Sponsored by: Netflix
Reviewed by: emaste, manu
Differential Revision: https://reviews.freebsd.org/D36299

show more ...


# a765ac11 30-Jun-2022 Ed Maste <emaste@FreeBSD.org>

Remove "All Rights Reserved" from Foundation copyrights

MFC after: 1 week
Sponsored by: The FreeBSD Foundation


# 221376db 17-Dec-2021 Toomas Soome <tsoome@FreeBSD.org>

loader.efi: to preserve heap space, use AllocatePages() for shadow_fb

shadow FB size could be rather large and depends on resolution,
instead of using heap, allocate dedicated space outside of heap.

loader.efi: to preserve heap space, use AllocatePages() for shadow_fb

shadow FB size could be rather large and depends on resolution,
instead of using heap, allocate dedicated space outside of heap.

Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D33600
MFC after: 2 weeks

show more ...


# 02732f94 16-Dec-2021 Alexander Motin <mav@FreeBSD.org>

loader.efi: Do not use as frame buffer BLT-only GOPs.

Kernel needs physical frame buffer address and size, which Block
Transfer-only Graphics Output Protocol instances do not have.

Some recent ASUS

loader.efi: Do not use as frame buffer BLT-only GOPs.

Kernel needs physical frame buffer address and size, which Block
Transfer-only Graphics Output Protocol instances do not have.

Some recent ASUS boards like PRIME Z690M-PLUS D4 and PRIME H570-Plus
report two GOPs, out of which the second one support ConOut protocol,
that made it preferable, but is BLT-only, that made console unusable.

Discussed with: tsoome (previous version)
MFC after: 1 week

show more ...


# 6102f43c 06-Dec-2021 Toomas Soome <tsoome@FreeBSD.org>

loader: framebuffer should only be written into

Reading from Write Combining memory can be very-very slow. Try to use
shadow buffer to avoid such reads.

MFC after: 1 month
Differential Revision: ht

loader: framebuffer should only be written into

Reading from Write Combining memory can be very-very slow. Try to use
shadow buffer to avoid such reads.

MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D33305

show more ...


# becaac39 20-Feb-2021 Toomas Soome <tsoome@FreeBSD.org>

loader: use display pixel density for font autoselection

Calculate font size from 16 density independent pixels (dp) by using:
size = 16 * ppi/160 * display_factor

We are specifying font size 16dp,

loader: use display pixel density for font autoselection

Calculate font size from 16 density independent pixels (dp) by using:
size = 16 * ppi/160 * display_factor

We are specifying font size 16dp, and assuming 1dp = 160ppi.
Also apply scaling factor 2 (display_factor).

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D28849

show more ...


# 52ec89a9 17-Jan-2021 Toomas Soome <tsoome@FreeBSD.org>

loader.efi: commands gop, uga and autoresize should use cached data

We are setting up pointers for gop or uga protocol in
efi_find_framebuffer(), reuse those pointers.


# 9adce1ae 17-Jan-2021 Toomas Soome <tsoome@FreeBSD.org>

loader.efi: variable 'hlist' is uninitialized

framebuffer.c:481:65: error: variable 'hlist' is uninitialized


# fb3a792a 17-Jan-2021 Toomas Soome <tsoome@FreeBSD.org>

loader.efi: unused variable 'mode'

framebuffer.c:707:8: error: unused variable 'mode' [-Wunused-variable]
u_int mode;


# ef698fab 16-Jan-2021 Toomas Soome <tsoome@FreeBSD.org>

loader.efi: handle multiple gop instances

Some systems may provide multiple GOP instances and not all are
bound to hardware. The current loader is picking up the first GOP,
which may not be usable.

loader.efi: handle multiple gop instances

Some systems may provide multiple GOP instances and not all are
bound to hardware. The current loader is picking up the first GOP,
which may not be usable. Instead we load the GOP handle array,
and test every handle to have registered ConOut protocol. If ConOut is
present, we can use this GOP handle to open GOP protocol.

show more ...


# 50180d2b 11-Jan-2021 Toomas Soome <tsoome@FreeBSD.org>

loader.efi: reworked framebuffer setup

Pass gfx_state to efi_find_framebuffer(), so we can pick between
GOP and UGA in efi_find_framebuffer(), also we can then
set up struct gen_fb in gfx_state from

loader.efi: reworked framebuffer setup

Pass gfx_state to efi_find_framebuffer(), so we can pick between
GOP and UGA in efi_find_framebuffer(), also we can then
set up struct gen_fb in gfx_state from efifb and isolate efi fb data
processing into framebuffer.c.

This change does allow us to clean up efi_cons_init() and reduce
BS->LocateProtocol() calls.

A little downside is that we now need to translate gen_fb back to
efifb in bootinfo.c (for passing to kernel), and we need to add few
-I options to CFLAGS.

show more ...


# 1a816c75 11-Jan-2021 Toomas Soome <tsoome@FreeBSD.org>

loader.efi: efifb_mask_from_pixfmt is missing PixelBltOnly

We are missing way to set RGB masks for BLT only framebuffer.


# 3630506b 21-Dec-2020 Toomas Soome <tsoome@FreeBSD.org>

loader: implement framebuffer console

Draw console on efi.
Add vbe framebuffer for BIOS loader (vbe off, vbe on, vbe list,
vbe set xxx).
autoload font (/boot/fonts) based on resolution and font size

loader: implement framebuffer console

Draw console on efi.
Add vbe framebuffer for BIOS loader (vbe off, vbe on, vbe list,
vbe set xxx).
autoload font (/boot/fonts) based on resolution and font size.
Add command loadfont (set font by file) and
variable screen.font (set font by size). Pass loaded font to kernel.

Export variables:
screen.height
screen.width
screen.depth

Add gfx primitives to draw the screen and put png image on the screen.
Rework menu draw to iterate list of consoles to enamble device specific
output.

Probably something else I forgot...

Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D27420

show more ...


# 7f3d93b5 14-Jun-2020 Toomas Soome <tsoome@FreeBSD.org>

loader.efi: update console after gfx mode change

The gfx mode change should be coordinated with console setup.


123