[clang-tools-extra][docs] Remove empty navigation trees
Remove stale, empty toctree directives from standalone tool documentation. Furo interpreted these directives as child navigation trees and displayed disclosure triangles with no useful entries.
Reject undetermined disks from all-SED pools
This commit fixes an issue where the disk SED capability column is tri-state but every consumer compared it with `is False`, so a disk that had never been probed passed the "must be SED" check and could join an all-SED pool unnoticed. The comparisons now reject anything that is not definitively SED. It also excludes `sed` from the disk update model, since it is a hardware fact we probe rather than something a caller has any business writing.
[Clang][AIX] Error on -mloadtime-comment-vars in cc1 for non-AIX targets
The driver continues to warn and drop the option for unsupported targets;
cc1, reachable directly or via -Xclang, now rejects it with
err_drv_unsupported_opt_for_target, mirroring the -mabi=quadword-atomics
and -mxcoff-roptr checks.
[Clang][AIX] Preserve -mloadtime-comment-vars variables across serialization
Named internal-linkage variables were silently dropped when their
definition crossed a PCH or C++20 named-module (BMI-to-object) boundary:
DeclMustBeEmitted did not know the implicit attribute, so the PCH writer
never marked the unreferenced variable as required, and for named modules
only non-discardable variables are recorded in the module-initializer
lists that EmitModuleInitializers walks. Teach DeclMustBeEmitted about
the attribute (the CodeGen-side check becomes redundant and is removed)
and record validated internal-linkage module-purview variables in the
module-initializer list.
Since DeclMustBeEmitted now sees the attribute, a preserved variable no
longer triggers -Wunused-const-variable: it is materially used.
Add tests for C++20 module preservation, importer behavior, and
instantiation diagnostics; PCH preservation; unused-warning suppression;
the non-AIX cc1 no-op; and char8_t element-type exclusion. Document the
modules/PCH rules.
[Clang][AIX] Restrict -mloadtime-comment-vars to file/namespace scope
Support only file- and namespace-scope variables. Name-matched static
data members, variable template specializations (explicit ones
included), and function-local statics are now diagnosed with
-Wloadtime-comment-var instead of being silently ignored. Implicit
instantiations are diagnosed via the template-instantiation path, once
per instantiating TU. Automatic locals have no symbol to match and
remain out of scope.
[Clang][AIX] Switch -mloadtime-comment-vars name matching to mangled IR names
Replace source-qualified name matching in matchesLoadTimeCommentVarName with
mangled IR symbol name matching via getMangledName(GlobalDecl(VD)).
[libclang/python] Make the value of a true bool enum 1, not -1 (#221497)
When converted to int a bool value is either `0` or `1`, but the `enum_value`
of a bool enum was reported as either `0` or `-1` in the Python bindings.
Make bool enums take the unsigned value code path so that `0` or `+1` is
returned instead.
Resolves #221326
loader.efi: fetch initmd specified by DHCP
Configure net0, read the DHCP-provided initmd URL, and download it
through the file API so directly booted loader.efi can construct its
root memory disk.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D59432
loader.efi: Allow downloading of ramdisk or md to be aborted
Hitting <ESC> will now allow one to abort a (possibly mistaken)
download.
Sponsored by: Netflix
loader.efi: Eat the character used to break to OK
When we can't find root, we give the user a chance to drop to the boot
loader OK prompt. We should eat the character that's pressed to not
interfere with the interactive session.
Sponsored by: Netflix
loader.efi: download md images through file API
Feed the existing decompressor from loader file descriptors as well as
iPXE callbacks, allowing arbitrary HTTP filesystem URLs to become
kernel-exportable memory disks.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D59431
loader.efi: download DHCP initmd specified image
When we haven't downloaded an image via mem{disk,cd} and ipxe, try any
image specified by the FreeBSD-specific initmd dhcp option. This allows
direct booting of loader.efi with a detached root ramdisk filesystem.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D59433
loader.efi: release SNP after network configuration
Close the exclusively opened SNP protocol after loader networking
finishes so the firmware network stack can reconnect the controller and
service a subsequent HTTP request.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D59430
loader: add standalone network configuration
Allow callers to obtain DHCP configuration without opening a network
file, enabling loader.efi to discover an initmd URL before handing the
interface back to firmware HTTP.
Differential Revision: https://reviews.freebsd.org/D59429
Sponsored by: Netflix
loader: request DHCP initmd option
Request FreeBSD RFC 3925 PEM 2238 DHCP 125 option. Use suboption 1 to
specify a ramdisk image to load and use to load the kernel and as the
root file system.
Differential Revision: https://reviews.freebsd.org/D59428
Sponsored by: Netflix
stand/efihttp: Support arbitrary http[N]://host[:port]/path devspecs
Until now, the "http" device only worked when firmware itself booted
loader.efi via EFI HTTP Boot: efihttp_dev_init() required a URI node on
the loader's own boot device path, and every fetch went to that same
server. Add a second form, using the parse_uri() helper from libsa/dev.c,
that works anywhere: http[N]://host[:port]/path (N is a network interface
unit, defaulting to 0). This lets a devspec like this be used as rootdev,
in loader.conf, or interactively, independent of how loader.efi itself
was booted.
Network configuration is shared, loader-wide state (the myip/netmask/
gateip/nameip globals from net.h): if something has already configured
them (e.g. tftp/nfs via net_open()), the http device just reuses those
values, applying them to EFI_IP4_CONFIG2_PROTOCOL as a static address. If
nothing has, it drives IP4Config2's own DHCP directly instead of calling
netdev's net_open(): net_open() opens the NIC's SNP
EFI_OPEN_PROTOCOL_EXCLUSIVE, which would disconnect the Mnp/Ip4/.../
HttpDxe driver chain this code depends on. That chain is also commonly
[8 lines not shown]
libsa: Add a generic URI-syntax devspec parser
Add parse_uri(), a helper for devices whose devspec can take a
"[N]://host[:port][/path]" form in addition to the traditional "N:path"
form. It returns EINVAL when devspec doesn't match that pattern, so a
caller's own dv_parsedev can fall back to the traditional form.
Un-static default_parsedev() so it can serve as that fallback.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D59422
loader.efi: For ipxe booting, fall back to md when ramdisk fails
Some UEFI firmwares do not contain the RamDisk protocol. When this
happens, load the file into a md disk instead. This is less desireable
than the RamDisk (since that allows better chain-booting options), but
sufficient to boot an image as a md device for FreeBSD. While most
severs have the RamDisk protocol enabled in their builds, I have two
IoT class boards from different manufacturers that do not. Since it
works just fine with this fallback, that's preferable.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D59421
loader: Small tweak to how md is configured
Only the EFI loader supports the md devices (as the moment). Create
LOADER_MD_SUPPORT and only try to compile md when that's true. For the
moment, also allow it when only MD_IMAGE_SIZE is defined, but that
will be dropped since LOADER_MD_SUPPORT is a superset.
Sponsored by: Netflix
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D59416
loader: Allow dynmaic creation of MD disks
Augment the md device to allow creation of md devices. This is useful
when UEFI doesn't support RamDisk and in other cases where we have a
handy initrd-like image we want to use.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D59418