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,15 +2,15 @@
|
||||
// Created by rick on 06-02-21.
|
||||
//
|
||||
|
||||
#include <attributes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <myke/fs/mbr.h>
|
||||
#include <myke/drivers/pci/ide.h>
|
||||
#include <myke/fs/blockdev.h>
|
||||
#include <myke/attributes.h>
|
||||
#include <myke/fs/mbr.h>
|
||||
|
||||
typedef struct {
|
||||
uint8_t bootable;
|
||||
@@ -23,14 +23,14 @@ typedef struct {
|
||||
uint16_t ending_cylinder: 10;
|
||||
uint32_t start_lba;
|
||||
uint32_t num_lbas;
|
||||
} packed mbr_partition_table_entry;
|
||||
} att_packed mbr_partition_table_entry;
|
||||
|
||||
typedef struct {
|
||||
uint32_t unique_id;
|
||||
uint16_t reserved;
|
||||
mbr_partition_table_entry entries[4];
|
||||
uint8_t signature[2];
|
||||
} packed mbr_table;
|
||||
} att_packed mbr_table;
|
||||
|
||||
typedef struct {
|
||||
const block_device_t *device;
|
||||
@@ -52,7 +52,7 @@ mbr_block_dev_access(const block_device_t *device, uint8_t direction, uint32_t l
|
||||
return info->device->access(info->device, direction, actual_lba, sectors, target);
|
||||
}
|
||||
|
||||
uint8_t used mbr_check_device(const block_device_t *device, uint8_t *first_sector) {
|
||||
uint8_t att_used mbr_check_device(const block_device_t *device, uint8_t *first_sector) {
|
||||
mbr_table table;
|
||||
memcpy((uint8_t *) &table, first_sector + (device->block_size - sizeof(mbr_table)), sizeof(mbr_table));
|
||||
if (table.signature[0] != 0x55 && table.signature[1] != 0xAA) { // AA 55 but in little endian
|
||||
|
||||
Reference in New Issue
Block a user