hi,a long time ago i've implemented VM86, and after a lot of testing, i concluded that the interrupts were working fine.recently i've included paging(not the shown in my previous post, now it's PAE-Paging), and i've seen that the VM86 interrupts don't work if paging is enabled.The only error i got is in qemu: 'Unhandled interrupt/exception. System halted!'.i've seen that i have to load the kernel at an address that VM86 cannot access, use identity paging(which i didn't understand the explanation or even the code from Identity Paging ).What's the problem here?are the last options true?in case is that i have to load the kernel at an address that VM86 cannot access, i'll give you the error later(or the post is going to be too long), or if is the identity paging option,can you explain me how does it work, and how to implement it?

If it's still the same code that you used before, then I have to tell you that it was extracted from paging enabled, high half kernel. It was working with and without PAE/PSE. What you need for it to work, in the simplest scenario, is to have first megabyte identity mapped (which means that 0th virtual byte is mapped to 0th physical, 6126th virtual byte is mapped to 6126th physical byte, etc.). Make sure that you don't trash any critical data in the first meg (like IVT, BDA, EBDA or shadowed ROM). Good choice is to load your kernel at over 1MiB.

To find which exception is fired add some kind of breakpoint in line 17 of /include/VM86/ints.c and check state->InterruptNumber.

it isn't the same(paging, if i dont mistake in what you refer to), now paging is with PAE enabled, but VM86 is exactly the same.also as i've said, i don't know how does identity mapping work, or how to use it. and loading the kernel over 1 MB, you say something like: jmp 0x000000C00:main?

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)

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 entryI 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.

hi,sorry for being without activity in the post.after a few days trying and working hard, the most i got, is at some moment(probrably when trying ID paging), the system hangs, or something like that, and after a few moments, it comes back to grub, without any error, even in bochs.Any thoughts?(yeah, i don't like to ask for help every time, but with almost no information that i can found in the web, i can't do much, almost not at all).

Thanks!

PD:i've updated the github repo, so any of you do not have to worry about my outdated repos

Who is online

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum