Page 1 of 1

processes 64bit

Posted: Mon Oct 22, 2007 3:55 am
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?

Posted: Mon Oct 22, 2007 6:19 am
by Avarok
:shock: What's an IST?

Posted: Mon Oct 22, 2007 6:26 am
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 ;-)

Re: processes 64bit

Posted: Mon Oct 22, 2007 11:12 am
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.