History log of /freebsd/stand/efi/loader/framebuffer.c (Results 1 – 25 of 31)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 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 ...


Revision tags: release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0
# 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 ...


Revision tags: release/13.3.0
# 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


Revision tags: release/14.0.0
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

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


Revision tags: release/13.2.0, release/12.4.0
# 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


Revision tags: release/13.1.0
# 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 ...


Revision tags: release/12.3.0, release/13.0.0
# 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 ...


Revision tags: release/12.2.0
# 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.


Revision tags: release/11.4.0, release/12.1.0
# 110d56cb 06-Aug-2019 Toomas Soome <tsoome@FreeBSD.org>

loader.efi: replace HandleProtocol() with OpenProtocol()

The HandleProtocol() is deprecated interface and we should use OpenProtocol()
instead. Moreover, in some firmware implementation(s), the Hand

loader.efi: replace HandleProtocol() with OpenProtocol()

The HandleProtocol() is deprecated interface and we should use OpenProtocol()
instead. Moreover, in some firmware implementation(s), the HandleProtocol()
does return device path using static storage, so we can not keep the value
returned there. With same firmware, the OpenProtocol() does return data we
do not need to clone.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D21162

show more ...


Revision tags: release/11.3.0, release/12.0.0
# 14b841d4 11-Aug-2018 Kyle Evans <kevans@FreeBSD.org>

MFH @ r337607, in preparation for boarding


# bbd7a929 04-Aug-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r336870 through r337285, and resolve conflicts.


# 37528fb4 04-Aug-2018 Kyle Evans <kevans@FreeBSD.org>

efi-autoresizecons: Don't fail the boot w/o GOP or UGA

efi-autoresizecons is currently executed for every boot. If it fails, we
risk failing the boot, and we really shouldn't do that unless we absol

efi-autoresizecons: Don't fail the boot w/o GOP or UGA

efi-autoresizecons is currently executed for every boot. If it fails, we
risk failing the boot, and we really shouldn't do that unless we absolutely
must.

Not being able to locate GOP or UGA is not a significant enough failure to
kill the boot. We always have the option to fall back to resizing ConOut to
a higher text mode resolution (if available), so do that.

This was detected by Doug [1] while attempting a bhyve + UEFI + PXE boot.
This patch was effectively also submitted by Doug, but I expanded the
comment he had originally sent me a little bit to indicate why this is an OK
idea.

Reported by: Doug Ambrisko <ambrisko@ambrisko.com> [1]

show more ...


Revision tags: release/11.2.0
# 807dbf2b 19-Apr-2018 Kyle Evans <kevans@FreeBSD.org>

efi loader: Address two nits with recent graphics changes

- We should be setting a known graphics mode on conout, but we aren't.
- We shouldn't be setting gop mode if we didn't find a good resolutio

efi loader: Address two nits with recent graphics changes

- We should be setting a known graphics mode on conout, but we aren't.
- We shouldn't be setting gop mode if we didn't find a good resolution to
set, but we were. This made efi_max_resolution=1x1 effectively worthless,
since it would always set gop mode 0 if nothing else.

show more ...


12