Skip to content

Commit

Permalink
kernel: add kconfig to say not all code/data is present at boot
Browse files Browse the repository at this point in the history
With demand paging and pinned sections enabled, it is possible for
data to be brought into physical memory as required by current
execution context. However, the kernel still assumes that all data
pages are present at boot which may not be desirable for certain
scenarios. This introduces a new kconfig to specify that those
data pages other than the boot and pinned sections are not present,
and they would be paged in on demand.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
  • Loading branch information
dcpleung authored and cfriedt committed Aug 27, 2021
1 parent 7771d27 commit 6a006d7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Kconfig.zephyr
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,19 @@ config LINKER_USE_PINNED_SECTION
Requires that pinned sections exist in the architecture, SoC,
board or custom linker script.

config LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT
bool "Generic sections are present at boot" if DEMAND_PAGING && LINKER_USE_PINNED_SECTION
default y
help
When disabled, the linker sections other than the boot and
pinned sections will be marked as not present in the page
tables. This allows kernel to pull in data pages on demand
as required by current execution context when demand paging
is enabled. There is no need to load all code and data into
memory at once.

If unsure, say Y.

endmenu # "Linker Sections"

endmenu
Expand Down

0 comments on commit 6a006d7

Please sign in to comment.