OSDev.org https://forum.osdev.org/ |
|
[solved] I have followed a tutorial and it does not work https://forum.osdev.org/viewtopic.php?f=1&t=33785 |
Page 1 of 1 |
Author: | wellwell [ Wed Jul 24, 2019 6:54 am ] |
Post subject: | [solved] I have followed a tutorial and it does not work |
I am fallowing the tutorial to build a kernel, http://www.jamesmolloy.co.uk/tutorial_html/, however, the kernel crashed on activated paging. the kernel crashed on executing the code Code: asm volatile("mov %0, %%cr0":: "r"(cr0)); what's up? I used gdb to debug this kernel, and returned Cannot find bounds of current function, when executing this code. i finally reached the part of multithread and could print A and B at the same time but without paging <_<. Thanks all, and good lucks. printed by A B C D four threads Solved finally!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! with paging, the heap user mode file system |
Author: | Octocontrabass [ Wed Jul 24, 2019 6:59 am ] |
Post subject: | Re: kernel crashed on activated paging |
Have you read this list of known bugs in the tutorial? Keep in mind this list is not complete. |
Author: | wellwell [ Wed Jul 24, 2019 7:21 am ] |
Post subject: | Re: kernel crashed on activated paging |
Octocontrabass wrote: Have you read this list of known bugs in the tutorial? Keep in mind this list is not complete. Many Thanks, Is there any other tutorials for beginner? |
Author: | TheCool1Kevin [ Wed Jul 24, 2019 8:38 am ] |
Post subject: | Re: kernel crashed on activated paging |
Hello and welcome to OSDev. I believe this humorously titled post may help: I have followed a tutorial and it does not work Unfortunately, I must redirect you to this post Beginner Mistakes before you become utterly overwhelmed by this subject after spending countless hours going in circles. Please understand that this is a very difficult subject and there are no tutorials that can cover paging to the depth that it deserves. OSDev tutorials should only serve as a jumping-off point in your development. I highly urge you to abandon any tutorial code after you have a general grasp on the topics. A good place to go after would be the Intel Software Developer Manuals (namely volume 3, section 4). Good luck |
Author: | GMorgan [ Wed Jul 24, 2019 3:56 pm ] |
Post subject: | Re: kernel crashed on activated paging |
It is likely your paging structure is invalid or your GDT is set up incorrectly. When I last did something like this I moved some code from NASM to GAS and bugs emerged from that (moving 5 in NASM means the value 5, in GAS the value at memory location 5). Check you are actually putting what you expect into each page table record. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |