aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/ficl
Commit message (Collapse)AuthorAgeFilesLines
* Move sys/boot to stand. Fix all references to new locationWarner Losh2017-11-1450-20698/+0
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=325834
* Install the 4th files in sys/boot/forth instead of each loaderWarner Losh2017-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Also, move generation of loader.help into loader.mk. Set HELP_FILES= to disable this (so we only install one help file, for now). At the same time remove some duplicate -I lines. Fix several FILES= and CLEANFILES= into the += form since we're touching both of those in the .mk files. Make sure we only build one loader.help file per platform in a unified way (we were building many on some, with the last to install winning, though often they were the same text). Also, we're now installing loader.rc and menu.rc everywhere. arm and mips uboot installed these as menu.rc.sample, but there's no need since the loader.rc for those platforms doesn't do menu.rc processing by default. pcibios.4th is now installed everywhere, but will failsafe on non x86 platforms (it isn't loaded by default anywhere). These changes are too intertwined to do separately since aspects of each are required to have a bug-free commit. Sponsored by: Netflix Notes: svn path=/head/; revision=325694
* Remove useless PNP define here.Warner Losh2017-11-101-3/+0
| | | | | | | | | We never use HAVE_PNP for anything, so don't define it on the command line. Sponsored by: Netflix Notes: svn path=/head/; revision=325691
* Centralize all 32-bit builds on 64-bit platform stuff.Warner Losh2017-11-061-7/+0
| | | | | | | | | | Move the addition of the -m32 and other flags to defs.mk. Remove redunant copies of -m32 that come from multiple locations. Sponsored by: Netflix Notes: svn path=/head/; revision=325485
* Use DO32 for all the places that we need to flag we're building a 32Warner Losh2017-11-061-1/+5
| | | | | | | | | | bit version of a library. Use a generic name since this may be usefule elsewhere. Sponsored by: Netflix Notes: svn path=/head/; revision=325480
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Minor cleanupWarner Losh2017-10-301-3/+1
| | | | | | | | | | | | Remove ancient comment about words to maybe add to the builds as softwords. We're not going to bring them in, so delete the noise. Also, check to see if HAVE_PNP is defined rather than if its value is true. Sponsored by: Netflix Notes: svn path=/head/; revision=325174
* Cleanup non-arch MakefilesWarner Losh2017-10-291-1/+2
| | | | | | | | | | Use SYSDIR, BOOTSRC, LDRSRC and FDTSRC in preference to relative paths. Also, use bsd.init.mk where needed. Sponsored by: Netflix Notes: svn path=/head/; revision=325094
* End source directories with SRC rather than a hodgepodge of namesWarner Losh2017-10-221-2/+2
| | | | | | | | | | | | | | BOOTDIR->BOOTSRC FICLDIR->FICLSRC LDR_MI->LDRSRC This matches the patterns used in the rest of the system a bit vetter. Suggested by: rgrimes@ Sponsored by: Netflix Notes: svn path=/head/; revision=324877
* Rename top level Makefile.ficl to ficl.mk.Warner Losh2017-10-161-1/+1
| | | | Notes: svn path=/head/; revision=324648
* sys: Replace zero with NULL for pointers.Pedro F. Giffuni2017-02-221-1/+1
| | | | | | | | | Found with: devel/coccinelle MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D9694 Notes: svn path=/head/; revision=314068
* Remove pc98 support completely.Yoshihiro Takahashi2017-01-281-3/+1
| | | | | | | | | I thank all developers and contributors for pc98. Relnotes: yes Notes: svn path=/head/; revision=312910
* Really make WITHOUT_FORTH (MK_FORTH==no) work. The recent inclusion ofWarner Losh2016-10-251-44/+1
| | | | | | | | | | | | | | | FICL definitions not in ficl/ficl32 files broke this generally. This makes that stuff conditional on BOOT_FORTH. Also, move definitions related to the architecture (FICL_CPUARCH and friends) into Makefile.ficl that all parts of the tree that include files with ficl need to include (but only if MK_FORTH == yes). In addition, had to fix library ordering issue with LIBSTAND to keep it last. Without boot forth, there's no references to memset to bring in memset.o from libstand.a to satisfy libgeliboot.a's use of it. Listing libstand last solves this issue (and it's the proper place for libstand to boot). Notes: svn path=/head/; revision=307942
* Preliminary support for EFI in boot loader. Define efi-boot forthWarner Losh2016-10-242-209/+1
| | | | | | | | | | environment variable to allow conditional compilation based on EFI being present or not. Provide efi-setenv, efi-getenv, and efi-unsetenv, though those need improvement. Move the efi definition to libefi (but include a reference so they get included). Notes: svn path=/head/; revision=307879
* Create a new linker set, Xficl_compile_set which contains a list ofWarner Losh2016-10-143-192/+28
| | | | | | | | | | | | | | | | | | | | | | | | functions to call at the appropriate time to register new forth words. In the past we've done this with ifdef soup, but now if the file is included in the build, we'll get the new forth words. Use this new functionality to move the pci bios stuff out of loader.c by moving it to biospci.c. Move the pnp functionality to common/pnp.c. Move the inb/outb forth words to the i386 sysdep.c file where their implementation is defined. Adjust the efi linker scripts and build machinery to cope. his should be an invisible change to forth scripts and user experience. Differential Revision: https://reviews.freebsd.org/D8145 Notes: svn path=/head/; revision=307324
* Implement UEFI set environment variable, as well as exporting the EFIWarner Losh2016-05-171-0/+207
| | | | | | | | | | | version. This is also scriptable, though additional scripting will be needed. Differential Review: https://reviews.freebsd.org/D4494 MFC After: 3 days Notes: svn path=/head/; revision=300081
* Implement uuid-to-string and uuid-from-string. uuid-from-string takesWarner Losh2016-05-171-0/+74
| | | | | | | | | | | | | a string, interprets it as a standard UUID, and returns a binary from of the UUID. uuid-to-string does the reverse. The binary UUID is in allocated memory, so you'll need to free it with 'free' after you are done using it. It won't be automatically garbage collected. Likewise with the string... MFC After: 3 days Notes: svn path=/head/; revision=300080
* Minor space tweak to make things consistent.Warner Losh2016-05-171-4/+3
| | | | | | | MFC After: 3 days Notes: svn path=/head/; revision=300055
* Add more .NOMETA missed in r291320Bryan Drewery2016-03-111-1/+1
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296706
* Currently BERI's loader is including the 32-bit version of the FICL MIPS ↵Stanislav Galabov2016-02-261-0/+2
| | | | | | | | | | | | sysdep.h (sys/boot/ficl/mips/sysdep.h) instead of the 64-bit version (sys/boot/ficl/mips64/sysdep.h). Although this may not be an issue in practice, it would be more correct if the 64-bit version was used. Also, using the 64-bit version would make it easier to add support for 64-bit ubldr on MIPS. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D5310 Notes: svn path=/head/; revision=296079
* DIRDEPS_BUILD: Regenerate without local dependencies.Bryan Drewery2016-02-241-2/+0
| | | | | | | | | | | These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=295989
* ficl: Replace rand(3) with random(3).Pedro F. Giffuni2016-02-081-1/+1
| | | | | | | | | | | Be a little more consistent with random(3) and push an unsigned value. Again, this has no effect as this code doesn't get compiled for the boot code. Notes: svn path=/head/; revision=295410
* ficl: Replace rand(3) with random(3).Pedro F. Giffuni2016-02-081-2/+2
| | | | | | | | | | | | While the later is a better random generator than the former, the main reason of the change is that random() has a better chance to work with libstand(3). At this time we don't include random number generators in bootforth so this has no effect. Notes: svn path=/head/; revision=295409
* Welcome the RISC-V 64-bit kernel.Ruslan Bukin2016-01-292-0/+510
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is the final step required allowing to compile and to run RISC-V kernel and userland from HEAD. RISC-V is a completely open ISA that is freely available to academia and industry. Thanks to all the people involved! Special thanks to Andrew Turner, David Chisnall, Ed Maste, Konstantin Belousov, John Baldwin and Arun Thomas for their help. Thanks to Robert Watson for organizing this project. This project sponsored by UK Higher Education Innovation Fund (HEIF5) and DARPA CTSRD project at the University of Cambridge Computer Laboratory. FreeBSD/RISC-V project home: https://wiki.freebsd.org/riscv Reviewed by: andrew, emaste, kib Relnotes: Yes Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D4982 Notes: svn path=/head/; revision=295041
* ficl on i386 should cast to unsigned char output to support efi i386Allan Jude2016-01-271-1/+1
| | | | | | | | | | | | | make it possible for efi_console to recognize and translate box characters on i386 build (unsigned versus signed char passed as int issue). Submitted by: Toomas Soome <tsoome at me.com> Reviewed by: emaste, smh, dteske MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D4993 Notes: svn path=/head/; revision=294926
* loader.efi: add terminal emulation supportEd Maste2016-01-061-1/+1
| | | | | | | | | | | | | This is based on the vidconsole implementation. Submitted by: Toomas Soome <tsoome@me.com> Reviewed by: adrian MFC after: 2 weeks Relnotes: Yes Differential Revision: https://reviews.freebsd.org/D4797 Notes: svn path=/head/; revision=293233
* META_MODE: Remove DEP_MACHINE from Makefile.depend files.Bryan Drewery2015-09-251-2/+0
| | | | | | | | | This has not been needed since r246865 in projects/bmake. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=288228
* META_MODE: Remove DEP_RELDIR from Makefile.depend files.Bryan Drewery2015-09-251-2/+0
| | | | | | | | | This has not been needed since r284171 in projects/bmake. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=288226
* Use CFLAGS_NO_SIMD in preference to varying lists of -mno-xxxx flags.Warner Losh2015-08-271-17/+1
| | | | | | | | | | | | Go ahead and defined -D_STANDALONE for all targets (only strictly needed for some architecture, but harmless on those it isn't required for). Also add -msoft-float to all architectures uniformly rather that higgley piggley like it is today. Differential Revision: https://reviews.freebsd.org/D3496 Notes: svn path=/head/; revision=287227
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * Merge sync of headSimon J. Gerraty2015-05-273-0/+513
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=283595
| * \ Merge from head@274682Simon J. Gerraty2014-11-198-16/+144
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ \ Merge head from 7/28Simon J. Gerraty2014-08-193-541/+0
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * \ \ \ Merge headSimon J. Gerraty2014-04-285-20/+569
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * \ \ \ \ Merge from headSimon J. Gerraty2013-09-051-4/+113
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * \ \ \ \ \ sync from headSimon J. Gerraty2013-04-122-8/+12
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249429
| * \ \ \ \ \ \ Sync with HEAD.David E. O'Brien2013-02-081-6/+15
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * | | | | | | | Updated/new Makefile.dependSimon J. Gerraty2012-11-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242788
| * | | | | | | | Sync from headSimon J. Gerraty2012-11-041-1/+4
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | | | | | Revert my previoius commit as it explicit pollute the ficl on otherMarcelo Araujo2015-06-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | architectures. It will be reworked by GSoC students. Requested by: ngie, bms and pfg. Notes: svn path=/head/; revision=284142
* | | | | | | | | | Include header libi386.h to silence the clang warning of implicit declarationMarcelo Araujo2015-06-071-0/+1
| |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of functions biospci_*. Differential Revision: D2668 Reviewed by: rodrigc Notes: svn path=/head/; revision=284116
* | | | | | | | | Add the arm64 machine dependent parts of ficl. This is not machineAndrew Turner2015-04-092-0/+510
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dependent, as most copies of these files are identical, but unfortunately this is still needed. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=281297
* | | | | | | | | The System V ABI for amd64 allows functions to use space in a 128 byteJohn Baldwin2015-03-131-0/+3
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | redzone below the stack pointer for scratch space and requires interrupt and signal frames to avoid overwriting it. However, EFI uses the Windows ABI which does not support this. As a result, interrupt handlers in EFI push their interrupt frames directly on top of the stack pointer. If the compiler used the red zone in a function in the EFI loader, then a device interrupt that occurred while that function was running could trash its local variables. In practice this happens fairly reliable when using gzipfs as an interrupt during decompression can trash the local variables in the inflate_table() function resulting in corrupted output or hangs. Fix this by disabling the redzone for amd64 EFI binaries. This requires building not only the loader but any libraries used by the loader without redzone support. Thanks to Jilles for pointing me at the redzone once I found the stack corruption. Differential Revision: https://reviews.freebsd.org/D2054 Reviewed by: imp MFC after: 2 weeks Sponsored by: Cisco Systems, Inc. Notes: svn path=/head/; revision=279949
* | | | | | | | Cleanup trailing newlines noticed while looking for other issues.Warner Losh2014-11-147-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=274528
* | | | | | | | Add support for calling pcibios routines from theWarner Losh2014-09-101-2/+144
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bootloader. Implement the following routines: pcibios-device-count count the number of instances of a devid pcibios-read-config read pci config space pcibios-write-config write pci config space pcibios-find-devclass find the nth device with a given devclass pcibios-find-device find the nth device with a given devid pcibios-locator convert bus device function ti pcibios locator These commands are thin wrappers over their PCI BIOS 2.1 counterparts. More informaiton, such as it is, can be found in the standard. Export a nunmber of pcibios.X variables into the environment to report what the PCI IDENTIFY command returned. Also implmenet a new command line primitive (pci-device-count), but don't include it by default just yet, since it depends on the recently added words and any errors here can render a system unbootable. This is intended to allow the boot loader to do special things based on the hardware it finds. This could be have special settings that are optimized for the specific cards, or even loading special drivers. It goes without saying that writing to pci config space should not be done without a just cause and a sound mind. Sponsored by: Netflix Notes: svn path=/head/; revision=271406
* | | | | | | Remove ia64.Marcel Moolenaar2014-07-073-541/+0
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes: o All directories named *ia64* o All files named *ia64* o All ia64-specific code guarded by __ia64__ o All ia64-specific makefile logic o Mention of ia64 in comments and documentation This excludes: o Everything under contrib/ o Everything under crypto/ o sys/xen/interface o sys/sys/elf_common.h Discussed at: BSDcan Notes: svn path=/head/; revision=268351
* | | | | | Fix printf args for 64-bit archsEd Maste2014-04-081-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=264262
* | | | | | Correct a variable's type for 64-bit FiclEd Maste2014-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FICL_INT is long. Notes: svn path=/head/; revision=264261
* | | | | | Fix the mips64el build: mips64el should use the mips64 directory, not the ↵Warner Losh2014-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mips64el directory. Notes: svn path=/head/; revision=264199