User Mode
Re: User Mode
You must jump to code segment with privellege level 3. You can do it when you set up TSS. How to set up TSS you can find in Intel Manuals
-
- Posts: 17
- Joined: Mon Jan 16, 2006 12:00 am
- Location: Poland
- Contact:
Re: User Mode
But you first have to have a TSS, before you do any IRET
<a href="http://miaexokernel.sourceforge.net">Mia Exokernel</a>
If you want to map 16 EB using 4kb pages in IA-64, these structures will require 33619968 GB 131328 MB.
If you want to map 16 EB using 4kb pages in IA-64, these structures will require 33619968 GB 131328 MB.
Re: User Mode
i dont have a tss and my iret method works
its called software task switching
its called software task switching
Re: User Mode
Even with software task-swicthing you need at least one TSS per CPU on the IA32 architecture. While you can switch to user-mode without having a TSS, the first call of an interrupt will cause a triple-fualt as the kernel stack pointer can't be determined (Intel reference manual, volume 3: chapter 5.12 - Exception and Interrupt handling).
regrads,
gaf
regrads,
gaf
-
- Posts: 17
- Joined: Mon Jan 16, 2006 12:00 am
- Location: Poland
- Contact:
Re: User Mode
hckr83, I have software task switching in my kernel too, and it requires a TSS =)
<a href="http://miaexokernel.sourceforge.net">Mia Exokernel</a>
If you want to map 16 EB using 4kb pages in IA-64, these structures will require 33619968 GB 131328 MB.
If you want to map 16 EB using 4kb pages in IA-64, these structures will require 33619968 GB 131328 MB.
Re: User Mode
hmmm maybe thats why im getting invalid opcode error
after i think about it it seems right that it wouldnt know the kernel stack
after i think about it it seems right that it wouldnt know the kernel stack
Re: User Mode
yes -- though it shouldn't cause an invalid opcode error -- infact you could never recieve any error at all -- it would just tripple-fault
you can switch into a ring3 task, but not out of it without the information located in the TSS, so if any exception hard-int, or soft-int occures, whos handler is not in ring3, you will triple-fault
you can switch into a ring3 task, but not out of it without the information located in the TSS, so if any exception hard-int, or soft-int occures, whos handler is not in ring3, you will triple-fault
Re: User Mode
i thought it would gpf
but how can i still display the exception message if i can't go back to ring0
but how can i still display the exception message if i can't go back to ring0
-
- Posts: 17
- Joined: Mon Jan 16, 2006 12:00 am
- Location: Poland
- Contact:
Re: User Mode
Conclusion - get this TSS
Last edited by darktemplar on Sun Mar 19, 2006 12:00 am, edited 1 time in total.
<a href="http://miaexokernel.sourceforge.net">Mia Exokernel</a>
If you want to map 16 EB using 4kb pages in IA-64, these structures will require 33619968 GB 131328 MB.
If you want to map 16 EB using 4kb pages in IA-64, these structures will require 33619968 GB 131328 MB.