summaryrefslogtreecommitdiffstats
path: root/sys/boot/ficl
Commit message (Collapse)AuthorAgeFilesLines
* MFC r313982, r314068:pfg2017-03-141-1/+1
| | | | | | sys: Replace zero with NULL for pointers. Found with: devel/coccinelle
* Implement UEFI set environment variable, as well as exporting the EFIimp2016-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
* Implement uuid-to-string and uuid-from-string. uuid-from-string takesimp2016-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
* Minor space tweak to make things consistent.imp2016-05-171-4/+3
| | | | MFC After: 3 days
* Add more .NOMETA missed in r291320bdrewery2016-03-111-1/+1
| | | | Sponsored by: EMC / Isilon Storage Division
* Currently BERI's loader is including the 32-bit version of the FICL MIPS ↵sgalabov2016-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
* DIRDEPS_BUILD: Regenerate without local dependencies.bdrewery2016-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
* ficl: Replace rand(3) with random(3).pfg2016-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.
* ficl: Replace rand(3) with random(3).pfg2016-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.
* Welcome the RISC-V 64-bit kernel.br2016-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
* ficl on i386 should cast to unsigned char output to support efi i386allanjude2016-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
* loader.efi: add terminal emulation supportemaste2016-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
* META_MODE: Remove DEP_MACHINE from Makefile.depend files.bdrewery2015-09-251-2/+0
| | | | | | This has not been needed since r246865 in projects/bmake. Sponsored by: EMC / Isilon Storage Division
* META_MODE: Remove DEP_RELDIR from Makefile.depend files.bdrewery2015-09-251-2/+0
| | | | | | This has not been needed since r284171 in projects/bmake. Sponsored by: EMC / Isilon Storage Division
* Use CFLAGS_NO_SIMD in preference to varying lists of -mno-xxxx flags.imp2015-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
* Add META_MODE support.sjg2015-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
| * Merge sync of headsjg2015-05-273-0/+513
| |\
| * \ Merge from head@274682sjg2014-11-198-16/+144
| |\ \
| * \ \ Merge head from 7/28sjg2014-08-193-541/+0
| |\ \ \
| * \ \ \ Merge headsjg2014-04-285-20/+569
| |\ \ \ \
| * \ \ \ \ Merge from headsjg2013-09-051-4/+113
| |\ \ \ \ \
| * \ \ \ \ \ sync from headsjg2013-04-122-8/+12
| |\ \ \ \ \ \
| * \ \ \ \ \ \ Sync with HEAD.obrien2013-02-081-6/+15
| |\ \ \ \ \ \ \
| * | | | | | | | Updated/new Makefile.dependsjg2012-11-081-0/+6
| | | | | | | | |
| | | | | | | | |
| | \ \ \ \ \ \ \
| *-. \ \ \ \ \ \ \ Sync from headsjg2012-11-041-1/+4
| |\ \ \ \ \ \ \ \ \
| * | | | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+14
| | |/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | | | Revert my previoius commit as it explicit pollute the ficl on otheraraujo2015-06-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | architectures. It will be reworked by GSoC students. Requested by: ngie, bms and pfg.
* | | | | | | | | | Include header libi386.h to silence the clang warning of implicit declarationaraujo2015-06-071-0/+1
| |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of functions biospci_*. Differential Revision: D2668 Reviewed by: rodrigc
* | | | | | | | | Add the arm64 machine dependent parts of ficl. This is not machineandrew2015-04-092-0/+510
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dependent, as most copies of these files are identical, but unfortunately this is still needed. Sponsored by: The FreeBSD Foundation
* | | | | | | | | The System V ABI for amd64 allows functions to use space in a 128 bytejhb2015-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.
* | | | | | | | Cleanup trailing newlines noticed while looking for other issues.imp2014-11-147-14/+0
| | | | | | | |
* | | | | | | | Add support for calling pcibios routines from theimp2014-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
* | | | | | | Remove ia64.marcel2014-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
* | | | | | Fix printf args for 64-bit archsemaste2014-04-081-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation
* | | | | | Correct a variable's type for 64-bit Ficlemaste2014-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | FICL_INT is long.
* | | | | | Fix the mips64el build: mips64el should use the mips64 directory, not the ↵imp2014-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | mips64el directory.
* | | | | | Build boot/ficl as 64-bit library on amd64emaste2014-04-031-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 32-bit bootloaders on amd64 now use the 32-bit version in ficl32, as is done with libstand32. The native 64-bit ficl will be used by the upcoming UEFI loader. Sponsored by: The FreeBSD Foundation
* | | | | | Build FICL support into little-endian 64-bit MIPS boot-loader fragments;rwatson2014-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | while this won't actually be used for anything (yet), it doesn't hurt to ensure it is exposed to the tinderbox. Requested by: imp, jmallett MFC after: 3 weeks
* | | | | | Give mips64 its own ficl configuration that sizes pointers/etc suitably forrwatson2014-02-233-1/+539
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a 64-bit architecture, rather than trying to share the 32-bit MIPS ficl configuration. When building ficl on MIPS, don't conflate 32-bit and 64-bit ISAs -- unlike x86, we don't want a 32-bit loader on a 64-bit CPU. Use quite conservative code generation -- e.g., softfloat, no GOT, etc -- suitable for early boot. MFC after: 3 weeks Sponsored by: DARPA, AFRL
* | | | | | For libstand and sys/boot, split off gcc-only flags into CFLAGS.gcc.dim2013-12-261-1/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | MFC after: 3 days X-MFC-With: r259730
* | | | | Fix the freaddir implementation for the stand-alone interpreter.marcel2013-08-091-11/+39
| | | | | | | | | | | | | | | | | | | | Bug pointed out by: Jan Beich <jbeich@tormail.org>
* | | | | Fix the build of the testmain target. This target compiles a Forthmarcel2013-08-011-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interpreter that can be run on the system and as such cannot be compiled against libbstand. On the one hand this means we need to include the usual headers for system interfaces that we use and on the the other hand we can only use standard system interfaces. While here, define local variables only when needed to make this WARNS=2 clean on amd64. PR: 172542 Obtained from: peterj@ Pointed out by: Jan Beich <jbeich@tormail.org>
* | | | | Add 2 builtin words for working with directories:marcel2013-07-101-0/+54
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | isdir? ( fd -- bool ) freaddir ( fd -- ptr len TRUE | FALSE ) The 'isdir?' word returns `true' if the file descriptor is for a directory and `false' otherwise. The 'freaddir' word reads the next directory entry and if successful, returns its name and 'true'. Otherwise 'false' is returned. These words give the loader the ability to scan directories and read files contained in them for 'rc.d'-like flexibility in handling which modules to load and/or which tunables to set. Obtained from: Juniper Networks, Inc.
* | | | The CELL fields can be various integer types depending on the platformkientzle2013-04-071-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | (ARM uses 'int' and 'unsigned'; i386 uses 'long' and 'unsigned long'), so we need explicit casts to long and unsigned long here to ensure that the result matches the printf %ld and %lx specifiers.
* | | | Fix two broken macros.kientzle2013-04-071-2/+2
| |_|/ |/| |
* | | Build a 64 bit version of the FICL library. This is need for a 64 bitrpaulo2012-12-211-6/+15
| |/ |/| | | | | | | | | EFI bootloader (amd64 only for now). This is not yet connected to the build.
* | boot: use -march=i386 for both i386 and amd64 buildsavg2012-10-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | .. so that consistent compilation algorithms are used for both architectures as in practice the binaries are expected to be interchangeable (for time being). Previously i386 used default setting which were equivalent to -march=i486 -mtune=generic. The only difference is using smaller but slower "leave" instructions. Discussed with: jhb, dim MFC after: 29 days
* | Try to avoid all files dependence on the modification time of the large andache2012-07-261-0/+2
|/ | | | | | | | | often modified directory created symbolic links points to - it cause unnecessary full rebuilds each time make runs when directory is changed. So do it only if symbolic link does not exists, which usually means that objdir is clean anyway. MFC after: 1 week
* Fix clang warnings.rpaulo2012-02-052-3/+3
|
* Add a version of the FreeBSD bootloader which can run in userland, packageddfr2011-06-302-0/+535
| | | | | as a shared library. This is intended to be used by BHyVe to load FreeBSD kernels into new virtual machines.
OpenPOWER on IntegriCloud