Commit graph

9 commits

Author SHA1 Message Date
Kyle Evans 1631382cf2 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
2023-12-08 15:43:19 -06:00
Warner Losh fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Warner Losh a07cef5a73 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
2022-11-30 15:30:33 -07:00
Warner Losh 66012c8fc4 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
2022-11-30 15:30:33 -07:00
Warner Losh 781ca0afcd 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
2022-11-30 15:30:31 -07:00
Warner Losh a0aad69f95 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
2022-11-30 15:30:31 -07:00
Warner Losh 45ad955714 stand: Add driver interface docs
Add some rather bare-bones driver interface docs.

Sponsored by:		Netflix
Suggestions by:		rpokala
Reviewed by:		pauamma
Differential Revision:	https://reviews.freebsd.org/D35912
2022-09-09 17:25:59 -06:00
Kyle Evans f6b2a4291b libsa(3): Correct statement about FS Write-support, name change
- jhb implemented UFS write support a little over 16 years ago.
- Update the library name while we're here.

Reviewed by:	jhb, rpokala
Differential Revision:	https://reviews.freebsd.org/D14476
2018-06-09 14:24:16 +00:00
Warner Losh 3a7d8294f0 Move libstand.3 to libsa.3. Update libsa.3 to include functions
recently added. More are likely missing.
2018-01-31 04:29:05 +00:00
Renamed from stand/libsa/libstand.3 (Browse further)