aboutsummaryrefslogtreecommitdiff
path: root/stand
Commit message (Collapse)AuthorAgeFilesLines
* loader: really use bold font for vga text modeToomas Soome2021-01-072-1/+7
| | | | | 8x16v turns out to be too thin and hard to read, use bold font instead.
* stand: remove bogus dependency from libsa32Kyle Evans2021-01-071-2/+0
| | | | libsa32 is independent of libsa, they can build in parallel if needed.
* stand: avoid adding fdt SUBDIR_DEPEND if WITHOUT_FDT is setKyle Evans2021-01-071-0/+2
| | | | | | This unbreaks the efi build if WITHOUT_FDT is set. Reported by: peterj
* Fix dateMateusz Piotrowski2021-01-071-1/+1
| | | | | | It's 2021 already. Reported by: delphij
* loader: do not update palette in text modeToomas Soome2021-01-071-1/+1
| | | | | Apparently palette update while in text mode, will cause some adapters to end up with blank display.
* Fix a couple of typos and formatting issuesMateusz Piotrowski2021-01-061-6/+10
|
* loader: instead of hw.vga.textmode, use screen.textmodeToomas Soome2021-01-062-9/+31
| | | | | | | | | | | | | hw.vga.textmode is directing VT VGA backend to use text mode. The default screen mode for BIOS loader is text, and default screen mode for VT VGA backend is graphics (unless we are running on hypervisor or hw.vga.textmode is set to 1). Using hw.vga.textmode for loader does remove possibility to have graphical mode VT VGA with text mode loader. screen.textmode can have possible values "0" to disable text mode, and "1" to set text mode.
* loader: remove left over call to unsetenv()Toomas Soome2021-01-061-1/+0
| | | | We do not touch kern.vt.fb.default_mode.
* loader: rewrite vidc_install_fontToomas Soome2021-01-061-32/+34
| | | | | | | | | Instead of trying to set reasonable register values, save significant register values, then prepare for font upload and then restore registers from saved data. This seems to fix text mode for most cases where text mode breakage was reported.
* loader: only use vidc_install_font() with vga controllerToomas Soome2021-01-043-0/+17
| | | | | If the controller does not support VGA, we should not touch VGA registers.
* loader: vidc_load_palette() does not need argumentsToomas Soome2021-01-041-2/+2
| | | | Remove left over argument from vidc_load_palette.
* loader: fix powerpc build with gfx_fbToomas Soome2021-01-044-2/+164
| | | | Need to add stub data and gfx functions to make linking happy.
* loader: fix mips build with gfx_fbToomas Soome2021-01-042-1/+83
| | | | Need to add stub data and gfx functions to make linking happy.
* loader: fix uboot build with gfx_fbToomas Soome2021-01-032-1/+81
| | | | Need to add stub data and gfx functions to make linking happy.
* loader: fix build on non-x86 platformsToomas Soome2021-01-021-5/+5
| | | | | | Need to build pnglite with all. Reported by: Herbert J. Skuhra
* loader: implement framebuffer consoleToomas Soome2021-01-0249-398/+6065
| | | | | | | | | | | | | | | | | | | | | | | 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
* efi loader: fix typos in a commentEric van Gyzen2021-01-011-4/+4
| | | | | | ...mostly because it's a harmless way to try the shiny new git repo. Sponsored by: Dell EMC Isilon
* stand: fix WITHOUT_FORTH/WITHOUT_LOADER_LUA buildKyle Evans2021-01-011-1/+7
| | | | | | | | Previously having ficl/liblua in LIB32LIST with their respective option turned OFF would be relatively harmless, as we wouldn't act on it unless we were building the non-32 variant. As of ac5f382a9d0a, however, these are now used for dependencies in some cases and must reflect what's actually going to be built.
* stand: properly declare subdir deps or .WAIT, do parallel buildKyle Evans2020-12-315-6/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buildworld already runs the stand build in parallel[1], so make it easier to identify ordering issues by properly establishing dependencies or adding .WAIT where needed. Everything in stand/ relies on libsa, either directly or indirectly, because libsa build is where the stand headers get installed and it gets linked in most places. Interpreters depend on their libs, machine dirs usually depend on top-level libs that are getting built and at least one of the interpreter flavors. For i386, order btx/libi386/libfirewire before everything else using a big-ol-.WAIT hammer. btx is the most common dependency, but the others are used sporadically. This seems to be where the race reporting on the mailing list is- AFAICT, the following sequence is happening: 1.) One of the loaders gets built based on stale btx/btxldr 2.) btx/btxldr gets rebuilt 3.) installworld triggers loader rebuild because btx was rebuilt after This seems like the most plausible explanation, as they've verified system time and timestamps. While we're here, let's switch stand/ over to a completely parallel build so we can work out these kinds of issues in isolation rather than in the middle of a larger build. Reviewed by: bdragon, sjg, tsoome Tested by: bdragon (-j1024, no failures, significant speed improvement) Differential Revision: https://reviews.freebsd.org/D23411
* lualoader: add loader_conf_dirs support (loader.conf.d)Kyle Evans2020-12-313-1/+33
| | | | | | | | | | | | | | | | | | loader_conf_dirs is the supporting mechanism for the included /boot/loader.conf.d directory. When lualoader finishes processing all of the loader_conf_files it finds after walking /boot/defaults/loader.conf, it will now check any and all loader_conf_dirs and process files ending in ".conf" as if they were a loader.conf. Note that loader_conf_files may be specified in a loader.conf.d config file, but loader_conf_dirs may *not*. It will only be processed as specified in /boot/defaults/loader.conf and any loader_conf_files that were loaded from there. Reviewed by: allanjude, freqlabs, rpokala, tsoome Includes suggestion from: imp Relnotes: yes Differential Revision: https://reviews.freebsd.org/D25608
* libsa: xdrproc_t should return boolToomas Soome2020-12-271-1/+1
| | | | | | | Since our xdr translation function are returning bool, so should xdrproc_t. Issue reported by gcc 10 build.
* lualoader: fix lua-lint runKyle Evans2020-12-171-1/+1
| | | | | | | | | | | luacheck rightfully complains that i is unused in the show-module-options loop at the end (it was used for some debugging in the process). We've added a new pager module that's compiled in, so declare that as an acceptable global. Notes: svn path=/head/; revision=368729
* lualoader: cli: provide a show-module-options loader commandKyle Evans2020-12-174-2/+91
| | | | | | | | | | | | | This effectively dumps everything lualoader knows about to the console using the libsa pager; that particular lua interface was added in r368591. A pager stub implementation has been added that just dumps the output as-is as a compat shim for older loader binaries that do not have lpager. This stub should be moved into a more appropriate .lua file if we add anything else that needs the pager. Notes: svn path=/head/; revision=368728
* Drop EFI_STAGING_SIZE back down to 64MWarner Losh2020-12-171-3/+1
| | | | | | | | | | | vmware can't cope with anything larger than 64MB. Drop this back to 64MB everywhere but arm. PR: 251866 MFC After: 1 week Notes: svn path=/head/; revision=368721
* loader: allow loader to accept zfs feature com.delphix:bookmark_writtenToomas Soome2020-12-151-0/+1
| | | | | | | | | We do not need to actually read bookmarks, just whitelist this feature. Reported by: mjg Notes: svn path=/head/; revision=368684
* loader: allow loader to accept zfs feature com.datto:bookmark_v2Toomas Soome2020-12-151-0/+1
| | | | | | | | | We do not need to actually read bookmarks, just whitelist this feature Reported by: jpaetzel Notes: svn path=/head/; revision=368677
* loader: Ignore the .interp section on RISC-VJessica Clarke2020-12-141-0/+1
| | | | | | | | | | | | | | Without this we risk having the .interp section be placed earlier in the file and mess with section offsets; in particular it has been seen to be placed at the start of the file and cause the PE/COFF header to not be at address 0. This is the same fix as was done for arm64 in r365578. Reviewed by: mhorne, imp Approved by: mhorne, imp Differential Revision: https://reviews.freebsd.org/D27603 Notes: svn path=/head/; revision=368626
* loader: Print autoboot countdown immediately, not at 9Jessica Clarke2020-12-141-2/+3
| | | | | | | | | | | | | | For the first second otime and ntime are equal so no message gets printed. Instead we should print the countdown right from the start, although we do it at the end of the first iteration so that if a key has already been pressed then the message is suppressed. Reviewed by: imp Approved by: imp Differential Revision: https://reviews.freebsd.org/D26935 Notes: svn path=/head/; revision=368623
* stand: liblua: add a pager moduleKyle Evans2020-12-124-1/+92
| | | | | | | | | | | | | | | This is nearly a 1:1 mapping of the pager API from libsa. The only real difference is that pager.output() will accept any number of arguments and coerce all of them to strings for output using luaL_tolstring (i.e. the __tostring metamethod will be used). The only consumer planned at this time is the upcoming "show-module-options" implementation. MFC after: 1 week Notes: svn path=/head/; revision=368591
* lualoader: config: fix module enabled checkKyle Evans2020-12-121-1/+1
| | | | | | | | A last minute rewrite left this logically wrong; if it's present in modules_blacklist, then we do not load it. Notes: svn path=/head/; revision=368579
* lualoader: provide module-manipulation commandsKyle Evans2020-12-124-10/+129
| | | | | | | | | | | | | | | | | | Specifically, we have: - enable-module - disable-module - toggle-module These can be used to add/remove modules to be loaded or force modules to be loaded in spite of modules_blacklist. In the typical case, a user is expected to use them to recover an issue happening due to a module directive they've added to their loader.conf or because they discover that they've under-specified what to load. MFC after: 1 week Notes: svn path=/head/; revision=368575
* Properly define the bool type in the BSD kernel shim.Hans Petter Selasky2020-12-071-1/+6
| | | | | | | | MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/head/; revision=368415
* loader: xdr_array is missing countToomas Soome2020-12-071-120/+245
| | | | | | | | | | | The integer arrays are encoded in nvlist as counted array <count, i0, i1...>, loader xdr_array() is missing the count. This will affect the pool import when there are hole devices in pool. Also fix the new data add and print functions. Notes: svn path=/head/; revision=368410
* Add missing busdma prototypes for load and unload and implement dummy syncHans Petter Selasky2020-12-072-4/+21
| | | | | | | | | | function for kernel bootloader shim code. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/head/; revision=368408
* Tidy up code a bit. Add missing section comments.Hans Petter Selasky2020-12-071-12/+20
| | | | | | | | | | No functional change. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/head/; revision=368407
* Add CFI start/end proc directives to arm64, i386, and ppcConrad Meyer2020-12-053-0/+16
| | | | | | | | | | | | | | Follow-up to r353959 and r368070: do the same for other architectures. arm32 already seems to use its own .fnstart/.fnend directives, which appear to be ARM-specific variants of the same thing. Likewise, MIPS uses .frame directives. Reviewed by: arichardson Differential Revision: https://reviews.freebsd.org/D27387 Notes: svn path=/head/; revision=368354
* Fix mis-spelled macro in the kernel shim.Hans Petter Selasky2020-12-041-1/+1
| | | | | | | | MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/head/; revision=368341
* Add more macros, types and prototypes for building kernel code into bootloaders.Hans Petter Selasky2020-12-041-1/+17
| | | | | | | | MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/head/; revision=368330
* Fix definition of int64_t and uint64_t when long is 64-bit. This gets the kernelHans Petter Selasky2020-12-041-0/+8
| | | | | | | | | | shim code in line with the rest of the kernel, sys/x86/include/_types.h. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/head/; revision=368329
* ficl: make dump a bit friendlierToomas Soome2020-12-011-6/+32
| | | | | | | would be nice to have dump to output hex and ascii. Notes: svn path=/head/; revision=368266
* ficl: instead of pad, emit can use local variableToomas Soome2020-12-011-1/+1
| | | | | | | | | Pad in forth is used as "scratchpad" and internal implementations should not use it. Ficl does not really follow this rule and this can fire back. emit has no need to use pad, we can use local variable instead. Notes: svn path=/head/; revision=368261
* Unobfuscate "KERNLOAD" parameter on amd64. This change lines-up amd64 with theMaxim Sobolev2020-11-251-5/+3
| | | | | | | | | | | | | | | | | i386 and the rest of supported architectures by defining KERNLOAD in the vmparam.h and getting rid of magic constant in the linker script, which albeit documented via comment but isn't programmatically accessible at a compile time. Use KERNLOAD to eliminate another (matching) magic constant 100 lines down inside unremarkable TU "copy.c" 3 levels deep in the EFI loader tree. Reviewed by: markj Approved by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D27355 Notes: svn path=/head/; revision=368041
* Fix build of USB bootloader code by adding checks for _STANDALONE being defined.Hans Petter Selasky2020-11-181-2/+5
| | | | | | | | | | Currently the USB bootloader code is not part of buildworld. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/head/; revision=367787
* zfsboot: add prototype for main()Toomas Soome2020-11-151-0/+2
| | | | | | | | | | Some compilers are complaining about missing prototype. PR: 251150 Reported by: markiyan.kushnir@gmail.com Notes: svn path=/head/; revision=367710
* loader: cstyle cleanup of console.cToomas Soome2020-11-141-173/+187
| | | | | | | cstyle cleanup only, no functional changes intended. Notes: svn path=/head/; revision=367674
* loader: cstyle cleanup of bootstrap.h did miss a bitToomas Soome2020-11-081-3/+3
| | | | | | | correct small issues - misplaced comment and typos. Notes: svn path=/head/; revision=367480
* loader: cstyle cleanup of bootstrap.hToomas Soome2020-11-081-119/+133
| | | | | | | No functional changes intended. Notes: svn path=/head/; revision=367479
* loader: add aarch64 support for zstdWarner Losh2020-10-281-2/+0
| | | | | | | | | | | | | | | | | | We don't have NEON available in the boot loader, so we have to disable it. OpenZFS included ZSTD which used the wrong symbol to bring in neon support. Change to use the code that's been submitted upstream as a pull request to both. __ARM_NEON is the proper symbol, defined in ARM C Language Extensions Release 2.1 (https://developer.arm.com/documentation/ihi0053/d/). Some sources suggest __ARM_NEON__, but that's the obsolete spelling from prior versions of the standard. OpenZFS Pull Request: https://github.com/openzfs/zfs/pull/11055 ZSTD Pull Request: https://github.com/facebook/zstd/pull/2356 Notes: svn path=/head/; revision=367119
* loader: revert r342161 and r342151Toomas Soome2020-10-221-18/+4
| | | | | | | | | | We are using asize property from pool label and we do not depend on partition data to find last two pool labels and to validate LBA for disk IO. This does allow us to re-enable support for partitionless disk setups. Notes: svn path=/head/; revision=366951
* Add 'netserver' command to EFI loader.Michal Meloun2020-10-141-0/+35
| | | | | | | | | | | | | | | | | | In some environments is difficult to access bootp/dhcp configuration as "standard user". Add a command that allows to set or display the URI of the network server used as "net:" device. Currently only tftp and nfs protocols are supported. Typical usage pattern is: netserver tftp://192.168.168.1/path_to_obj_dir/arm.armv7/sys/GENERIC/ boot net:kernel Reviewed by: imp, kevans MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D26736 Notes: svn path=/head/; revision=366700