-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add EMS / VCPI support #4
base: master
Are you sure you want to change the base?
Conversation
Also reverted IDT change based on misreading of osdev wiki.
But resetting FS/GS is always optional.
Using EMS is usually limited to 32MB - that's really not very useful for 64-bit apps :)) The VCPI switch is useful, of course - but it's probably better to supply an additional branch (src3?) for that, so that dos64stb2.asm remains as simple as possible. |
That's true! It might be better to use EMS just for setting up the page tables and XMS for everything else, or something like that. I might do some more work on this in the future…
Fair enough. What about the use of a TSS? I think it's helpful even for src2, since it allows for stack faults that don't crash the machine… |
I'd prefer to copy the "map 64-bit physical region into address space"-feature of the Dos32pae project to Dos64stb. This allows to allocate paging tables in "legacy" XMS memory, but the rest in memory beyond 4G.
Yes, I fully agree. |
Sorry for going quiet on this for a while, I really needed a break from this! 😅 Anyway, I must confess that I hadn't realized that Dos32pae was a thing until you mentioned it. When you say copy the feature, do you mean expand Dos64stb's DPMI subset to include the same functions as Dos32pae? That sounds like a good idea indeed! What I might do is see if I can add VCPI support to Dos32pae too, maybe using EMS just for page tables like I said (so unreal mode wouldn't be needed to set them up), and then take what I learn and come back to this one… |
Hello! For fun, I've enhanced the "src2" version of the stub to be able to use EMS memory rather than XMS if available, and to use the VCPI interface to get out of VM86 mode. I guess it means memory is more limited when an EMS manager is running, but it's better than nothing…