History log of /freebsd/stand/efi/loader/main.c (Results 1 – 25 of 149)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 860f20cc 20-Jul-2025 Aymeric Wibo <obiwac@FreeBSD.org>

stand: Add print_delay environment variable in loader

This adds support for a new `print_delay` environment variable,
which inserts a delay in microseconds when `putchar` encounters a
newline charac

stand: Add print_delay environment variable in loader

This adds support for a new `print_delay` environment variable,
which inserts a delay in microseconds when `putchar` encounters a
newline character. This can be useful when debugging.

Reviewed by: markj, imp, ziaee, mckusick (mentor)
Approved by: markj, imp, ziaee, mckusick (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50832

show more ...


# d72c74a6 04-Jul-2025 Tom Jones <thj@FreeBSD.org>

loader: Add halt as an alias to poweroff machine

Add halt as an alias to also poweroff a machine from the loader prompt,
this is consistent with ddb.

Reviewed by: imp
Sponsored by: The FreeBSD Foun

loader: Add halt as an alias to poweroff machine

Add halt as an alias to also poweroff a machine from the loader prompt,
this is consistent with ddb.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51132

show more ...


Revision tags: release/14.3.0-p1, release/14.2.0-p4, release/13.5.0-p2, release/14.3.0
# e94f269c 26-May-2025 Warner Losh <imp@FreeBSD.org>

stand/efi: Initialize archsw at compile time

Sponsored by: Netflix


# 41cf74fe 20-May-2025 Simon J. Gerraty <sjg@FreeBSD.org>

loader - guard against empty rootdev

At least one instance of u-boot pretending to be EFI
is passing empty rootdev to loader which does not end well.

A simple precaution is harmless.

Reviewed by:

loader - guard against empty rootdev

At least one instance of u-boot pretending to be EFI
is passing empty rootdev to loader which does not end well.

A simple precaution is harmless.

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

show more ...


# 0d1d8c8c 11-Apr-2025 Warner Losh <imp@FreeBSD.org>

loader/efi: Fix trivial whitespace error

Sponsored by: Netflix


Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0
# 96f77576 05-Mar-2025 Olivier Certner <olce@FreeBSD.org>

loader.efi: smbios: Favor the v3 (64-bit) entry point

Be consistent with what we are now doing with non-EFI boot (but with the
difference that EFI runs in 64-bit mode on 64-bit platforms, so there i

loader.efi: smbios: Favor the v3 (64-bit) entry point

Be consistent with what we are now doing with non-EFI boot (but with the
difference that EFI runs in 64-bit mode on 64-bit platforms, so there is
no restriction that the v3 entry point should be below 4GB).

While here, move out the EFI smbios detection code in a separate
sub-routine.

Reviewed by: imp, markj
MFC after: 2 weeks
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49292

show more ...


Revision tags: release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3
# 038457dd 23-Jan-2025 Andrew Turner <andrew@FreeBSD.org>

stand/efi: Add more pl011-like uarts

The Arm SBSA uarts are handled by the pl011 driver. Add them to the
list of pl011 uarts.

Reviewed by: manu, imp
Sponsored by: Arm Ltd
Differential Revision: htt

stand/efi: Add more pl011-like uarts

The Arm SBSA uarts are handled by the pl011 driver. Add them to the
list of pl011 uarts.

Reviewed by: manu, imp
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D48526

show more ...


# 7eb3273a 23-Jan-2025 Andrew Turner <andrew@FreeBSD.org>

stand/efi: Use hex values to get the uart type

To keep the SPCR uart type to name map aligned always use the hex value
as an index in the types array.

Reviewed by: manu, imp
Sponsored by: Arm Ltd
D

stand/efi: Use hex values to get the uart type

To keep the SPCR uart type to name map aligned always use the hex value
as an index in the types array.

Reviewed by: manu, imp
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D48525

show more ...


Revision tags: release/14.2.0
# 780f2892 20-Nov-2024 Warner Losh <imp@FreeBSD.org>

stand: drop inttypes.h from safe list

Nothing uses it anymore, so drop it from the 'safe' list. Also, move
stand/efi/loader/main.c to using machine/_inttypes.h which is all it
really needs.

Sponsor

stand: drop inttypes.h from safe list

Nothing uses it anymore, so drop it from the 'safe' list. Also, move
stand/efi/loader/main.c to using machine/_inttypes.h which is all it
really needs.

Sponsored by: Netflix

show more ...


# 47ef2a13 02-Nov-2024 Tatiana <t.ermakova@securitycode.ru>

loader.efi: Fix LOADER_NET_SUPPORT=no builds

We include too many references to networking things in the
non-networking build for loader.efi. Ifdef out netserver command when we
are disabling network

loader.efi: Fix LOADER_NET_SUPPORT=no builds

We include too many references to networking things in the
non-networking build for loader.efi. Ifdef out netserver command when we
are disabling network support to resolve.

PR: 277528
MFC After: 2 days
Reviewed by: imp

show more ...


# 501983e6 15-Oct-2024 Warner Losh <imp@FreeBSD.org>

loader.efi: Parse SPCR v3 and v4

We can get the UART clock from v3 SPCR, and a precise baudrate from
v4. Some precise baudrates will currently be rejected by the kernel.

Sponsored by: Netflix
Revi

loader.efi: Parse SPCR v3 and v4

We can get the UART clock from v3 SPCR, and a precise baudrate from
v4. Some precise baudrates will currently be rejected by the kernel.

Sponsored by: Netflix
Reviewed by: adrian, andrew
Differential Revision: https://reviews.freebsd.org/D47096

show more ...


# 70253b53 15-Oct-2024 Warner Losh <imp@FreeBSD.org>

loader.efi: Parse SPCR table entry in ACPI tables

If there's a SPCR, then use it to create and pass the right values to
the uart. We pass xo=0 in to calcuate the xo from the baud rate. We try
to be

loader.efi: Parse SPCR table entry in ACPI tables

If there's a SPCR, then use it to create and pass the right values to
the uart. We pass xo=0 in to calcuate the xo from the baud rate. We try
to be smart about what we set. We either set io or mm or pv/pd. Old
kernels will still work, despite pb/pd not being supported, because
we'll fall back to the SPCR parsing in the kernel.

We don't support Rev3 or Rev4 SPCR yet. It's too new to be in real
hardware yet.

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

show more ...


# 94164106 15-Oct-2024 Warner Losh <imp@FreeBSD.org>

loader.efi: |= the boot flags how

how is assumed to be 0, so we directly assign to it. It might not always
be 0, so or-in these bits.

Sponsored by: Netflix
Reviewed by: bz, andrew
Differential Re

loader.efi: |= the boot flags how

how is assumed to be 0, so we directly assign to it. It might not always
be 0, so or-in these bits.

Sponsored by: Netflix
Reviewed by: bz, andrew
Differential Revision: https://reviews.freebsd.org/D47084

show more ...


# c5f3a7f6 15-Oct-2024 Warner Losh <imp@FreeBSD.org>

loader.efi: Make rsdp global

Make rsdp pointer to the RSDP global so we can look up other tables.

Sponsored by: Netflix
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D470

loader.efi: Make rsdp global

Make rsdp pointer to the RSDP global so we can look up other tables.

Sponsored by: Netflix
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D47083

show more ...


# c8ebbd28 18-Sep-2024 Colin Percival <cperciva@FreeBSD.org>

loader: Expand EFI entropy if < 2048 bytes

The EFI RNG on some platforms takes a long time if we request 2048
bytes of entropy, so we would like to request less; but our kernel
Fortuna RNG needs to

loader: Expand EFI entropy if < 2048 bytes

The EFI RNG on some platforms takes a long time if we request 2048
bytes of entropy, so we would like to request less; but our kernel
Fortuna RNG needs to be fed 2048 bytes in order to consider itself
"fully seeded". If we have between 64 bytes (the size of a single
Fortuna pool and enough to guarantee cryptographic security) and
2048 bytes (what Fortuna wants) then the boot process will hang
waiting for more entropy despite in fact having enough to operate
securely.

Since 64 bytes of entropy is plenty to be cryptographically secure
(an attack of cost ~ 2^128 is infeasible, which implies a mere 16
bytes of entropy), use PBKDF2 (aka pkcs5v2_genkey_raw) to spread
the entropy across 2048 bytes. This is secure since PBKDF2 has
the property that every subset of output bytes has within O(1) of
the maximum possible amount of entropy.

Reviewed by: pjd
MFC after: 1 week
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D46635

show more ...


# b58fe4eb 18-Sep-2024 Colin Percival <cperciva@FreeBSD.org>

loader: Instrument EFI GetRNG with TSLOG

On some systems, the EFI GetRNG is slow. Make it show up in flamecharts.

MFC after: 1 week
Sponsored by: Amazon
Differential Revision: https://reviews.free

loader: Instrument EFI GetRNG with TSLOG

On some systems, the EFI GetRNG is slow. Make it show up in flamecharts.

MFC after: 1 week
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D46631

show more ...


Revision tags: release/13.4.0, release/14.1.0
# f8ca5d45 14-May-2024 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

stand: Add support for 64-bit machines with 32-bit UEFI implementations

Some machines have 64-bit capable cpus but are stuck on 32-bit uefi
firmware.

Add support for them by building a new "loader_

stand: Add support for 64-bit machines with 32-bit UEFI implementations

Some machines have 64-bit capable cpus but are stuck on 32-bit uefi
firmware.

Add support for them by building a new "loader_ia32" with
LOADER_DEFAULT_INTERP along with the 64-bit one. The loader
can be disabled using MK_LOADER_IA32.

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

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 ...


Revision tags: release/13.3.0
# 2425dbdf 29-Feb-2024 Warner Losh <imp@FreeBSD.org>

loader/efi: Small diff reduction

Make doing the boot once protocol more similar to copies of this code.

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

loader/efi: Small diff reduction

Make doing the boot once protocol more similar to copies of this code.

Sponsored by: Netflix
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D44007

show more ...


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

libsa: Remove redundant sys/cdefs.h

Sponsored by: Netflix


# b2822c40 21-Feb-2024 Warner Losh <imp@FreeBSD.org>

loader/efi: Make gcc friendlier by move md_dev

Move the extern struct devsw md_dev out of the function. gcc is happier
with this arrangemnt often. However, we really should move it to a
header file,

loader/efi: Make gcc friendlier by move md_dev

Move the extern struct devsw md_dev out of the function. gcc is happier
with this arrangemnt often. However, we really should move it to a
header file, but that requires a bit of a rework of md support and
config.

Sponsored by: Netflix
Reviewed by: manu, tsoome
Differential Revision: https://reviews.freebsd.org/D44008

show more ...


# 064fa628 04-Feb-2024 Warner Losh <imp@FreeBSD.org>

loader: For EFI, if we don't have ConOut, try ConIn

Try ConIn if we don't have a ConOut variable. ConIn will contain HID
devices and/or serial devices. We currently just search for serial
devices an

loader: For EFI, if we don't have ConOut, try ConIn

Try ConIn if we don't have a ConOut variable. ConIn will contain HID
devices and/or serial devices. We currently just search for serial
devices and will use them instead of video with the current code. While
ConIn w/o ConOut is fairly common on laptops, is kinda rare on servers.
Some refinement may be needed in the future if servers come to
light. This is also minimal to allow possible integration into 13.3
release.

MFC After: 1 week
Sponsored by: Netflix
Reviewed by: dab, tsoome
Differential Revision: https://reviews.freebsd.org/D43714

show more ...


# e183039f 08-Dec-2023 Kyle Evans <kevans@FreeBSD.org>

loader: lua: assume late ACPI detection if the feature isn't enabled

While we're here, enable the feature in the places we detect ACPI. This
lets us side-step the existing issues and provide a path

loader: lua: assume late ACPI detection if the feature isn't enabled

While we're here, enable the feature in the places we detect ACPI. This
lets us side-step the existing issues and provide a path forward for
folks upgrading from previous releases that haven't updated their ESP
yet.

Let's also fix core.setACPI: the hint already indicates that the
user's disabled it more consistently than loader.acpi_disabled_by_user.
Even more, the latter is wrong because we set it by default if we did
not detect ACPI. The ACPI hint remains even when we're setting defaults
because ACPI loaded into the kernel will make some noise if it's not
hinted off, even when we didn't detect it.

imp notes that this will result in some relatively harmless noise on
platforms that don't support ACPI but aren't using the UEFI loader, as
we would enable the ACPI module for loading on them and then loader
would not be able to find it. These are non-fatal, but should probably
be fixed by just declaring support for EARLY_ACPI in those loaders since
we know they won't have ACPI early on -- punting on this for the time
being, though, in favor of providing a safer upgrade path sooner.

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

show more ...


# 7a1bc422 22-Nov-2023 Warner Losh <imp@FreeBSD.org>

stand/efi: Consolidate integer types

We have no need for 5 different copies of these.

Sponsored by: Netflix
Reviewed by: rcm, kevans, andrew
Differential Revision: https://reviews.freebsd.org/D42

stand/efi: Consolidate integer types

We have no need for 5 different copies of these.

Sponsored by: Netflix
Reviewed by: rcm, kevans, andrew
Differential Revision: https://reviews.freebsd.org/D42699

show more ...


# e4789047 21-Nov-2023 Warner Losh <imp@FreeBSD.org>

stand/efi: Define ACPI_USE_SYSTEM_INTTYPES to be 1 instead of blank

To avoid a redefinition warning... This needs to be redone correctly,
but this gets amd64 building again... My amd64 environment

stand/efi: Define ACPI_USE_SYSTEM_INTTYPES to be 1 instead of blank

To avoid a redefinition warning... This needs to be redone correctly,
but this gets amd64 building again... My amd64 environment is polluted
with something that caues earlier failures which I ignored...

Fixes: 488bc7e9a777
Sponsored by: Netflix

show more ...


123456