Changeset 683 for trunk/kernel/kernel_config.h
- Timestamp:
- Jan 13, 2021, 12:36:17 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kernel_config.h
r675 r683 25 25 #define _KERNEL_CONFIG_H_ 26 26 27 //////////////////////////////////////////////////////////////////////////////////////// ////27 //////////////////////////////////////////////////////////////////////////////////////// 28 28 // KERNEL DEBUG 29 // Each debug variable control one kernel function, or one small group of functions. 30 // - trace is generated only when cycle > debug_value. 31 // - detailed trace is enabled when (debug_value & Ox1) is non zero. 32 //////////////////////////////////////////////////////////////////////////////////////////// 29 // 30 // 1) All errors detected by the kernel caused by a system call are reported to the 31 // user process using the ERRNO mechanism. Moreover, the DEBUG_***_ERROR variables 32 // force the compiler to display on TXT0 the error messages generated by 33 // the low-level kernel function, to help the error cause analysis. 34 // 35 // 2) The other debug variable forece the compiler to display on TXT0 a trace for one 36 // specific kernel function, or one small group of functions. 37 // All these trace variables (but locks, kmem, kcm) respect the following rules: 38 // - the trace is generated if the debug variable is non zeo. 39 // - trace is generated only when cycle > debug_value. 40 // - detailed trace is enabled when (debug_value & 0x1) is non zero. 41 //////////////////////////////////////////////////////////////////////////////////////// 42 43 // error reporting variables 44 45 #define DEBUG_DEV_NIC_ERROR 1 46 #define DEBUG_KCM_ERROR 1 47 #define DEBUG_KMEM_ERROR 1 48 #define DEBUG_MAPPER_ERROR 1 49 #define DEBUG_PPM_ERROR 1 50 #define DEBUG_PROCESS_ERROR 1 51 #define DEBUG_SOCKET_ERROR 1 52 #define DEBUG_SYSCALLS_ERROR 1 53 #define DEBUG_THREAD_ERROR 1 54 #define DEBUG_USER_DIR_ERROR 1 55 #define DEBUG_VFS_ERROR 1 56 #define DEBUG_VMM_ERROR 1 57 58 59 // trace activation variables 33 60 34 61 #define DEBUG_BARRIER_CREATE 0 … … 36 63 #define DEBUG_BARRIER_WAIT 0 37 64 38 #define DEBUG_BUSYLOCK_TYPE 0 39 #define DEBUG_BUSYLOCK_PID 0 40 #define DEBUG_BUSYLOCK_TRDID 0 65 #define DEBUG_BUSYLOCK_TYPE 0 // type 0 undefined => no debug 66 #define DEBUG_BUSYLOCK_PID 0 // owner process PID 67 #define DEBUG_BUSYLOCK_TRDID 0 // owner thread TRDID 41 68 42 69 #define DEBUG_CHDEV_CMD_RX 0 … … 115 142 116 143 #define DEBUG_KCM 0 117 #define DEBUG_KCM_REMOTE 0 144 #define DEBUG_KCM_ORDER 0 // filter for DEBUG_KCM 145 #define DEBUG_KCM_CXY 0 // filter for DEBUG_KCM 146 147 #define DEBUG_KERNEL_INIT 0 118 148 119 149 #define DEBUG_KMEM 0 120 #define DEBUG_KMEM_REMOTE 0 121 122 #define DEBUG_KERNEL_INIT 0 150 #define DEBUG_KMEM_ORDER 0 // filter for DEBUG_KMEM 151 #define DEBUG_KMEM_CXY 0 // filter for DEBUG_KMEM 123 152 124 153 #define DEBUG_MAPPER_GET_PAGE 0 … … 133 162 #define DEBUG_PPM_ALLOC_PAGES 0 134 163 #define DEBUG_PPM_FREE_PAGES 0 135 #define DEBUG_PPM_REMOTE_ALLOC_PAGES 0136 #define DEBUG_PPM_REMOTE_FREE_PAGES 0137 164 138 165 #define DEBUG_PROCESS_COPY_INIT 0 139 166 #define DEBUG_PROCESS_DESTROY 0 140 #define DEBUG_PROCESS_EXEC_GET_STRINGS 0141 167 #define DEBUG_PROCESS_FD_REGISTER 0 142 168 #define DEBUG_PROCESS_FD_REMOVE 0 … … 151 177 #define DEBUG_PROCESS_ZERO_CREATE 0 152 178 153 #define DEBUG_QUEUELOCK_TYPE 0 154 #define DEBUG_QUEUELOCK_PTR 0 155 #define DEBUG_QUEUELOCK_CXY 0 179 #define DEBUG_QUEUELOCK_TYPE 0 // type 0 undefined => no debug 180 #define DEBUG_QUEUELOCK_PTR 0 // lock local pointer 181 #define DEBUG_QUEUELOCK_CXY 0 // lock cluster identifier 156 182 157 183 #define DEBUG_RPC_CLIENT_GENERIC 0 … … 170 196 #define DEBUG_RPC_VMM_SET_COW 0 171 197 172 #define DEBUG_RWLOCK_TYPE 0 173 #define DEBUG_RWLOCK_PTR 0 174 #define DEBUG_RWLOCK_CXY 0 198 #define DEBUG_RWLOCK_TYPE 0 // type 0 undefined => no debug 199 #define DEBUG_RWLOCK_PTR 0 // lock local pointer 200 #define DEBUG_RWLOCK_CXY 0 // lock cluster identifier 175 201 176 202 #define DEBUG_SCHED_HANDLE_SIGNALS 0 … … 189 215 #define DEBUG_SOCKET_DESTROY 0 190 216 #define DEBUG_SOCKET_LISTEN 0 217 #define DEBUG_SOCKET_SEND 0 191 218 #define DEBUG_SOCKET_RECV 0 192 #define DEBUG_SOCKET_SEND 0193 219 #define DEBUG_SOCKET_LINK 0 194 195 #define DEBUG_SYSCALLS_ERROR 0196 220 197 221 #define DEBUG_SYS_BARRIER 0 … … 205 229 #define DEBUG_SYS_FG 0 206 230 #define DEBUG_SYS_FORK 0 207 #define DEBUG_SYS_GET _CONFIG 0231 #define DEBUG_SYS_GET 0 208 232 #define DEBUG_SYS_GETCWD 0 209 233 #define DEBUG_SYS_GETPID 0 210 #define DEBUG_SYS_GET_BEST_CORE 0211 #define DEBUG_SYS_GET_CORE_ID 0212 #define DEBUG_SYS_GET_NB_CORES 0213 #define DEBUG_SYS_GET_THREAD_INFO 0214 234 #define DEBUG_SYS_ISATTY 0 215 235 #define DEBUG_SYS_IS_FG 0 … … 250 270 #define DEBUG_THREAD_USER_EXEC 0 251 271 252 #define DEBUG_USER_DIR 0 253 254 #define DEBUG_VFS_ERROR 0 272 #define DEBUG_USER_DIR_CREATE 0 273 #define DEBUG_USER_DIR_DESTROY 0 255 274 256 275 #define DEBUG_VFS_ADD_CHILD 0 … … 277 296 #define DEBUG_VFS_UNLINK 0 278 297 298 279 299 #define DEBUG_VMM_CREATE_VSEG 0 280 300 #define DEBUG_VMM_DESTROY 0 … … 352 372 //////////////////////////////////////////////////////////////////////////////////////////// 353 373 354 #define CONFIG_VERSION "Version 2. 3 / November 2019"374 #define CONFIG_VERSION "Version 2.4 / November 2020" 355 375 356 376 //////////////////////////////////////////////////////////////////////////////////////////// … … 370 390 #define CONFIG_CLUSTER_SPAN 32 // ln(phys. address space per cluster) 371 391 #define CONFIG_CACHE_LINE_SIZE 64 // number of bytes in cache line 392 #define CONFIG_CACHE_LINE_ORDER 6 // ln( cache line size ) 372 393 373 394 #define CONFIG_CACHE_LINE_ALIGNED __attribute__((aligned(CONFIG_CACHE_LINE_SIZE))) … … 389 410 390 411 //////////////////////////////////////////////////////////////////////////////////////////// 412 // DQDT 413 //////////////////////////////////////////////////////////////////////////////////////////// 414 415 #define CONFIG_DQDT_LEVELS_NR 5 416 417 //////////////////////////////////////////////////////////////////////////////////////////// 418 // FBF WINDOWS 419 //////////////////////////////////////////////////////////////////////////////////////////// 420 421 #define CONFIG_FBF_WINDOWS_MAX_NR 64 // max number of windows 422 #define CONFIG_FBF_WINDOWS_MAX_WIDTH 1024 // max number of pixels in FBF line 423 #define CONFIG_FBF_WINDOWS_MAX_HEIGHT 1024 // max number of lines in FBF 424 425 //////////////////////////////////////////////////////////////////////////////////////////// 391 426 // PROCESS MANAGEMENT 392 427 //////////////////////////////////////////////////////////////////////////////////////////// 393 428 429 #define CONFIG_PROCESS_INIT_PATH "/bin/user/init.elf" 394 430 #define CONFIG_MAX_PROCESS_PER_CLUSTER 16 // max number of owned process 395 431 #define CONFIG_PROCESS_ARGS_MAX_NR 4 // max number of args per process … … 399 435 #define CONFIG_PROCESS_HEAP_MIN_SIZE 0x00010000 // user heap min size (bytes) 400 436 #define CONFIG_PROCESS_HEAP_MAX_SIZE 0x30000000 // user heap max size (bytes) 401 #define CONFIG_PROCESS_INIT_PATH "/bin/user/init.elf" 437 #define CONFIG_PROCESS_DISPLAY_BUF_SIZE 128 // display one process on one line 438 439 //////////////////////////////////////////////////////////////////////////////////////////// 440 // PHYSICAL MEMORY MANAGEMENT 441 //////////////////////////////////////////////////////////////////////////////////////////// 442 443 #define CONFIG_PPM_PAGE_SIZE 4096 // physical page size (bytes) 444 #define CONFIG_PPM_PAGE_ORDER 12 // ln(physical page size) 445 #define CONFIG_PPM_PAGE_MASK 0x00000FFF // physical page mask 446 #define CONFIG_PPM_MAX_ORDER 16 // ln(total number of pages per cluster) 447 #define CONFIG_PPM_MAX_RSVD 32 // max reserved zones on the machine 448 449 #define CONFIG_PPM_PAGE_ALIGNED __attribute__((aligned(CONFIG_PPM_PAGE_SIZE))) 450 451 //////////////////////////////////////////////////////////////////////////////////////////// 452 // RANDOM NUMBERS 453 //////////////////////////////////////////////////////////////////////////////////////////// 454 455 #define CONFIG_RDNG_PARAM_A 65519 456 #define CONFIG_RDNG_PARAM_C 64037 457 458 //////////////////////////////////////////////////////////////////////////////////////////// 459 // REMOTE PROCEDURE CALL 460 //////////////////////////////////////////////////////////////////////////////////////////// 461 462 #define CONFIG_RPC_FIFO_SLOTS 16 463 #define CONFIG_RPC_FIFO_MAX_ITERATIONS 1024 464 #define CONFIG_RPC_THREADS_MAX 4 // max number of RPC threads per core 465 466 //////////////////////////////////////////////////////////////////////////////////////////// 467 // SCHEDULING 468 //////////////////////////////////////////////////////////////////////////////////////////// 469 470 #define CONFIG_SCHED_TICKS_PER_SECOND 1 // number of TICKS per seconds 471 #define CONFIG_SCHED_TICKS_PER_QUANTUM 1 // number of ticks between scheduling 472 #define CONFIG_SCHED_MAX_THREADS_NR 32 // max number of threads per core 473 #define CONFIG_SCHED_IDLE_MODE_SLEEP 0 // idle thread use sleep mode if non 0 474 475 //////////////////////////////////////////////////////////////////////////////////////////// 476 // TCP/UDP/IP 477 //////////////////////////////////////////////////////////////////////////////////////////// 478 479 #define CONFIG_SOCK_ISS_CLIENT 0x10000 // initial sequence number for TCP client 480 #define CONFIG_SOCK_ISS_SERVER 0x20000 // initial sequence number for TCP server 481 #define CONFIG_SOCK_MAX_WINDOW 0xFFFFF // initial window (bytes) for TCP 482 #define CONFIG_SOCK_RETRY_TIMEOUT 1000000 // number of cycles before retry for TCP 483 #define CONFIG_SOCK_QUEUES_DEPTH 4 // max number of packets in RX/TX queues 484 #define CONFIG_SOCK_RX_BUF_ORDER 20 // ln( number of bytes in socket rx_buf ) 485 #define CONFIG_SOCK_TX_BUF_ORDER 20 // ln( number of bytes in socket tx_buf ) 486 #define CONFIG_SOCK_R2T_BUF_SIZE 8 // max number of requests in R2T queue 487 #define CONFIG_SOCK_CRQ_BUF_SIZE 8 // max number of requests in CRQ queue 488 #define CONFIG_SOCK_PKT_BUF_SIZE 2048 // max length for one ETH/IP/TCP packet 489 #define CONFIG_SOCK_PAYLOAD_MAX 1500 // max user payload length for packet 490 491 //////////////////////////////////////////////////////////////////////////////////////////// 492 // THREADS 493 //////////////////////////////////////////////////////////////////////////////////////////// 494 495 #define CONFIG_THREADS_MAX_PER_CLUSTER 32 // max threads per cluster per process 496 #define CONFIG_THREAD_DESC_SIZE 0x4000 // thread desc size (with kernel stack) 497 #define CONFIG_THREAD_DESC_ORDER 14 // ln( number of bytes ) 402 498 403 499 //////////////////////////////////////////////////////////////////////////////////////////// … … 419 515 #define CONFIG_MAPPER_GRDXT_W2 7 // number of bits for RADIX_TREE_IX2 420 516 #define CONFIG_MAPPER_GRDXT_W3 7 // number of bits for RADIX_TREE_IX3 421 422 ////////////////////////////////////////////////////////////////////////////////////////////423 // FBF WINDOWS424 ////////////////////////////////////////////////////////////////////////////////////////////425 426 #define CONFIG_FBF_WINDOWS_MAX_NR 64 // max number of windows427 #define CONFIG_FBF_WINDOWS_MAX_WIDTH 1024 // max number of pixels in FBF line428 #define CONFIG_FBF_WINDOWS_MAX_HEIGHT 1024 // max number of lines in FBF429 430 ////////////////////////////////////////////////////////////////////////////////////////////431 // DQDT432 ////////////////////////////////////////////////////////////////////////////////////////////433 434 #define CONFIG_DQDT_LEVELS_NR 5435 436 ////////////////////////////////////////////////////////////////////////////////////////////437 // RANDOM NUMBERS438 ////////////////////////////////////////////////////////////////////////////////////////////439 440 #define CONFIG_RDNG_PARAM_A 65519441 #define CONFIG_RDNG_PARAM_C 64037442 443 ////////////////////////////////////////////////////////////////////////////////////////////444 // SCHEDULING445 ////////////////////////////////////////////////////////////////////////////////////////////446 447 #define CONFIG_SCHED_TICK_MS_PERIOD 10000 // number of milliseconds per period448 #define CONFIG_SCHED_TICKS_PER_QUANTUM 1 // number of ticks between scheduling449 #define CONFIG_SCHED_MAX_THREADS_NR 32 // max number of threads per core450 #define CONFIG_SCHED_IDLE_MODE_SLEEP 0 // idle thread use sleep mode if non 0451 452 ////////////////////////////////////////////////////////////////////////////////////////////453 // THREADS454 ////////////////////////////////////////////////////////////////////////////////////////////455 456 #define CONFIG_THREADS_MAX_PER_CLUSTER 32 // max threads per cluster per process457 #define CONFIG_THREAD_DESC_SIZE 0x4000 // thread desc size (with kernel stack)458 #define CONFIG_THREAD_DESC_ORDER 2 // ln( number of 4K pages )459 460 ////////////////////////////////////////////////////////////////////////////////////////////461 // REMOTE PROCEDURE CALL462 ////////////////////////////////////////////////////////////////////////////////////////////463 464 #define CONFIG_REMOTE_FIFO_SLOTS 16465 #define CONFIG_REMOTE_FIFO_MAX_ITERATIONS 1024466 #define CONFIG_RPC_THREADS_MAX 4 // max number of RPC threads per core467 517 468 518 //////////////////////////////////////////////////////////////////////////////////////////// … … 479 529 #define CONFIG_VMM_ARGS_SIZE 0x000001 // args vseg size : 4 Kbytes 480 530 #define CONFIG_VMM_ENVS_SIZE 0x000004 // envs vseg size : 16 Kbytes 481 #define CONFIG_VMM_STACK_SIZE 0x001000 // single stack vseg size : 16 Mbytes 482 483 #define CONFIG_VMM_HEAP_MAX_ORDER 18 // max size of MMAP vseg : 1 Gbytes 484 485 //////////////////////////////////////////////////////////////////////////////////////////// 486 // PHYSICAL MEMORY MANAGEMENT 487 //////////////////////////////////////////////////////////////////////////////////////////// 488 489 #define CONFIG_PPM_PAGE_SIZE 4096 // physical page size (bytes) 490 #define CONFIG_PPM_PAGE_SHIFT 12 // physical page shift (bits) 491 #define CONFIG_PPM_PAGE_MASK 0x00000FFF // physical page mask 492 #define CONFIG_PPM_MAX_ORDER 16 // ln(total number of pages per cluster) 493 #define CONFIG_PPM_HEAP_ORDER 10 // ln(number of heap pages per cluster) 494 #define CONFIG_PPM_MAX_RSVD 32 // max reserved zones on the machine 495 496 #define CONFIG_PPM_PAGE_ALIGNED __attribute__((aligned(CONFIG_PPM_PAGE_SIZE))) 531 #define CONFIG_VMM_STACK_SIZE 0x000100 // single stack vseg size : 1 Mbytes 532 533 #define CONFIG_VMM_HEAP_MAX_ORDER 18 // max size of MMAP vseg : 1 Gbytes 497 534 498 535 //////////////////////////////////////////////////////////////////////////////////////////// … … 502 539 #define CONFIG_PRINTK_BUF_SIZE 0x800 // max length of a formated string 503 540 #define CONFIG_PIPE_BUF_SIZE 0x1000 // max number of bytes in a pipe buffer 504 #define CONFIG_SOCK_RX_BUF_SIZE 0x100000 // max number of bytes in RX buffer505 #define CONFIG_SOCK_R2T_BUF_SIZE 0x64 // max number of requests in R2T queue506 #define CONFIG_SOCK_CRQ_BUF_SIZE 0x8 // max number of requests in CRQ queue507 #define CONFIG_SOCK_PKT_BUF_SIZE 0x800 // max length for one ETH/IP/TCP packet508 541 509 542 ////////////////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.