mirror of
https://github.com/tailix/kernel.git
synced 2024-11-27 11:24:34 -05:00
Move structs from headers to sources
This commit is contained in:
parent
a1b7b35e72
commit
d1ebb35f58
4 changed files with 31 additions and 31 deletions
16
arch/gdt.c
16
arch/gdt.c
|
@ -2,6 +2,22 @@
|
|||
|
||||
#include "logger.h"
|
||||
|
||||
struct GdtPointer {
|
||||
unsigned short limit;
|
||||
unsigned int base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct GdtEntry {
|
||||
unsigned short limit_low;
|
||||
unsigned short base_low;
|
||||
unsigned char base_middle;
|
||||
unsigned char access;
|
||||
unsigned char granularity;
|
||||
unsigned char base_high;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
static struct GdtPointer gdt_pointer;
|
||||
|
||||
static struct GdtEntry gdt_entries[5];
|
||||
|
|
16
arch/gdt.h
16
arch/gdt.h
|
@ -1,22 +1,6 @@
|
|||
#ifndef TAILIX_KERNEL_INCLUDED_GDT
|
||||
#define TAILIX_KERNEL_INCLUDED_GDT 1
|
||||
|
||||
struct GdtPointer {
|
||||
unsigned short limit;
|
||||
unsigned int base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct GdtEntry {
|
||||
unsigned short limit_low;
|
||||
unsigned short base_low;
|
||||
unsigned char base_middle;
|
||||
unsigned char access;
|
||||
unsigned char granularity;
|
||||
unsigned char base_high;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
void gdt_initialize();
|
||||
|
||||
#endif
|
||||
|
|
15
arch/idt.c
15
arch/idt.c
|
@ -2,6 +2,21 @@
|
|||
|
||||
#include "logger.h"
|
||||
|
||||
struct IdtPointer {
|
||||
unsigned short limit;
|
||||
unsigned int base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct IdtEntry {
|
||||
unsigned short base_lo;
|
||||
unsigned short sel;
|
||||
unsigned char always0;
|
||||
unsigned char flags;
|
||||
unsigned short base_hi;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
static struct IdtPointer idt_pointer;
|
||||
|
||||
static struct IdtEntry idt_entries[256];
|
||||
|
|
15
arch/idt.h
15
arch/idt.h
|
@ -1,21 +1,6 @@
|
|||
#ifndef TAILIX_KERNEL_INCLUDED_IDT
|
||||
#define TAILIX_KERNEL_INCLUDED_IDT 1
|
||||
|
||||
struct IdtPointer {
|
||||
unsigned short limit;
|
||||
unsigned int base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct IdtEntry {
|
||||
unsigned short base_lo;
|
||||
unsigned short sel;
|
||||
unsigned char always0;
|
||||
unsigned char flags;
|
||||
unsigned short base_hi;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
void idt_initialize();
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue