Files
termOS/kernel/inc/arch/x86_64/gdt.h
T
Karina 794dae7084 Refactor: Modular kernel structure & WIP keyboard driver
- Reorganized src/inc into arch, drivers, core, shell
- Updated CMakeLists.txt for multi-arch support
- Added basic scancode-to-ASCII mapping (US QWERTY)
- Initial KSH (Kernel Shell) skeleton
- WIP: Keyboard modifier handling
2025-12-27 22:10:24 +04:00

45 lines
720 B
C

// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (c) 2025 0xKarinyash
#pragma once
#ifndef GDT_H
#define GDT_H
#include <types.h>
typedef struct {
u16 limit_low;
u16 base_low;
u8 base_middle;
u8 access;
u8 granularity;
u8 base_high;
} __attribute__((packed)) GDTDescriptor;
typedef struct {
u16 limit;
u64 base;
} __attribute__((packed)) GDTPtr;
typedef struct {
u32 reserved0;
u64 rsp0;
u64 rsp1;
u64 rsp2;
u64 reserved1;
u64 ist1;
u64 ist2;
u64 ist3;
u64 ist4;
u64 ist5;
u64 ist6;
u64 ist7;
u64 reserved2;
u16 reserved3;
u16 iomap_base;
} __attribute__((packed)) TSS;
void gdt_init();
#endif