Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Dpith
Beginner
1,210 Views

Simplified Long Mode

Is there a keep-it-simple long mode feature in any of the newer processors?

If not, could there be?

I realized that features are market driven, but a simple option in a CPU would definitely improve the market share, cut down on hackability, and I'd wager cut QA costs.

To get a chip to long mode, I have to write several sections of code that:

  1. Boots into 16 bit mode, redundantly.
  2. Initalizes a GDT for 32 bit mode, redundantly.
  3. Changes into 32 bit mode, redundantly.
  4. Query external hardware to figure out what memory I have BEFORE I can set up GDT and page tables correctly.
  5. Initializes a GDT for 64 bit mode, even though I don't want one.
  6. Initializes 2, 3 or 4 levels of Page tables, depending on what the CPU supports, even though in true 64 bit style I want a flat memory model.
  7. Now I am in 64 bit mode and have access to the full memory, redo my GDT and stack, and, because I don't really want to have to deal with them, during normal operation, my PTEs.

That's a lot of hours of research, coding and testing, not to mention bytes, noisy code, and cpu cycles, to get to a starting point for my Keep-it-simple OS.

I realize a lot of this is necessary for backwards compatibility, or evolved best practices, but it seems to be at the expense of future simplicity.

If they don't exist (and I haven't been able to find how to do any of this without workarounds), my feature requests are:

1. A simple procedure (a few operations only) to take the CPU into 'straightforward64' mode.

2. No GDT unless you want one.

3. No Page tables unless you want them.

4. The option to use the cache as a stack, which would be MUCH faster than a memory-based stack and SMP friendly. So much so, caching would not be necessary. .

Separate code and data stacks would also be nice.

0 Kudos
3 Replies
idata
Community Manager
99 Views

Hello 0b1

 

 

Thank you for joining the community and for the feedback in other to obtain better information on the matter could you provide me with more details of the configuration that you are setting and the hardware involved with it?

 

 

Regards,

 

Leonardo C.

 

idata
Community Manager
99 Views

Hello 0b1

 

 

I was checking your case and would like to know if you need further help. If so, please do not hesitate in replying back.

 

 

Regards,

 

Leonardo C.

 

Dpith
Beginner
99 Views

Hi Leonardo.

Thanks for responding.

I having anything else. These are just suggestions for the future.

Thanks again.

Reply