- Timestamp:
- Oct 5, 2018, 12:06:26 AM (6 years ago)
- Location:
- trunk/kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/Makefile
r557 r569 8 8 endif 9 9 10 # We choose drivers and hal file to be linked with kernel.elf10 # We choose drivers and hal file to be linked with kernel.elf 11 11 ifeq ($(ARCH_NAME), tsar_mips32) 12 12 13 13 DRIVERS_OBJS = $(HAL_ARCH)/build/drivers/soclib_tty.o \ 14 $(HAL_ARCH)/build/drivers/soclib_mt ty.o\14 $(HAL_ARCH)/build/drivers/soclib_mty.o \ 15 15 $(HAL_ARCH)/build/drivers/soclib_bdv.o \ 16 16 $(HAL_ARCH)/build/drivers/soclib_hba.o \ … … 79 79 80 80 # Objects to be linked for kernel.elf generation 81 KERN_OBJS = build/kern/kernel_init.o \82 build/kern/printk.o \83 build/kern/thread.o \84 build/kern/process.o \85 build/kern/chdev.o \86 build/kern/cluster.o \87 build/kern/scheduler.o \88 build/kern/core.o \89 build/kern/dqdt.o \90 build/kern/do_syscall.o \81 KERN_OBJS = build/kern/kernel_init.o \ 82 build/kern/printk.o \ 83 build/kern/thread.o \ 84 build/kern/process.o \ 85 build/kern/chdev.o \ 86 build/kern/cluster.o \ 87 build/kern/scheduler.o \ 88 build/kern/core.o \ 89 build/kern/dqdt.o \ 90 build/kern/do_syscall.o \ 91 91 build/kern/rpc.o \ 92 92 build/kern/cluster_info.o 93 93 94 DEV_OBJS = build/devices/dev_txt.o \95 build/devices/dev_ioc.o \96 build/devices/dev_mmc.o \97 build/devices/dev_nic.o \98 build/devices/dev_pic.o \99 build/devices/dev_dma.o \100 build/devices/dev_fbf.o \94 DEV_OBJS = build/devices/dev_txt.o \ 95 build/devices/dev_ioc.o \ 96 build/devices/dev_mmc.o \ 97 build/devices/dev_nic.o \ 98 build/devices/dev_pic.o \ 99 build/devices/dev_dma.o \ 100 build/devices/dev_fbf.o \ 101 101 build/devices/dev_iob.o 102 102 103 MM_OBJS = build/mm/ppm.o \104 build/mm/vmm.o \105 build/mm/vseg.o \106 build/mm/page.o \107 build/mm/kcm.o \108 build/mm/khm.o \109 build/mm/mapper.o \103 MM_OBJS = build/mm/ppm.o \ 104 build/mm/vmm.o \ 105 build/mm/vseg.o \ 106 build/mm/page.o \ 107 build/mm/kcm.o \ 108 build/mm/khm.o \ 109 build/mm/mapper.o \ 110 110 build/mm/kmem.o 111 111 112 LIBK_OBJS = build/libk/grdxt.o \ 113 build/libk/bits.o \ 114 build/libk/elf.o \ 115 build/libk/string.o \ 116 build/libk/ctype.o \ 117 build/libk/rwlock.o \ 118 build/libk/spinlock.o \ 119 build/libk/barrier.o \ 120 build/libk/remote_barrier.o \ 121 build/libk/remote_spinlock.o \ 122 build/libk/remote_rwlock.o \ 123 build/libk/remote_fifo.o \ 124 build/libk/remote_mutex.o \ 125 build/libk/remote_sem.o \ 126 build/libk/remote_condvar.o \ 127 build/libk/memcpy.o \ 128 build/libk/htab.o \ 112 LIBK_OBJS = build/libk/grdxt.o \ 113 build/libk/bits.o \ 114 build/libk/elf.o \ 115 build/libk/string.o \ 116 build/libk/ctype.o \ 117 build/libk/rwlock.o \ 118 build/libk/busylock.o \ 119 build/libk/queuelock.o \ 120 build/libk/barrier.o \ 121 build/libk/xbarrier.o \ 122 build/libk/remote_busylock.o \ 123 build/libk/remote_queuelock.o \ 124 build/libk/remote_rwlock.o \ 125 build/libk/remote_fifo.o \ 126 build/libk/remote_mutex.o \ 127 build/libk/remote_sem.o \ 128 build/libk/remote_condvar.o \ 129 build/libk/remote_barrier.o \ 130 build/libk/memcpy.o \ 131 build/libk/htab.o \ 129 132 build/libk/xhtab.o 130 133 -
trunk/kernel/kernel_config.h
r557 r569 24 24 */ 25 25 26 #ifndef _ ALMOS_CONFIG_H_27 #define _ ALMOS_CONFIG_H_26 #ifndef _KERNEL_CONFIG_H_ 27 #define _KERNEL_CONFIG_H_ 28 28 29 29 #define CONFIG_ALMOS_VERSION "Version 1.0 / August 2018" … … 36 36 //////////////////////////////////////////////////////////////////////////////////////////// 37 37 38 #define DEBUG_BUSYLOCK 0 39 #define DEBUG_BUSYLOCK_THREAD_XP 0x3A000ULL // selected thread_xp 40 38 41 #define DEBUG_CHDEV_CMD_RX 0 39 42 #define DEBUG_CHDEV_CMD_TX 0 … … 83 86 84 87 #define DEBUG_KERNEL_INIT 0 85 #define DEBUG_KMEM_ALLOC 086 88 87 89 #define DEBUG_MAPPER_GET_PAGE 0 88 90 #define DEBUG_MAPPER_MOVE_USER 0 89 91 #define DEBUG_MAPPER_MOVE_KERNEL 0 92 93 #define DEBUG_MUTEX 0 90 94 91 95 #define DEBUG_PPM_ALLOC_PAGES 0 … … 103 107 #define DEBUG_PROCESS_ZERO_CREATE 0 104 108 109 #define DEBUG_QUEUELOCK 0 110 105 111 #define DEBUG_RPC_CLIENT_GENERIC 0 106 112 #define DEBUG_RPC_SERVER_GENERIC 0 107 113 114 #define DEBUG_RPC_KCM_ALLOC 0 115 #define DEBUG_RPC_KCM_FREE 0 108 116 #define DEBUG_RPC_PMEM_GET_PAGES 0 109 117 #define DEBUG_RPC_PMEM_RELEASE_PAGES 0 110 118 #define DEBUG_RPC_PROCESS_MAKE_FORK 0 111 119 #define DEBUG_RPC_PROCESS_SIGACTION 0 120 #define DEBUG_RPC_THREAD_USER_CREATE 0 121 #define DEBUG_RPC_THREAD_KERNEL_CREATE 0 112 122 #define DEBUG_RPC_VFS_INODE_CREATE 0 113 123 #define DEBUG_RPC_VFS_INODE_DESTROY 0 … … 119 129 #define DEBUG_RPC_VMM_GET_VSEG 0 120 130 121 #define DEBUG_SCHED_HANDLE_SIGNALS 2 131 #define DEBUG_RWLOCK 0 132 133 #define DEBUG_SCHED_HANDLE_SIGNALS 0 122 134 #define DEBUG_SCHED_YIELD 2 // must be activated by the trace() syscall 135 #define DEBUG_SCHED_RPC_CHECK 0 136 137 #define DEBUG_SEM 0 123 138 124 139 #define DEBUG_SYSCALLS_ERROR 2 125 140 126 141 #define DEBUG_SYS_CLOSE 0 142 #define DEBUG_SYS_CONDVAR 0 127 143 #define DEBUG_SYS_DISPLAY 0 128 144 #define DEBUG_SYS_EXEC 0 … … 131 147 #define DEBUG_SYS_FORK 0 132 148 #define DEBUG_SYS_GET_CONFIG 0 149 #define DEBUG_SYS_GETPID 0 133 150 #define DEBUG_SYS_ISATTY 0 134 151 #define DEBUG_SYS_IS_FG 0 … … 137 154 #define DEBUG_SYS_MMAP 0 138 155 #define DEBUG_SYS_MUNMAP 0 156 #define DEBUG_SYS_MUTEX 0 139 157 #define DEBUG_SYS_READ 0 158 #define DEBUG_SYS_SEM 0 140 159 #define DEBUG_SYS_THREAD_CANCEL 0 141 160 #define DEBUG_SYS_THREAD_CREATE 0 … … 148 167 #define DEBUG_SYS_WAIT 0 149 168 #define DEBUG_SYS_WRITE 0 150 #define DEBUG_SYS_SEM 0151 169 152 170 #define DEBUG_SPINLOCKS 0 … … 155 173 #define DEBUG_REMOTE_RWLOCKS 0 156 174 175 #define DEBUG_THREAD_DELETE 0 157 176 #define DEBUG_THREAD_DESTROY 0 158 177 #define DEBUG_THREAD_IDLE 0 159 178 #define DEBUG_THREAD_INIT 0 160 179 #define DEBUG_THREAD_KERNEL_CREATE 0 161 #define DEBUG_THREAD_KILL 0162 180 #define DEBUG_THREAD_USER_CREATE 0 163 181 #define DEBUG_THREAD_USER_FORK 0 … … 165 183 #define DEBUG_THREAD_BLOCK 0 166 184 185 #define DEBUG_VFS_ADD_CHILD 0 167 186 #define DEBUG_VFS_CLOSE 0 187 #define DEBUG_VFS_DENTRY_CREATE 0 168 188 #define DEBUG_VFS_INODE_CREATE 0 169 189 #define DEBUG_VFS_INODE_LOAD 0 170 #define DEBUG_VFS_DENTRY_CREATE 0171 #define DEBUG_VFS_OPEN 0172 190 #define DEBUG_VFS_LOOKUP 0 173 #define DEBUG_VFS_ADD_CHILD 0174 191 #define DEBUG_VFS_MAPPER_MOVE 0 175 192 #define DEBUG_VFS_MAPPER_LOAD 0 193 #define DEBUG_VFS_OPEN 0 176 194 177 195 #define DEBUG_VMM_CREATE_VSEG 0 … … 187 205 #define DEBUG_VMM_UPDATE_PTE 0 188 206 207 #define DEBUG_XHTAB 0 208 209 210 //////////////////////////////////////////////////////////////////////////////////////////// 211 // KERNEL LOCKS TYPES MNEMONICS (for debug) 212 // It must be kept consistent with the lock_name[] array defined in kernel_init.c file. 213 //////////////////////////////////////////////////////////////////////////////////////////// 214 215 #define LOCK_CLUSTER_KCM 1 // local (B) protect dynamic KCM creation in cluster 216 #define LOCK_PPM_FREE 2 // local (B) protect PPM allocator free_pages lists 217 #define LOCK_SCHED_STATE 3 // local (B) protect scheduler state for given core 218 #define LOCK_VMM_STACK 4 // local (B) protect VMM stack vseg allocator 219 #define LOCK_VMM_MMAP 5 // local (B) protect VMM mmap vseg allocator 220 #define LOCK_VFS_CTX 6 // local (B) protect vfs context state 221 #define LOCK_KCM_STATE 7 // local (B) protect KCM allocator state 222 #define LOCK_KHM_STATE 8 // local (B) protect KHM allocator state 223 #define LOCK_HTAB_STATE 9 // local (B) protect a local htab state 224 225 #define LOCK_THREAD_JOIN 10 // remote (B) protect join/exit between two threads 226 #define LOCK_VFS_MAIN 11 // remote (B) protect vfs traversal (one per inode) 227 #define LOCK_CHDEV_QUEUE 12 // remote (B) protect chdev threads waiting queue 228 #define LOCK_CHDEV_TXT0 13 // remote (B) protect access to kernel terminal TXT0 229 #define LOCK_CHDEV_TXTLIST 14 // remote (B) protect xlist of processes using same TXT 230 #define LOCK_PAGE_STATE 15 // remote (B) protect physical page descriptor state 231 #define LOCK_MUTEX_STATE 16 // remote (B) protect user mutex state 232 #define LOCK_CONDVAR_STATE 17 // remote (B) protect user condvar state 233 #define LOCK_SEM_STATE 18 // remote (B) protect user semaphore state 234 #define LOCK_XHTAB_STATE 19 // remote (B) protect a distributed xhatb state 235 236 #define BUSYLOCK_TYPE_MAX 20 237 238 #define LOCK_CLUSTER_PREFTBL 21 // local (Q) protect array of ref. processes in cluster 239 #define LOCK_PPM_DIRTY 22 // local (Q) protect PPM dirty_pages list 240 241 #define LOCK_CLUSTER_LOCALS 23 // remote (Q) protect xlist of local processes in cluster 242 #define LOCK_CLUSTER_COPIES 24 // remote (Q) protect xlist of process copies in cluster 243 #define LOCK_PROCESS_CHILDREN 25 // remote (Q) protect xlist of chidren process in process 244 #define LOCK_PROCESS_USERSYNC 26 // remote (Q) protect all lists of user synchros in process 245 #define LOCK_PROCESS_FDARRAY 27 // remote (Q) protect array of open files in owner process 246 247 #define LOCK_MAPPER_STATE 28 // local (RW) protect mapper state 248 #define LOCK_PROCESS_THTBL 29 // local (RW) protect local array of threads in a process 249 250 #define LOCK_PROCESS_CWD 30 // remote (RW) protect current working directory in process 251 #define LOCK_VFS_INODE 31 // remote (RW) protect inode state and associated mapper 252 #define LOCK_VFS_FILE 32 // remote (RW) protect file descriptor state 253 #define LOCK_VMM_VSL 33 // remote (RW) protect VSL (local list of vsegs) 254 189 255 //////////////////////////////////////////////////////////////////////////////////////////// 190 256 // HARDWARE CONFIGURATION … … 192 258 193 259 #define CONFIG_KERNEL_IDENTITY_MAP true // True for 32 bits cores 194 #define CONFIG_MAX_CLUSTERS_X 16 // max number of cluster columns195 #define CONFIG_MAX_CLUSTERS_Y 16 // max number of cluster rows196 #define CONFIG_MAX_CLUSTERS (CONFIG_MAX_CLUSTERS_X * CONFIG_MAX_CLUSTERS_Y) 260 #define CONFIG_MAX_CLUSTERS_X 16 // max number of clusters in row 261 #define CONFIG_MAX_CLUSTERS_Y 16 // max number of clusters in column 262 #define CONFIG_MAX_CLUSTERS (CONFIG_MAX_CLUSTERS_X * CONFIG_MAX_CLUSTERS_Y) 197 263 #define CONFIG_MAX_LOCAL_CORES 4 // max number of cores per cluster 198 264 #define CONFIG_MAX_INT_DEV 4 // max number of internal peripherals 199 265 #define CONFIG_MAX_EXT_DEV 8 // max number of external peripherals 200 #define CONFIG_MAX_INTERNAL_IRQS 32 // max number of HWI per ICU201 #define CONFIG_MAX_EXTERNAL_IRQS 32 // max number of PTI per ICU266 #define CONFIG_MAX_INTERNAL_IRQS 32 // max number of internal IRQs 267 #define CONFIG_MAX_EXTERNAL_IRQS 32 // max number of external IRQs 202 268 #define CONFIG_IRQS_PER_CORE 4 // number of input IRQs per core 203 269 #define CONFIG_CLUSTER_SPAN 32 // ln(phys. address space per cluster) … … 245 311 246 312 //////////////////////////////////////////////////////////////////////////////////////////// 247 // LOCKS248 ////////////////////////////////////////////////////////////////////////////////////////////249 250 #define CONFIG_RWLOCK_DELAY 50 // iterations number ( ~ 200 cycles )251 252 ////////////////////////////////////////////////////////////////////////////////////////////253 313 // DQDT 254 314 //////////////////////////////////////////////////////////////////////////////////////////// … … 276 336 //////////////////////////////////////////////////////////////////////////////////////////// 277 337 278 #define CONFIG_THREAD _MAX_PER_CLUSTER16 // max threads per cluster & process338 #define CONFIG_THREADS_MAX_PER_CLUSTER 16 // max threads per cluster & process 279 339 #define CONFIG_THREAD_DESC_SIZE 0x4000 // thread desc size (with kernel stack) 280 340 #define CONFIG_THREAD_DESC_ORDER 2 // ln( number of 4K pages ) … … 333 393 334 394 335 336 //////////////////////////////////////////////////////////////////////////////////////////// 337 // deprecated 338 //////////////////////////////////////////////////////////////////////////////////////////// 339 340 #define CONFIG_DMA_RQ_KCM_MIN 2 341 #define CONFIG_DMA_RQ_KCM_MAX 4 342 #define CONFIG_TASK_KCM_MIN 2 343 #define CONFIG_TASK_KCM_MAX 3 344 #define CONFIG_FDINFO_KCM_MIN 2 345 #define CONFIG_FDINFO_KCM_MAX 2 346 #define CONFIG_DEVFS_CTX_MIN 1 347 #define CONFIG_DEVFS_CTX_MAX 1 348 #define CONFIG_DEVFS_FILE_MIN 2 349 #define CONFIG_DEVFS_FILE_MAX 3 350 #define CONFIG_DEVFS_NODE_MIN 1 351 #define CONFIG_DEVFS_NODE_MAX 2 352 #define CONFIG_VFAT_CTX_MIN 1 353 #define CONFIG_VFAT_CTX_MAX 1 354 355 #define CONFIG_RAMFS_FILE_MIN 3 356 #define CONFIG_RAMFS_FILE_MAX 3 357 358 #define CONFIG_VFAT_FILE_MIN 3 359 #define CONFIG_VFAT_FILE_MAX 3 360 #define CONFIG_VFAT_NODE_MIN 2 361 #define CONFIG_VFAT_NODE_MAX 2 362 363 #define CONFIG_EXT2_CTX_MIN 1 364 #define CONFIG_EXT2_CTX_MAX 1 365 #define CONFIG_EXT2_FILE_MIN 3 366 #define CONFIG_EXT2_FILE_MAX 3 367 #define CONFIG_EXT2_NODE_MIN 2 368 #define CONFIG_EXT2_NODE_MAX 2 369 370 #define CONFIG_VFS_CTX_MIN 1 371 #define CONFIG_VFS_CTX_MAX 1 372 #define CONFIG_VFS_INODE_MIN 3 373 #define CONFIG_VFS_INODE_MAX 6 374 #define CONFIG_VFS_FILE_MIN 3 375 #define CONFIG_VFS_FILE_MAX 5 376 377 #define CONFIG_SEMAPHORE_MIN 2 378 #define CONFIG_SEMAPHORE_MAX 2 379 #define CONFIG_CONDTION_VAR_MIN 2 380 #define CONFIG_CONDTION_VAR_MAX 2 381 #define CONFIG_BARRIER_MIN 2 382 #define CONFIG_BARRIER_MAX 2 383 #define CONFIG_RWLOCK_MIN 2 384 #define CONFIG_RWLOCK_MAX 2 385 #define CONFIG_WAITQUEUEDB_MAX 2 386 #define CONFIG_WAITQUEUEDB_MIN 2 387 #define CONFIG_RADIX_NODE_MIN 10 388 #define CONFIG_RADIX_NODE_MAX 30 389 #define CONFIG_VM_REGION_MIN 1 390 #define CONFIG_VM_REGION_MAX 2 391 #define CONFIG_BLKIO_MIN 4 392 #define CONFIG_BLKIO_MAX 8 393 #define CONFIG_KEYREC_MIN 2 394 #define CONFIG_KEYREC_MAX 2 395 //////////////////////////////////////////////////////////////////////////////////////////// 396 // INSTRUMENTATION 397 //////////////////////////////////////////////////////////////////////////////////////////// 398 399 #define CONFIG_INTRUMENTATION_SYSCALLS 0 400 401 395 402 396 403
Note: See TracChangeset
for help on using the changeset viewer.