git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: replace all stdint::uint32_t into short and more manageable u32_t
[lunaix-os.git]
/
lunaix-os
/
kernel
/
k_init.c
diff --git
a/lunaix-os/kernel/k_init.c
b/lunaix-os/kernel/k_init.c
index d1643b42a71c391f545729f75c78e42273bffa36..6274dd8fa5e88e5a96efe87502a8cef5a5d1ffcc 100644
(file)
--- a/
lunaix-os/kernel/k_init.c
+++ b/
lunaix-os/kernel/k_init.c
@@
-82,6
+82,8
@@
_kernel_init()
vfs_export_attributes();
vfs_export_attributes();
+ lxconsole_init();
+
if ((errno = vfs_mount_root("ramfs", NULL))) {
panickf("Fail to mount root. (errno=%d)", errno);
}
if ((errno = vfs_mount_root("ramfs", NULL))) {
panickf("Fail to mount root. (errno=%d)", errno);
}
@@
-90,7
+92,7
@@
_kernel_init()
vfs_mount("/sys", "twifs", NULL, MNT_RO);
vfs_mount("/task", "taskfs", NULL, MNT_RO);
vfs_mount("/sys", "twifs", NULL, MNT_RO);
vfs_mount("/task", "taskfs", NULL, MNT_RO);
- lxconsole_
init
();
+ lxconsole_
spawn_ttydev
();
syscall_install();
syscall_install();
@@
-209,4
+211,9
@@
setup_memory(multiboot_memory_map_t* map, size_t map_size)
for (uintptr_t i = &__usrtext_start; i < &__usrtext_end; i += PG_SIZE) {
vmm_set_mapping(PD_REFERENCED, i, V2P(i), PG_PREM_UR, VMAP_NULL);
}
for (uintptr_t i = &__usrtext_start; i < &__usrtext_end; i += PG_SIZE) {
vmm_set_mapping(PD_REFERENCED, i, V2P(i), PG_PREM_UR, VMAP_NULL);
}
+
+ // reserve higher half
+ for (size_t i = L1_INDEX(KERNEL_MM_BASE); i < 1023; i++) {
+ assert(vmm_set_mapping(PD_REFERENCED, i << 22, 0, 0, VMAP_NOMAP));
+ }
}
}