Moving lots into seperate folders to cleanup the project structure

- Drivers have now gotten Category folders
- RSDP is now called ACPI
- Ports folders is now called Serial to show that its a serial driver
- Paging assembly definition is moved to the memory folder
- VGA folder has moved into the drivers
- Patched the makefile and include statements to reflect the changes
	in the project structure
This commit is contained in:
Nigel Barink 2021-12-27 15:26:32 +01:00
parent fb2a19e11d
commit b8d75dddae
22 changed files with 28 additions and 29 deletions

View File

@ -75,7 +75,7 @@ $(BUILD_DIR)/kterm.o:
$(CPP) -c $(SRC_DIR)/kernel/tty/kterm.cpp -o $(BUILD_DIR)/kterm.o $(CFLAGS) -fno-exceptions -fno-rtti
$(BUILD_DIR)/boot.o:
$(AS) $(SRC_DIR)/kernel//boot.S -o $(BUILD_DIR)/boot.o
$(AS) $(SRC_DIR)/kernel/boot.S -o $(BUILD_DIR)/boot.o
$(BUILD_DIR)/crti.o:
$(AS) $(SRC_DIR)/kernel/crti.s -o $(BUILD_DIR)/crti.o
@ -84,7 +84,7 @@ $(BUILD_DIR)/crtn.o:
$(AS) $(SRC_DIR)/kernel/crtn.s -o $(BUILD_DIR)/crtn.o
$(BUILD_DIR)/io.o:
$(CPP) -c $(SRC_DIR)/kernel/io.cpp -o $(BUILD_DIR)/io.o $(CFLAGS) -fno-exceptions -fno-rtti
$(CPP) -c $(SRC_DIR)/kernel/drivers/IO/io.cpp -o $(BUILD_DIR)/io.o $(CFLAGS) -fno-exceptions -fno-rtti
$(BUILD_DIR)/PageDirectory.o:
$(CPP) -c $(SRC_DIR)/kernel/memory/PageDirectory.cpp -o $(BUILD_DIR)/PageDirectory.o $(CFLAGS) -fno-exceptions -fno-rtti
@ -106,17 +106,17 @@ $(BUILD_DIR)/PhysicalMemoryManager.o:
$(CPP) -c $(SRC_DIR)/kernel/memory/PhysicalMemoryManager.cpp -o $(BUILD_DIR)/PhysicalMemoryManager.o $(CFLAGS) -fno-exceptions -fno-rtti
$(BUILD_DIR)/pci.o:
$(CPP) -c $(SRC_DIR)/kernel/pci.cpp -o $(BUILD_DIR)/pci.o $(CFLAGS) -fno-exceptions -fno-rtti
$(CPP) -c $(SRC_DIR)/kernel/drivers/IO/PCI/pci.cpp -o $(BUILD_DIR)/pci.o $(CFLAGS) -fno-exceptions -fno-rtti
$(BUILD_DIR)/pcidevice.o:
$(CPP) -c $(SRC_DIR)/kernel/pci/pciDevice.cpp -o $(BUILD_DIR)/pcidevice.o $(CFLAGS) -fno-exceptions -fno-rtti
$(BUILD_DIR)/atapiDevice.o:
$(CPP) -c $(SRC_DIR)/kernel/drivers/atapi/atapiDevice.cpp -o $(BUILD_DIR)/atapiDevice.o $(CFLAGS) -fno-exceptions -fno-rtti
$(CPP) -c $(SRC_DIR)/kernel/drivers/IO/atapi/atapiDevice.cpp -o $(BUILD_DIR)/atapiDevice.o $(CFLAGS) -fno-exceptions -fno-rtti
$(BUILD_DIR)/ataDevice.o:
$(CPP) -c $(SRC_DIR)/kernel/drivers/ata/ataDevice.cpp -o $(BUILD_DIR)/ataDevice.o $(CFLAGS) -fno-exceptions -fno-rtti
$(CPP) -c $(SRC_DIR)/kernel/drivers/IO/ata/ataDevice.cpp -o $(BUILD_DIR)/ataDevice.o $(CFLAGS) -fno-exceptions -fno-rtti
$(BUILD_DIR)/rsdp.o:
$(CPP) -c $(SRC_DIR)/kernel/drivers/rsdp/rsdp.cpp -o $(BUILD_DIR)/rsdp.o $(CFLAGS) -fno-exceptions -fno-rtti
$(CPP) -c $(SRC_DIR)/kernel/drivers/ACPI/rsdp.cpp -o $(BUILD_DIR)/rsdp.o $(CFLAGS) -fno-exceptions -fno-rtti

