core: remove bozo typedef for types

This commit is contained in:
2025-02-07 12:35:32 +01:00
parent 70739744ac
commit 3b798e5daa
55 changed files with 59841 additions and 1789 deletions

View File

@ -3,14 +3,14 @@
#include "gdt.h"
#include "kprintf.h"
extern void set_gdt(u32 gdt_ptr);
extern void set_gdt(uint32_t gdt_ptr);
struct tss TSS;
u8 gdt_entries[GDT_SIZE * 8];
uint8_t gdt_entries[GDT_SIZE * 8];
struct gdt_descriptor gdtr;
static void set_gdt_entry_value(u8 *target, u32 base, u32 limit,
u8 access, u8 granularity)
static void set_gdt_entry_value(uint8_t *target, uint32_t base, uint32_t limit,
uint8_t access, uint8_t granularity)
{
if (limit > 0xFFFFF) {
kprintf(KERN_ERR
@ -38,7 +38,7 @@ static void set_gdt_entry_value(u8 *target, u32 base, u32 limit,
void init_gdt(void)
{
gdtr.size = 8 * GDT_SIZE - 1;
gdtr.base = (u32)&gdt_entries[0];
gdtr.base = (uint32_t)&gdt_entries[0];
set_gdt_entry_value(gdt_entries + 0x00, 0, 0, 0, 0); // Null segment
@ -92,8 +92,8 @@ void init_gdt(void)
GDT_ACCESS_A_ACCESSED,
GDT_FLAG_32BIT_MODE | GDT_FLAG_PAGE_MODE); // User stack
// TSS
set_gdt_entry_value(gdt_entries + GDT_OFFSET_TSS, (u32)&TSS,
set_gdt_entry_value(gdt_entries + GDT_OFFSET_TSS, (uint32_t)&TSS,
sizeof(struct tss) - 1, 0x89, 0);
set_gdt(((u32)&gdtr));
set_gdt(((uint32_t)&gdtr));
}