Commit graph

399 commits

Author SHA1 Message Date
Chris Friedt 4d0a8c1e8b doc: posix: async-io: clean up async-io documentation
The async-io documentation was in need of some beautification.

Rather than repeating the same thing inside of the table, just
mention that the whole option is expected to fail enosys.

At this time, there does not seem to be sufficient need for
implementing async io, so it is only present so that conforming
applications can still link properly.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-16 06:38:27 -04:00
Yong Cong Sin e0956f09d1 docs: posix: fix for unimplemented functions
The following functions are not implemented:
- getc_unlocked()
- getchar_unlocked()
- putc_unlocked()
- putchar_unlocked()

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-16 06:37:54 -04:00
Chris Friedt 0af0187095 doc: posix: mark memory protection as supported
Mark _POSIX_MEMORY_PROTECTION as supported (i.e. a
conformant application will link). Zephyr's mm API does not
currently support modifying memory protection bits after
pages have been mapped, so use of this function may result
in undefined behaviour.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt 24378ed08a doc: posix: mark shared memory objects as supported
Mark _POSIX_SHARED_MEMORY_OBJECTS as supported.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt 2fd7297aed doc: posix: mark mlockall() and munlockall() as supported
Mark mlockall() and munlockall() as supported, as well as the
_POSIX_MEMLOCK Option.

These functions are currently expected to fail, but are
required so that conformant applications can still link
successfully.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt d44047120b doc: posix: mark mlock() and munlock() as supported.
Mark mlock() and munlock() as supported, as well as the
_POSIX_MEMLOCK_RANGE Option.

These functions are currently expected to fail, but are
required so that conformant applications can still link
successfully.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt 510be57d7f doc: posix: mark mapped files as supported
Mark POSIX_MAPPED_FILES as supported.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Chris Friedt 65020f5b1f doc: posix: mark fstat() as implemented
The fstat() function is implemented as part of the
POSIX_FILE_SYSTEM Option Group, but it is implemented through
zvfs, as an ioctl, which allows other file descriptor types to
support queries of file descriptor status.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00
Luis Ubieda 18b19150af doc: shell: Add section for commonly-used commands
With details on how to enable them.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-13 17:57:36 +02:00
Luis Ubieda b831543137 doc: shell: Changes to restructure Backends documentation
- Unify shell backends in a dedicated section.
- Add documentation for the following backends: USB, BLE, RTT.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-13 17:57:36 +02:00
Adrien Ricciardi 61474ac99e doc: storage: nvs: Tell about optional data CRC
The CONFIG_NVS_DATA_CRC configuration item allows to enable a CRC-32
on the data part of the NVS items.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-06-13 05:51:56 -04:00
Chris Friedt e4ca6ff706 doc: posix: clean up xopen streams docs
This documentation was a bit unappealing. Add a
paragraph at the top to describe the level of support.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-13 05:35:31 -04:00
Benjamin Cabé 30ebe33f5a docs: pm: fix broken link to power domain tests
fix README to link to Power domain *tests*, not samples.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 12:49:00 -04:00
Benjamin Cabé c9a4386a92 doc: logging: fix LOG_INST_HEXDUMP_DBG link
fixed misspelled mention to LOG_INST_HEXDUMP_DBG

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-10 16:56:25 +03:00
Flavio Ceolin 9ba65abcb3 doc: pm: Add information about device and system constraint
Add information about device power management and system power
management constarints.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-07 19:06:23 -04:00
Daniel DeGrasse 93ebf1c48f doc: services: disk_access: add documentation for INIT/DEINIT IOCTLs
Add documentation for disk INIT/DEINIT IOCTLs to the disk access API.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-07 18:16:01 +01:00
Benjamin Cabé 5a5fd7c96f doc: mcumgr: fix mixed up occurrences of :c:enum: and :c:enumerator:
While Breathe seems to not care and creates hyperlinks either way, the
proper role to mention a C enumerator is :c:enumerator:. :c:enum: is to
be used to refer to the enum itself.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-07 16:44:49 +03:00
Jamie McCrae 1906ab33da doc: services: device_mgmt: mcumgr: Remove references to go tool
The go tool documentation is very old, and the tool is not
recommended for use, therefore remove all documentation relating
to it to prevent people from using it

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-07 15:07:07 +02:00
Tom Burdick d95caa51a4 sys: Add a lockfree mpsc and spsc queues
Moves the rtio_ prefixed lockfree queues to sys alongside existing
mpsc/spsc pbuf, ringbuf, and similar queue-like data structures.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-06 00:42:29 -07:00
Flavio Ceolin dcf22a66de doc: pm: Update system device pm
Add new information about new property to
enable/disable device power management per
power state.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:53 -04:00
Flavio Ceolin 94af630b22 pm: Deprecate PM_DEVICE_RUNTIME_EXCLUSIVE
That is option has shown confusing on it is attempt to prevent
system pm doing device power management. Lets address this
problem properly.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:53 -04:00
Flavio Ceolin 1a6bdb2e3e doc: crypto: Add PSA Crypto documentation
Add PSA Crypto in the cryptographic services
section.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:36 -04:00
Flavio Ceolin c1bcf3c72f doc: crypto: Remove TinyCrypt from documentation
TinyCrypt is being removed from Zephyr in favor of PSA Crypto.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-04 19:13:36 -04:00
Chris Friedt fe1e7f8d37 doc: release: posix: deprecate non-normative POSIX Kconfig
Add release notes for the deprecation of a number of POSIX
Kconfig options. These have been deprecated so that we can
use more normative Kconfig variable identifiers, based on
the Options and Option Groups of IEEE 1003.1-2017.

