OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Sep 26, 2020 7:43 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Single address space in Long mode
PostPosted: Tue Jan 12, 2010 10:24 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9287
Location: On the balcony, watching the Swedish Chef
No, it works with multiple CPUs, multiple address spaces and multithreading.

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re: Single address space in Long mode
PostPosted: Tue Jan 12, 2010 1:25 pm 
Offline
Member
Member

Joined: Wed Oct 31, 2007 9:09 am
Posts: 1383
Combuster wrote:
jal wrote:
but that means the scheduler must update the MSR when switching tasks.
Not necessarily. You can just have it contain a pointer to a valid temporary stack, then update ESP manually. (instead of finding out the value for ESP, then bothering the slow WRMSR with it)


Indeed. Thanks for pointing it out.


JAL


Top
 Profile  
 
 Post subject: Re: Single address space in Long mode
PostPosted: Tue Jan 12, 2010 1:55 pm 
Offline
Member
Member
User avatar

Joined: Fri Jun 13, 2008 3:21 pm
Posts: 1700
Location: Cambridge, United Kingdom
The convention with syscall/sysret is to use the SWAPGS instruction and hang a "processor control block" off of the kernel's GS.

For this reason, I'm looking forward to clang & llvm maturing, because they have support for declaring a pointer off the GS segment, and therefore better optimized code.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: bungeefield, Google [Bot] and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group