aboutsummaryrefslogtreecommitdiff
path: root/stand/ficl
Commit message (Collapse)AuthorAgeFilesLines
* stand: Remove dangling mips referencesWarner Losh2024-02-284-1058/+0
| | | | | | Remove mips support files from ficl. Sponsored by: Netflix
* loader/ficl: Rename the ficl compile set to X4th_compile_setWarner Losh2024-02-252-3/+3
| | | | | | | | | | And upcoming change will need this set to be named this. Since it's only used in the efi Makefile, and inside if ficl itself, the change should be a nop. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D44063
* loader: rename gfx_interp_md to gfx_interp_refWarner Losh2024-02-241-1/+1
| | | | | | | | | We have the call to gfx_interp_ref to bring in the .o so that we get the linker set item to add the language bindings at the right time. Where we call it is not the right time... So the _ref name is better. Change it before we have too many others like it. Sponsored by: Netflix
* loader: Only create gfx 4th bindings when gfx is availableWarner Losh2024-02-163-190/+262
| | | | | | | | | | | | Only create the gfx bindings for 4th when it's compiled into the loader. We do this with a linker set that only gets brought in to those loaders that call gfx_framework_init. This calls gfx_interp_md() will will drag in gfx_loader.c which will add to the linker set that registers these bindings. Sponsored by: Netflix Reviewed by: kevans, jhb Differential Revision: https://reviews.freebsd.org/D43904
* loader: add target for dirdeps buildStephen J. Kiernan2023-11-021-0/+1
| | | | | | | | Update dependencies for the loader variations used for each architecture. Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D39741
* Remove $FreeBSD$: one-line forth tagWarner Losh2023-08-1613-13/+0
| | | | Remove /^\\[\s*]*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-163-3/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-1626-26/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-166-6/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* Revert "stand: Grammar fix for a source code comment"Gordon Bergling2022-09-051-1/+1
| | | | | | | | This reverts commit 7d91d6b83e74edf278dde375e6049aca833cbebd. The orginal comment is more natural. Reported by:jrtc27
* stand: Grammar fix for a source code commentGordon Bergling2022-09-041-1/+1
| | | | | | - s/that that/that this/ MFC after: 3 days
* ficl: Fix a typo in a commentGordon Bergling2021-11-301-1/+1
| | | | | | - s/segement/segment/ MFC after: 3 days
* loader: implement framebuffer consoleToomas Soome2021-01-022-0/+187
| | | | | | | | | | | | | | | | | | | | | | | 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
* 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
* Tweak ficl definition from r365724Brandon Bergren2020-09-221-1/+1
| | | | | | | | | | | | | | I had overthought how to do the FICL_TRUE change. We do not need to explicitly specify how big the 0 is before the cast to the correct size. The same change was suggested by both imp@ and Gunther Nikl independently. Tested on powerpc. Reported by: imp, Gunther Nikl Notes: svn path=/head/; revision=366029
* stand/ficl 64-bit compatibilityBrandon Bergren2020-09-142-4/+7
| | | | | | | | | | | | | | | | | | | Currently, the only thing that prevents a functioning 64-bit FICL build is a few integer types that were intended to be fixed-width. Changing them to C99 integer types allows building a functioning 64-bit FICL. While this isn't applicable to the default settings of any in-tree loaders, it is necessary for a future Petitboot loader, due to the requirement that it be compiled as a 64-bit program. Reviewed by: tsoome, imp (earlier revision) Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D26364 Notes: svn path=/head/; revision=365724
* veloader use vectx API for kernel and modulesSimon J. Gerraty2020-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vectx API, computes the hash for verifying a file as it is read. This avoids the overhead of reading files twice - once to verify, then again to load. For doing an install via loader, avoiding the need to rewind large files is critical. This API is only used for modules, kernel and mdimage as these are the biggest files read by the loader. The reduction in boot time depends on how expensive the I/O is on any given platform. On a fast VM we see 6% improvement. For install via loader the first file to be verified is likely to be the kernel, so some of the prep work (finding manifest etc) done by verify_file() needs to be factored so it can be reused for vectx_open(). For missing or unrecognized fingerprint entries, we fail in vectx_open() unless verifying is disabled. Otherwise fingerprint check happens in vectx_close() and since this API is only used for files which must be verified (VE_MUST) we panic if we get an incorrect hash. Reviewed by: imp,tsoome MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org//D23827 Notes: svn path=/head/; revision=358813
* veloader use vectx API for kernel and modulesSimon J. Gerraty2020-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vectx API, computes the hash for verifying a file as it is read. This avoids the overhead of reading files twice - once to verify, then again to load. For doing an install via loader, avoiding the need to rewind large files is critical. This API is only used for modules, kernel and mdimage as these are the biggest files read by the loader. The reduction in boot time depends on how expensive the I/O is on any given platform. On a fast VM we see 6% improvement. For install via loader the first file to be verified is likely to be the kernel, so some of the prep work (finding manifest etc) done by verify_file() needs to be factored so it can be reused for vectx_open(). For missing or unrecognized fingerprint entries, we fail in vectx_open() unless verifying is disabled. Otherwise fingerprint check happens in vectx_close() and since this API is only used for files which must be verified (VE_MUST) we panic if we get an incorrect hash. Reviewed by: imp,tsoome MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org//D23827 Notes: svn path=/head/; revision=358744
* Remove sparc64 support from the boot loader.Warner Losh2020-02-032-511/+0
| | | | | | | Remove all the sparc64 specific bits, both files and ifdefs. Notes: svn path=/head/; revision=357454
* Add support for hypervisor check on x86Simon J. Gerraty2019-10-244-51/+85
| | | | | | | | | | | | | | Add ficl words for isvirtualized and move ficl inb and outb words to ficl/x86/sysdep.c so can be shared by i386 and amd64 Reviewed by: imp bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22069 Notes: svn path=/head/; revision=354043
* ficl: add xemit wordToomas Soome2019-09-051-0/+8
| | | | | | | | | While emit will output one byte on screen, the xemit will output xchar. See: http://forth-standard.org/standard/xchar/XEMIT Notes: svn path=/head/; revision=351865
* ficl: add uIsGreater wordToomas Soome2019-09-051-0/+13
| | | | | | | For some reason we have u< but not u>, fix it. Notes: svn path=/head/; revision=351837
* ficl pfopen: verify fileSimon J. Gerraty2019-05-241-0/+17
| | | | | | | | | | | | | | | If the file is verified - do not allow write otherwise do not allow read. Add O_ACCMODE to stand.h Reviewed by: stevek, mindal_semihalf.com MFC after: 3 days Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D20387 Notes: svn path=/head/; revision=348249
* Enable veriexec for loaderSimon J. Gerraty2019-02-263-9/+18
| | | | | | | | | | | | | | | | This relies on libbearssl and libsecureboot to verify files read by loader in a maner equivalent to how mac_veriexec Note: disabled by default. Use is initially expected to be by embeded vendors Reviewed by: emaste, imp Sponsored by: Juniper Networks Differential Revision: D16336 Notes: svn path=/head/; revision=344568
* Prefer uintXX_t to u_intXX_tWarner Losh2018-03-139-47/+47
| | | | | | | | | A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. With consistency a great soul has simply nothing to do. -- Ralph Waldo Emerson Notes: svn path=/head/; revision=330864
* stand/ficl: Fix testmainKyle Evans2018-03-071-1/+2
| | | | | | | | | | | | | | testmain is a userland application intended to be built with standard headers and whatnot, which we broke. Fix it by having the testmain build clobber cflags, reducing it to just the set of defines/includes it needs to build. Discussed with: imp MFC after: 3 days Notes: svn path=/head/; revision=330612
* Eliminate bsd.stand.mk and -fPIC 32-bit intel buildsWarner Losh2018-02-161-1/+0
| | | | | | | | | | | | | OK. We don't really need a bsd.stand.mk, and it was causing a -fPIC for the toolchain to be added (bogusly) when building on amd64. Pull all relevant defs back into defs.mk and delete bsd.stand.mk. This saves about 15-20k on i386 loader and zfsloader which when combined with Lua give us a lot more stack space in those constrained environments. Notes: svn path=/head/; revision=329345
* Centralize several variables.Warner Losh2018-02-021-1/+0
| | | | | | | | | | MK_CTF, MK_SSP, MK_PROFILE, NO_PIC, and INTERNALLIB are always the same, so set them in defs.mk. MAN= is common, so set it here too. This removes a lot of boring repetition from the Makefiles that added almost no value. Notes: svn path=/head/; revision=328769
* Revert r326855: Cargo cut a fix for the regressions r326585 caused.Warner Losh2017-12-141-3/+3
| | | | | | | | | | | | This was an experiment that landed in the wrong branch and was pushed accidentally. It's best if it is ignored because the difference was due to vers.o being different, not float.o... And it was confirmed to not fix anything... Pointy Hat to: imp Notes: svn path=/head/; revision=326858
* Cargo cut a fix for the regressions r326585 caused.Warner Losh2017-12-141-3/+3
| | | | | | | | | | | | | | | | We need to include ficl.h after the standard includes, rather than before them. It changes the generated code in ways that haven't been completely analyized. This restores the old code generation (as verified by md5 changing back for zfsloader). This should restore GPT + ZFS and GPT + ZFS + GELI booting that was broken in r326585 (or would have been if r326584 hadn't broken the build). Sponsored by: Netflix Notes: svn path=/head/; revision=326855
* This path belongs in ficl/Makefile, not the common defines for usersWarner Losh2017-12-081-0/+2
| | | | | | | | | of ficl. Sponsored by: Netflix Notes: svn path=/head/; revision=326720
* Include ficl.h before anything else and avoid including anything atWarner Losh2017-12-051-3/+3
| | | | | | | | | all if we're not building float. Sponsored by: Netflix Notes: svn path=/head/; revision=326585
* Move sys/boot to stand. Fix all references to new locationWarner Losh2017-11-1450-0/+20698
Sponsored by: Netflix Notes: svn path=/head/; revision=325834