Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

PluMGMK
Copy link

@PluMGMK PluMGMK commented Aug 19, 2021

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…

@Baron-von-Riedesel
Copy link
Owner

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.

@PluMGMK
Copy link
Author

PluMGMK commented Aug 27, 2021

Using EMS is usually limited to 32MB - that's really not very useful for 64-bit apps :))

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…

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.

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…

@Baron-von-Riedesel
Copy link
Owner

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…

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.

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

Yes, I fully agree.

@PluMGMK
Copy link
Author

PluMGMK commented Sep 11, 2021

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…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants