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
feat: heap support and re-worked
[lunaix-os.git]
/
lunaix-os
/
kernel
/
proc0.c
diff --git
a/lunaix-os/kernel/proc0.c
b/lunaix-os/kernel/proc0.c
index 19f04dce4d077b59bcd7c47099071ee5dc69d7b7..6f39299977eaf1dac49a312cb1efce05db75d2ae 100644
(file)
--- a/
lunaix-os/kernel/proc0.c
+++ b/
lunaix-os/kernel/proc0.c
@@
-1,11
+1,8
@@
#include <lunaix/block.h>
#include <lunaix/common.h>
#include <lunaix/block.h>
#include <lunaix/common.h>
-#include <lunaix/fctrl.h>
#include <lunaix/foptions.h>
#include <lunaix/fs.h>
#include <lunaix/fs/twifs.h>
#include <lunaix/foptions.h>
#include <lunaix/fs.h>
#include <lunaix/fs/twifs.h>
-#include <lunaix/lunaix.h>
-#include <lunaix/lunistd.h>
#include <lunaix/lxconsole.h>
#include <lunaix/mm/cake.h>
#include <lunaix/mm/pmm.h>
#include <lunaix/lxconsole.h>
#include <lunaix/mm/cake.h>
#include <lunaix/mm/pmm.h>
@@
-18,6
+15,10
@@
#include <lunaix/syslog.h>
#include <lunaix/types.h>
#include <lunaix/syslog.h>
#include <lunaix/types.h>
+#include <usr/fcntl.h>
+#include <usr/sys/lunaix.h>
+#include <usr/unistd.h>
+
#include <sdbg/protocol.h>
#include <hal/acpi/acpi.h>
#include <sdbg/protocol.h>
#include <hal/acpi/acpi.h>
@@
-211,7
+212,7
@@
init_platform()
// clean up
for (size_t i = 0; i < (uintptr_t)(&__init_hhk_end); i += PG_SIZE) {
// clean up
for (size_t i = 0; i < (uintptr_t)(&__init_hhk_end); i += PG_SIZE) {
- vmm_del_mapping(
PD_REFERENCED
, (void*)i);
+ vmm_del_mapping(
VMS_SELF
, (void*)i);
pmm_free_page(KERNEL_PID, (void*)i);
}
}
pmm_free_page(KERNEL_PID, (void*)i);
}
}
@@
-255,7
+256,7
@@
__do_reserved_memory(int unlock)
// Don't fuck up our kernel space!
break;
}
// Don't fuck up our kernel space!
break;
}
- vmm_set_mapping(
PD_REFERENCED
, _pa, _pa, PG_PREM_R, VMAP_NULL);
+ vmm_set_mapping(
VMS_SELF
, _pa, _pa, PG_PREM_R, VMAP_NULL);
pmm_mark_page_occupied(
KERNEL_PID, _pa >> PG_SIZE_BITS, PP_FGLOCKED);
}
pmm_mark_page_occupied(
KERNEL_PID, _pa >> PG_SIZE_BITS, PP_FGLOCKED);
}
@@
-268,7
+269,7
@@
__do_reserved_memory(int unlock)
mmap.type);
for (; j < pg_num; j++) {
uintptr_t _pa = pa + (j << PG_SIZE_BITS);
mmap.type);
for (; j < pg_num; j++) {
uintptr_t _pa = pa + (j << PG_SIZE_BITS);
- vmm_del_mapping(
PD_REFERENCED
, _pa);
+ vmm_del_mapping(
VMS_SELF
, _pa);
if (mmap.type == MULTIBOOT_MEMORY_ACPI_RECLAIMABLE) {
pmm_mark_page_free(_pa >> PG_SIZE_BITS);
}
if (mmap.type == MULTIBOOT_MEMORY_ACPI_RECLAIMABLE) {
pmm_mark_page_free(_pa >> PG_SIZE_BITS);
}