core: change types from uint32_t to u32 (e.g)
This commit is contained in:
@ -3,14 +3,14 @@
|
||||
#include "gdt.h"
|
||||
#include "kprintf.h"
|
||||
|
||||
extern void set_gdt(uint32_t gdt_ptr);
|
||||
extern void set_gdt(u32 gdt_ptr);
|
||||
|
||||
struct tss TSS;
|
||||
uint8_t gdt_entries[GDT_SIZE * 8];
|
||||
u8 gdt_entries[GDT_SIZE * 8];
|
||||
struct gdt_descriptor gdtr;
|
||||
|
||||
static void set_gdt_entry_value(uint8_t *target, uint32_t base, uint32_t limit,
|
||||
uint8_t access, uint8_t granularity)
|
||||
static void set_gdt_entry_value(u8 *target, u32 base, u32 limit,
|
||||
u8 access, u8 granularity)
|
||||
{
|
||||
if (limit > 0xFFFFF) {
|
||||
kprintf(KERN_ERR
|
||||
@ -38,7 +38,7 @@ static void set_gdt_entry_value(uint8_t *target, uint32_t base, uint32_t limit,
|
||||
void init_gdt(void)
|
||||
{
|
||||
gdtr.size = 8 * GDT_SIZE - 1;
|
||||
gdtr.base = (uint32_t)&gdt_entries[0];
|
||||
gdtr.base = (u32)&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, (uint32_t)&TSS,
|
||||
set_gdt_entry_value(gdt_entries + GDT_OFFSET_TSS, (u32)&TSS,
|
||||
sizeof(struct tss) - 1, 0x89, 0);
|
||||
|
||||
set_gdt(((uint32_t)&gdtr));
|
||||
set_gdt(((u32)&gdtr));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user