View File

@ -24,7 +24,7 @@ stack_top:
.include "./src/kernel/irs_table.s"
.include "./src/kernel/irq_table.s"
.include "./src/kernel/idt/idt.s"
.include "./src/kernel/paging.s"
.include "./src/kernel/memory/paging.s"
.global _start

View File

@ -1,8 +1,8 @@
#pragma once
#include <stdint.h>
#include "io.h"
#include "tty/kterm.h"
#include "pci/pciDevice.h"
#include "../io.h"
#include "../../../tty/kterm.h"
#include "../../../pci/pciDevice.h"
// Configuration Space Access Mechanism #1
#define CONFIG_ADDRESS 0xCF8 // Configuration adress that is to be accessed

View File

@ -1,10 +1,10 @@
#pragma once
#include <stdint.h>
#include "../../io.h"
#include "../../ide/ideCommands.h"
#include "../../ide/sampleIDE.definitions.h"
#include "../io.h"
#include "../../../ide/ideCommands.h"
#include "../../../ide/sampleIDE.definitions.h"
#include "../../tty/kterm.h"
#include "../../../tty/kterm.h"
/*
* This first driver wil make use of IO ports.

View File

@ -1,10 +1,10 @@
#pragma once
#include <stdint.h>
#include "../../io.h"
#include "../../ide/ideCommands.h"
#include "../../ide/sampleIDE.definitions.h"
#include "../io.h"
#include "../../../ide/ideCommands.h"
#include "../../../ide/sampleIDE.definitions.h"
#include "../../tty/kterm.h"
#include "../../../tty/kterm.h"
/*
* This first driver wil make use of IO ports.

View File

@ -2,7 +2,7 @@
#include "stdint.h"
#include "stddef.h"
#include "../vga/colors.h"
#include "../drivers/VGA/colors.h"
#include "../pic/pic.h"
#include "../tty/kterm.h"

View File

@ -4,7 +4,7 @@ extern "C"{
}
#include "vga/VBE.h"
#include "drivers/VGA/VBE.h"
#include "tty/kterm.h"
#include "./bootloader/multiboot.h"
@ -14,18 +14,17 @@ extern "C"{
#include "gdt/gdtc.h"
#include "idt/idt.h"
#include "io.h"
#include "drivers/IO/io.h"
#include "time.h"
#include "cpu.h"
#include "serial.h"
#include "pci.h"
#include "drivers/IO/PCI/pci.h"
#include "ide/ide.h"
//#include "drivers/atapi/atapiDevice.h"
#include "drivers/ata/ataDevice.h"
#include "./drivers/IO/ata/ataDevice.h"
#include "./PartitionTable/MBR/MasterBootRecord.h"
#include "./filesytems/FAT32/BiosParameterBlock.h"
#include "./filesytems/FAT32/ExtendBootRecord.h"
#include "./drivers/rsdp/rsdp.h"
#include "drivers/ACPI/rsdp.h"
#define CHECK_FLAG(flags, bit) ((flags) & (1 <<(bit)))

View File

@ -1,5 +1,5 @@
#pragma once
#include "../io.h"
#include "../drivers/IO/io.h"
#define PIC1 0x20 /* IO base address for master PIC */
#define PIC2 0xA0 /* IO base address for slave PIC */

View File

@ -1,7 +1,7 @@
#pragma once
#include "tty/kterm.h"
#include "io.h"
#include "drivers/IO/io.h"
#define PORT 0x3f8
inline static int init_serial() {
outb(PORT + 1, 0x00); // Disable all interrupts

View File

@ -4,8 +4,8 @@
#include <stdint.h>
#include <stdbool.h>
#include "../vga/colors.h"
#include "../io.h"
#include "../drivers/VGA/colors.h"
#include "../drivers/IO/io.h"
extern "C"{
#include "./../../libc/include/string.h"