【发布时间】:2021-08-31 11:13:20
【问题描述】:
我对使用 UEFI 的 x86_64 上的内核开发和引导过程比较陌生。许多通用操作系统开发资源建议将初始目标文件中的前 1 MiB 保留为空闲/未触及,因为存在“许多 I/O 映射的遗留功能,例如 VGA 帧缓冲区”。
这仅适用于旧版 BIOS 引导还是仍然适用于 UEFI?
链接描述文件示例:
ENTRY(start)
SECTIONS {
/* According to https://intermezzos.github.io/book/first-edition/hello-world.html
* there is lots of memory mapped I/O and 1MiB is a conventional padding (legacy?!)
* TODO find out if this only is valid for legacy BIOS boot or also for UEFI!
*/
. = 1M;
.text :
{
*(.text)
}
.bss :
{
*(COMMON)
*(.bss)
}
}
【问题讨论】: