...but you can preempt VMode... so that really doesnt count as a reason to use this...Plus you can't preempt real mode, an emulator can be.
there may be good reasons for this, but preemption isnt one of them
...but you can preempt VMode... so that really doesnt count as a reason to use this...Plus you can't preempt real mode, an emulator can be.
True, but almost all long mode-capable CPUs also have virutalization extensions that can be used for this.thepowersgang wrote:AFIK you cannot use VM8086 mode when in long mode so and emulator could be used to run real mode apps and execute bios calls.
didnt mean to imply that you could... but you cant do RMode in LMode either...thepowersgang wrote:AFIK you cannot use VM8086 mode when in long mode so and emulator could be used to run real mode apps and execute bios calls.
You are saying two things: 1) you are running rmode in vmode together with long mode, but this is just not possible, since long mode has no vmode and 2) you are running rmode in rmode, and lmode in pmode. As for the latter, you do realize that a) this is dead-slow, b) you can only run one real-mode application (if you drop to realmode, your paging is gone, so only identity mapping), c) this is very dangerous (the program running from real mode can switch to pmode, and trash your OS)? If not, you are hereby warned and, if so, you are very stupid (no insult intended).JAAman wrote:however, i do expect my OS to (eventually) be able to run 64bit programs simultaneously with RMode programs (using VMode to run the RMode programs...) because it will be capable of switching between LMode and PMode on task-switch... (although this is a lower priority goal)
Which is still dead slow, probably. And needs some careful memory layouting to avoid > 32 bit addresses containing necessary information when in pmode. I'd just go for vmode, even if it is not available on all machines, or emulation.Combuster wrote:The trick is, the scheduler described can switch between long mode and protected mode, which means that the kernel is not restricted to the limitations of either. to schedule a real mode task, it will drop to PMode (if it was in long mode), then from there enter v8086 mode to do whatever is needed. Then for the next task it will be interrupted to protected mode, which again re-enters long mode, to continue with the 64 bit program that was also running.
Which you didn't measure and as such, is a uneducated guess:Which is still dead slow, probably.
And PAE paging can solve a lot of your address space issues. In fact, you can reuse long mode's page tables if you're careful enough.And needs some careful memory layouting to avoid > 32 bit addresses containing necessary information when in pmode.
Which is exactly what we do.I'd just go for vmode,
not really...You are saying two things:
yes it is possible -- you cant run VMode in LMode, but you can run it with LMode... as combuster said... he was exactly right... didnt expect anyone else to try anything this crazy though...1) you are running rmode in vmode together with long mode, but this is just not possible, since long mode has no vmode and
of course not... RMode has no place in any PMode-capable OS...2) you are running rmode in rmode, and lmode in pmode.
yes, its not exactly meant to be fast (after all, if you want your program to run fast, you must use JaaOS native PMode or LMode interface, and not be running in old DOS emulators in simulated RMode...) -- and of course its still much faster than the per-instruction software emulationWhich is still dead slow, probably.
no, as combuster said, PMode has had full access to 64GB of physical memory since the P6 (begining with the PentiumPro ~1995?) and has since been extended to support the full address space in PMode...And needs some careful memory layouting to avoid > 32 bit addresses containing necessary information when in pmode.
My concern is not the speed of the real mode application, since these are written decades ago anyway, and therefore uauslly fast enough in emulation, but the speed impact on the whole OS, when running multiple realmode tasks and many switches between them and the other tasks in the OS. But you are right, it's just an (un)educated guess, so I may be dead wrong (wouldn't be the first time).Combuster wrote:Which you didn't measure and as such, is a uneducated guess:
- Not having the emulation layer is way faster than having to interpret each and every instruction.