| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The device tree include file for TI TPS65* is in a
relative path to the source for example:
device-tree/src/arm/ti/omap/am335x-bone-common.dtsi#n305
device-tree/src/arm/rockchip/rk3066a-marsboard.dts#n183
This patch gets the dts path and adds that as an include path
for the device tree compiler.
Approved by: manu (mentor)
Differential revision: https://reviews.freebsd.org/D53887
|
| |
|
|
|
|
| |
Silence some warnings in my editor. No functional change intended.
MFC after: 1 week
|
| |
|
|
|
|
| |
Provide a command which can be used to reload gdb modules.
MFC after: 1 week
|
| |
|
|
|
|
|
|
| |
These are printed by gdb when requesting help for the corresponding
function or command, so phrase them such that they make sense in that
context.
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change simplifies integration of gdb python scripts with our kernel
debugging infrastructure. Rather than putting debugging scripts in
/usr/libexec/kgdb, move them to <path-to-kernel-debug-symbols>/gdb, and
add a kernel-gdb.py which automatically loads modules from that
directory. kernel-gdb.py will be automatically executed by kgdb when
loading kernel debug symbols (assuming a default configuration), so one
no longer needs to do anything to use these modules.
The change also adds a couple of new modules, vnet.py and pcpu.py, for
conveniently accessing VNET symbols and PCPU/DPCPU fields, respectively.
Note that these require a change to the kernel linker when accessing
symbols from a loadable kernel module.
sys/tools/gdb/README.txt describes the scheme in more detail and
provides some rudiementary documentation for the commands and functions
added by these modules. It should be updated when adding new features.
sys/tools/gdb/selftest.py can be used to do some primitive testing of
the modules. All it does is execute a number of gdb commands making use
of commands and functions added by these modules. The developer is
expected to verify that the commands complete without errors and that
the output looks sane.
Discussed with: kp, avg, jhb, glebius
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D50825
|
| |
|
|
| |
No point after hot patching was introduced.
|
| |
|
|
|
| |
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D52407
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The debug info is not very useful and embeds build paths because
elf-vdso.so.o is built without CFLAGS, breaking reproducibility of
elf-vdso.so.o and thus the kernel. Just stop passing debug flags to
amd64_vdso.sh.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52129
|
| |
|
|
|
|
|
|
| |
System calls of type NORETURN don't return and their stubs are declare
not to.
Reviewed by: kevans, kib
Differential Revision: https://reviews.freebsd.org/D51673
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
exit(3) is implemented by the runtime and performs a number of shutdown
actions before ultimately calling _exit(2) to terminate the program. We
historically named the syscall table entry `exit` rather than `_exit`,
but this requires special handling in libc/libsys to cause the `_exit`
symbol to exist while implementing `exit` in libc.
Declare the syscall as `_exit` and flow that through the system.
Because syscall(SYS_exit, code) is fairly widely used, allow a
configured extra line in syscall.h to define SYS_exit to SYS__exit.
I've found no external uses of __sys_exit() so I've not bothered to
create a compatability version of this private symbol.
Reviewed by: imp, kib, emaste
Differential Revision: https://reviews.freebsd.org/D51672
|
| |
|
|
|
|
|
|
|
| |
This allows you to run the kernel using the bootz command, which can be
useful on a board where the manufacturer's u-boot does not support EFI.
The original behavior has not been changed, the zImage binary can still
be run by jumping to the beginning of the binary file.
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is easy to forget to configure DEBUG_VFS_LOCKS, and when one does, no
vnode lock assertions are checked when INVARIANTS is configured, so bugs
can arise. This has happened to me more than once, and the overhead
over DEBUG_VFS_LOCKS does not appear to be high enough to prohibit
folding it into INVARIANTS, so let's do that.
The change makes vnode lock assertions useful in plain INVARIANTS
kernels, and guards VOP debug routines on INVARIANTS rather than
DEBUG_VFS_LOCKS. Further, invariants are now checked by plain
assertions rather than having various sysctls to finely control what
happens the checks fail. The extra complexity didn't seem particularly
useful and is at odds with how we handle debugging most everywhere else.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D51402
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an implementation of inotify_init(), inotify_add_watch(),
inotify_rm_watch(), source-compatible with Linux. This provides
functionality similar to kevent(2)'s EVFILT_VNODE, i.e., it lets
applications monitor filesystem files for accesses. Compared to
inotify, however, EVFILT_VNODE has the limitation of requiring the
application to open the file to be monitored. This means that activity
on a newly created file cannot be monitored reliably, and that a file
descriptor per file in the hierarchy is required.
inotify on the other hand allows a directory and its entries to be
monitored at once. It introduces a new file descriptor type to which
"watches" can be attached; a watch is a pseudo-file descriptor
associated with a file or directory and a set of events to watch for.
When a watched vnode is accessed, a description of the event is queued
to the inotify descriptor, readable with read(2). Events for files in a
watched directory include the file name.
A watched vnode has its usecount bumped, so name cache entries
originating from a watched directory are not evicted. Name cache
entries are used to populate inotify events for files with a link in a
watched directory. In particular, if a file is accessed with, say,
read(2), an IN_ACCESS event will be generated for any watched hard link
of the file.
The inotify_add_watch_at() variant is included so that this
functionality is available in capability mode; plain inotify_add_watch()
is disallowed in capability mode.
When a file in a nullfs mount is watched, the watch is attached to the
lower vnode, such that accesses via either layer generate inotify
events.
Many thanks to Gleb Popov for testing this patch and finding lots of
bugs.
PR: 258010, 215011
Reviewed by: kib
Tested by: arrowd
MFC after: 3 months
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D50315
|
| |
|
|
|
|
|
|
|
|
| |
Now that SDT is implemented using hot-patching, SDT_PROBE* no longer
introduces a branch instruction, so the SDT_PROBES_ENABLED() check in
each VOP_*_APV() is not really worth preserving.
Reviewed by: olce, kib
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D50423
|
| |
|
|
|
|
|
|
|
|
|
| |
If there are per-platform differences in which syscalls are supported,
we should only try to export implemented ones in libc. Fortunately,
syscall maps are run though cpp. This is arguably incomplete as
syscall.mk isn't (and can't practically be) supported.
Reviewed by: kevans
Sponsored by: DARPA, AFRL
Pull Request: https://github.com/freebsd/freebsd-src/pull/1575
|
| |
|
|
|
|
|
|
|
|
|
| |
Warn that C preprocessor directives in the config file are deprecated.
They are unsound and support has a number of potential pitfalls. They
should be replaced by compile-time generation of files plus an overlay
framework to allow things like per-arch variation.
Reviewed by: kevans
Sponsored by: DARPA, AFRL
Pull Request: https://github.com/freebsd/freebsd-src/pull/1575
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow patterns like this in syscalls.master:
#if 0
91 AUE_NULL RESERVED
#else
91 AUE_NULL STD|CAPENABLED {
int newsyscall(void);
}
#endif
makesyscalls.lua and it's predecessor makesyscalls.sh (really an awk
script with a tiny shell prolog) used a single pass parsing model where
lines beginning with `#` were emitted into most generated files as they
were read. I belive this was initially there to allow includes to be
listed in syscalls.master, but Hyrum's Law[0] applies and people are using
it for things like architecture-specific syscall definitions.
This use of CPP macro is unsound and there are a number of sharp edges
in both the new and old implementations. The macros are unsound because
not all the files were generate are run through CPP (or if they are not
in the same context) and this will increasingly be true as we generate
more things. Sharp edges include the fact that anything before the
first syscall would be printed at a different scope (e.g., before an
array is declared).
In this patch I collect each non-#include CPP directive and attach them
to the syscall table or individual entries. All entries before the
first syscall and after the last are attached to the prolog and epilog
members. Within the syscall table all entries are attached to the next
system calls's prolog member. In generators, each prolog entry is
printed regardless of the system call's visibiilty which replicates the
naive single pass model's behavior (including lots of empty blocks
of #if/#else/#endif in the output). Unlike makesyscalls.lua, I discard
none #define entries at the top of the file and print a warning as their
usefulness appears limited.
[0] https://www.hyrumslaw.com
Reported by: kevans
Reviewed by: kevans
Sponsored by: DARPA, AFRL
Pull Request: https://github.com/freebsd/freebsd-src/pull/1575
|
| |
|
|
|
|
|
|
|
| |
The two outer blocks had identical contents and the two inner blocks
differed in a single location.
Reviewed by: kevans
Sponsored by: DARPA, AFRL
Pull Request: https://github.com/freebsd/freebsd-src/pull/1575
|
| |
|
|
|
|
|
| |
This exercises some subset of the preprocessor that would be nice to
still support.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1575
|
| |
|
|
|
|
| |
No functional change intended.
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The yield system call has long existed, but never had a stub. Replace
the hardcoded checks for it in libsys_h.lua and syscalls_map.lua and
stop inserting it into MIASM (requiring libsys/Makefile.sys to disable
the stub).
(This seems like overkill, but I've got another case in CheriBSD so this
reduces my diff appreciably.)
Reviewed by: emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1503
|
| |
|
|
|
|
|
|
| |
These flags are a mix of excusive types and modifer flags. Comment the
modifer flags and sort them.
Reviewed by: emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1503
|
| |
|
|
| |
System call entry generation now lives in sys/tools/syscalls/*
|
| |
|
|
| |
It is obsolete and will be removed in a followup commit.
|
| |
|
|
|
|
|
|
|
| |
We haven't used this since commit be67ea40c5a0 in 2021 so stop carrying
it forward.
Also remove support for setting the list in syscalls.conf via the
capenabled variable. This was last used by cloudabi (removed in 2021
by commit cf0ee8738e31).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* main.lua replicates the functionality of makesyscalls.lua
* Individual files are generated by their associated module
* Modules can be called as standalone scripts to generate a specific
file
* Data and procedures are performed by objects instead of procedual code
* Bitmasks are replaced by declarative types
* Temporary files are no longer produced, writing is stored in memory
* Comments provide explanation to functions and semantics
Google Summer of Code 2024 Final Work Product
Co-authored-by: Warner Losh <imp@freebsd.org>
Co-authored-by: Kyle Evans <kevans@freebsd.org>
Co-authored-by: Brooks Davis <brooks@freebsd.org>
Sponsored by: Google (GSoC 24)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1362
Signed-off-by: agge3 <sterspark@gmail.com>
|
| |
|
|
| |
Reported by: agge3 <sterspark@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Apparently newer versions of binutils complain instead of silently
ignoring the unknown -z option.
Reported by: bz
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D47176
|
| |
|
|
|
|
|
| |
Add blank like after comment to align with upcoming refactor for
makesysent.lua.
Fixes: 0d490c6a445a sysent: make header comments more consistent
|
| |
|
|
|
|
| |
An upcoming refactor appends do-not-merge comments to all headers
centrally to do the same to reduce the final diff. Headers also start
with a comment line (for /*) and end with a blank line.
|
| |
|
|
|
|
|
|
| |
Comment aligning was inconsistent and required a ton of book-keeping.
Replaced comment aligning with a simple, single tab out.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1441
Signed-off-by: agge3 <sterspark@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the defined names are not the direct 1:1 mapping with vendor
and device names used by Linux device drivers.
Introduce a p(roduct)alias so we can map the one device entry I came
across without much extra hassle and generate a name device drivers
know about:
palias BROADCOM_CYPRESS_43439 CYPRESS_43439
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D46455
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Generate defined names which match the ones in the Linux drivers (a lot more);
given we are likely to have drivers only based on those one way or another
there is absolutely no reason to fight over differently generated names
for device and vendor IDs.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D46300
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The input file used to have a $FreeBSD$ tag on the first line and we
recorded that in the generated files to know which versions they were
based on. With the removal of $FreeBSD$ the logic was not quite
correct anymore; fix that to generate proper header files again.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D46300
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The latest ota is the first one in FreeBSD that treats 0 + "0xf" as
being '0' instead of '15'. Don't use this old trick anymore to convert
from hexidecimal to a number. Write a function to do that instead. This
fixes kernel.bin building on arm*. awk on 14 doesn't need this, but to
build FreeBSD stable/14's kernel.bin on 15 we'll need it, so fast MFC.
MFC After: 3 days
Sponsored by: Netflix
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D44801
|
| |
|
|
|
|
|
|
|
| |
Create a header covering most of the "stable" libsys interfaces.
Specifically __sys_<foo> syscall stubs and __sys_<foo>_t typedefs for
those interfaces.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44386
|
| |
|
|
|
|
|
|
|
| |
In sysproto.h, stop including sys/acl.h as syscall defintions now use
__acl* types from sys/_types.h. Add sys/types.h to provide types
previously provided by sys/param.h (via sys/acl.h).
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44467
|
| |
|
|
|
|
|
|
|
|
| |
The undocumented yield system call has never been implemented via libc
or libsys (except accidentally for <15 minutes in 1998 between commits
abd529cebab9 and 0db2fac06ab7). Avoid trying to export it now to avoid
failures when linking with --no-undefined-version.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44236
|
| |
|
|
|
|
|
|
|
|
| |
Historically we exposed _getlogin as a private symbol on a per-arch basis
(except on aarch64 and riscv) for no obvious reason. We now need to
expose it for libc's use so remove the special case from
makesyscalls.lua and expose it in the generated syscalls.map.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44116
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For libsys we need to expose all the private symbols (_ and __sys_
prefixes) so libsys can replace the libc versions. Rather than trying
to maintain a table, teach makesyscalls to generate it.
There are a small number of "_" prefixed symbols that are exposed as
public interfaces rather than in the private symbol space. Since the
list is short, just hardcode it for now.
If doesn't appear that we need to export freebsd#_foo symbols for compat
system calls explicitly. If it turns out we do, there are probably few
enough of them to handle seperately.
Reviewed by: kib, emaste, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/908
|
| |
|
|
|
|
| |
Reviewed by: kevans, imp
Fixes: 84d12f887c91f Add a COMPAT_FREEBSD14 kernel option
Differential Revision: https://reviews.freebsd.org/D42861
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Reviewed by: kevans, imp
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42168
|
| |
|
|
|
|
|
|
|
|
|
| |
We only want to produce syscall.mk for the main syscall table so default
to not producing it (send it to /dev/null) and add a syscalls.conf to
sys/kern to trigger the creation of sys/sys/syscall.mk. This eliminates
the need for entries in other syscalls.conf files and is a cleaner
pattern going forward.
Reviewed by: kevans, imp
Differential Revision: https://reviews.freebsd.org/D42663
|
| |
|
|
|
|
|
|
| |
pccard support was removed in 31b35400cf77on Dec 14, 2021, but this
wasn't. Belatedly remove it.
MFC After: 1 week
Sponsored by: Netflix
|
| |
|
|
| |
Remove /^--\n--\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Sponsored by: Netflix
|
| |
|
|
| |
Sponsored by: Netflix
|
| |
|
|
|
|
|
| |
The first line hasn't contained version information in years. Ignore it
entirely.
Sponsored by: Netflix
|