mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12: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
|
@ -30,6 +30,7 @@ ALWAYS_INLINE FlatPtr cpu_flags()
|
|||
return flags;
|
||||
}
|
||||
|
||||
#if ARCH(I386)
|
||||
ALWAYS_INLINE void set_fs(u16 segment)
|
||||
{
|
||||
asm volatile(
|
||||
|
@ -59,6 +60,7 @@ ALWAYS_INLINE u16 get_gs()
|
|||
: "=a"(gs));
|
||||
return gs;
|
||||
}
|
||||
#endif
|
||||
|
||||
ALWAYS_INLINE u32 read_fs_u32(u32 offset)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue