/** * GDT section header of rockOS * Copyright (C) 2022 Furkan Mudanyali * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, _either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef _ROCKOS_GDT_H #define _ROCKOS_GDT_H #include #define GDT_ENTRIES 0x6 typedef struct { uint16_t limit; uint32_t base; } __attribute__((packed)) gdtr_t; typedef struct { uint16_t limit_low; uint16_t base_low; uint8_t base_mid; uint8_t access; uint8_t limit_hi_flags; uint8_t base_high; } __attribute__((packed)) gdt_entry_t; #endif