X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/6d75e31596b5ac2e638c8a31c6c2185ee4053b6b..d96f52f65ecb90e26be9bd709fbdb1de54795db1:/lunaix-os/kernel/k_init.c?ds=sidebyside diff --git a/lunaix-os/kernel/k_init.c b/lunaix-os/kernel/k_init.c index a82df94..ce4ac6a 100644 --- a/lunaix-os/kernel/k_init.c +++ b/lunaix-os/kernel/k_init.c @@ -78,12 +78,15 @@ _kernel_init() fsm_init(); input_init(); + vfs_export_attributes(); + if ((errno = vfs_mount_root("ramfs", NULL))) { panickf("Fail to mount root. (errno=%d)", errno); } vfs_mount("/dev", "devfs", NULL, 0); vfs_mount("/sys", "twifs", NULL, MNT_RO); + vfs_mount("/task", "taskfs", NULL, MNT_RO); lxconsole_init(); @@ -161,6 +164,11 @@ spawn_proc0() : "i"(KSTACK_TOP), "i"(KCODE_SEG), "r"(proc0->intr_ctx.eip) : "%ebx", "memory"); + // 加载x87默认配置 + asm volatile("fninit\n" + "fxsave (%%eax)" ::"a"(proc0->fxstate) + : "memory"); + // 向调度器注册进程。 commit_process(proc0);