writing CR0 is not the bug
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.
page enable problem
Re: page enable problem
And how can I fix this execution of page full of zeros? :/Combuster wrote:writing CR0 is not the bug
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.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: page enable problem
*fetches crystal ball*
I see... fog... very thick fog...</sarcasm>
Ask smart questions, will you.
I see... fog... very thick fog...</sarcasm>
Ask smart questions, will you.
Re: page enable problem
* gets his 8-ball, asks "will I be able to ask smart question", receives the answers "Not in this life, mate" *Combuster wrote:*fetches crystal ball*
I see... fog... very thick fog...</sarcasm>
Ask smart questions, will you.
OK, smart questions are not my strong point, but let's try. Which part of my PE writing creates broken tables?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: page enable problem
hmm
I suggest you look at
pageableMemoryStart = MEMORY_MAP + 0x100000; // high bogosity levels.
and the rest of the thread you hijacked.
I suggest you look at
pageableMemoryStart = MEMORY_MAP + 0x100000; // high bogosity levels.
and the rest of the thread you hijacked.
Re: page enable problem
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.Combuster wrote:hmm
I suggest you look at
pageableMemoryStart = MEMORY_MAP + 0x100000; // high bogosity levels.
and the rest of the thread you hijacked.
EDIT: The address, that is held in pageableMemoryStart is 0x100000 (GRUB thing) + 32MB KERNEL + 4MB of my PMM structure.