Core execution head program. S

Source: Internet
Author: User
Function
  • Define data segment and text segment
  • Re-manually initialize the GDT table, IDT table, TSS table structure
  • Initialize page table and page catalog data in a single page table

    • In the page directory, in fact, the address is 0x1000, initialize the page directory, a page directory occupies the page table of the remaining data values using the zero fill, a page table size is divided into (2MB, 4MB, 8MB, etc., generally larger is prone to cause page particles too fragmented)
  • In the text snippet, load the data into the register using LGDT, Lidt, and load CR3, etc.
  • After initialization, the code that directs the CPU to the real kernel via a jump instruction is the address of a function.
  • Note: for head. S, we know that he is in the kernel of this executable file, and is at the front, so we need to put it in the link to the top of the kernel code

Core execution head program. S

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.