3 Star 6 Fork 4

健哥 / xuxiake

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
cpu_entry.c 731 Bytes
一键复制 编辑 原始数据 按行查看 历史
健哥 提交于 2023-09-10 12:45 . quirk
#include <xuxiake.h>
#include <lib.h>
#include <gpio.h>
#include <asm.h>
void cpu_entry(void)
{
arch_init();
xxk_print("XXK: Hello XU Xiake\n");
setup_exception_vector();
xxk_print("XXK: After set vector\n");
#ifdef CONFIG_USERSPACE
copy_user_program();
#endif /* #ifdef CONFIG_USERSPACE */
mmu_init();
#if defined(CONFIG_MMU) && !defined(CONFIG_USERSPACE)
xxk_print("XXK: Test write addres not mappped by kernel:");
*((unsigned long*)USER_MEM_START) = 0x0;
xxk_print("...DONE\n");
#endif /* #ifdef CONFIG_MMU */
#ifdef CONFIG_USERSPACE
xxk_print("XXK: Jump to userspace\n");
jump_to_user_mode();
#endif /* #ifdef CONFIG_USERSPACE */
xxk_print("XXK: Exit!(Please Ctrl+a,x or kill the qemu process)\n");
while(1);
}
C
1
https://gitee.com/bamvor/xuxiake.git
git@gitee.com:bamvor/xuxiake.git
bamvor
xuxiake
xuxiake
dev-aarch64

搜索帮助

53164aa7 5694891 3bd8fe86 5694891