processes 64bit

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
os64dev
Member
Member
Posts: 553
Joined: Sat Jan 27, 2007 3:21 pm
Location: Best, Netherlands

processes 64bit

Post by os64dev »

I am currently busy with creating processes in my 64-bit OS and am wondering how to implement the basics.

I have a higher-half micro kernel of which the memory is going to be mapped in every process space. Within the kernel area i intend to put a 32 KiB area, at a fixed location, that contains the GDT, IDT, TSS, IOPB, RSP0 and IST1 for that process. Thus this area changes every process switch. This implies that all other pages of the kernel map could be global pages but these 8 pages can't.

Code: Select all

GDT  \         (  56 bytes)
TSS  |- 04 KiB ( 104 bytes)
IDT  /         (3936 bytes) (max. 246 entries)
IOPB |- 08 KiB (IO permission bitmap)
RSP0 |- 04 KiB (Stack)
IST1 |- 04 KiB (Stack)
free |- 12 KiB (future use)
1) What do you think of this approach?
2) How do you do it?
Author of COBOS
Avarok
Member
Member
Posts: 102
Joined: Thu Aug 30, 2007 9:09 pm

Post by Avarok »

:shock: What's an IST?
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies.
- C. A. R. Hoare
User avatar
os64dev
Member
Member
Posts: 553
Joined: Sat Jan 27, 2007 3:21 pm
Location: Best, Netherlands

Post by os64dev »

Interrupt Stack Table (IST) is a field in the 64 bit TSS that points to a piece of memory that is used as stack memory during an interrupt. This assures that an interrupt has a valid stack at all time. Very handy feature ;-)
Author of COBOS
SpooK
Member
Member
Posts: 260
Joined: Sun Jun 18, 2006 7:21 pm

Re: processes 64bit

Post by SpooK »

os64dev wrote: 1) What do you think of this approach?
That is how the 32-bit Version of DynatOS works, so I am biased in thinking that it is a solid choice :P
os64dev wrote: 2) How do you do it?
Take a look at PM_SWITCH and ISR_HANDLER_ROUTINE from the 32-bit DynatOS source code. Other files will apply as well.
Post Reply