summaryrefslogtreecommitdiff
path: root/stand
AgeCommit message (Collapse)Author
37 hourspowerpc/loader: Size the CAS PVR array correctlyJustin Hibbits
Fixes: 895eeb492 ("powerpc/loader: Add CAS support for older CPUs") MFC after: 1 week
40 hourspowerpc/loader: Add CAS support for older CPUsJustin Hibbits
QEMU creates a "ibm,arch-vec-5-platform-support" property for all pseries emulations. Add POWER7 and POWER6 to the CAS list, more can be added later as needed/desired. MFC after: 1 week
10 daysloader.efi(8): clarify UEFI boot path and boot1.efi usagekitkat1424
Reorganise and clarify the legacy role of boot1.efi in DESCRIPTION to improve clarity. Add a minor missing word in the BUGS section ["...caution is required*..."]. See also - PR: 290794 Signed-off-by: Aaditya Singh <aadityavksingh@gmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1939
10 daysstand: remove powerpcspe linker scriptMinsoo Choo
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me> Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1914 (cherry picked from commit 9c72e8e3500408f7ce5fc7be500dd3efc0307674)
10 daysMakefile*: remove powerpcspeMinsoo Choo
As reported on the freebsd-announce mailing list[1] FreeBSD is continuing to retire 32-bit support. Remove powerpcspe from build infrastructure. [1] https://lists.freebsd.org/archives/freebsd-announce/2024-February/000117.html Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me> Reviewed by: jhibbits, emaste Pull request: https://github.com/freebsd/freebsd-src/pull/1914
11 daysloader: Only warn when we have neither FDT nor ACPIWarner Losh
Sponsored by: Netflix Reviewed by: adrian, andrew Differential Revision: https://reviews.freebsd.org/D54510
11 daysloader.efi: Only use SPCR if enabled.Jarmo Jaakkola
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
12 dayslualoader: fix pruning of non-existent default kernelKyle Evans
Removing the kernel from the list of available kernels is sufficient to avoid rendering it in the list, but we need more for booting to actually work. Notably, the 'kernel' loader.conf var was left intact to its default value, so if one didn't use the kernel selector in the menu then we'd try to boot the nonexistent 'kernel' instead of the new default (first autodetected). There's room to improve the error messages here, but for now let's just make it actually work correctly. PR: 292232 Fixes: d04415c520b03 ("loader: lua: remove the default kernel [...]")
13 dayspxeboot.8: Fix mdoc typo for emails, tag spdxAlexander Ziaee
Fixes: a37825313f62 (Fix mdoc typos for emails, tag spdx) MFC after: 3 days
13 daysloader.efi: add stride & offset for MacBookPro3,1Frank Hilgendorf
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
2026-01-04loader.efi: only use firmware provided Blt on GOPAhmad Khalifa
gfx_state.tg_private points to a EFI_GRAPHICS_OUTPUT_PROTOCOL only when using GOP. The firmware provided Blt functions on UGA platforms have been observed to not work on old MacBooks, and are likley hit or miss anyways as UGA has been deprecated since 2006. Reviewed by: tsoome PR: 291935 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54432
2026-01-04loader.efi: probe for UGA if GOP isn't foundAhmad Khalifa
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
2025-12-27loader: Use C99 initializations for file_formatWarner Losh
For greppability, use C99 initializers for the struct file_format. Sponsored by: Netflix
2025-12-27loader: Fix powerpc64le by working around slof bug in qemu/slofWarner Losh
Fix powerpc 64 little endian booting by adding some padding. Due to https://gitlab.com/slof/slof/-/blob/master/lib/libelf/elf32.c?ref_type=heads#L114 https://gitlab.com/slof/slof/-/blob/master/lib/libelf/elf32.c?ref_type=heads#L150 using <= instead of <, slof used to loop over the phdrs. It overruns by 1 and so on little endian it swizzles the first 32 bytes of .text. Work around this by adding 32 bytes of padding after the headers. We should fix this in slof, but it's in the just released QEMU 10.2, so we have to pad things here for now. Now powerpc64le + qemu works. MFC After: 3 days (maybe EN too) Reviewed by: adrian, jhibbits Sponsored by: Netflix
2025-12-10kboot: Explicitly use host:/procWarner Losh
When looking for the boot_params symbol we need to get the UEFI memory map, use host: prefix. The short-circuit we have for this only works when we have a filesystem. During the earliest parts of boot, we can sometimes not have this yet, so making this explicit allows these environments to function. It's always in the host path. Print better error messages, and add newlines in two palces. Sponsored by: Netflix
2025-12-08iwmfw(4): fix spelling of the iwm8000C firmware.Bjoern A. Zeeb
When migrating the firmware to be installed as plain firmware files to /boot/firmware the iwm8000C firmware lost its "fw" suffix that iwm(4) expects. The follow-up change to defaults/loader.conf is also consistently missing the "fw". Fix both places, and add the wrongly spelt version to ObsoleteFiles.inc (entirely untested). PR: 291403 Reported by: Augustin Hoffmann (avgwst tutanota.de) Fixes: af0a81b6470aba4af4a24ae9804053722846ded4 Fixes: a0f06dfb0d188966bee7265ec7d9f20093186bb6 MFC after: 3 days
2025-11-26loader: Note current autoboot_delay behaviorWarner Losh
Some time ago, the boot loader stopped polling for a key press during the kernel and module loading prior to the transition to lua. Inspection of the code shows the polling is no longer there. Document the change. Sponsored by: Netflix
2025-11-24stand: Rename ZFSSRC to SAZFSSRC to avoid confusionWarner Losh
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
2025-11-24stand: Move from OZFS to ZFSTOPWarner Losh
Use ZFSTOP instead of OZFS. They are the saame thing. Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D53900
2025-11-22loader.efi.8: Minor formatting nitsJohn Baldwin
- Add several missing .Pp after lists and literal blocks. - Fix the column widths for the console table and use a shorter indent so that it doesn't wrap on an 80-col display. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53866
2025-11-19stand/lua: Fix two typos in the manual pagesGordon Bergling
- s/Additionnaly/Additionally/ - s/commmand/command/ MFC after: 3 days
2025-11-16stand: Update riscv efi booting to edk2 includesWarner Losh
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
2025-11-16edk2: Fix fdt buildWarner Losh
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
2025-11-16stand: Cut over to using the EDK2 filesWarner Losh
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
2025-11-16stand: switch the loader over to using efi-edk2.hWarner Losh
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D53652
2025-11-16stand: Rename EFI_ERROR_CODE to DECODE_ERROR to avoid Edk2 ClashWarner Losh
This follows what Illumos has done. Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D53656
2025-11-14loader.8: Document module commandsAlexander Ziaee
Begin documenting module loader commands in loader(8), where the reader would look for them. Segregate them by their availability in individual loader implementations, like build(7) targets. These details were graciously donated by kevans. MFC after: 3 days Reviewed by: kevans Co-authored-by: Kyle Evans <kevans@freebsd.org> Differential Revision: https://reviews.freebsd.org/D50727
2025-11-14loader manuals: Clarify console and boot_serialAlexander Ziaee
console=comconsole is for the loader and boot_serial is for the kernel. I think we should centralize documentation on the loader settings in one manual, such a loader.8. The current proliferation is not obvious where to find the documentation. To the user, these are all set in loader.conf or at the loader prompt. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53695
2025-11-10stand: Try to parse vdisk correctlyWarner Losh
PR: 289306 Sponsored by: Netflix Reviewed by: dab MFC After: 5 days Differential Revision: https://reviews.freebsd.org/D52500
2025-11-06stand: Teach the zfs loader about dynamic gang headersMark Johnston
There is a pool feature, dynamic_gang_header, that is enabled by default in new pools. When this feature is active, gang headers may be larger than 512 bytes. The loader needs to be taught to cope with that. Try using the vdev ashift to pick the gang block header size. If the checksum fails, fall back to the old gang block header size. This is based on a patch by Paul Dagnelie, with testing, bug-fixing and some simplifications from me. PR: 289690 Co-authored by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53578
2025-10-26packages: Remove the /boot hack from mtree-to-plist.awkLexi Winter
Currently, files in /boot (other than /boot/kernel) are assigned to the bootloader package using a filename match in mtree-to-plist.awk. This causes some problems, most notably that debug info for userboot ends up in the utilities-dbg package instead of bootloader-dbg. Remove the path handling from mtree-to-plist and instead set PACKAGE in the appropriate Makefiles to put these in the correct package. While here, move userboot*.so from bootloader-dev to bootloader. MFC after: 3 days Reviewed by: cperciva Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D53179
2025-10-24sys/crypto: import md5c.c C rewriteRobert Clausecker
The reimplementation is a bit cleaner than the original code, although it is also slightly slower. This shouldn't matter too much as we will have asm code for the major platforms. The code is unrolled when built in the kernel or user space, but not when in libsa, as to reduce the code size. Differential Revision: https://reviews.freebsd.org/D45670 Reviewed by: jrtc27, imp Approved by: markj (mentor) MFC after: 1 month
2025-10-24sys: move sys/kern/md[45].c to sys/cryptoRobert Clausecker
Both files are used by kernel and userspace. Move them to sys/crypto where they belong. No functional changes intended. In preparation of D45670. Reviewed by: markj Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D52909
2025-10-16stand/i386: quiet gcc -Warray-boundsRyan Libby
GCC has started to warn about memory accesses under address 0x1000. Tweak it to 0x400 for stand/i386 to avoid warnings for access to BIOS data area memory and above but still retain most of the warning value. Reviewed by: dab, imp Differential Revision: https://reviews.freebsd.org/D53036
2025-10-09cli.lua.8: Reflow literal commentsAlexander Ziaee
Reflow comments in literal text blocks so this manual is legible at MANWIDTH 78. MFC after: 1 day
2025-10-07libsa: smbios: Detect less-than-64-bit platforms via __SIZEOF_SIZE_T__Olivier Certner
What we really want here is to know if pointers can refer to 64-bit addresses, regardless of whether they also hold other information (such as capabilities in CHERI). __SIZEOF_SIZE_T__ is probably the closest indication to that piece of information, so let's use it. __ILP32__ wasn't wrong in practice though, as we don't support 32-bit CHERI hardware (and likely never will). Consistently with this change, test whether we can actually address the 64-bit SMBIOS's structure table by converting the end address to 'size_t' and checking whether its value is preserved. Suggested by: jhb (for the __ILP32__ => __SIZEOF_SIZE_T__ part) Reviewed by: jhb, imp MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49318
2025-10-03flua: kick out the remaining builtin modulesKyle Evans
Bootstrap flua has some magic now to handle modules by building them in and discovering them via linker sets. This is slightly cleaner than always building them in and baking them into loadedlibs for both bootstrap and system flua. Adjust the stand build now that these three libs have their own new homes. Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D51891
2025-10-03Revert "flua: kick out the remaining builtin modules"Kyle Evans
This reverts commit 80ada959004c4386880e47b11618f8abfc2d80e1, because bootstrap flua is about to get backed out.
2025-10-03flua: kick out the remaining builtin modulesKyle Evans
Bootstrap flua has some magic now to handle modules by building them in and discovering them via linker sets. This is slightly cleaner than always building them in and baking them into loadedlibs for both bootstrap and system flua. Adjust the stand build now that these three libs have their own new homes. Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D51891
2025-09-28core.lua: Consistently check for single userWarner Losh
While boot_single:lower() should always be in {yes,no}, it might not be. In one place we check == yes, and another ~= no. Make both places ~= no for consistency. We generally try to test != default. Sponsored by: Netflix
2025-09-28loader: make disable-device more rebustWarner Losh
Check the number of arguments and ensure that the passed-in device to disable parses correctly. Sponsored by: Netflix
2025-09-28stand: Remove support for FreeBSD 12.2 and earlierWarner Losh
Remove 'pager' shim that was last not supported in FreeBSD 12.2, which went EOL on March 31, 2022. People have had enough time to upgrade the boot loader. Sponsored by: Netflix
2025-09-18stand/man: Fix mdoc typos for emails, tag spdxAlexander Ziaee
MFC after: 3 days
2025-09-13loader: Move ACPI RSDP detectionkpowkitty
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1843
2025-09-13loader.efi: Properly scope variableWarner Losh
guid here is only used for EFI_ZFS_BOOT, so move the ifdef. Noticed by: wosch and clang 20 Sponsored by: Netflix
2025-09-11loader.efi: improve StartImage error messageToomas Soome
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
2025-09-10loader/efi: fix non-x86 buildAhmad Khalifa
Pointy hat to: vexeduxr Reported by: Bakul Shah
2025-09-09efi: translate errno to EFI status on exitAhmad Khalifa
Translate the given errno to an efi status instead of always exiting with EFI_LOAD_ERROR.
2025-09-09loader/efi: remove is_last parameter from find_currdevAhmad Khalifa
It is unused. Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D52434
2025-09-09loader/efi: plug memory leakAhmad Khalifa
Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D52433