System startup process

Learning link:

http://www.xuetangx.com/courses/course-v1:TsinghuaX+30240243X+sp/courseware/1d95cdf6f0e943448801e538b039300a/ffca4e1f29a145338461662b9b37fcf2/

The approximate process of system startup: power-on-->BIOS-->loader-->kernel image

It can be subdivided as follows:

Initialization of CPU

Read the first instruction from 0xfffff0 after the CPU is powered on and stabilized

  CS:IP = 0xf000:fff0

  The first instruction is a jump instruction

CPU initialization state is 16-bit real mode

  CS: IP is a 16-bit register

  Instruction pointer PC=16*CS+IP

  The maximum address space is 1M

BIOS initialization process

  Hardware self-test POST

  Detect the presence and working status of key components such as memory and graphics cards in the system

  Find and execute the BIOS of interface cards such as graphics cards to initialize the device

  Execute the system's BIOS to perform system detection

    Detect and configure Plug and Play devices installed in the system

  Update Extended System Configuration Data ESCD in CMOS

  Boot from a floppy disk, hard disk, or CD in the specified boot order

Master Boot Record MBR format

  Startup code: 446 bytes

    Check partition table correctness

    Load and jump to the bootloader on disk

  Hard disk partition table: 64 bytes

    Describe partition status and location

    Each partition description information occupies 16 bytes

  End marker: 2 bytes (55AA)

    Valid flags for the master boot record

Partition Boot Sector Format

  Jump instruction: jump to the startup code

    platform-specific code

  File volume header: file system description information

  Startup Code: Jump to Loader

  End Mark: 55AA

 Refinement of the loader

System startup specification

  BIOS

    Program for fixing the phone to the motherboard of the computer

    Including system settings, self-checking procedures and system self-starting procedures

    BIOS-MBR,BIOS-GPT,PXE

  UEFA

    interface standard

    Consistent OS startup services on all platforms

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324987600&siteId=291194637