aboutsummaryrefslogtreecommitdiff
path: root/stand
Commit message (Collapse)AuthorAgeFilesLines
* INDEX.fonts: Minor maintenanceAlexander Ziaee46 hours1-2/+1
| | | | | | | | + Mention relevance of this file in the vt manual screen.font entry + The vidfont manual is in section one, not eight + Remove leftover blank line from freebsd tag removal MFC after: 3 days
* stand: Add compiler builtins needed by GCC for RISC-VJohn Baldwin2 days1-0/+3
| | | | | Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D54963
* stand: Use the correct OUTPUT_ARCH in the linker script for RISC-VJohn Baldwin2 days1-1/+1
| | | | | | | Compare to the OUTPUT_ARCH in sys/conf/ldscript.riscv. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D54962
* loader: Prefer comma-separated list of values for "console"Michael Osipov5 days2-4/+4
| | | | | | | PR: 292595 Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54923
* loader.conf.5: "console" setting does not document multi-value possiblityMichael Osipov6 days2-1/+2
| | | | | | | PR: 292595 Approved by: ziaee, dab, imp, tsoome MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54843
* stand: fix typo in common/nvstore.cToomas Soome6 days1-1/+1
| | | | Some out of order chars.
* stand/zfs: fix path setup in zfs_mount()Toomas Soome6 days1-1/+1
| | | | Need to check argument 'path', not just allocated struct member.
* loader: Only warn for !FDT && !ACPI take twoColin Percival9 days1-1/+1
| | | | | | | | | | | | | | | | | | | For unclear reasons, we used to print two warnings about not having a DTB: First, printf("No valid device tree blob found!\n"); and immediately later a second, printf("WARNING! Trying to fire up the kernel, but no " "device tree blob found!\n"); A previous commit silenced the second warning in the event that the acpi.revision environment variable was set, on the theory that systems which have ACPI might not need a DTB; this commit silences the first of the two warnings under the same condition. Reviewed by: andrew Fixes: 3989a3d81701 ("loader: Only warn when we have neither FDT nor ACPI") Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D54772
* powerpc/loader: Size the CAS PVR array correctlyJustin Hibbits2026-01-171-1/+1
| | | | | Fixes: 895eeb492 ("powerpc/loader: Add CAS support for older CPUs") MFC after: 1 week
* powerpc/loader: Add CAS support for older CPUsJustin Hibbits2026-01-171-0/+6
| | | | | | | | 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
* loader.efi(8): clarify UEFI boot path and boot1.efi usagekitkat14242026-01-091-24/+23
| | | | | | | | | | | | | 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
* stand: remove powerpcspe linker scriptMinsoo Choo2026-01-091-3/+0
| | | | | | | 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)
* Makefile*: remove powerpcspeMinsoo Choo2026-01-091-5/+0
| | | | | | | | | | | | 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
* loader: Only warn when we have neither FDT nor ACPIWarner Losh2026-01-081-1/+2
| | | | | | Sponsored by: Netflix Reviewed by: adrian, andrew Differential Revision: https://reviews.freebsd.org/D54510
* loader.efi: Only use SPCR if enabled.Jarmo Jaakkola2026-01-081-5/+9
| | | | | | | | | | | | | | | | | | 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
* lualoader: fix pruning of non-existent default kernelKyle Evans2026-01-071-0/+6
| | | | | | | | | | | | | | | 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 [...]")
* pxeboot.8: Fix mdoc typo for emails, tag spdxAlexander Ziaee2026-01-061-3/+6
| | | | | Fixes: a37825313f62 (Fix mdoc typos for emails, tag spdx) MFC after: 3 days
* loader.efi: add stride & offset for MacBookPro3,1Frank Hilgendorf2026-01-061-0/+17
| | | | | | | | 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
* loader.efi: only use firmware provided Blt on GOPAhmad Khalifa2026-01-041-2/+6
| | | | | | | | | | | | | | 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
* loader.efi: probe for UGA if GOP isn't foundAhmad Khalifa2026-01-041-36/+38
| | | | | | | | | 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
* loader: Use C99 initializations for file_formatWarner Losh2025-12-2815-39/+70
| | | | | | For greppability, use C99 initializers for the struct file_format. Sponsored by: Netflix
* loader: Fix powerpc64le by working around slof bug in qemu/slofWarner Losh2025-12-281-1/+1
| | | | | | | | | | | | | | | | | | | 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
* kboot: Explicitly use host:/procWarner Losh2025-12-101-3/+10
| | | | | | | | | | | | | 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
* iwmfw(4): fix spelling of the iwm8000C firmware.Bjoern A. Zeeb2025-12-081-1/+1
| | | | | | | | | | | | | | | | | 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
* loader: Note current autoboot_delay behaviorWarner Losh2025-11-271-3/+3
| | | | | | | | 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
* stand: Rename ZFSSRC to SAZFSSRC to avoid confusionWarner Losh2025-11-258-10/+10
| | | | | | | | | 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
* stand: Move from OZFS to ZFSTOPWarner Losh2025-11-252-11/+10
| | | | | | | | Use ZFSTOP instead of OZFS. They are the saame thing. Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D53900
* loader.efi.8: Minor formatting nitsJohn Baldwin2025-11-221-1/+8
| | | | | | | | | | - 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
* stand/lua: Fix two typos in the manual pagesGordon Bergling2025-11-192-2/+2
| | | | | | | - s/Additionnaly/Additionally/ - s/commmand/command/ MFC after: 3 days
* stand: Update riscv efi booting to edk2 includesWarner Losh2025-11-171-1/+5
| | | | | | | | | | | | 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
* edk2: Fix fdt buildWarner Losh2025-11-162-0/+3
| | | | | | | | | 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
* stand: Cut over to using the EDK2 filesWarner Losh2025-11-1652-7427/+285
| | | | | | | | | | | | | | | | | | | | | | 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
* stand: switch the loader over to using efi-edk2.hWarner Losh2025-11-166-804/+9
| | | | | Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D53652
* stand: Rename EFI_ERROR_CODE to DECODE_ERROR to avoid Edk2 ClashWarner Losh2025-11-1618-40/+40
| | | | | | | | This follows what Illumos has done. Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D53656
* loader.8: Document module commandsAlexander Ziaee2025-11-141-1/+47
| | | | | | | | | | | | 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
* loader manuals: Clarify console and boot_serialAlexander Ziaee2025-11-142-2/+5
| | | | | | | | | | | | 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
* stand: Try to parse vdisk correctlyWarner Losh2025-11-111-1/+12
| | | | | | | | PR: 289306 Sponsored by: Netflix Reviewed by: dab MFC After: 5 days Differential Revision: https://reviews.freebsd.org/D52500
* stand: Teach the zfs loader about dynamic gang headersMark Johnston2025-11-061-13/+54
| | | | | | | | | | | | | | | | | | 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
* packages: Remove the /boot hack from mtree-to-plist.awkLexi Winter2025-10-262-0/+6
| | | | | | | | | | | | | | | | | 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
* sys/crypto: import md5c.c C rewriteRobert Clausecker2025-10-241-0/+1
| | | | | | | | | | | | | | 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
* sys: move sys/kern/md[45].c to sys/cryptoRobert Clausecker2025-10-241-2/+1
| | | | | | | | | | | | | | 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
* stand/i386: quiet gcc -Warray-boundsRyan Libby2025-10-174-4/+8
| | | | | | | | | 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
* cli.lua.8: Reflow literal commentsAlexander Ziaee2025-10-091-8/+10
| | | | | | | Reflow comments in literal text blocks so this manual is legible at MANWIDTH 78. MFC after: 1 day
* libsa: smbios: Detect less-than-64-bit platforms via __SIZEOF_SIZE_T__Olivier Certner2025-10-071-4/+7
| | | | | | | | | | | | | | | | | | | 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
* flua: kick out the remaining builtin modulesKyle Evans2025-10-042-2/+2
| | | | | | | | | | | | | 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
* Revert "flua: kick out the remaining builtin modules"Kyle Evans2025-10-042-2/+2
| | | | | This reverts commit 80ada959004c4386880e47b11618f8abfc2d80e1, because bootstrap flua is about to get backed out.
* flua: kick out the remaining builtin modulesKyle Evans2025-10-032-2/+2
| | | | | | | | | | | | | 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
* core.lua: Consistently check for single userWarner Losh2025-09-291-1/+1
| | | | | | | | 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
* loader: make disable-device more rebustWarner Losh2025-09-291-1/+9
| | | | | | | Check the number of arguments and ensure that the passed-in device to disable parses correctly. Sponsored by: Netflix
* stand: Remove support for FreeBSD 12.2 and earlierWarner Losh2025-09-291-12/+0
| | | | | | | | 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