alberinfo wrote:
well in my properly definition for this case, i mean that EVERYTHING, and i recall EVERYTHING that's included in my OS, should work fine together, and not halt the system, throw triple faults, etc.i've readed
Virtual Monitor(and also
Virtual 8086 Mode, but it doesn't contain nothing for the problem i have).and they say the question i asked, and i have no answer.it says that i have to identity map the first MB, but, in
Identity Paging, the explanation is almost nothing, and in the code, i didn't understand what first_pte was, and vaddr(it means virtual address, but how to declare it, i have my suspects that it's an void type)
To identity map means to make a physical address equal a virtual one.
0x0 = 0x0, 0x100000 = 0x100000, 0x1234 = 0x1234 etc...
So to ID map the first megabyte means to make everything from 0x0 to 0x100000 equal 0x0-0x100000 as if paging wasn’t enabled.
first_pte means first page table entry
I personally use uint32_t for virtual addresses and uint64_t for physical ones (since I use PAE which allows you to access physical addresses >4GB, on x86). If you were to use x64 then you could just declare them as uint64_t.
I think you should step back and learn some other (more important) things first.
Your project is a mess, source/object files inside include, random chunks of tutorial code everywhere, etc...
This is a clear example of
https://wiki.osdev.org/Duct_von_TapeI know it’s hard for a beginner to catch up with everything, but this hobby ain’t easy, learning something like this takes a lot of reading, practice, studying and most importantly time.
Virtual 8086 mode is not a beginners topic, it requires somewhat of an infrastructure.
Build your kernel in a way you understand it and them come back to this. One thing at a time.