What do I have to set to have a 64-bit environment with a flat memory model, no paging and "no segmentation"?
When I search for switching to long mode, I can only find information for people that already have paging enabled.
Flat memory on 64-bit
Flat memory on 64-bit
Last edited by mschummi on Mon Aug 31, 2009 9:05 am, edited 1 time in total.
-
- Member
- Posts: 199
- Joined: Sat Jun 28, 2008 6:44 pm
Re: Flat memory on 64-bit
It's automatically in a flat memory model, assuming you've set up long mode properly. When you set LME bit and enable paging, you are in long mode.mschummi wrote:I'd like
What do I have to set to have a 64-bit environment with a flat memory model, no paging and "no segmentation"?
When I search for switching to long mode, I can only find information for people that already have paging enabled.
Re: Flat memory on 64-bit
So, can't I switch to long mode without having paging enabled?
-
- Member
- Posts: 199
- Joined: Sat Jun 28, 2008 6:44 pm
Re: Flat memory on 64-bit
Yes, exactly. For better or for worse, AMD engineers are ... brilliant.mschummi wrote:So, can't I switch to long mode without having paging enabled?
Re: Flat memory on 64-bit
Just to add what was already said, but 64 bit mode doesn't have segmentation to begin with.
Edit: Didn't realize that the compatibility modes were considered a sub mode of long mode!
Edit: Didn't realize that the compatibility modes were considered a sub mode of long mode!
Last edited by Kitsune on Mon Aug 31, 2009 4:11 pm, edited 1 time in total.
Re: Flat memory on 64-bit
Hi,
@mschummi: If you don't want to take advantage of paging (e.g. to improve performance, reduce RAM usage and simplify the address space/s) then you could just identity map everything. There's also other beneficial features you can disable or ignore (caches, FPU/MMX, SSE, etc) if you really want to ensure your OS is inefficient.
Cheers,
Brendan
In long mode there's 2 sub-modes. There's the 64-bit sub-mode (which has no segmentation, except for FS and GS), and the "compatibility" sub-mode that allows you to run 32-bit and 16-bit software (which has full segmentation).Kitsune wrote:Just to add what was already said, but long mode doesn't have segmentation to begin with.
@mschummi: If you don't want to take advantage of paging (e.g. to improve performance, reduce RAM usage and simplify the address space/s) then you could just identity map everything. There's also other beneficial features you can disable or ignore (caches, FPU/MMX, SSE, etc) if you really want to ensure your OS is inefficient.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.