PatchworkOS  19e446b
A non-POSIX operating system.
Loading...
Searching...
No Matches
Configuration

Kernel configuration. More...

Collaboration diagram for Configuration:

Detailed Description

Kernel configuration.

Macros

#define CONFIG_INTERRUPT_STACK_PAGES   1
 Interrupt stack configuration.
 
#define CONFIG_MAX_KERNEL_STACK_PAGES   100
 Kernel stack configuration.
 
#define CONFIG_MAX_USER_STACK_PAGES   100
 User stack configuration.
 
#define CONFIG_MAX_FD   64
 Maximum file descriptor configuration.
 
#define CONFIG_LOG_SERIAL   true
 Serial logging configuration.
 
#define CONFIG_MAX_NOTES   8
 Maximum note queue configuration.
 
#define CONFIG_MAX_ARGC   512
 Maximum argument vector configuration.
 
#define CONFIG_MIN_TIMER_TIMEOUT   ((CLOCKS_PER_SEC) / 10000)
 Minimum timer timeout configuration.
 
#define CONFIG_TIME_SLICE   ((CLOCKS_PER_MS) * 10)
 Time slice configuration.
 
#define CONFIG_CACHE_HOT_THRESHOLD   ((CLOCKS_PER_MS) * 5)
 Cache hot threshold configuration.
 
#define CONFIG_MUTEX_MAX_SLOW_SPIN   1000
 Maximum mutex slow spin configuration.
 
#define CONFIG_SCREEN_MAX_LINES   256
 Maximum screen lines configuration.
 
#define CONFIG_PMM_BITMAP_MAX_ADDR   0x4000000ULL
 Maximum bitmap allocator address.
 
#define CONFIG_PROCESS_REAPER_INTERVAL   (CLOCKS_PER_SEC * 1)
 Process reaper interval configuration.
 
#define CONFIG_MAX_ENV_VARS   4096
 Maximum environment variables configuration.
 
#define CONFIG_KLOG_SIZE   0x4000
 
#define CONFIG_PERCPU_SIZE   0x10000
 Per-CPU data size configuration.
 
#define CONFIG_MAX_WAIT_QUEUES   64
 Maximum wait queues configuration.
 
#define CONFIG_MAX_RINGS   8
 Maximum rings configuration.
 
#define CONFIG_MAX_RINGS_PAGES   1024
 Maximum async ring pages configuration.
 

Macro Definition Documentation

◆ CONFIG_INTERRUPT_STACK_PAGES

#define CONFIG_INTERRUPT_STACK_PAGES   1

Interrupt stack configuration.

The CONFIG_INTERRUPT_STACK_PAGES constant defines the amount of pages that are allocated for the per-CPU interrupt, exception and doubleFault stacks.

The interrupt stack can be much much smaller than regular kernel stacks as all interrupt handlers should be as short as possible and allocate as little memory as possible to reduce the amount of time while preemptions are disabled.

Definition at line 21 of file config.h.

◆ CONFIG_MAX_KERNEL_STACK_PAGES

#define CONFIG_MAX_KERNEL_STACK_PAGES   100

Kernel stack configuration.

The CONFIG_MAX_KERNEL_STACK_PAGES constant defines the maximum amount of pages that are allowed to be allocated for a threads kernel stack, the kernel stack is used while the thread is in kernel space and NOT handling an exception/interrupt.

Definition at line 32 of file config.h.

◆ CONFIG_MAX_USER_STACK_PAGES

#define CONFIG_MAX_USER_STACK_PAGES   100

User stack configuration.

The CONFIG_MAX_USER_STACK_PAGES constant defines the maximum amount of pages that are allowed to be allocated for a threads user stack, the user stack is used while the thread is in user space.

Definition at line 42 of file config.h.

◆ CONFIG_MAX_FD

#define CONFIG_MAX_FD   64

Maximum file descriptor configuration.

The CONFIG_MAX_FD constant defines the maximum amount of file descriptors that a process is allowed to have open.

Definition at line 51 of file config.h.

◆ CONFIG_LOG_SERIAL

#define CONFIG_LOG_SERIAL   true

Serial logging configuration.

The CONFIG_LOG_SERIAL constant defines if to output logged strings via serial.

Definition at line 60 of file config.h.

◆ CONFIG_MAX_NOTES

#define CONFIG_MAX_NOTES   8

Maximum note queue configuration.

The CONFIG_MAX_NOTES constant defines the maximum length of a threads note queue.

Definition at line 69 of file config.h.

