on x86 NTVDM is a VDM = Virtual Machine int that it virtualizes the processor and the memory. In contrast to simulate or emulate the whole thing. Since it is a "normal" process it mustn't access physical memory as all others. It however can enable the VM-Bit to enable v86-mode. This and some registered HW-Exceptoion-handlers enables NTVDM to emulate privileged instructions. Such instr in usermode (v86 is usermode) raises an exception. NTVDM then can manage it's own GDT, LDT and map pages around to finnish up the missing part of a x86-processor inside NT. NTVDM as its pendant in OS/2 can boot a DOS. At least in OS/2 it was possible to start a "DOS-Box" from a floppy in A: ... The Bios is specially made for such a "realmode"-Box. It invokes system calls instead to access HW.
Asking me, I'd ignore all this fascinating but difficult stuff which was good at 386's times and use the project DOS-Box on nowerdays machines.
Alex Ionescu schrieb:
Barubary wrote:
This is not 100% correct. The lowest 64k of the process _virtual_ address space is is reserved and protected in order to detect NULL pointer access.
Do you know how NTVDM in NT/2000/XP/2003 gets around this? NTVDM allocates this area somehow for creation of the V86 IDT.
Melissa _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Are you sure about that?
In any case, NTVDM is a completely separate subsystem that actually "Boots up" with its own ROM/BIOS and has its own memory handlers, ivt, idt, gdt, ldt, etc. It emulates everything it can, but sometimes it can't and it raises exceptions (which is why many DOS apps won't work). So, by being an emulator, it has full control over its internal virtual memory. However, I'm still not convinced that the actual ntvdm.exe process allocates, in Windows, the first 0x10000 bytes.
Best regards, Alex Ionescu _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev