/** * @file * F00l 0S REFERENCES ========== http://www.brokenthorn.com/Resources/OSDev17.html http://www.jamesmolloy.co.uk/tutorial_html/9.-Multitasking.html http://pdos.csail.mit.edu/6.828/2011/labs/lab6/ http://pdos.csail.mit.edu/6.828/2011/xv6.html http://www.nongnu.org/ext2-doc/ http://www.osdever.net/tutorials/view/multiprocessing-support-for-hobby-oses-explained http://forum.osdev.org/viewtopic.php?f=1&t=10944 http://wiki.osdev.org/Virtual_8086_Mode http://wiki.xomb.org/index.php?title=ACPI_Tables http://wiki.osdev.org/Hosted_GCC_Cross-Compiler https://sourceware.org/newlib/ and many many more... */ #ifndef FOOLOS_CONFIG_H #define FOOLOS_CONFIG_H #define VESA_MAX_WIDTH 1920 #define VESA_MAX_HEIGHT 1080 #define DISABLE_E1000 //#define FOOLOS_UNIT_TESTING // Run Unit Tests //#define FOOLOS_LOG_OFF // Turn off logging (disables serial port alltogether) //#define FOOLOS_COLORLESS // Turn off colors in log //#define LOG_SYSCALLS #define HIDE_FIXME #define FOOLOS_APIC_FREQ 60 // how many apic ticks per second #define MAX_MOUNTS 10 #define BIN_INIT "/bin/init" #define VESA_FONT_PATH "/doc/fonts/binfont.bin" #define FIFO_MAX_RINGBUFFERS 20 #define MAX_FIFOS 20 #define MAX_FD 20 #define MAX_TASKS 100 #define MEM_PRINT_MEMORYMAP #define KMALLOC_MEM_SIZE (1024*1024*8) // 8MB for in kernel-memory #define KMALLOC_BLOCK_SIZE (1024*4) // 4096 per block #define NUMBER_SPINLOCKS 16 #define SPINLOCK_LOG 0 #define SPINLOCK_ALLOC 1 #define SPINLOCK_PID 2 #define SMP_MAX_PROC 16 // 16 (together with bsp) We can currently only address a maximum of 16 cpus via ipis! // Virtual Memory Locations // // REMEMBER THAT THE STACKS GROW DOWNWARDS // // We leave some space around them // 1 page 0x1000 bytes // 8192 pages = 0x2000000 bytes // minimal space between user and kernel pages 1024 pages! #define VMEM_KERNEL 0x00000000 /// identity mapped #define VMEM_KERNEL_PAGES (1024*16) // 64mb // VMEM_KERNEL END 0x02000000 #define VMEM_USER_ENV 0x07000000 // 1 page / per user process //#define VMEM_USER_PROG_PAGES (256*16) //#define VMEM_USER_PROG_PAGES (1024*16) // 64 megs #define VMEM_USER_PROG_PAGES (1024*8) // 32megs #define VMEM_USER_PROG 0x08048000 // / per user process (usual entry: 0x8048080) #define VMEM_USER_STACK_PAGES (1024*16) // 64 megs / per thread #define VMEM_USER_STACK_TOP 0xF0000000 // s / per thread #define VMEM_LAPIC 0xF0005000 // 1 pages / identity mapped #define VMEM_IOAPIC 0xF0006000 // 1 pages / identity mapped #define VMEM_CPU_PRIVATE 0xF000A000 // 4 pages / per cpu #define VMEM_CPU_STACK_PAGES 4 // 4 pages / per thread #define VMEM_CPU_STACK_TOP 0xF3000000 // 4 pages / per cpu #define VMEM_COPY_PAGE 0xF4000000 // 1 page / temporery map-in tables for copying //TODO: do not hardcode in crt0.s!!!! #define VMEM_USER_NEWLIB 0xF5000000 // 1 page / newlib reentrancy struct. 1 per thread #define VMEM_USER_FRAMEBUFFER 0xF5100000 #define VMEM_USER_FRAMEBUFFER_PAGES 300// 4*320*480 bytes per app (one extra?) #define VMEM_FRAMEBUFFER 0xF6000000 // identity mapped #define VMEM_FRAMEBUFFER_PAGES (1024*8) // 32mb #define VMEM_EXT2_RAMIMAGE 0xF8000000 // identity mapped #define VMEM_EXT2_PAGES (1024*26) // 128mb #endif