问题描述
这个问题的表述和
相关文章:https://neosmart.net/wiki/mbr-boot-process/
但是,
在 UEFI 的情况下,我很难掌握这个顺序.
我已经浏览了 UEFI 规范文档和 OS Dev UEFI 部分.
UEFI:https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf
操作系统开发:https://wiki.osdev.org/UEFI
似乎这个 efi_main() 函数在 BIOS 模式下相当于 0x7C00 的点.但是如何?
UEFI 固件是否在做类似的事情
jmp efi_main
在完成一系列工作之后?
第一季度.UEFI 启动模式的流程如何?
第二季度.有没有一个很好的 UEFI 示例或教程,比如基于 BIOS 的 Brokenthorn?
附言
我看到了英特尔在 2020 年取消 BIOS 支持的消息(已经过去了几年).
https:///www.anandtech.com/show/12068/intel-to-remove-bios-support-from-uefi-by-2020
它说
一旦 CSM 被移除,新平台将无法运行 32 位操作系统,无法使用相关软件(至少在本地),也无法使用旧硬件,例如 RAID HBA(因此连接到这些 HBA 的旧硬盘驱动器)、网卡,甚至缺少 UEFI 兼容 vBIOS 的显卡(2012 年至 2013 年之前推出)
第三季度.这是否意味着与 BIOS 启动相关的所有内容(0x7C00 处的第一阶段引导加载程序和 BIOS 中断等)都将被弃用?
Q1:
UEFI 启动顺序分为多个阶段",您可以找到每个阶段的一些基本信息 此处.
为了加载 SEC 阶段,SecCore 位于内存地址 0xFFFFFFF0(该地址映射到 UEFI 闪存),因此是重置向量的目标.
在 dxe 阶段之后,可以在加载操作系统之前调用多个 UEFI 应用程序.
第二季度:
如果您想对 UEFI 的工作原理有一个基本的了解,我会推荐超越 BIOS"一书.
如果您想学习如何编写 UEFI 驱动程序/应用程序,我建议您查看 EDK2 存储库 (以及如何用它构建应用程序),更多细节可以在规范中找到.
The expression of this question is same as What is UEFI's boot sequence?, but it doesn't seem what I want. I'd like to know UEFI sequence in instruction perspective.
For example, in case of BIOS boot mode, in simplified fashion,
- Computer power is on.
- Content of BIOS chip attached to motherboard performs the POST(Power On Self Test) process.
- BIOS searches for MBR(Master Boot Record)s, which has boot signature in preset boot device order.
- If MBR with boot signature is found, load the first sector (512 bytes) of the device to DRAM, address 0x7C00. This loaded sector (512 bytes) becomes the "first stage bootloader".
- BIOS transfers control to this first stage bootloader. In other words, opcode located at physical memory address 0x7C00 in DRAM is executed.
Related article:https://neosmart.net/wiki/mbr-boot-process/
But,
in case of UEFI, I'm having trouble grasping this sequence.
I've already glanced UEFI spec documentation and OS Dev UEFI part.
UEFI:https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf
OS Dev:https://wiki.osdev.org/UEFI
It seems this efi_main() function works as the point equivalent to 0x7C00 in BIOS mode. But how?
Is UEFI firmware doing something like
jmp efi_main
after performing a series of jobs?
Q1. How is UEFI boot mode flows?
Q2. Is there a good UEFI example or tutorial like brokenthorn that of BIOS based?
P.S.
I've seen the news (which years have passed already) that Intel removes BIOS support by 2020.
https://www.anandtech.com/show/12068/intel-to-remove-bios-support-from-uefi-by-2020
It says
Once CSM is removed, the new platforms will be unable to run 32-bit operating systems, unable to use related software (at least natively), and unable to use older hardware, such as RAID HBAs (and therefore older hard drives that are connected to those HBAs), network cards, and even graphics cards that lack UEFI-compatible vBIOS (launched before 2012 – 2013)
Q3. Doesn't it mean that everything related to BIOS booting (first stage bootloader at 0x7C00 and BIOS interrupts and etc) becomes deprecated?
Q1:
The UEFI boot sequence is devided in multiple "phases", you can find some basic information about each phase here.
To load the SEC phase, the SecCore is located at memory address 0xFFFFFFF0 (this address is mapped to the UEFI Flash Memory) and therefore is the target of the reset vector.
After the dxe phase multiple UEFI Applications can be called before the operating system is loaded.
Q2:
If you want to get a basic understanding of how UEFI works i would recommend the book "Beyond BIOS".
If you want to learn how to write UEFI Drivers/Applications i would recommend to have a look at some of the sample applications in the EDK2 repository (and how to build Applications with it), more details can be found in the specification.
这篇关于UEFI 启动模式启动流程如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!