| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Sponsored by: Netflix
Reviewed by: adrian, andrew
Differential Revision: https://reviews.freebsd.org/D54510
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SerialPort in the SPCR is zeroed when serial redirection is disabled,
rather than the SPCR being omitted from the ACPI tables ony many
systems. Check to see that SerialPort.Address is non-zero before using.
FreeBSD would fail to boot on systems that could have a serial port
redireciton, but don't have it enabled because the loader would create a
bogus hw.uart.console. While one could unset this value to boot, you
couldn't do that automatically very easily. Instead, don't even look
at the SPCR table if the SerialPort is zero'd.
PR: 292206
MFC After: 3 days
Sponsored by: Netflix
Co-authored-by: Warner Losh <imp@FreeBSD.org>
Closes: https://github.com/freebsd/freebsd-src/pull/1948
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
For greppability, use C99 initializers for the struct file_format.
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
| |
ZFSSRC is abiguous on its surface and too clos to ZFSTOP, so rename it
to SAZFSSRC.
Sponsored by: Netflix
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D53901
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Update to include the right includes for the riscv protocol to get the
hypervisor details.
Note: I expanded the GUID inline rather than using a #define because
there was none. This is only listed in UefiCpuPkg/UefiCpuPkg.dec, so
include it here inline until we can automate using those files.
Fixes: 43b8edb32051
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
| |
x86 doesn't use FDT things by default, but aarch64 does. I thought I'd
built the loader on aarch64 to test the EDK2 all the things series, but
apparently not. This fixes the aarch64 build.
Fixes: 43b8edb32051
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D53652
|
| |
|
|
|
|
|
|
| |
This follows what Illumos has done.
Sponsored by: Netflix
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D53656
|
| |
|
|
|
| |
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1843
|
| |
|
|
|
|
|
| |
guid here is only used for EFI_ZFS_BOOT, so move the ifdef.
Noticed by: wosch and clang 20
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
| |
StartImage() may return additional data from failure. This data
has text message followed by optional binary blob. Print
out the text message (if present) and free the data.
See 7.4.2 EFI_BOOT_SERVICES.StartImage() page 199
UEFI_Spec_Final_2.11.pdf.
Reviewed by: imp
|
| |
|
|
|
| |
Pointy hat to: vexeduxr
Reported by: Bakul Shah
|
| |
|
|
|
| |
Translate the given errno to an efi status instead of always exiting
with EFI_LOAD_ERROR.
|
| |
|
|
|
|
|
| |
It is unused.
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D52434
|
| |
|
|
|
| |
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D52433
|
| |
|
|
|
|
|
|
| |
Also return actual errno values in other code paths.
(suggested by tsoome)
Reviewed by: tsoome, imp
Differential Revision: https://reviews.freebsd.org/D52432
|
| | |
|
| |
|
|
|
| |
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D52431
|
| |
|
|
|
|
|
|
|
|
| |
These are basically identical, with exception to the hook installed
which is specific to the loader we're building by necessity. Pull these
out into common/gfx_fb.c and just parameterize the hooks to make it
easier to change the logic.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D50886
|
| |
|
|
|
|
| |
- s/externel/external/
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While netbooting with loader.efi on at least one arm64 platform
which uses u-boot emulating UEFI, the kernel gets corrupted, we
suspected the u-boot ethernet driver was still running.
Use netdev.dv_cleanup for efinet_dev to address this.
This in turn requires calling dev_cleanup() before bi_load() to avoid
a loader crash since bi_load() calls ExitBootServices.
Reviewed by: imp
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D51186
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Switch to using sys/stdarg.h for va_list type and va_* builtins.
Make an attempt to insert the include in a sensible place. Where
style(9) was followed this is easy, where it was ignored, aim for the
first block of sys/*.h headers and don't get too fussy or try to fix
other style bugs.
Reviewed by: imp
Exp-run by: antoine (PR 286274)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1595
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we're loading metadata, we need to align it in a certain way. Right
now that way is hard-coded to be PAGE_SIZE. Rather than do the actual
physical thing in all these places, move this into a wrapper routine. We
may want to load a 16k kernel and align all these on 16k or a 4k kernel
and align on 4k on aarch64 (today you have to compile the loader with
the right page size). This will also reduce the number of places we
might have to touch to do that.
Sponsored by: Netflix
Reviewed by: tsoome, jhibbits
Differential Revision: https://reviews.freebsd.org/D50585
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No functional change: We're allocating a page from EFI, which is always
4k on amd64. So, this should always be 4k. PAGE_SIZE usually is this,
but might not be in some cases. For the end of the stack pointer in the
ist1, it should point the architecture's physical page past where we've
allocated. EFI_PAGE_SIZE more faithfully reflects that here since
PAGE_SIZE might not be exactly that in the future (if we had a larger
logical page than physical page). Since the AllocPage interface is in
EFI_PAGE_SIZE pages always, this seems safer. No functional change since
they are both 2096 today.
Sponsored by: Netflix
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D50584
|
| |
|
|
| |
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
| |
This allows us to change the VERSION_FILE used for loaders
as well as set NEWVERS_DATE and BUILD_UTC to reflect the publish
date of loaders for secure-boot.
Sponsored by: Juniper Networks, Inc.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D50478
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
Many of these no-doubt are in upstream, but they are interfering with
the filters I use to judge commits (no traling whitespace). We don't
directly get stuff from upstream. If/when we pull this from contrib
we'll revisit.
Sponsored by: Netflix
|
| |
|
|
| |
Sponsored by: Netflix
|
| |
|
|
| |
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commit b885643b63e4 ("boot: Always use ELF Tool Chain elfcopy for EFI
builds") I switched to using elfcopy for EFI_OBJCOPY, as llvm-objcopy
lacks support for translating ELF objects to PE32+. This broke building
on older releases with WITHOUT_ELFTOOLCHAIN_BOOTSTRAP set, as the host
did not provide elfcopy and it was not built as a bootstrap tool.
Now, if we're not bootstrapping ELF Tool Chain we check the output of
`${OBJCOPY} --version`, and will use that ${OBJCOPY} as long as it is
not llvm-objcopy.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49722
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now use llvm-objcopy by default (as of commit 1cae7121c667), but it
does not support efi-app-x86_64 and similar ouptut formats (for more
detail see LLVM issue 108609[1]).
Go back to installing ELF Tool Chain's version of objcopy as elfcopy
(the standard upstream name) and use it for EFI builds.
[1] https://github.com/llvm/llvm-project/issues/108609).
PR: 280771
Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49362
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the RISCV_EFI_BOOT_PROTOCOL to fetch the boot hart ID, and
communicate this to the kernel via new metadata field
(MODINFOMD_BOOT_HART).
If the boot hart is not found this way, fall back to the (now
deprecated) device-tree method.
The assumption that a hart ID can be represented with a 32-bit unsigned
integer is unchanged in the kernel, but from the loader we pass the full
64-bit value. This ensures that this API won't need to change in the
future, should the wider value become necessary.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48887
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It seems like this file was vendored (sorta) originally, but we have not
kept it in sync with the original source, if it still exists. Follow the
precedent in commit acf82d2659879, and just add the definition to the
bottom of the file, keeping its style conventions.
Defined here: https://github.com/riscv-non-isa/riscv-uefi
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48885
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Pass framebuffer information from loader(8) to the kernel via the
MODINFOMD_EFI_FB metadata field.
Enable the vt_efifb driver. A small tweak is required to work around the
lack of VM_MEMATTR_WRITE_COMBINING on this platform; we use
VM_MEMATTR_UNCACHEABLE instead.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48884
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1394
|
| |
|
|
|
|
|
|
| |
We never set the kernel type to either "elf64 kernel" nor "elf32
kernel".
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1394
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When FEAT_LPA2 is implemented the hardware supports increasing the
physical address space from 48-bit to 52-bit.
As older kernels only support a 48-bit physical address space limit
where the kernel is loaded to this.
Reviewed by: kib, markj
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46625
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
Ensure the open operation targets an HTTP device. Return EINVAL if
not, to prevent potential system crashes when used on other devices.
Differential Revision: https://reviews.freebsd.org/D48439
Reviewed by: dab, imp, vangyzen
Sponsored by: Dell Technologies
|
| |
|
|
|
|
|
|
| |
Instead of listing every arch we support, always define
EFI_STAGING_2M_ALIGN to 1.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1446
|
| |
|
|
|
|
|
|
| |
Try our best to use headers instead of doing things ourselves. With
i386's headers, there are some holes we need to fill manually.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1446
|