gpt4 book ai didi

operating-system - 引导加载程序背后的理论

转载 作者:行者123 更新时间:2023-12-04 08:30:03 24 4
gpt4 key购买 nike

关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。












想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。

4年前关闭。




Improve this question




我已经从 osdev 下载了几个引导加载程序并成功加载了内核。但现在我想学习引导加载程序背后的理论。我想知道为什么系统会启动以及引导加载程序代码背后的所有内容。谁能给我一个链接或一本书的链接?提前致谢。
系统是 x86。

最佳答案

https://pdos.csail.mit.edu/6.828/2014/xv6/book-rev8.pdf

关于附录 B,它在第一段中给出了一个简短的概述:

When an x86 PC boots, it starts executing a program called the BIOS, which is stored in non-volatile memory on the motherboard. The BIOS’s job is to prepare the hardware and then transfer control to the operating system. Specifically, it transfers control to code loaded from the boot sector, the first 512-byte sector of the boot disk.The boot sector contains the boot loader: instructions that load the kernel int o memory. The BIOS loads the boot sector at memory address 0x7c00 and then jumps (sets the processor's %ip) to that address. When the boot loader begins executing, the processor is simulating an Intel 8088, and the loader's job is to put the processor in a more modern operating mode, to load the xv6 kernel from disk into memory, and then to transfer control to the kernel. The xv6 boot loader comprises two source files, one written in a combination of 16-bit and 32-bit x86 assembly (bootasm.S;(8900)) and one written in C (bootmain.c;(9000)).

关于operating-system - 引导加载程序背后的理论,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4069808/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com