From 9113c143c377876cc750e007e99f76c844bc95e8 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 6 Mar 2017 02:14:29 +0100 Subject: 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}. --- include/garmos/arch.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/garmos') diff --git a/include/garmos/arch.h b/include/garmos/arch.h index 0cee4c2..6d0f54d 100644 --- a/include/garmos/arch.h +++ b/include/garmos/arch.h @@ -37,4 +37,11 @@ void regset8(const uint32_t reg, const uint8_t val); void regset16(const uint32_t reg, const uint16_t val); void regset32(const uint32_t reg, const uint32_t val); +/* global description table initialization */ +struct gdtp { + uint16_t limit; + void *pointer; +} __attribute__((packed)); +void gdtset(struct gdtp gdtp); + #endif -- cgit v1.2.1