Single address space in Long mode
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Single address space in Long mode
No, it works with multiple CPUs, multiple address spaces and multithreading.
Re: Single address space in Long mode
Indeed. Thanks for pointing it out.Combuster wrote: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)jal wrote:but that means the scheduler must update the MSR when switching tasks.
JAL
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: Single address space in Long mode
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.
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.