mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:37:45 +00:00
Kernel: Add support for setting up a x86_64 GDT once in C++ land
This commit is contained in:
parent
29d9666e02
commit
f630299d49
5 changed files with 55 additions and 11 deletions
|
@ -19,6 +19,11 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
#if ARCH(X86_64)
|
||||
# define MSR_FS_BASE 0xc0000100
|
||||
# define MSR_GS_BASE 0xc0000102
|
||||
#endif
|
||||
|
||||
class Thread;
|
||||
class SchedulerPerProcessorData;
|
||||
struct MemoryManagerData;
|
||||
|
@ -241,7 +246,11 @@ public:
|
|||
|
||||
ALWAYS_INLINE static bool is_initialized()
|
||||
{
|
||||
return get_fs() == GDT_SELECTOR_PROC && read_fs_u32(__builtin_offsetof(Processor, m_self)) != 0;
|
||||
return
|
||||
#if ARCH(I386)
|
||||
get_fs() == GDT_SELECTOR_PROC &&
|
||||
#endif
|
||||
read_fs_u32(__builtin_offsetof(Processor, m_self)) != 0;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE void set_scheduler_data(SchedulerPerProcessorData& scheduler_data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue