![Very Happy :D](./images/smilies/icon_biggrin.gif)
Which descriptors and segments do I have to initialize and how?
Once these system resources are set up, how do I jump to RING3 in LONG MODE?
Where is stored the data that the long mode TSS misses comparing it to the protected mode one? Where are for example the CS ,RIP or CR3 of different tasks (including the kernel task) saved and when exactly? Is this saved by the scheduler to some memory address? How do you change the current code selector in CS to a DPL3 segment selector and RIP while being still in kernelspace if they are not read from a TSS? (I really don´t understand software task switching what is too bad
![Crying or Very sad :cry:](./images/smilies/icon_cry.gif)
I´ve already set up paging so I can modify the kernel memory map in all ways. But, do I have to set up new PML4, PD(s), PDT(s) and PT(s) to switch to usermode?, or just change some of the kernel pages attributes?
I´ve also a working 64bit IDT and exception handlers that print registers content on an exception, just in case something goes wrong.
Hope someone can help me with this cause I´m really stuck and fed up with reading a lot in the AMD64 manuals without being able to do a step further in OS dev on this architecture.
Thanks in advance.