forked from Imagelibrary/seL4
config: make root cnode size 4k minimum
The previous minimum (4) was actually too small to fit more than 1 capability, which would not allow the kernel to boot. A 4K minimum means on 32-bit, an 8 size is the minimum (256 slots) and on 64-bit, 7 (128 slots). In addition to being a more practical minimum, this also allows for simplification of the boot code for future commits.
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -29,6 +29,7 @@ Upcoming release: BREAKING
|
||||
* Added extended bootinfo header for device tree (SEL4_BOOTINFO_HEADER_FDT).
|
||||
* Support added for passing a device tree from the bootloader to the root task on ARM.
|
||||
* Add seL4_VSpaceBits, the size of the top level page table.
|
||||
* The root cnode size is now a minimum of 4K.
|
||||
|
||||
## Upgrade Notes
|
||||
---
|
||||
|
||||
13
config.cmake
13
config.cmake
@@ -72,12 +72,13 @@ include(src/config.cmake)
|
||||
config_set(KernelHaveFPU HAVE_FPU "${KernelHaveFPU}")
|
||||
|
||||
# System parameters
|
||||
config_string(KernelRootCNodeSizeBits ROOT_CNODE_SIZE_BITS "Root CNode Size (2^n slots) \
|
||||
The acceptable range is 4-27, based on the kernel-supplied caps.\
|
||||
The root CNode needs at least enough space to contain up to\
|
||||
BI_CAP_DYN_START. Note that in practice your root CNode will need\
|
||||
to be several bits larger than 4 to fit untyped caps and\
|
||||
cannot be 27 bits as it won't fit in memory." DEFAULT 12 UNQUOTE)
|
||||
config_string(
|
||||
KernelRootCNodeSizeBits ROOT_CNODE_SIZE_BITS "Root CNode Size (2^n slots) \
|
||||
The acceptable range is 8-27 and 7-26, for 32-bit and 64-bit respectively. \
|
||||
The root CNode needs at least enough space to contain up to BI_CAP_DYN_START."
|
||||
DEFAULT 12
|
||||
UNQUOTE
|
||||
)
|
||||
|
||||
config_string(KernelTimerTickMS TIMER_TICK_MS "Timer tick period in milliseconds" DEFAULT 2 UNQUOTE)
|
||||
config_string(
|
||||
|
||||
@@ -126,7 +126,8 @@ BOOT_CODE void write_slot(slot_ptr_t slot_ptr, cap_t cap)
|
||||
*/
|
||||
compile_assert(root_cnode_size_valid,
|
||||
CONFIG_ROOT_CNODE_SIZE_BITS < 32 - seL4_SlotBits &&
|
||||
(1U << CONFIG_ROOT_CNODE_SIZE_BITS) >= seL4_NumInitialCaps)
|
||||
BIT(CONFIG_ROOT_CNODE_SIZE_BITS) >= seL4_NumInitialCaps &&
|
||||
BIT(CONFIG_ROOT_CNODE_SIZE_BITS) >= (seL4_PageBits - seL4_SlotBits))
|
||||
|
||||
BOOT_CODE cap_t
|
||||
create_root_cnode(void)
|
||||
|
||||
Reference in New Issue
Block a user