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
fix: gen_ksymtable does not work on non-English platform
[lunaix-os.git]
/
lunaix-os
/
kernel
/
kinit.c
diff --git
a/lunaix-os/kernel/kinit.c
b/lunaix-os/kernel/kinit.c
index 528a73867e7c189dd3f36db8092ec85bd6aedfa4..ca28001f8bc66b255604297d727267455743ea3d 100644
(file)
--- a/
lunaix-os/kernel/kinit.c
+++ b/
lunaix-os/kernel/kinit.c
@@
-16,10
+16,9
@@
#include <lunaix/trace.h>
#include <lunaix/tty/tty.h>
#include <lunaix/owloysius.h>
#include <lunaix/trace.h>
#include <lunaix/tty/tty.h>
#include <lunaix/owloysius.h>
-#include <lunaix/
pcontext
.h>
+#include <lunaix/
hart_state
.h>
#include <hal/acpi/acpi.h>
#include <hal/acpi/acpi.h>
-#include <hal/intc.h>
#include <sys/abi.h>
#include <sys/mm/mm_defs.h>
#include <sys/abi.h>
#include <sys/mm/mm_defs.h>
@@
-44,7
+43,7
@@
kernel_bootstrap(struct boot_handoff* bhctx)
/* Begin kernel bootstrapping sequence */
boot_begin(bhctx);
/* Begin kernel bootstrapping sequence */
boot_begin(bhctx);
- tty_init(ioremap(0xB8000, PAGE_SIZE));
+ tty_init(
(void*)
ioremap(0xB8000, PAGE_SIZE));
/* Setup kernel memory layout and services */
kmem_init(bhctx);
/* Setup kernel memory layout and services */
kmem_init(bhctx);
@@
-59,12
+58,9
@@
kernel_bootstrap(struct boot_handoff* bhctx)
device_scan_drivers();
device_scan_drivers();
- invoke_init_function(on_earlyboot);
-
device_sysconf_load();
device_sysconf_load();
- /* Get intc online, this is the cornerstone when initing devices */
- intc_init();
+ invoke_init_function(on_earlyboot);
clock_init();
timer_init();
clock_init();
timer_init();
@@
-96,7
+92,6
@@
kernel_bootstrap(struct boot_handoff* bhctx)
* and start geting into uspace
*/
boot_end(bhctx);
* and start geting into uspace
*/
boot_end(bhctx);
- boot_cleanup();
spawn_lunad();
}
spawn_lunad();
}
@@
-126,9
+121,16
@@
void
kmem_init(struct boot_handoff* bhctx)
{
pte_t* ptep = mkptep_va(VMS_SELF, KERNEL_RESIDENT);
kmem_init(struct boot_handoff* bhctx)
{
pte_t* ptep = mkptep_va(VMS_SELF, KERNEL_RESIDENT);
+
ptep = mkl0tep(ptep);
ptep = mkl0tep(ptep);
+ unsigned int i = ptep_vfn(ptep);
do {
do {
+ if (l0tep_impile_vmnts(ptep)) {
+ ptep++;
+ continue;
+ }
+
#if LnT_ENABLED(1)
assert(mkl1t(ptep++, 0, KERNEL_DATA));
#elif LnT_ENABLED(2)
#if LnT_ENABLED(1)
assert(mkl1t(ptep++, 0, KERNEL_DATA));
#elif LnT_ENABLED(2)
@@
-138,7
+140,7
@@
kmem_init(struct boot_handoff* bhctx)
#else
assert(mklft(ptep++, 0, KERNEL_DATA));
#endif
#else
assert(mklft(ptep++, 0, KERNEL_DATA));
#endif
- } while (
ptep_vfn(ptep) < MAX_PTEN - 2
);
+ } while (
++i < MAX_PTEN
);
// allocators
cake_init();
// allocators
cake_init();