1# Copyright (c) 2020 Intel Corporation
2# SPDX-License-Identifier: Apache-2.0
3
4choice BACKING_STORE_CHOICE
5	prompt "Backing store algorithms"
6	default BACKING_STORE_CUSTOM
7
8config BACKING_STORE_CUSTOM
9	bool "Custom backing store implementation"
10	help
11	  This option is chosen when the backing store will be implemented in
12	  the application. This will be typical as these tend to be very
13	  hardware-dependent.
14
15config BACKING_STORE_RAM
16	bool "RAM-based test backing store"
17	help
18	  This implements a backing store using physical RAM pages that the
19	  Zephyr kernel is otherwise unaware of. It is intended for
20	  demonstration and testing of the demand paging feature.
21
22config BACKING_STORE_QEMU_X86_TINY_FLASH
23	bool "Flash-based backing store on qemu_x86_tiny"
24	depends on BOARD_QEMU_X86_TINY
25	help
26	  This uses the "flash" memory area (in DTS) as the backing store
27	  for demand paging. The qemu_x86_tiny.ld linker script puts
28	  the symbols outside of boot and pinned sections into the flash
29	  area, allowing testing of the demand paging mechanism on
30	  code and data.
31
32config BACKING_STORE_ONDEMAND_SEMIHOST
33	bool "Backing store for on-demand linker section using semihosting"
34	depends on SEMIHOST && LINKER_USE_ONDEMAND_SECTION
35	help
36	  This is used to do on-demand paging of code and data marked with
37	  __ondemand_func and __ondemand_rodata tags respectively. The compiled
38	  zephyr.bin on the host is used to retrieve needed data with the
39	  semihosting I/O facility.
40
41endchoice
42
43if BACKING_STORE_RAM
44config BACKING_STORE_RAM_PAGES
45	int "Number of pages for RAM backing store"
46	default 16
47	help
48	  Number of pages of backing store memory to reserve in RAM. All test
49	  cases for demand paging assume that there are at least 16 pages of
50	  backing store storage available.
51
52endif # BACKING_STORE_RAM
53