diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2017-03-06 02:14:29 +0100 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2017-03-06 02:14:29 +0100 |
commit | 9113c143c377876cc750e007e99f76c844bc95e8 (patch) | |
tree | 0c055d6fe57c713042e352284996eef6433737a7 /arch/x86_64 | |
parent | 0041476a0f804db9266c54b8ce62a585e7b30890 (diff) | |
download | garmos-9113c143c377876cc750e007e99f76c844bc95e8.tar.gz garmos-9113c143c377876cc750e007e99f76c844bc95e8.tar.bz2 |
gdt: move assembler code to arch
The assembler code to set the global descriptor table is
architecture-specific and therefore moved to arch.{c,h}.
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/arch.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86_64/arch.c b/arch/x86_64/arch.c index 0479a52..d7762c2 100644 --- a/arch/x86_64/arch.c +++ b/arch/x86_64/arch.c @@ -74,3 +74,8 @@ void regset32(const uint32_t reg, const uint32_t val) volatile uint32_t *p = (volatile uint32_t *) reg; *p = val; } + +void gdtset(struct gdtp gdtp) +{ + asm volatile("lgdt %0" : : "m" (gdtp)); +} |