Memory Management at Boot Time

As far as memory management of linux at boot time,
the code in ${linux src}/arch/i386/arch/setup.S is
executed to get information of memory.

There are three memory detection methods,

  • e820h BIOS interruption
  • e801h BIOS interruption
  • 88h old sytle BIOS interruption
  • Each interruption is invoked sequencially.

    Then, temporary Global Descriptor Table is setup
    to cover all address space, which is 4Gbytes space the 32bit
    processor can access.

    And jump to startup_32 defined in {$linux src}/arch/i386/kernel/head.S.
    This jump is done with "jmpi" instruction.

    From startup_32

    After Global Descriptor Table is setup,
    we should setup "Global Directory Table" and "Directory Table Entry"
    to translate virtual linear address into physical memory address.

    Page Initialization at boot time is done for pages
    that is required for kernel setup.

    Then, enable paging to start the Paging Unit in processor.
    From this point, processor uses Paging Unit to translate virtual
    address to physical address.

    When these temporary memory setup is done,
    call start_kernel() that is writen in C code.

    In start_kernel(), many setup functions are invoked.
    And in these setup functions, there is a setup frunction
    for memory management, which makes kernel work as kernel
    as far as memory management.



    top
    inserted by FC2 system