Massive backlog of changes
This commit is contained in:
@@ -61,7 +61,7 @@ struct apic_register_t
|
||||
{
|
||||
uint32_t value;
|
||||
uint32_t padding[3];
|
||||
};
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct apic_lapic_version_t
|
||||
{
|
||||
@@ -71,7 +71,7 @@ struct apic_lapic_version_t
|
||||
uint32_t suppress_eoi_broadcast : 1;
|
||||
uint32_t reserved_2 : 7;
|
||||
uint32_t padding[3];
|
||||
};
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct apic_lvt_t
|
||||
{
|
||||
@@ -86,7 +86,7 @@ struct apic_lvt_t
|
||||
uint32_t timer_mode : 2;
|
||||
uint32_t reserved_2 : 13;
|
||||
uint32_t padding[3];
|
||||
};
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct apic_icr_t
|
||||
{
|
||||
@@ -104,7 +104,7 @@ struct apic_icr_t
|
||||
uint32_t reserved : 24;
|
||||
uint32_t destination : 8;
|
||||
uint32_t padding_2[3];
|
||||
};
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct apic_registers_t
|
||||
{
|
||||
@@ -138,9 +138,10 @@ struct apic_registers_t
|
||||
struct apic_register_t reserved_4[4];
|
||||
struct apic_register_t divide_config;
|
||||
struct apic_register_t reserved_5;
|
||||
};
|
||||
struct apic_register_t reserved_76[16 * 12];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
extern struct apic_registers_t volatile *apic_registers;
|
||||
extern struct apic_registers_t volatile apic_registers;
|
||||
|
||||
void apic_enable();
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ void isr_generic(struct interrupt_frame_t *frame);
|
||||
__attribute__ ((interrupt))
|
||||
void isr_division_by_zero(struct interrupt_frame_t *frame);
|
||||
|
||||
__attribute__ ((interrupt))
|
||||
void isr_segment_not_present(struct interrupt_frame_t *frame, unsigned int error);
|
||||
|
||||
__attribute__ ((interrupt))
|
||||
void isr_gp_fault(struct interrupt_frame_t *frame, unsigned int error);
|
||||
|
||||
|
||||
@@ -1,84 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "memorymap.h"
|
||||
#include "module.h"
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define module_limit 8
|
||||
|
||||
enum multiboot2_tag_types
|
||||
{
|
||||
MB_END_TAG = 0,
|
||||
MB_BOOT_COMMAND = 1,
|
||||
MB_BOOTLOADER = 2,
|
||||
MB_MODULE = 3,
|
||||
MB_MEMORY_INFO = 4,
|
||||
MB_BIOS_BOOT_DEVICE = 5,
|
||||
MB_MEMORY_MAP = 6,
|
||||
MB_VBE = 7,
|
||||
MB_FRAMEBUFFER = 8,
|
||||
MB_ELF_SYMBOLS = 9,
|
||||
MB_APM = 10,
|
||||
MB_EFI32_SYSTEM_TABLE = 11,
|
||||
MB_EFI64_SYSTEM_TABLE = 12,
|
||||
MB_SMBIOS = 13,
|
||||
MB_ACPI10_RSDP = 14,
|
||||
MB_ACPT20_RSDP = 15,
|
||||
MB_NETOWRK = 16,
|
||||
MB_EFI_MEMORY_MAP = 17,
|
||||
MB_EFI_BOOT_SERVICES = 18,
|
||||
MB_EFI32_IMAGE = 19,
|
||||
MB_EFI64_IMAGE = 20,
|
||||
MB_LOAD_ADDRESS = 21
|
||||
};
|
||||
|
||||
enum multiboot2_memory_types
|
||||
{
|
||||
MB_AVAILABLE = 1,
|
||||
MB_ACPI = 3,
|
||||
MB_DEFECTIVE = 5
|
||||
};
|
||||
|
||||
struct multiboot2_string_t
|
||||
{
|
||||
uint32_t type;
|
||||
uint32_t size;
|
||||
char str;
|
||||
};
|
||||
|
||||
struct multiboot2_module_t
|
||||
{
|
||||
uint32_t type;
|
||||
uint32_t size;
|
||||
uint32_t start;
|
||||
uint32_t end;
|
||||
char str;
|
||||
};
|
||||
|
||||
struct multiboot2_map_entry_t
|
||||
{
|
||||
uint64_t base;
|
||||
uint64_t length;
|
||||
uint32_t type;
|
||||
};
|
||||
|
||||
struct multiboot2_memory_map_t
|
||||
{
|
||||
uint32_t type;
|
||||
uint32_t size;
|
||||
uint32_t entry_size;
|
||||
uint32_t entry_version;
|
||||
struct multiboot2_map_entry_t entries;
|
||||
};
|
||||
|
||||
struct boot_info_t
|
||||
{
|
||||
char *bootloader;
|
||||
char *parameters;
|
||||
size_t module_count;
|
||||
struct memory_map_t map;
|
||||
struct module_t modules[module_limit];
|
||||
};
|
||||
#include "kernel.h"
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param boot_info
|
||||
* @param table
|
||||
* @return void*
|
||||
*/
|
||||
void *read_multiboot_table(struct boot_info_t *boot_info, void *table);
|
||||
|
||||
Reference in New Issue
Block a user