Espresso 0.0.0e

This commit is contained in:
2025-06-13 18:03:39 -05:00
parent 6d366537dd
commit 1e5b4a765b
40 changed files with 742 additions and 718 deletions

View File

@ -3,21 +3,7 @@
#include <stdint.h>
struct gdt_entry {
uint16_t limit_low; /* Lower 16 bits of limit */
uint16_t base_low; /* Lower 16 bits of base */
uint8_t base_middle; /* Next 8 bits of base */
uint8_t access; /* Access flags */
uint8_t granularity; /* Granularity + high 4 bits of limit */
uint8_t base_high; /* Last 8 bits of base */
} __attribute__((packed));
struct gdt_ptr {
uint16_t limit; /* Size of GDT - 1 */
uint32_t base; /* Base address of GDT */
} __attribute__((packed));
void gdt_install();
void gdt_set_entry(int num, uint32_t base, uint32_t limit, uint8_t access, uint8_t gran);
void gdt_install(bool prnt_gdt);
void create_descriptor(int index, uint32_t base, uint32_t limit, uint16_t flag, bool prnt_gdt);
#endif