Clean: harmonizing & header-commenting code

This commit is contained in:
xamidev
2024-08-24 17:17:53 +02:00
parent a915ac15a1
commit fbd4fa6089
46 changed files with 339 additions and 130 deletions

View File

@@ -1,8 +1,28 @@
// Global descriptor table setup header
// Author: xamidev
// Licensed under the Unlicense. See the repo below.
// https//github.com/xamidev/blankos
#ifndef GDT_H
#define GDT_H
void gdt_set_gate(int num, unsigned long base, unsigned long limit, unsigned char access, unsigned char gran);
struct gdt_entry
{
unsigned short limit_low;
unsigned short base_low;
unsigned char base_middle;
unsigned char access;
unsigned char granularity;
unsigned char base_high;
} __attribute__((packed));
struct gdt_ptr
{
unsigned short limit;
unsigned int base;
} __attribute__((packed));
void gdt_set_gate(int num, unsigned long base, unsigned long limit, unsigned char access, unsigned char gran);
void gdt_install();
#endif