To simplify migration, use

python $ZEPHYR_BASE/scripts/utils/migrate_posix_kconfigs.py \
    -r root_path

Additionally, document the removal of PTHREAD_BARRIER_DEFINE(),
EFD_IN_USE, EFD_FLAGS_SET, which were previously deprecated
>= 2 release cycles before.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 0fa97326c7 posix: create kconfig options for pse51, pse52, pse53
Create Kconfig "shortcuts" for PSE51, PSE52, and PSE53.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 487a8756c3 posix: eventfd: fix dependency cycle between net and posix
Until recently, the posix api was purely a consumer of the
network subsystem. However, a dependency cycle was added as
a stop-gap solution for challenges with the native platform.

Specifically,

1. eventfd symbols conflict with those of the host
2. eventfd was excluded from native libc builds via cmake

If any part of the posix were then to select the network
subsystem (which is a legitimate use case, given that networking
is a part of the posix api), we would get a build error due to
the Kconfig dependency cycle.

As usual, with dependency cycles, the cycle can be broken
via a third, mutual dependency.

What is the third mutual dependency? Naturally, it is ZVFS
which was planned some time ago. ZVFS will be where we
collect file-descriptor and FILE-pointer APIs so that we can
ensure consistency for Zephyr users.

This change deprecates EVENTFD_MAX in favour of
ZVFS_EVENTFD_MAX.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt b003636b2b doc: posix: misc cleanup and add links to system interfaces
memlock, memlock range, shared memory objects, and synchronized
io were missing links.

Also, vdisable is '\0' (not 0).

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 3949e89330 posix: net: update for POSIX_NETWORKING
Add a link to the Kconfig option CONFIG_POSIX_NETWORKING in
the documentation.

Additionally, add Kconfig options for other Network
dependencies in an effort to make POSIX Kconfig options
consistent with the specification.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 1640967173 doc: posix: clean up some Kconfig options
Add links to POSIX-related Kconfig options that are related to
POSIX Options and Option Groups.

These include limits that might not have an associated standard
name and related Kconfig variables in other subsystems.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt b051bcee25 posix: move getpid() to Kconfig.procN and doc MULTI_PROCESS
Create a Kconfig option for POSIX_MULTI_PROCESS Option Group
and mark it as experimental.

