JOS-LAB1 Boot the PC

Source: Internet
Author: User

Start up flow of PC:

1. BIOS

A. At the very beginning, BIOS would load 512-byte boot sector into [0X7C00,0X7DFF];

B. Then set cs:ip = 0000:7c00

2. Boot Loader

A. Switch from real mode to protected mode (+ bit), mainly by setting GDTR.

B. Load kernel image from hard disk.

(Void (*) (void)) (Elfhdr->e_entry ()) (); Check the kernel image, it ' s 0x0010000c

3. Kernel

A. In Kern/entry. S, it'll turn on the MMU first, set CR3 & CR0 with Entry_pgdir

B. Set esp and EBP.

C. I386_init ()
I386_init ()
|--> Cons_init ()
| |--> Cga_init ()
| |--> Kbd_init ()
| |--> Serial_init ()
|--> Mem_init ()
|--> Env_init ()
|--> Trap_init ()
|--> Mp_init ()
|--> Lapic_init ()
|--> Pic_init ()
|--> Boot_aps ()
|--> Env_create ()


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.