Bootf: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
Created |
m linkfixes mostly |
||
Line 1: | Line 1: | ||
Bootf is a small FAT12 floppy 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. |
'''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. |
||
== Features == |
== Features == |
||
* Enables the A20 gate. |
* Enables the A20 gate. |
||
* Switches to big real mode |
* Switches to big real mode. |
||
* Computes the locations of the FAT, the root directory and the first cluster. |
* Computes the locations of the FAT, the root directory and the first cluster. |
||
* Reads in the root directory |
* Reads in the root directory. |
||
* Scans the root directory for a specific file (KERNEL.BIN) |
* Scans the root directory for a specific file (KERNEL.BIN). |
||
* Reads in the FAT |
* Reads in the FAT. |
||
* Reads the file (KERNEL.BIN) to RAM starting at physical 1Mb. |
* Reads the file (KERNEL.BIN) to RAM starting at physical 1Mb. |
||
* Builds two page tables and one page directory mapping: |
* Builds two page tables and one page directory mapping: |
||
** The first 4Mb linear to the first 4Mb physical |
** The first 4Mb linear to the first 4Mb physical. |
||
** Linear FF800000 (where all my protected mode images start) to physical RAM starting at 1Mb |
** 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 |
** Self map the page directory to the end of linear memory. |
||
* Switch to protected mode with paging turned on |
* Switch to protected mode with paging turned on. |
||
* JMP to KERNEL.BIN at linear FF800000 |
* JMP to KERNEL.BIN at linear FF800000. |
||
== Limitations == |
== Limitations == |
||
* Runs only on a 386+ |
* 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 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 |
* 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). |
* 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) |
* LBN of root directory less than 65536 (safe in unpartitioned FAT12). |
||
== |
== See Also == |
||
=== External Links === |
|||
⚫ | |||
* [http://my.execpc.com/~geezer/johnfine/ |
* [http://redir.no-ip.org/mirrors/my.execpc.com/~geezer/johnfine/bootf02.zip Bootf02.zip] (Mirror) |
||
⚫ | |||
* [http://redir.no-ip.org/mirrors/my.execpc.com/~geezer/ Chris Giese OSDev] |
|||
[[Category:Bootloaders]] |
[[Category:Bootloaders]] |
Revision as of 09:53, 29 October 2008
Bootf is a small FAT12 floppy 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.
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
- Bootf02.zip (Mirror)
- 'Official' Site (Mirror)
- Chris Giese OSDev