1 Star 0 Fork 98

周正亮/grub2

forked from src-openEuler/grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
grub2-linuxefi-fix-boot-params.patch 745 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhangqiumiao 提交于 2024-03-04 03:17 . update to 2.12
--- a/grub-core/loader/i386/efi/linux.c
+++ b/grub-core/loader/i386/efi/linux.c
@@ -298,7 +298,14 @@
lh.code32_start = (grub_uint32_t)(grub_addr_t) kernel_mem;
}
- grub_memcpy(params, &lh, 2 * 512);
+ /* Grub linuxefi erroneously initialize linux's boot_params with non-zero values. (bsc#1025563)
+
+ From https://www.kernel.org/doc/Documentation/x86/boot.txt:
+ The memory for struct boot_params could be allocated anywhere (even above 4G)
+ and initialized to all zero.
+ Then, the setup header at offset 0x01f1 of kernel image on should be
+ loaded into struct boot_params and examined. */
+ grub_memcpy (&params->setup_sects, &lh.setup_sects, sizeof (lh) - 0x01f1);
params->type_of_loader = 0x21;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhou-zhengliang/grub2.git
git@gitee.com:zhou-zhengliang/grub2.git
zhou-zhengliang
grub2
grub2
master

搜索帮助