stage4_ia32_pc.asm

The bootstrap user module

Although replacing this module with another can allow the user to run an effectively different operating system, this is currently the default.

Checks and loads all modules present in the ramdisk and starts each of them

Author

Marcel Sondaar

License

Educational purposes

Summary
stage4_ia32_pc.asmThe bootstrap user module
Functions
ELF_LoadParses an elf file in memory
ELF_LoadsectionParses an elf section and loads it into memory
ELF_AdjustsectionParses an elf relocation section and loads it into memory
ELF_CopysectionCopies a section from an ELF file to newly allocated memory
ELF_AllocSectionParses an elf bss section header, allocates it and zeroes it
Todo’s
get task entry point and create threads for all modules

Functions

ELF_Load

Parses an elf file in memory

in

  • EBX = pointer to file in memory
  • EAX = length of file

out

unknown

destroyed

unknown

ELF_Loadsection

Parses an elf section and loads it into memory

in

  • EBX = image offset
  • EDX = current section header offset

out

unknown

destroyed

unknown

ELF_Adjustsection

Parses an elf relocation section and loads it into memory

in

  • EBX = image offset
  • EDX = current section header offset

out

unknown

destroyed

unknown

ELF_Copysection

Copies a section from an ELF file to newly allocated memory

in

  • EBX = image offset
  • EDX = current section header offset

out

unknown

destroyed

EAX, EDI

ELF_AllocSection

Parses an elf bss section header, allocates it and zeroes it

in

  • EBX = image offset
  • EDX = current section header offset

out

unknown

destroyed

EAX, EDI

Todo’s

get task entry point and create threads for all modules