#
c29cba40 |
| 20-Nov-2024 |
Warner Losh <imp@FreeBSD.org> |
stand: Narrow the 'signal emulation' we provide
We only need to provide sig_atomic_t in emulation. However, including machine/signal.h brings in too much namespace pollution related to signals. Inst
stand: Narrow the 'signal emulation' we provide
We only need to provide sig_atomic_t in emulation. However, including machine/signal.h brings in too much namespace pollution related to signals. Instead, define sig_atomic_t as long. Setting long is async atomic on all platforms (though powerpc64 defines it to an int), though that doesn't matter since the boot loader doesn't use signals.
Sponsored by: Netflix
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0 |
|
#
3e15b01d |
| 22-Feb-2024 |
Warner Losh <imp@FreeBSD.org> |
libsa: Remove redundant sys/cdefs.h
Sponsored by: Netflix
|
#
1631382c |
| 08-Dec-2023 |
Kyle Evans <kevans@FreeBSD.org> |
loader: provide a features table for binary compatibility advertisement
liblua now provides a loader.has_feature() function to probe the loader binary for features advertised. name => desc mappings
loader: provide a features table for binary compatibility advertisement
liblua now provides a loader.has_feature() function to probe the loader binary for features advertised. name => desc mappings are provided in loader.features to get a list of all of the features loader *can* support. core.hasFeature is provided as a shim to loader.has_feature so that individual consumers don't need to think about the logic of the loader module not providing has_feature; we know that means the feature isn't enabled.
The first consumer of this will be EARLY_ACPI to advertise that the loader binary probes for ACPI presence before the interpreter has started, so that we know whether we can trust the presence of acpi.rsdp as relatively authoritative. In general, it's intended to be used to avoid breaking new scripts on older loaders within reason.
This will be used in lua as `core.hasFeature("EARLY_ACPI")`, while the C bits of loader will `feature_enable(FEATURE_EARLY_ACPI)`.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42695
show more ...
|
#
6e28a6bc |
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
stand: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl
stand: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
b3e76948 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
Revision tags: release/13.2.0 |
|
#
d1ea5017 |
| 13-Jan-2023 |
Warner Losh <imp@FreeBSD.org> |
stand: Separate base and cli parts of nvstore
zfs lives in libsa. However, it depends on nvstore (and other things) that are in common. Fix part of this layering violation by splitting nvstore into
stand: Separate base and cli parts of nvstore
zfs lives in libsa. However, it depends on nvstore (and other things) that are in common. Fix part of this layering violation by splitting nvstore into a libsa piece (which is the base implementation) and keeping a much smaller common piece (to implement the nvstore command). This just leaves zfs' knowledge of device names that's specific to common and its calling platform specific init code to resolve. Add a nvstore.h file for these two parts to communicate private things and move the public nvstore api from bootstrap.h to stand.h.
Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D38043
show more ...
|
#
bf020787 |
| 11-Jan-2023 |
Warner Losh <imp@FreeBSD.org> |
stand: Move dev_cleanup into libsa
Since dev_cleanup() walks through all the devsw devices with dv_cleanup rotuines, move it into libsa rather than having it in 'common'. Logically, it operates only
stand: Move dev_cleanup into libsa
Since dev_cleanup() walks through all the devsw devices with dv_cleanup rotuines, move it into libsa rather than having it in 'common'. Logically, it operates only on things that are in libsa, and would never be different for different loaders: either people would call it as is, or they'd do the loop themselves with 'special' things inline between calls to cleanup (not that I think that will ever be needed though).
Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D38004
show more ...
|
#
5cf20707 |
| 07-Jan-2023 |
Warner Losh <imp@FreeBSD.org> |
stand: Allow stand.h to be included in C++ programs
Allow stand.h to be included in C++ programs. This is little more than using our stylized __BEGIN_DECL / __END_DECL around the entire file. There'
stand: Allow stand.h to be included in C++ programs
Allow stand.h to be included in C++ programs. This is little more than using our stylized __BEGIN_DECL / __END_DECL around the entire file. There's no run-time support for C++, so the C++ that can be used is quite limited. It is enough for libunwind, though.
Sponsored by: Netflix Reviewed by: jrtc27, kevans Differential Revision: https://reviews.freebsd.org/D37946
show more ...
|
#
2e1e68cb |
| 13-Dec-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Make ioctl declaration consistent
It typically had two args with an optional third from the userland declaration in sys/ioccom.h. However, the funciton definition used a non-optional char * a
stand: Make ioctl declaration consistent
It typically had two args with an optional third from the userland declaration in sys/ioccom.h. However, the funciton definition used a non-optional char * argument. This mismatch is UB behavior (but worked due to the calling convetions of all our machines).
Instead, add a declaration for ioctl to stand.h, make the third arg 'void *' which is a better match to the ... declaration before. This prevents the convert int * -> char * errors as well. Make the ioctl user-space declaration truly user-space specific (omit it in the stand-alone build).
No functional change intended.
Sponsored by: Netflix Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D37680
show more ...
|
#
a07cef5a |
| 30-Nov-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Add dv_match
On OpenFirmware, and possibly kboot, we use full path names for the objects that are the 'device'. kboot uses a hack of knowing that all disk device nodes start with '/dev', but
stand: Add dv_match
On OpenFirmware, and possibly kboot, we use full path names for the objects that are the 'device'. kboot uses a hack of knowing that all disk device nodes start with '/dev', but this generalizes it for OpenFirmware where both 'block' and 'network' devices live in the same namespace and one must ask the OF node its type to know if this device type matches.
For drivers that don't specify, the current convention of using strncmp() is retained. This is done only in devparse(), but everything uses it directly (or will soon).
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D37554
show more ...
|
#
66012c8f |
| 30-Nov-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: create devinit
devinit() marches through all the devices, calling the inint routines if any exist. Replace all the identical copies of this code.
Sponsored by: Netflix Differential Revision
stand: create devinit
devinit() marches through all the devices, calling the inint routines if any exist. Replace all the identical copies of this code.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D37349
show more ...
|
#
781ca0af |
| 30-Nov-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Introduce devparse to parse device / path strings
devparse is now the preferred interface to use to parse device strings or device:/path strings. It parses the passed in string, mallocs the d
stand: Introduce devparse to parse device / path strings
devparse is now the preferred interface to use to parse device strings or device:/path strings. It parses the passed in string, mallocs the device's particular devdesc string and returns the 'remainder' of the device:/path for further processing.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D37338
show more ...
|
#
a0aad69f |
| 30-Nov-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Introduce new dv_parsedev routine
Allow device classes to define a parsing routine. Most device classes already have these routines, but there's much duplication in their use. Define an inter
stand: Introduce new dv_parsedev routine
Allow device classes to define a parsing routine. Most device classes already have these routines, but there's much duplication in their use. Define an interface for a common routine to parse an individual device. By convetion, files have the form "[device:]/path/to/file" where device is optional (filled in to be the value of currdev) and it starts with the dv_name field of the device, with the rest of the name up to the device (typically a unit number, but disks add partition inforation, and other devices may do artibtrary otehr things).
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D37337
show more ...
|
Revision tags: release/12.4.0 |
|
#
269865a8 |
| 05-Nov-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Update comment about devdesc
How devdesc is used is opaque until much code is read. Give a more useful description of the theory behind it here.
Sponsored by: Netflix
|
#
4d4b1a29 |
| 11-Aug-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Add dv_devfmt to return a string represenation of the device
Add a new pointer, dv_devfmt, to allow devices to format themselves. We will use this to simplify many of the fmtdev functions in
stand: Add dv_devfmt to return a string represenation of the device
Add a new pointer, dv_devfmt, to allow devices to format themselves. We will use this to simplify many of the fmtdev functions in the tree as they are all almost the same, or all are isomorphic to each other.
Sponsored by: Netflix Reviewed by: tsoome (prior version) Differential Revision: https://reviews.freebsd.org/D35915
show more ...
|
#
079f02e8 |
| 27-Jul-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Small comment correction
While in theory, once upon a time, dv_type was arch specific, that's never been the case in FreeBSD (and certaintly isn't in the surviving drivers). Remove that notat
stand: Small comment correction
While in theory, once upon a time, dv_type was arch specific, that's never been the case in FreeBSD (and certaintly isn't in the surviving drivers). Remove that notation.
Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D35911
show more ...
|
#
4932a6e4 |
| 27-Jul-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: Create DEV_NAMLEN for the length of a device name
Rather than hard coding 8 for the device name length, create a #define for it.
Sponsored by: Netflix Reviewed by: tsoome Differential Revi
stand: Create DEV_NAMLEN for the length of a device name
Rather than hard coding 8 for the device name length, create a #define for it.
Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D35910
show more ...
|
Revision tags: release/13.1.0 |
|
#
bd001d86 |
| 30-Apr-2022 |
Warner Losh <imp@FreeBSD.org> |
stand: s/libstand/libsa/g to catch up with rename
We renamed libstand to libsa years ago with the move from sys/boot to stand. Catch up in the comments.
Sponsored by: Netflix
|
#
01cad731 |
| 30-Dec-2021 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: tslog: Add more log for module loading
This helps mesuring what's happening when we load the kernel/modules/mfsroot.
This also adds TSENTER2 which uses the third argument of TSRAW, same as
loader: tslog: Add more log for module loading
This helps mesuring what's happening when we load the kernel/modules/mfsroot.
This also adds TSENTER2 which uses the third argument of TSRAW, same as in the kernel.
MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33699
show more ...
|
#
c25d9aff |
| 10-Dec-2021 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: Add preload operation to fs_ops
When we load an ELF file (kernel or module) we do seek(2) a lot to parse/load the different sections of the ELF file. Protocol like TFTP suffers a lot from th
loader: Add preload operation to fs_ops
When we load an ELF file (kernel or module) we do seek(2) a lot to parse/load the different sections of the ELF file. Protocol like TFTP suffers a lot from this as there is no resume or a way to start the tranfer from a specified offset in the file. fs_preload is added to help those protocol. Call preload just after opening the ELF file that we need to load so the underlying method can cache the hole file and then read/lseek operations are faster.
Reviewed by: imp MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33409
show more ...
|
Revision tags: release/12.3.0 |
|
#
b4cb3fe0 |
| 12-Aug-2021 |
Toomas Soome <tsoome@FreeBSD.org> |
loader: implement mount/unmount rootfs
We want to keep our root file system open to preserve bcache segment between file accesses, thus reducing physical disk IO.
Reviewed by: imp, allanjude, kevan
loader: implement mount/unmount rootfs
We want to keep our root file system open to preserve bcache segment between file accesses, thus reducing physical disk IO.
Reviewed by: imp, allanjude, kevans (previous version) Differential Revision: https://reviews.freebsd.org/D30848 MFC after: 1 month
show more ...
|
#
97cbd5e7 |
| 31-Jul-2021 |
Toomas Soome <tsoome@FreeBSD.org> |
loader: open file list should be dynamic
Summary: Open file list is currently created as statically allocated array (64 items). Once this array is filled up, loader will not be able to operate with
loader: open file list should be dynamic
Summary: Open file list is currently created as statically allocated array (64 items). Once this array is filled up, loader will not be able to operate with files. In most cases, this mechanism is good enough, but the problem appears, when we have many disks with zfs pool(s). In current loader implementation, all discovered zfs pool configurations are kept in memory and disk devices open - consuming the open file array. Rewrite the open file mechanism to use dynamically allocated list.
Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D31364
show more ...
|
#
e193d3ba |
| 30-May-2021 |
Colin Percival <cperciva@FreeBSD.org> |
libsa: Add support for timestamp logging (tslog)
At present this only supports x86, due to the use of the rdtsc instruction; and is inert unless a buffer is allocated and passed to the tslog code (w
libsa: Add support for timestamp logging (tslog)
At present this only supports x86, due to the use of the rdtsc instruction; and is inert unless a buffer is allocated and passed to the tslog code (which will be done by a future commit).
Reviewed by: kevans
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
ed19b7c5 |
| 29-Aug-2020 |
Simon J. Gerraty <sjg@FreeBSD.org> |
zalloc_malloc:Free hexdump preceeding buffer when we detect overflow
Move hexdump from stand/common/misc.c to stand/libsa/hexdump.c (svn cp) Disable use of pager - causes linking issue for boot1 can
zalloc_malloc:Free hexdump preceeding buffer when we detect overflow
Move hexdump from stand/common/misc.c to stand/libsa/hexdump.c (svn cp) Disable use of pager - causes linking issue for boot1 can be re-enabled by defining HEXDUMP_PAGER.
Reviewed by: stevek, imp MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D26235
show more ...
|
#
b9c5b432 |
| 28-Aug-2020 |
Warner Losh <imp@FreeBSD.org> |
Declare time()
Time is used and was accidentally brought in through header pollution. Declare it in stand.h directly instead.
|