Currently, Zephyr has two functions that belong to this
Option Group:
- sleep()
- getpid()

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 3f29b17bd1 posix: deprecate POSIX_SIGNAL in favour of POSIX_SIGNALS
This change deprecates CONFIG_POSIX_SIGNAL in favour of
the plural CONFIG_POSIX_SIGNALS, which maps directly to the
name of the standard POSIX Option Group POSIX_SIGNALS.

Additionally, mark signals as experimental.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt fcebe60090 posix: deprecate PTHREAD_IPC _MUTEX _COND and _KEY
Zephyr's POSIX API is moving toward using the standard
nomenclature from IEEE 1003.1-2017 for as much as possible. In
particular, we want to have consistent naming between Zephyr's
POSIX API Kconfig options and the naming for POSIX Options and
Option Groups.

The Kconfig option CONFIG_PTHREAD_IPC has been (ab)used for a
very long time for a variety of different purposes. However,
the standard Option / feature test macro for POSIX Threads is,
intuitively _POSIX_THREADS. There is a corresponding sysconf()
key named _SC_POSIX_THREADS.

Annoyingly, the POSIX Option Group that corresponds to the
Option is POSIX_THREADS_BASE, which is a minor inconsistency
in the standard.

The _POSIX_THREADS Option already includes mutexes, condition
variables, and thread-specific storage (keys). So with this
change, we also deprecate the redundant Kconfig variables that
do not have a corresponding match in the standard.

- CONFIG_PTHREAD_IPC
- CONFIG_PTHREAD
- CONFIG_PTHREAD_COND
- CONFIG_PTHREAD_MUTEX
- CONFIG_PTHREAD_KEY

Additionally, create Kconfig variables for those configurables
which we are lacking:

- CONFIG_POSIX_THREADS_EXT
- CONFIG_POSIX_THREAD_ATTR_STACKSIZE
- CONFIG_POSIX_THREAD_ATTR_STACKADDR
- CONFIG_POSIX_THREAD_PRIORITY_SCHEDULING
- CONFIG_POSIX_THREAD_PRIO_INHERIT
- CONFIG_POSIX_THREAD_PRIO_PROTECT
- CONFIG_POSIX_THREAD_SAFE_FUNCTIONS

Some Kconfig variables were renamed to more properly match the spec:

- CONFIG_MAX_PTHREAD_COUNT -> CONFIG_POSIX_THREAD_THREADS_MAX
- CONFIG_MAX_PTHREAD_KEY_COUNT -> CONFIG_POSIX_THREAD_KEYS_MAX

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 2f2cad742e posix: deprecate POSIX_PUTMSG for XOPEN_STREAMS
This change deprecates CONFIG_POSIX_PUTMSG and introduces a new
Kconfig option CONFIG_XOPEN_STREAMS which maps directly to the
standard POSIX Option, _XOPEN_STREAMS.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 0711d603f7 posix: deprecate POSIX_SYSLOG for XSI_SYSTEM_LOGGING
This change deprecates the CONFIG_POSIX_SYSLOG Kconfig
variable for CONFIG_XSI_SYSTEM_LOGGING, which has a
direct mapping to the POSIX Option Group XSI_SYSTEM_LOGGING.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 23f9119176 doc: posix: add kconfig link for async io
Update documentation so that there is a link to
CONFIG_POSIX_ASYNCHRONOUS_IO as it was previously missing.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 842a7b7ba1 posix: deprecate SEM_VALUE_MAX and SEM_NAMELEN_MAX
This change deprecates CONFIG_SEM_VALUE_MAX in favour of
CONFIG_POSIX_SEM_VALUE_MAX which maps directly to
_POSIX_SEM_VALUE_MAX.

Additionally, we add the Kconfig option
CONFIG_POSIX_SEMAPHORES which maps directly to the
POSIX Option _POSIX_SEMAPHORES.