◆ CONFIG_MAX_ARGC

#define CONFIG_MAX_ARGC   512

Maximum argument vector configuration.

The CONFIG_MAX_ARGC constant defines the maximum amount of arguments that can be passed to a process via its argument vector. Used to avoid vulnerabilities where extremely large argument vectors are passed to processes.

Definition at line 79 of file config.h.

◆ CONFIG_MIN_TIMER_TIMEOUT

#define CONFIG_MIN_TIMER_TIMEOUT   ((CLOCKS_PER_SEC) / 10000)

Minimum timer timeout configuration.

The CONFIG_MIN_TIMER_TIMEOUT constant defines the minimum timeout that can be set for timers.

Definition at line 88 of file config.h.

◆ CONFIG_TIME_SLICE

#define CONFIG_TIME_SLICE   ((CLOCKS_PER_MS) * 10)

Time slice configuration.

The CONFIG_TIME_SLICE constant defines the default time slice given to threads when they are scheduled.

Definition at line 97 of file config.h.

◆ CONFIG_CACHE_HOT_THRESHOLD

#define CONFIG_CACHE_HOT_THRESHOLD   ((CLOCKS_PER_MS) * 5)

Cache hot threshold configuration.

The CONFIG_CACHE_HOT_THRESHOLD constant defines the threshold below which a time duration is considered "cache hot", meaning that the data is likely still in the CPU cache.

Definition at line 107 of file config.h.

◆ CONFIG_MUTEX_MAX_SLOW_SPIN

#define CONFIG_MUTEX_MAX_SLOW_SPIN   1000

Maximum mutex slow spin configuration.

The CONFIG_MUTEX_MAX_SLOW_SPIN constant defines the maximum number of iterations a thread will spin before blocking on a mutex.

Definition at line 117 of file config.h.

◆ CONFIG_SCREEN_MAX_LINES

#define CONFIG_SCREEN_MAX_LINES   256

Maximum screen lines configuration.

The CONFIG_SCREEN_MAX_LINES constant defines the maximum number of lines that the logging system will display.

Definition at line 126 of file config.h.

◆ CONFIG_PMM_BITMAP_MAX_ADDR

#define CONFIG_PMM_BITMAP_MAX_ADDR   0x4000000ULL

Maximum bitmap allocator address.

The CONFIG_PMM_BITMAP_MAX_ADDR constant defines the maximum address below which pages will be handled by the bitmap allocator, pages above this value will be handled by the free stack allocator.

Definition at line 136 of file config.h.

◆ CONFIG_PROCESS_REAPER_INTERVAL

#define CONFIG_PROCESS_REAPER_INTERVAL   (CLOCKS_PER_SEC * 1)

Process reaper interval configuration.

The CONFIG_PROCESS_REAPER_INTERVAL constant defines the minimum interval at which the process reaper runs to clean up zombie processes. It might run less frequently.

Definition at line 146 of file config.h.

◆ CONFIG_MAX_ENV_VARS

#define CONFIG_MAX_ENV_VARS   4096

Maximum environment variables configuration.

The CONFIG_MAX_ENV_VARS constant defines the maximum number of environment variables that a process can have.

Definition at line 155 of file config.h.

◆ CONFIG_KLOG_SIZE

#define CONFIG_KLOG_SIZE   0x4000

Definition at line 164 of file config.h.

◆ CONFIG_PERCPU_SIZE

#define CONFIG_PERCPU_SIZE   0x10000

Per-CPU data size configuration.

The CONFIG_PERCPU_SIZE constant defines the size allocated for per-CPU data.

Definition at line 173 of file config.h.

◆ CONFIG_MAX_WAIT_QUEUES

#define CONFIG_MAX_WAIT_QUEUES   64

Maximum wait queues configuration.

The CONFIG_MAX_WAIT_QUEUES constant defines the maximum amount of wait queues that a thread can wait on simultaneously.

Definition at line 183 of file config.h.

◆ CONFIG_MAX_RINGS

#define CONFIG_MAX_RINGS   8

Maximum rings configuration.

The CONFIG_MAX_RINGS constant defines the maximum amount of asynchronous rings that each process can have.

Definition at line 192 of file config.h.

◆ CONFIG_MAX_RINGS_PAGES

#define CONFIG_MAX_RINGS_PAGES   1024

Maximum async ring pages configuration.

The CONFIG_MAX_RINGS_PAGES constant defines the maximum amount of pages that can be allocated for a async rings buffer.

Definition at line 202 of file config.h.