zephyr/lib/posix/options/Kconfig.mem
Chris Friedt bca2ef672e posix: mem: remove imply MMU from POSIX options
With MMU being converted to a non-user-configurable option, we can
rely on that exclusively to know whether arch_mem_map() and
arch_mem_unmap() are available and we can remove the workarounds
in POSIX at the Kconfig level.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-02-19 04:59:33 +01:00

80 lines
2.7 KiB
Plaintext

# Copyright (c) 2024 BayLibre SAS
#
# SPDX-License-Identifier: Apache-2.0
menu "POSIX memory"
config POSIX_PAGE_SIZE
hex
# TODO: something similar and arch-independent for MPUs
default MMU_PAGE_SIZE if MMU
default 0x40
help
This option is not user-configurable.
config POSIX_SHARED_MEMORY_OBJECTS
bool "POSIX shared memory objects"
select SYS_HASH_FUNC32
select SYS_HASH_FUNC32_DJB2
select FDTABLE
select POSIX_MAPPED_FILES
help
Select 'y' here and Zephyr will provide implementations of shm_open() and shm_unlink().
For more information, please see
https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/V2_chap02.html
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_port.html#tag_24_03_04
config POSIX_MAPPED_FILES
bool "POSIX memory-mapped files"
help
Select 'y' here and Zephyr will provide support for mmap(), msync(), and munmap().
Note: This feature depends on hardware MMU support. If the underlying platform does not
support an MMU, then affected POSIX API functions may return -1 and set errno to ENOTSUP.
For more information, please see
https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/V2_chap02.html
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_port.html#tag_24_03_04
if POSIX_MAPPED_FILES
config POSIX_MEMLOCK
bool "POSIX memory locking"
help
Select 'y' here and Zephyr will provide support for mlockall() and munlockall().
Note: This feature depends on hardware MMU support as well as DEMAND_PAGING. If the
underlying platform does not support an MMU or DEMAND_PAGING, then affected POSIX API
functions will return -1 and set errno to ENOTSUP.
For more information, please see
https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/V2_chap02.html
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_port.html#tag_24_03_04
config POSIX_MEMLOCK_RANGE
bool "POSIX range memory locking"
imply DEMAND_PAGING
help
Select 'y' here and Zephyr will provide support for mlock() and munlock().
Note: This feature depends on hardware MMU support. If the underlying platform does not
support an MMU, then affected POSIX API functions will return -1 and set errno to ENOTSUP.
For more information, please see
https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/V2_chap02.html
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_port.html#tag_24_03_04
endif
config POSIX_MEMORY_PROTECTION
bool "POSIX memory protection"
help
Select 'y' here and Zephyr will provide support for mprotect().
For more information, please see
https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/V2_chap02.html
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_port.html#tag_24_03_04
endmenu