demand_paging: add infra for demand paging modules
Backing stores and eviction algorithms will be included here. Exactly one must be chosen, with a default option to leave the implementation to the application. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
a6eca9fab6
commit
993cf9f8eb
|
@ -26,3 +26,4 @@ add_subdirectory(tracing)
|
|||
add_subdirectory_ifdef(CONFIG_JWT jwt)
|
||||
add_subdirectory(canbus)
|
||||
add_subdirectory_ifdef(CONFIG_TIMING_FUNCTIONS timing)
|
||||
add_subdirectory_ifdef(CONFIG_DEMAND_PAGING demand_paging)
|
||||
|
|
|
@ -58,4 +58,6 @@ source "subsys/timing/Kconfig"
|
|||
|
||||
source "subsys/tracing/Kconfig"
|
||||
|
||||
source "subsys/demand_paging/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
|
5
subsys/demand_paging/CMakeLists.txt
Normal file
5
subsys/demand_paging/CMakeLists.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Copyright (c) 2020 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
add_subdirectory(eviction)
|
||||
add_subdirectory(backing_store)
|
11
subsys/demand_paging/Kconfig
Normal file
11
subsys/demand_paging/Kconfig
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Copyright (c) 2020 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menu "Demand Paging modules"
|
||||
depends on DEMAND_PAGING
|
||||
|
||||
source "subsys/demand_paging/eviction/Kconfig"
|
||||
|
||||
source "subsys/demand_paging/backing_store/Kconfig"
|
||||
|
||||
endmenu
|
2
subsys/demand_paging/backing_store/CMakeLists.txt
Normal file
2
subsys/demand_paging/backing_store/CMakeLists.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Copyright (c) 2020 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
15
subsys/demand_paging/backing_store/Kconfig
Normal file
15
subsys/demand_paging/backing_store/Kconfig
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Copyright (c) 2020 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BACKING_STORE_CHOICE
|
||||
prompt "Backing store algorithms"
|
||||
default BACKING_STORE_CUSTOM
|
||||
|
||||
config BACKING_STORE_CUSTOM
|
||||
bool "Custom backing store implementation"
|
||||
help
|
||||
This option is chosen when the backing store will be implemented in
|
||||
the application. This will be typical as these tend to be very
|
||||
hardware-dependent.
|
||||
|
||||
endchoice
|
2
subsys/demand_paging/eviction/CMakeLists.txt
Normal file
2
subsys/demand_paging/eviction/CMakeLists.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Copyright (c) 2020 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
17
subsys/demand_paging/eviction/Kconfig
Normal file
17
subsys/demand_paging/eviction/Kconfig
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Copyright (c) 2020 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Demand paging sample eviction algorithms
|
||||
|
||||
choice EVICTION_CHOICE
|
||||
prompt "Page frame eviction algorithms"
|
||||
default EVICTION_CUSTOM
|
||||
depends on DEMAND_PAGING
|
||||
|
||||
config EVICTION_CUSTOM
|
||||
bool "Custom eviction algorithm"
|
||||
help
|
||||
This option is chosen when the eviction algorithm will be implemented
|
||||
by the application, instead of using one included in Zephyr.
|
||||
|
||||
endchoice
|
Loading…
Reference in a new issue