The role of BIOS

Source: Internet
Author: User

<title>The role of BIOS</title> The role of BIOS

Real Mode : 20-bit, 1M of memory can directly access the BIOS and hardware, no paging and multitasking, a boot is real mode

BIOS : Boot by hardware, he is located in 0xffff0, hardware power will automatically execute his cs:0xf000,ip:fff0–> 0xffff0

Protection Mode : The pattern that we normally use. In real mode IP is 16 bits, in protected mode, IP becomes 32 bit, called EIP

The role of BIOS startup, detecting hardware, and More importantly , creating interrupt vector tables and interrupt service programs in memory

1k:0x0 ~ 0X3FF
256b:0x0 ~ 0xFF

Interrupt vector table in memory:
0x00000 ~ 0x003ff: Interrupt vector table
0x00400 ~ 0x004ff:bios Data area
0x0e05b ~ 0x0ffff: Several interrupt service programs related to interrupt vector table

Interrupt vector table has 1 K, the other contains 256 interrupt vectors, each interrupt vector table occupies 4K, which contains CS and IP values
Each interrupt vector points to a specific interrupt service program

Computer load OS kernel 3 times

    • The BIOS interrupts int 0x19 to load the contents of the first sector bootsect into memory
    • 2 and 3, under the command of Bootsect, load the contents of the next 4 sectors and the subsequent 240 sectors into memory, respectively.

Other BIOS interrupts 0x19 are initiated by the computer's BIOS. Interrupt vector 0x19 points the CPU to 0X0E6F2 (there are several interrupt service programs associated with the interrupt vector table in 0x0e05b ~ 0x0ffff, where the 0x19 corresponding interrupt service program is 0XE6F2). His role is to:
Load the first section of the floppy disk program (512B) into the specified location in memory

Interrupt vector tables Interrupt Verctor table: is an important part of the real-mode interrupt mechanism, recording the memory address of all interrupts corresponding to the interrupt service program
Interrupt Services Interrupt Service: A program with a specific function

After the int 0x19 executes, the contents of the first sector are copied to the memory 0x07c00

The content inside this sector is the Linux boot program, which is the bootsect boot sector, and then Bootsect executes the second batch in the floppy disk, and the third batch of code is loaded into memory

The role of BIOS

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.