Moved reading file from disk to its own super visor terminal command

- Updated gdt assembly
- Updated Interrupt service request handlers
- Improved virtual memory manager
- NOTE: we're dependent on identity mappings for the heap to work
This commit is contained in:
2023-02-08 14:07:44 +01:00
parent 7993a2d172
commit 520104a43a
23 changed files with 474 additions and 701 deletions

View File

@ -0,0 +1,14 @@
#include "acpi.h"
RSDPTR* ACPI::rsd_ptr;
RSDT* ACPI::rsd_table;
void ACPI::initialize(){
// Find the Root System Description Pointer
ACPI::rsd_ptr = FindRSD();
printRSD(rsd_ptr);
// Get the Root System Description Table
ACPI::rsd_table = getRSDT(rsd_ptr);
}

View File

@ -0,0 +1,13 @@
#pragma once
#include "rsdp.h"
class ACPI {
public:
static void initialize();
// In the future ACPI might start
// doing more systems initialization
private:
static RSDPTR* rsd_ptr;
static RSDT* rsd_table;
};

View File

@ -27,8 +27,6 @@ struct RSDT{
uint32_t PointerToSDT[]; // Length of array : (header.Length - sizeof(header))/ 4
}__attribute__((packed));
//NOTE: only scans EBDA enough to find RSD PTR in QEMU
RSDPTR* FindRSD();
void printRSD(RSDPTR* rsd);

View File

@ -155,7 +155,7 @@ inline void init_IDE( uint32_t BAR0, uint32_t BAR1,uint32_t BAR2, uint32_t BAR3,
// 3- Detect ATA-ATAPI Devices:
void DetectDevices(){
inline void DetectDevices(){
int i, j, k, count = 0;
for (i = 0; i < 2; i++)
@ -228,7 +228,7 @@ void DetectDevices(){
}
void Detect_IO_Ports(uint32_t BAR0, uint32_t BAR1,uint32_t BAR2, uint32_t BAR3, uint32_t BAR4){
inline void Detect_IO_Ports(uint32_t BAR0, uint32_t BAR1,uint32_t BAR2, uint32_t BAR3, uint32_t BAR4){
// 1 Detect I/O Ports which interface an IDE Controller
// Based on the implementation within serenity

View File

@ -185,7 +185,11 @@ void PrintPCIDeviceInfo (PCIBusAddress& PCIDeviceAddress)
}
void PCI_Enumerate(){
int devicesFound = 0;
int devicesFound = 0;
printf("Start finding devices, Found: %d devices");
// loop through all possible busses, devices and their functions;
for( int bus = 0 ; bus < 256 ; bus++)
{

View File

@ -10,8 +10,6 @@
extern const char* ClassCodeTable [0x13];
// Note: this could be used to make the api for receiving PCI class codes a bit
// nicer.
struct ClassCodes {