Page 1 of 1

Setting up User Mode

Posted: Sat May 26, 2007 3:18 pm
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

Posted: Sat May 26, 2007 4:00 pm
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.

Posted: Sat May 26, 2007 4:14 pm
by t0xic
Thanks!