From: Saravanan Jayakumar
I am trying to understand the freeloader code in ReactOS.Can
anyone tell me from which file i need to start,any logical
order?. Your suggestions are greatly appreciated. regards Jay
There are 2 entry points, one for when you install freeldr in the bootsector
and one for when you call freeldr as a multiboot kernel from Grub. Both of
these entry points are in reactos/boot/freeldr/freeldr/arch/i386/arch.S (the
first entry point is at the top of the file, the second at MultibootEntry).
After doing some setup, both transfer control to BootMain() in
reactos/boot/freeldr/freeldr/freeldr.c. You should be able to pick up the
flow from there.
We have 2 sets of low-level routines for e.g. disk I/O. One set is for
normal PCs, the other for the Xbox. We're using a function table wrapped by
macros to call these routines. All these macros start with "Mach", e.g.
MachDiskReadLogicalSectors(). For a normal PC, this will translate to a call
to PcDiskReadLogicalSectors().
Gé van Geldorp.