Project name: kornOS-X
Target: Developing fully functional multiuser, multitaskting, 32bit OS.
Platform:80486+


Toolset: DJGPP (gcc v3.4.3)
NASM (v0.98.39)
GNU ld (v2.15)
Eclipse SDK (with CDT)
M$ Virtual PC (build 582)
real PCs: Intel Celeron 366MHz, 288MB (don't ask)
               PII 400MHz, 128MB

Features:
  • Bootstrap with FAT12 support
  • Loader with FAT12 support, 80486+ and RAM detection
  • Kernel working in PMode over the 1MB limit
  • Paging enabled
  • Interrupts enabled
       -dynamic PIC reconfiguration
  • CMOS RTC periodic interrupt enabled
  • byte * malloc(dword );
       -via syscall sbrk
       -on a task level (not kernel)
  • Hardware detection:
       -RAM
       -floppy drives
       -HDDs
       -PCI devices


  • Details:


    Boot process (3 level)
       
  • Bootstrap

  • Moves itself at 0x9000
  • Loads FAT12 table at 0x9000:0x0200
  • Loads FAT12 RootDir at 0x9000:0x1400
  • Loads Loader.bin at 0x9000:0x3000 and jumps to it
  •    
  • Loader

  • Checks for 80486+ processor
  • Uses the old FAT12 structures at 0x9000 and loads the kernel at 0x1000:0x0000
  • Enables the A20 Gate
  • Loads temp GDT
  • Starts PMode
  • Moves the kernel at 0x100000
  • Jumps far to activate the GDT at 0x8:0x100000


  • PCI
    The PCI detection mechanism uses the PCI BIOS via the BIOS32 Service Directory. Thats why it won't work at all under M$ Virtual PC. Using a list of device IDs and vendor IDs (I use the one from Jim Boemler.Thanks!) and successive calls to the FIND_PCI_DEVICE function we discover every device present. For more information check the source here.





    Some References:
    "Understanding the Linux Kernel", Daniel P. Bovet, Marco Cesati, ISBN 0-596-00002-2
    "PC Hardwarebuch", Hans-Peter Messmer, ISBN 3-8273-1461-5
    "The indispensable PC Hardware Book", Hans-Peter Messmer, ISBN 0-201-59616-4
    BonaFide
    Mega-Tokyo OSfaq
    The Operating Systems Resource Center
    www.x86.org
    Ralf Brown's Interrupt List
    BIOS Central

    I suggest you read these too:
    Linkers and Loaders
    Smashing The Stack For Fun And Profit