1 Star 0 Fork 83

ridedolphin / grub2

forked from src-openEuler / grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
loongarch-Implement-cache-synchronization-operation.patch 867 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 7dccf456ce7fe693c6e488a812dc8f14ea592eeb Mon Sep 17 00:00:00 2001
From: mengyingkun <mengyingkun@loongson.cn>
Date: Wed, 22 Mar 2023 09:29:42 +0800
Subject: [PATCH] loongarch: Implement cache synchronization operation
When the module is loaded, ICACHE and DCACHE need to flush
before calling init function. If the caches are not flushed,
loader will crash unexpectedly.
Signed-off-by: mengyingkun <mengyingkun@loongson.cn>
---
grub-core/kern/loongarch64/cache.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/grub-core/kern/loongarch64/cache.S b/grub-core/kern/loongarch64/cache.S
index d291c67..6e32d37 100644
--- a/grub-core/kern/loongarch64/cache.S
+++ b/grub-core/kern/loongarch64/cache.S
@@ -19,6 +19,8 @@
#include <grub/symbol.h>
FUNCTION (grub_arch_sync_caches)
+ ibar 0
+ dbar 0
jr $ra
FUNCTION (grub_arch_sync_dma_caches)
--
2.33.0
1
https://gitee.com/ridedolphin/grub2.git
git@gitee.com:ridedolphin/grub2.git
ridedolphin
grub2
grub2
master

搜索帮助