feat: gdt, attributes move, reorder
Added late gdt setup with initial tss Moved attributes to include root Reordered some imports
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
// Created by rick on 22-04-20.
|
||||
//
|
||||
|
||||
#include <attributes.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <myke/mem/pmm.h>
|
||||
#include <myke/mem/mem.h>
|
||||
#include <myke/libk/libk.h>
|
||||
#include <myke/attributes.h>
|
||||
#include <myke/mem/mem.h>
|
||||
#include <myke/mem/pmm.h>
|
||||
|
||||
#define MEMMAP_ENTRIES 16
|
||||
|
||||
@@ -25,7 +25,7 @@ typedef struct {
|
||||
uint32_t address;
|
||||
uint32_t length;
|
||||
uint32_t type;
|
||||
} packed mmap_entry;
|
||||
} att_packed mmap_entry;
|
||||
|
||||
int last_memmap_entry = 0;
|
||||
mmap_entry memmap[MEMMAP_ENTRIES] = {
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Created by rick on 21-02-21.
|
||||
//
|
||||
|
||||
#include <attributes.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <myke/mem/paging.h>
|
||||
#include <myke/attributes.h>
|
||||
|
||||
#define TABLE_ADDR_MASK 0xFFFFF000
|
||||
#define DIRECTORY_SIZE 1024
|
||||
@@ -25,10 +25,10 @@ typedef struct {
|
||||
bool page_size: 1;
|
||||
bool global: 1; // ignored
|
||||
uint8_t avail: 3;
|
||||
} packed;
|
||||
} att_packed;
|
||||
uint32_t addr;
|
||||
};
|
||||
} packed page_directory_entry;
|
||||
} att_packed page_directory_entry;
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
@@ -43,12 +43,12 @@ typedef struct {
|
||||
char ignored: 1;
|
||||
bool global: 1;
|
||||
uint8_t available: 3;
|
||||
} packed;
|
||||
} att_packed;
|
||||
uint32_t addr;
|
||||
};
|
||||
} packed page_table_entry;
|
||||
} att_packed page_table_entry;
|
||||
|
||||
page_directory_entry page_directory[DIRECTORY_SIZE] at_aligned(4096);
|
||||
page_directory_entry page_directory[DIRECTORY_SIZE] att_aligned(4096);
|
||||
|
||||
void page_pre_init() {
|
||||
for (int i = 0; i < DIRECTORY_SIZE; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user