Move headers to include/
This commit is contained in:
+6
-6
@@ -4,16 +4,16 @@
|
||||
* @license GPL-3.0-only
|
||||
*/
|
||||
|
||||
#include "idt.h"
|
||||
#include <idt/idt.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "io/serial/serial.h"
|
||||
#include "io/kbd/ps2.h"
|
||||
#include <io/serial/serial.h>
|
||||
#include <io/kbd/ps2.h>
|
||||
#include <kernel.h>
|
||||
#include <stdbool.h>
|
||||
#include "sched/scheduler.h"
|
||||
#include "config.h"
|
||||
#include "sched/process.h"
|
||||
#include <sched/scheduler.h>
|
||||
#include <config.h>
|
||||
#include <sched/process.h>
|
||||
|
||||
struct interrupt_descriptor idt[256];
|
||||
struct idtr idt_reg;
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* @author xamidev <xamidev@riseup.net>
|
||||
* @brief Interrupt Descriptor Table setup and dispatching
|
||||
* @license GPL-3.0-only
|
||||
*/
|
||||
|
||||
#ifndef IDT_H
|
||||
#define IDT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void idt_init(void);
|
||||
|
||||
struct interrupt_descriptor {
|
||||
uint16_t address_low;
|
||||
uint16_t selector;
|
||||
uint8_t ist;
|
||||
uint8_t flags;
|
||||
uint16_t address_mid;
|
||||
uint32_t address_high;
|
||||
uint32_t reserved;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct idtr {
|
||||
uint16_t limit;
|
||||
uint64_t base;
|
||||
} __attribute__((packed));
|
||||
|
||||
// All general-purpose registers (except rsp) as stored on the stack,
|
||||
// plus the values we pushed (vector number, error code) and the iret frame
|
||||
// In reverse order because the stack grows downwards.
|
||||
struct cpu_status_t {
|
||||
uint64_t r15;
|
||||
uint64_t r14;
|
||||
uint64_t r13;
|
||||
uint64_t r12;
|
||||
uint64_t r11;
|
||||
uint64_t r10;
|
||||
uint64_t r9;
|
||||
uint64_t r8;
|
||||
uint64_t rbp;
|
||||
uint64_t rdi;
|
||||
uint64_t rsi;
|
||||
uint64_t rdx;
|
||||
uint64_t rcx;
|
||||
uint64_t rbx;
|
||||
uint64_t rax;
|
||||
|
||||
uint64_t vector_number;
|
||||
uint64_t error_code;
|
||||
|
||||
uint64_t iret_rip;
|
||||
uint64_t iret_cs;
|
||||
uint64_t iret_flags;
|
||||
uint64_t iret_rsp;
|
||||
uint64_t iret_ss;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user