Note 1: From MINIX 2.0 startup process angle, read source code.

xiaoxiao2021-03-06  42

MiniX boot process ricky zhangrickycheung@21cn.com2005-02-09

The following source file defaults under / usr / src / boot

First, the PC is started, the ROM BIOS automatically loads 1 fan of Hard Disk or FLOPPY, to 0x0000: 0x

7C

00.

Second, MasterBoot.s (hard disk) or bootblock.s (floppy) is loaded to 0x0000: 0x

7C

00, then one of both to load the secondary boot. Secondary boot is loaded by boothead.s (one of the two to BootSeg: bootoff 0x1000: 0x0030), bootimage.c, boot.c, rawfs.c (including call without fs, accessing the MINIX file format), four Link into a image.

Third, the secondary boot loads the kernel image, the latest image in the Minix file system

Waiting to be extended: Read the secondary boot.

MiniX kernel startup process

The following source file defaults in / usr / src / kernel /

First, MPX386.s, establish the Stack of the C program, prepare for the CSTART for calling Start.c

Second, call CStart, call protect.c's prot_init initialize GDT and establish IDT

Third, return MPX386.s, call main.c's main ()

Fourth, MAIN, initialize 8259 chip INTR_INIT (1), initialize memory MEM_INIT (), initialize the process table,

Description:

Process table (PROC.H) consists of three parts:

Part 1: Task process, where the TTY console has the highest priority, TASK's main data structure Table.c definition (Struct TaskTab)

Part 2: Server process, where FS, MM, INET, and IIT

Part 3: User process

Priority by large to the horizon

Waiting to be extended: Read Initial Idt and GDT Principles

转载请注明原文地址:https://www.9cbs.com/read-58931.html

New Post(0)