Archive / / / 2002-12-01-osnotes1.txt
2002-12-01 17:25:51 UTC
previous next
boot/boot.asm boot/screen.c services: hard drive sound card network card pcmcia pci isa usb video card floppy drive cd-rom dvd-rom cd-rw atomic clock keyboard mouse RAID filesystem windowing system sockets program does #include <api/service.h> kernal does: booting process/thread management + stuff like mutexes and semiphores memory management service management IPC kernel heiarchy: boot/boot.asm - Jumps to kinit(); boot/init.c - Contains kinit(); boot/multiboot.c - Parses multiboot structure and saves it into a different structure boot/multiboot.h - Defines multiboot_info_t boot/screen.h boot/screen.c - Allows printing to screen before drivers loaded memory/memstack.c 1. Kernal loaded at 0x100000 VMA LMA 0x100000 0x100000 boot.text 0x100001 0x100001 boot.data 0xF0000000 0x101000 .text 0xF0000001 0x101001 .data 0xF0000002 0x101002 .bss 2. boot.* executes: a. Parse multiboot structure c. Create free space stack b. Create GDT, LDT, etc. with kernel loaded at 0x100000 AND 0xF0000000 c. Activate paging d. Jump to bootup code in .text 3. Start loading modules 4. Start using screen module instead of boot_printf (which is loaded at 0x100000) and then unload kernel from 0x100000 4. Start module specified as init= on command line Kernel memory manager used to get space for modules http://modeemi.cs.tut.fi/~tuomov/ion/ Modules can be loaded as: -Seperate processes -A kernel thread -A dynamically linked library Shared Object: * .text loaded into kernel area as user-mode/read-only code and .data/.bss area stored in each process that uses it (Same featuures as location indepenant code but with out the global offset table stuffs). One copy for all processes that use it. * .text and .data loaded in process that uses it. One copy for each process * Used as a seperate thread?