Bootf: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
m linkfixes mostly
Change 'bootstrap' to 'bootloader' - to match the link name.
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
'''Bootf''' is a small [[FAT12]] floppy [[bootloader|bootstrap]] for protected mode OS images, created by John Fine. It is also a coding sample for cramming lots of operations into very little code. The boot code on a FAT diskette or FAT partition is limited to 0x1C0 bytes (0x3E bytes are reserved at the beginning and 0x2 at the end of a 0x200 byte sector). BOOTF.ASM fits with 0x1A bytes to spare.
'''Bootf''' is a small [[FAT12]] floppy [[bootloader|bootloader]] for protected mode OS images, created by John Fine. It is also a coding sample for cramming lots of operations into very little code. The boot code on a FAT diskette or FAT partition is limited to 0x1C0 bytes (0x3E bytes are reserved at the beginning and 0x2 at the end of a 0x200 byte sector). BOOTF.ASM fits with 0x1A bytes to spare.


== Features ==
== Features ==
Line 25: Line 25:
== See Also ==
== See Also ==
=== External Links ===
=== External Links ===
* [http://redir.no-ip.org/mirrors/my.execpc.com/~geezer/johnfine/bootf02.zip Bootf02.zip] (Mirror)
* [http://files.osdev.org/mirrors/geezer/johnfine/bootf02.zip Bootf02.zip] (Mirror)
* [http://redir.no-ip.org/mirrors/my.execpc.com/~geezer/johnfine/index.htm 'Official' Site] (Mirror)
* [http://files.osdev.org/mirrors/geezer/johnfine/index.htm 'Official' Site] (Mirror)
* [http://redir.no-ip.org/mirrors/my.execpc.com/~geezer/ Chris Giese OSDev]
* [http://redir.no-ip.org/mirrors/my.execpc.com/~geezer/ Chris Giese OSDev] (Mirror)


[[Category:Bootloaders]]
[[Category:Bootloaders]]

Latest revision as of 04:21, 28 July 2009

Bootf is a small FAT12 floppy bootloader for protected mode OS images, created by John Fine. It is also a coding sample for cramming lots of operations into very little code. The boot code on a FAT diskette or FAT partition is limited to 0x1C0 bytes (0x3E bytes are reserved at the beginning and 0x2 at the end of a 0x200 byte sector). BOOTF.ASM fits with 0x1A bytes to spare.

Features

  • Enables the A20 gate.
  • Switches to big real mode.
  • Computes the locations of the FAT, the root directory and the first cluster.
  • Reads in the root directory.
  • Scans the root directory for a specific file (KERNEL.BIN).
  • Reads in the FAT.
  • Reads the file (KERNEL.BIN) to RAM starting at physical 1Mb.
  • Builds two page tables and one page directory mapping:
    • The first 4Mb linear to the first 4Mb physical.
    • Linear FF800000 (where all my protected mode images start) to physical RAM starting at 1Mb.
    • Self map the page directory to the end of linear memory.
  • Switch to protected mode with paging turned on.
  • JMP to KERNEL.BIN at linear FF800000.

Limitations

  • Runs only on a 386+.
  • The FAT structure must be the first thing on the drive (no partitions). It just uses "reserved" sectors before the FAT, not "hidden" etc.
  • The sector size must be 512 bytes.
  • There are less than 256 sectors per fat (safe, since FAT12 has less than 4096*1.5 bytes per FAT).
  • LBN of root directory less than 65536 (safe in unpartitioned FAT12).

See Also

External Links