mirror of
https://github.com/reactos/reactos.git
synced 2024-08-17 00:48:51 +00:00
![Brian Palmer](/assets/img/avatar_default.png)
New .ini file format (sort of) - changed some parameter names, etc. More efficient .ini file parsing code More efficient use of memory, smaller image file Total rewrite of file system code (the old stuff sucked) VFAT Long File Names now supported! ReactOS is the only boot type supported currently, disabled all others (temporarily) svn path=/trunk/; revision=2372
43 lines
2.3 KiB
Plaintext
43 lines
2.3 KiB
Plaintext
FreeLoader notes
|
|
|
|
To build FreeLoader you will need DJGPP because Mingw32 doesn't support 16-bit code
|
|
FreeLoader does not currently work with extended partitions.
|
|
Linux booting support needs to be added.
|
|
ext2 filesystem support needs to be added.
|
|
The MessageBox() function needs to not allocate memory. Because it gets called when memory allocation fails.
|
|
|
|
Old memory layout:
|
|
|
|
0000:0000 - 0000:0FFF: Interrupt vector table & BIOS data
|
|
0000:1000 - 0000:6FFF: Real mode stack area
|
|
0000:7000 - xxxx:xxxx: FreeLoader program & data area
|
|
xxxx:xxxx - 6000:0000: Protected mode stack area & heap
|
|
6000:0000 - 6000:C000: Filesystem data buffer
|
|
6000:C000 - 7000:0000: FREELDR.INI loaded here
|
|
7000:0000 - 7000:FFFF: scratch area for any function's use (ie sector buffer for biosdisk()) - can be overwritten by any function
|
|
8000:0000 - 9000:FFFF: fat table entry buffer
|
|
A000:0000 - FFFF:FFFF: reserved
|
|
|
|
|
|
New memory layout:
|
|
|
|
0000:0000 - 0000:0FFF: Interrupt vector table & BIOS data
|
|
0000:1000 - 0000:6FFF: Real mode stack area
|
|
0000:7000 - 0000:7FFF: Unused
|
|
0000:8000 - xxxx:xxxx: FreeLoader program & data area
|
|
xxxx:xxxx - 8000:FFFF: Random memory allocation heap
|
|
9000:0000 - 9000:7FFF: Disk read buffer for BIOS Int 13h
|
|
9000:8000 - 9000:8FFF: Screen save buffer passed in from boot sector
|
|
9000:9000 - 9000:FFFF: Protected mode stack area
|
|
A000:0000 - FFFF:FFFF: reserved
|
|
|
|
|
|
FreeLoader Boot Process
|
|
|
|
Boot Sector
|
|
|
|
The BIOS loads the boot sector at 0000:7C00. The FAT32 boot sector relocates itself higher in memory at 9000:0000 and loads it's extra sector at 9000:0200 and then looks for freeldr.sys on the file system. Once found it loads freeldr.sys to 0000:7E00 and then jumps to it's entry point at 0000:8000. The FAT12/16 boot sector does no relocation, it just searches for the freeldr.sys and loads the first 512 bytes to 0000:7E00. This extra code enables it to fully navigate the file allocation table. Then it loads freeldr.sys to 0000:7E00 and jumps to it's entry point at 0000:8000. Before FreeLoader gets control the boot sector saves the screen contents to a buffer at 9000:8000 and the cursor x & y position to bytes at 9000:8FA0 & 9000:8FA1 respectively.
|
|
|
|
FreeLoader Initialization
|
|
|
|
When FreeLoader gets control it saves the boot drive, passed to it in the DL register, and sets up the stack, enables protected mode, and calls BootMain(). |