boot.s is loaded at 0x7c00 by the bios startup routines and moves itself out of the way to address 0x90000, and jumps there.It then loads the system at 0x10000, using BIOS interrupts. Thereafter it disables all interrupts,moves the system down to 0x0000 , changes to protected mode and calls the start of system. The system …
Monthly Archives: August 2011
boot.s (copy) 0.01 kernel size and paging
currently system is atmost 8*65536 bytes long. This should be no problem even in the future. I want to keep it simple.This 512 size kernel kB kernel size should be enough – infact more would mean we should have to move not just these startup routines, but also do something about the cache memory(block I/O …
Continue reading “boot.s (copy) 0.01 kernel size and paging”
searching for call …
$grep -r setup * boot/head.s: call setup_idt boot/head.s: call setup_gdt boot/head.s: mov %ax,%es # reloaded in ‘setup_gdt’ boot/head.s: * setup_idt boot/head.s:setup_idt: boot/head.s: * setup_gdt boot/head.s:setup_gdt: boot/head.s: jmp setup_paging boot/head.s:setup_paging: include/linux/sys.h:extern int sys_setup(); include/linux/sys.h:fn_ptr sys_call_table[] = { sys_setup, sys_exit, sys_fork, sys_read, include/unistd.h:#define __NR_setup 0 /* used only by init, to get system going */ init/main.c:static inline …
IDT interrupt descriptor table
The Interrupt Descriptor Table (IDT) is an array of 8 byte interrupt descriptors in memory devoted to specifying (at most) 256 interrupt service routines. The first 32 entries are reserved for processor exceptions, and any 16 of the remaining entries can be used for hardware interrupts. The rest are available for software interrupts. source : …
LEA instruction
The lea instruction places the address specified by its second operand into the register specified by its first operand. Note, the contents ofthe memory location are not loaded, only the effective address is computed and placed into the register. This is useful for obtaining a pointer into a memory region. source: http://www.cs.virginia.edu/~evans/cs216/guides/x86.html
setup_idt …
setup_idt: lea ignore_int,%edx movl$ox00080000,%eax movw %dx,%ax movw $0x8E00,%dx
Bochs
snippet 1 $apt-cache search bochs grub-firmware-qemu – GRUB firmware image for QEMU vgabios – VGA BIOS software for the Bochs and Qemu emulated VGA card bochs – IA-32 PC emulator bochs-doc – Bochs upstream documentation bochs-sdl – SDL plugin for Bochs bochs-svga – SVGA plugin for Bochs bochs-term – Terminal (ncurses-based) plugin for Bochs bochs-wx …
ELF spec. types of object files
A relocatable file holds code and data suitable for linking with other object files to create an executable or a shared object file. An executable file holds a program suitable for execution; the file specifies how exec(BA_OS) creates a program’s process image. A shared object file holds code and data suitable for linking in two …
stackoverflow and … other links
Links http://stackoverflow.com/questions/43180/how-to-get-started-in-operating-system-development http://www.osix.net/modules/article/?id=359 http://www.nondot.org/sabre/os/articles
Standalone Device Drivers in Linux Theodore Ts’o July 1, 1999
Linguistic defer Recommended Reading 1. Linux Kernel In A Nutshell 2. Link to the above book at oreilly Website. 3. GNU Make Manual