Setting up User Mode

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
t0xic
Member
Member
Posts: 216
Joined: Sat May 05, 2007 3:16 pm
Location: VA
Contact:

Setting up User Mode

Post by t0xic »

Hey everyone,

How would I go about setting up user mode? Is that in the gdt, and if so, how do I specifiy which segment to use.

Thanks

--t0xic
User avatar
mathematician
Member
Member
Posts: 437
Joined: Fri Dec 15, 2006 5:26 pm
Location: Church Stretton Uk

Post by mathematician »

Set up the segment descriptors in the same way you set up the GDT entries for the OS, but with the difference that they will have a privilege level of 3 instead of 0. And the user/supervisor bit in the page tables is set to 1 for user pages.
User avatar
t0xic
Member
Member
Posts: 216
Joined: Sat May 05, 2007 3:16 pm
Location: VA
Contact:

Post by t0xic »

Thanks!
Post Reply