Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
The manifestation is caused by writing PE, having broken tables, executing a page full of zeroes, which are equivalent to 00 00 = add [eax], al (also in bochs log, just read it ), which causes a pagefault on the same eax you used to write CR0. Which makes the exact bug way too easy to spot.
@OP: Get bochs debugger, and tell it to info tab after the mov cr0, eax instruction. Then compare that with what you had intended it to be.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
The manifestation is caused by writing PE, having broken tables, executing a page full of zeroes, which are equivalent to 00 00 = add [eax], al (also in bochs log, just read it ), which causes a pagefault on the same eax you used to write CR0. Which makes the exact bug way too easy to spot.
@OP: Get bochs debugger, and tell it to info tab after the mov cr0, eax instruction. Then compare that with what you had intended it to be.
And how can I fix this execution of page full of zeros? :/
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
I suggest you look at
pageableMemoryStart = MEMORY_MAP + 0x100000; // high bogosity levels.
and the rest of the thread you hijacked.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
I suggest you look at
pageableMemoryStart = MEMORY_MAP + 0x100000; // high bogosity levels.
and the rest of the thread you hijacked.
Don't know what is wrong with this line, but I've re-aligned it to 4096 (it was already aligned, but just to be on a safe side) and changed MEMORY_MAP with KERNEL_END, which I get from linker, and still no result :/... Maybe I don't get the reason of this high bogosity level.
EDIT: The address, that is held in pageableMemoryStart is 0x100000 (GRUB thing) + 32MB KERNEL + 4MB of my PMM structure.