For consistence, deprecate CONFIG_SEM_NAMELEN_MAX
in favour of CONFIG_POSIX_SEM_NAMELEN_MAX.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 9f6590c7b7 posix: deprecate POSIX_FS for POSIX_FILE_SYSTEM
This change deprecates CONFIG_POSIX_FS in favour of
CONFIG_POSIX_FILE_SYSTEM, which maps directly to the name of the
standard POSIX Option Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 2bc722a97e posix: deprecate POSIX_FNMATCH GETOPT GETENTROPY
The functions fnmatch(), getopt(), getentropy()
and others are grouped into the standard Option Group
POSIX_C_LIB_EXT.

The getentropy() function is currently in-draft for
Issue 8 as of 2021.

https://www.opengroup.org/austin/docs/austin_1110.pdf

Not surprisingly, the POSIX_C_LIB_EXT Option Group
also includes the highly debated strnlen() function.

Moving that function will be deferred until later.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 70e2b02c8e posix: deprecate PTHREAD_RWLOCK for POSIX_READER_WRITER_LOCKS
This change deprecates CONFIG_PTHREAD_RWLOCK in favour of
CONFIG_POSIX_READER_WRITER_LOCKS, which maps directly to the
name of the standard POSIX Option.

Annoyingly, the POSIX_RW_LOCKS Option Group is inconsistently
named. However, it is more convenient for us to use the Option
name since it is also the format used by the sysconf() variable
(_SC_READER_WRITER_LOCKS).

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt f270de7362 posix: deprecate POSIX_MQUEUE in favour of POSIX_MESSAGE_PASSING
This change deprecates CONFIG_POSIX_MQUEUE in favour of
CONFIG_POSIX_MESSAGE_PASSING, which maps directly to the name of the
standard POSIX Option.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 4e181f7031 posix: deprecate PTHREAD_SPINLOCK for POSIX_SPIN_LOCKS
This change deprecates CONFIG_PTHREAD_SPINLOCK in favour of
CONFIG_POSIX_SPIN_LOCKS, which maps directly to the name of the
standard POSIX Option Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 2fe9d6cd68 posix: deprecate POSIX_ENV _CONFSTR _SYSCONF and _UNAME
This change deprecates the following Kconfig options
* CONFIG_POSIX_ENV
* CONFIG_POSIX_CONFSTR
* CONFIG_POSIX_SYSCONF
* CONFIG_POSIX_UNAME

and instead groups them into a single Kconfig option that maps
directly to the standard. Namely, CONFIG_POSIX_SINGLE_PROCESS.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt b639604833 posix: deprecate PTHREAD_BARRIER for POSIX_BARRIERS
The standard specifies _POSIX_BARRIERS as an Option so let's
use CONFIG_POSIX_BARRIERS for consistence.

This change deprecates CONFIG_PTHREAD_BARRIER. Users should
instead choose CONFIG_POSIX_BARRIERS.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt bc4374b5fe posix: deprecate POSIX_MAX_FDS and add POSIX_DEVICE_IO
The POSIX_MAX_FDS option does not correspond to any standard
POSIX option. It was used to define the size of the file
descriptor table, which is by no means exclusively used by
POSIX (also net, fs, ...).

POSIX_MAX_FDS is being deprecated in order to ensure that
Zephyr's POSIX Kconfig variables correspond to those defined in
the specification, as of IEEE 1003.1-2017. Namely,
POSIX_OPEN_MAX. CONFIG_POSIX_MAX_OPEN_FILES is being deprecated
for the same reason.

To mitigate any possible layering violations, that option is
not user selectable. It tracks the newly added
CONFIG_ZVFS_OPEN_MAX option, which is native to Zephyr.

With this deprecation, we introduce the following Kconfig
options that map directly to standard POSIX Option Groups by
simply removing "CONFIG_":

* CONFIG_POSIX_DEVICE_IO

Similarly, with this deprecation, we introduce the following
Kconfig options that map directly to standard POSIX Options by
simply removing "CONFIG":

* CONFIG_POSIX_OPEN_MAX

In order to maintain parity with the current feature set, we
introduce the following Kconfig options.

* CONFIG_POSIX_DEVICE_IO_ALIAS_CLOSE
* CONFIG_POSIX_DEVICE_IO_ALIAS_OPEN
* CONFIG_POSIX_DEVICE_IO_ALIAS_READ
* CONFIG_POSIX_DEVICE_IO_ALIAS_WRITE

Gate open(), close(), read(), and write() via the
CONFIG_POSIX_DEVICE_IO Kconfig option and move
implementations into device_io.c, to be conformant with the
spec.

Lastly, stage function names for upcoming ZVFS work, to be
completed as part of the LTSv3 Roadmap (e.g. zvfs_open(), ..).

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 3f469665f4 posix: fd_mgmt: add fd_mgmt option group
With this change, we collect implementations of functions that are
part of the POSIX_FD_MGMT Option Group into one compilation unit
(fd_mgmt.c) and provide a matching Kconfig symbol that is
reflective of the standard.

Additionally, provide Kconfig options for aliases of those functions
since Newlib-based toolchains internally use an underscore-prefixed
alias for many POSIX functions (in this case _lseek).

Prefix Zephyr-native implementations with zvfs_ to prepare for the
up-coming changes in that area.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt 4a5c4e5f73 posix: timers: deprecate CONFIG_POSIX_CLOCK and TIMER
The POSIX_CLOCK option does not correspond to any standard
option. It was used to active features of several distinct
POSIX Options and Option Groups, which complicated API and
application configuration as a result.

POSIX_CLOCK is being deprecated in order to ensure that Zephyr's
POSIX Kconfig variables correspond to those defined in the
specification, as of IEEE 1003.1-2017.

Additionally, CONFIG_TIMER is being deprecated because it does
not match the corresponding POSIX Option (_POSIX_TIMERS).

With this deprecation, we introduce the following Kconfig
options that map directly to standard POSIX Option Groups by
simply removing "CONFIG_":

* CONFIG_POSIX_TIMERS

Similarly, we introduce the following Kconfig options that
map directly to standard POSIX Options by simply removing
"CONFIG":

* CONFIG_POSIX_CLOCK_SELECTION
* CONFIG_POSIX_CPUTIME
* CONFIG_POSIX_DELAYTIMER_MAX
* CONFIG_POSIX_MONOTONIC_CLOCK
* CONFIG_POSIX_TIMEOUTS
* CONFIG_POSIX_TIMER_MAX

In order to maintain parity with the current feature set, we
introduce the following Kconfig options that map directly to
standard POSIX Option Groups by simply removing "CONFIG_":

* CONFIG_POSIX_MULTI_PROCESS - sleep()

Similarly, in order to maintain parity with the current feature
set, we introduce the following additional Kconfig options that
map directly to standard POSIX Options by simply removing
"CONFIG":

* CONFIG_XSI_SINGLE_PROCESS - gettimeofday()

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Chris Friedt e2fc78af23 posix: signals: deprecate CONFIG_POSIX_LIMITS_RTSIG_MAX
There were two Kconfig constants defined for (effectively) the
same thing in Zephyr. Namely, RTSIG_MAX - the highest valued
real-time signal.

Deprecate CONFIG_POSIX_LIMITS_RTSIG_MAX in favour of
CONFIG_POSIX_RTSIG_MAX since the latter more closely matches
convention.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Yong Cong Sin db2f74555d doc: services: debugging: add documentation for symtab
Add a simple documentation for symbol table.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-30 16:52:01 -05:00
Yong Cong Sin 0a1a286a31 doc: services: debugging: mipi: fix heading
Fix heading level.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-30 16:52:01 -05:00
Tomi Fontanilles f451201228 manifest: trusted-firmware-m: update to 2.1.0
Update TF-M to version 2.1.0.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 04:56:40 -07:00