aboutsummaryrefslogtreecommitdiff
path: root/lib/libstand
Commit message (Collapse)AuthorAgeFilesLines
...
* MFHGlen Barber2016-04-047-64/+13
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=297567
| * Correct comment.Bjoern A. Zeeb2016-03-221-1/+1
| | | | | | | | | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=297191
| * If the dhcp server delivers an interface-mtu option, parse it and storeIan Lepore2016-03-214-0/+11
| | | | | | | | | | | | | | | | | | | | | | the value in a new global intf_mtu for use by the application. These changes were inspired by the patch provided by Robert Blayzor in PR 187094, and will allow loader(8) to propagate the value to the kernel along with the other nfs_diskless parms delivered via environment vars. Notes: svn path=/head/; revision=297150
| * Actually garbage collect the unused code, as mentioned in r297147, whichIan Lepore2016-03-211-57/+0
| | | | | | | | | | | | | | this change should have been part of. Notes: svn path=/head/; revision=297148
| * Garbage collect the bswap routines from libstand. The declaration wasIan Lepore2016-03-212-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | wrapped in an i386 ifdef with a comment questioning their usefulness even there. It turns out they aren't referenced anywhere, but their presence prevents using sys/endian.h in libstand code. These days, sys/endian.h provides much better support for such things, using compiler builtins and inline functions (and creating connections between libstand code and header files from sys/ would not be breaking new ground). Notes: svn path=/head/; revision=297147
* | MFHGlen Barber2016-03-061-0/+4
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296422
| * Merge ^/head r295902 through r296006.Dimitry Andric2016-02-241-42/+0
| |\ | | | | | | | | | Notes: svn path=/projects/clang380-import/; revision=296007
| * \ Merge ^/head r294169 through r294598.Dimitry Andric2016-01-221-2/+2
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/clang380-import/; revision=294599
| * \ \ Merge ^/head r293430 through r293685.Dimitry Andric2016-01-111-2/+2
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/clang380-import/; revision=293687
| * \ \ \ Merge ^/head r293280 through r293429.Dimitry Andric2016-01-081-1/+1
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/clang380-import/; revision=293430
| * | | | | Similar to r293384, for libstand, also use the new -mno-movt flag withDimitry Andric2016-01-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang >= 3.8.0 targeting arm. Notes: svn path=/projects/clang380-import/; revision=293426
* | | | | | MFHGlen Barber2016-03-021-42/+0
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296318
| * | | | | DIRDEPS_BUILD: Regenerate without local dependencies.Bryan Drewery2016-02-241-42/+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
* / | | | First pass through library packaging.Glen Barber2016-02-041-0/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295278
* | | / Bring in initial libc and libstand support for RISC-V.Ruslan Bukin2016-01-171-2/+2
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: andrew, emaste, kib Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D4943 Notes: svn path=/head/; revision=294227
* | | Make tohex() work as expected.Andrey V. Elsukov2016-01-091-1/+1
| | | | | | | | | | | | Notes: svn path=/head/; revision=293468
* | | Fix a typo.Andrey V. Elsukov2016-01-091-1/+1
| |/ |/| | | | | | | | | | | PR: 205722 Notes: svn path=/head/; revision=293467
* | Don't install /usr/include/stand.h twice after r293040.Bryan Drewery2016-01-071-1/+1
|/ | | | | | | | | Only install it from lib/libstand. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=293341
* Add fls() to libstandEd Maste2016-01-061-2/+3
| | | | | | | | | | Although we don't use it in tree yet libstand is installed as user- facing /usr/liblibstand.a, and some work in progress makes use of it. Instead of conflicting with ongoing libstand Makefile deduplication, just add it now. Notes: svn path=/head/; revision=293241
* Reduce libstand Makefile duplicationEd Maste2016-01-011-3/+4
| | | | | | | | | | | | | | | | | | | libstand is built in three places (lib/libstand, sys/boot/libstand32, and sys/boot/userboot/libstand). Reduce Makefile duplication by .including libstand/Makefile from sys/boot/libstand32/Makefile. sys/boot/userboot/libstand/Makefile will be addressed later, as it contains additional differences yet to be handled. This change also switches libstand32 to use the new uuid_from_string and uuid_to_string, which was not included in r292473. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D4747 Notes: svn path=/head/; revision=293040
* When building libstand for arm, don't emit instructions that requireIan Lepore2015-12-311-0/+6
| | | | | | | | | relocation fixups unsupported by the self_reloc() code, and don't optimize memcpy/memset using floating point registers, because in a standalone environment nothing has initialized the fpu hardware. Notes: svn path=/head/; revision=292993
* Allow dhcp/bootp server-provided values to be overriden from environmentIan Lepore2015-12-221-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variables in loader(8) and other libstand applications. Sometimes a dhcp server provides incorrect information along with the IP address. It would be useful to have a way to override this with locally-supplied information, such as command line parameters passed from a prior-stage bootloader. This change allows pre-existing env vars to take precedence over values delivered by the dhcp or bootp server. The bootp/dhcp code in libstand automatically creates environment variables from the data provided by the server (dhcp.root-path, dhcp.domain-name, etc). It also transcribes the values to some global variables such as 'rootpath' and 'hostname'. This change does two things: When adding dhcp.* vars to the environment, don't replace existing vars/values. When setting the global vars rootpath and hostname, use the dhcp.root-path and dhcp.host-name env var values if they exist. This allows the platform-specific part of loader(8) to obtain override values in some platform-specific way and store them in the environment before opening the network device. The set of values that can be overriden is currently limited to just string options. The values that are delivered as binary data are things that probably shouldn't be overridden (IP, netmask, gateway, etc). The original patch this evolved from was submitted by martymac@ PR: 202098 Differential Revision: https://reviews.freebsd.org/D4559 Notes: svn path=/head/; revision=292583
* Create libstand version of uuid_from_string and uuid_to_string. TheWarner Losh2015-12-193-1/+244
| | | | | | | | | | | | | | normal libc versions of these functions use asprintf and sscanf, both of which aren't available in the libstand world. It's easier to rewrite these than to try to claw those functions into libstand. Also include uuid_create_nil, since it's safe to include. These were written from scratch, except for bits of comments that I got from the libc version, which are acknowledged in the source. Differential Revision: https://reviews.freebsd.org/D4540 Notes: svn path=/head/; revision=292473
* pxeboot: make the tftp loader use the option root-path directiveBaptiste Daroussin2015-12-161-3/+17
| | | | | | | | | | | | | | | | | | | | | | | pxeboot in tftp loader mode (when built with LOADER_TFTP_SUPPORT) now prefix all the path to open with the path obtained via the option 'root-path' directive. This allows to be able to use the traditional content /boot out of box. Meaning it now works pretty much like all other loaders. It simplifies hosting hosting multiple version of FreeBSD on a tftp server. As a consequence, pxeboot does not look anymore for a pxeboot.4th (which was never provided) Note: that pxeboot in tftp loader mode is not built by default. Reviewed by: rpokala Relnotes: yes Sponsored by: Gandi.net Differential Revision: https://reviews.freebsd.org/D4590 Notes: svn path=/head/; revision=292344
* Add strlcat() and strlcpy() to libstand.Ian Lepore2015-12-141-2/+2
| | | | Notes: svn path=/head/; revision=292234
* If we can't open the file, skip devclose() for the exclusive_file_systemMarcel Moolenaar2015-10-081-1/+1
| | | | | | | case. We never called devopen(), so we know there's nothing to close. Notes: svn path=/head/; revision=289044
* 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-26/+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/+59
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2716-55/+185
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-194-13/+817
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-197-34/+71
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | Updated dependenciesSimon J. Gerraty2014-05-161-0/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | | Merge from headSimon J. Gerraty2014-05-081-1/+1
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * \ \ \ Merge headSimon J. Gerraty2014-04-2710-82/+196
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265006
| * | | | | Saver to rm first when making link to dirSimon J. Gerraty2013-10-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=256701
| * | | | | Merge head@256284Simon J. Gerraty2013-10-131-2/+6
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=256424
| * \ \ \ \ \ Merge from headSimon J. Gerraty2013-09-055-167/+34
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * \ \ \ \ \ \ sync from headSimon J. Gerraty2013-04-124-19/+165
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249429
| * | | | | | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | | | | | Sync with HEAD.David E. O'Brien2013-02-083-261/+106
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * | | | | | | | | Updated/new Makefile.dependSimon J. Gerraty2012-11-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242788
| * | | | | | | | | Sync from headSimon J. Gerraty2012-11-043-89/+80
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | | | | | | Reduce diffs between the three copies of libstand's MakefileEd Maste2015-04-231-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should be a non-functional change. A future change should address the functional differences between these three and converge on a single source. Differential Revision: https://reviews.freebsd.org/D2058 Reviewed by: jhb Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=281886
* | | | | | | | | | | Add the start of libc and libstand for arm64. Not all of the machineAndrew Turner2015-04-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dependent functions have been implemented, but this is enough for world. Differential Revision: https://reviews.freebsd.org/D2132 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=281197
* | | | | | | | | | | The System V ABI for amd64 allows functions to use space in a 128 byteJohn Baldwin2015-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | | | Spin the twiddle in dosfs to give visual feedback for disk I/O onJohn Baldwin2015-03-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FAT filesystems as is done for other filesystems in the loader. MFC after: 1 week Notes: svn path=/head/; revision=279931
* | | | | | | | | | | Fix loader on PowerPC following r279784. It turns out that, due to .PATHNathan Whitehorn2015-03-093-7/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | confusion, the _setjmp.S in libstand was never being used and was instead being shadowed by the libc version. Since the libc version now uses FPRs, it caused loader to crash. Notes: svn path=/head/; revision=279798
* | | | | | | | | | | Fix usage example in kvprintf(9) and its copy in libstand(3): trailing '\n'Alexey Dokuchaev2015-01-232-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in bitfield argument is wrong, as it will be treated as bit 10, causing any code printing >=10 bits with bit 10 on as having a trailing comma. Newline (intended one) should be part of the format string (already present in the examples). Also fix grammar and kill EOL whitespace in comment while here. PR: 195005 Approved by: bdrewery Notes: svn path=/head/; revision=277560