Merge into main the new state of the operating system/kernel #1
							
								
								
									
										12
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								Makefile
									
									
									
									
									
								
							@ -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
 | 
						$(CPP) -c $(SRC_DIR)/kernel/tty/kterm.cpp  -o $(BUILD_DIR)/kterm.o $(CFLAGS) -fno-exceptions -fno-rtti
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(BUILD_DIR)/boot.o:
 | 
					$(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:
 | 
					$(BUILD_DIR)/crti.o:
 | 
				
			||||||
	$(AS) $(SRC_DIR)/kernel/crti.s -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
 | 
						$(AS) $(SRC_DIR)/kernel/crtn.s -o $(BUILD_DIR)/crtn.o
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(BUILD_DIR)/io.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:
 | 
					$(BUILD_DIR)/PageDirectory.o:
 | 
				
			||||||
	$(CPP) -c $(SRC_DIR)/kernel/memory/PageDirectory.cpp -o $(BUILD_DIR)/PageDirectory.o $(CFLAGS) -fno-exceptions -fno-rtti 
 | 
						$(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
 | 
						$(CPP) -c $(SRC_DIR)/kernel/memory/PhysicalMemoryManager.cpp  -o $(BUILD_DIR)/PhysicalMemoryManager.o $(CFLAGS) -fno-exceptions -fno-rtti
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(BUILD_DIR)/pci.o:
 | 
					$(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:
 | 
					$(BUILD_DIR)/pcidevice.o:
 | 
				
			||||||
	$(CPP) -c $(SRC_DIR)/kernel/pci/pciDevice.cpp  -o $(BUILD_DIR)/pcidevice.o $(CFLAGS) -fno-exceptions -fno-rtti
 | 
						$(CPP) -c $(SRC_DIR)/kernel/pci/pciDevice.cpp  -o $(BUILD_DIR)/pcidevice.o $(CFLAGS) -fno-exceptions -fno-rtti
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(BUILD_DIR)/atapiDevice.o:
 | 
					$(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:
 | 
					$(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:
 | 
					$(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
 | 
				
			||||||
 | 
				
			|||||||
@ -24,7 +24,7 @@ stack_top:
 | 
				
			|||||||
.include "./src/kernel/irs_table.s"
 | 
					.include "./src/kernel/irs_table.s"
 | 
				
			||||||
.include "./src/kernel/irq_table.s"
 | 
					.include "./src/kernel/irq_table.s"
 | 
				
			||||||
.include "./src/kernel/idt/idt.s"
 | 
					.include "./src/kernel/idt/idt.s"
 | 
				
			||||||
.include "./src/kernel/paging.s"
 | 
					.include "./src/kernel/memory/paging.s"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.global _start
 | 
					.global _start
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
#include <stdint.h>
 | 
					#include <stdint.h>
 | 
				
			||||||
#include "io.h"
 | 
					#include "../io.h"
 | 
				
			||||||
#include "tty/kterm.h"
 | 
					#include "../../../tty/kterm.h"
 | 
				
			||||||
#include "pci/pciDevice.h"
 | 
					#include "../../../pci/pciDevice.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Configuration Space Access Mechanism #1
 | 
					// Configuration Space Access Mechanism #1
 | 
				
			||||||
#define CONFIG_ADDRESS 0xCF8 // Configuration adress that is to be accessed
 | 
					#define CONFIG_ADDRESS 0xCF8 // Configuration adress that is to be accessed
 | 
				
			||||||
@ -1,10 +1,10 @@
 | 
				
			|||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
#include <stdint.h>
 | 
					#include <stdint.h>
 | 
				
			||||||
#include "../../io.h"
 | 
					#include "../io.h"
 | 
				
			||||||
#include "../../ide/ideCommands.h"
 | 
					#include "../../../ide/ideCommands.h"
 | 
				
			||||||
#include "../../ide/sampleIDE.definitions.h"
 | 
					#include "../../../ide/sampleIDE.definitions.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "../../tty/kterm.h"
 | 
					#include "../../../tty/kterm.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
* This first driver wil make use of IO ports.
 | 
					* This first driver wil make use of IO ports.
 | 
				
			||||||
@ -1,10 +1,10 @@
 | 
				
			|||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
#include <stdint.h>
 | 
					#include <stdint.h>
 | 
				
			||||||
#include "../../io.h"
 | 
					#include "../io.h"
 | 
				
			||||||
#include "../../ide/ideCommands.h"
 | 
					#include "../../../ide/ideCommands.h"
 | 
				
			||||||
#include "../../ide/sampleIDE.definitions.h"
 | 
					#include "../../../ide/sampleIDE.definitions.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "../../tty/kterm.h"
 | 
					#include "../../../tty/kterm.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
* This first driver wil make use of IO ports.
 | 
					* This first driver wil make use of IO ports.
 | 
				
			||||||
@ -2,7 +2,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "stdint.h"
 | 
					#include "stdint.h"
 | 
				
			||||||
#include "stddef.h"
 | 
					#include "stddef.h"
 | 
				
			||||||
#include "../vga/colors.h"
 | 
					#include "../drivers/VGA/colors.h"
 | 
				
			||||||
#include "../pic/pic.h"
 | 
					#include "../pic/pic.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "../tty/kterm.h"
 | 
					#include "../tty/kterm.h"
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ extern "C"{
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "vga/VBE.h"
 | 
					#include "drivers/VGA/VBE.h"
 | 
				
			||||||
#include "tty/kterm.h"
 | 
					#include "tty/kterm.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "./bootloader/multiboot.h"
 | 
					#include "./bootloader/multiboot.h"
 | 
				
			||||||
@ -14,18 +14,17 @@ extern "C"{
 | 
				
			|||||||
#include "gdt/gdtc.h"
 | 
					#include "gdt/gdtc.h"
 | 
				
			||||||
#include "idt/idt.h"
 | 
					#include "idt/idt.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "io.h"
 | 
					#include "drivers/IO/io.h"
 | 
				
			||||||
#include "time.h"
 | 
					#include "time.h"
 | 
				
			||||||
#include "cpu.h"
 | 
					#include "cpu.h"
 | 
				
			||||||
#include "serial.h"
 | 
					#include "serial.h"
 | 
				
			||||||
#include "pci.h"
 | 
					#include "drivers/IO/PCI/pci.h"
 | 
				
			||||||
#include "ide/ide.h"
 | 
					#include "ide/ide.h"
 | 
				
			||||||
//#include "drivers/atapi/atapiDevice.h"
 | 
					#include "./drivers/IO/ata/ataDevice.h"
 | 
				
			||||||
#include "drivers/ata/ataDevice.h"
 | 
					 | 
				
			||||||
#include "./PartitionTable/MBR/MasterBootRecord.h"
 | 
					#include "./PartitionTable/MBR/MasterBootRecord.h"
 | 
				
			||||||
#include "./filesytems/FAT32/BiosParameterBlock.h"
 | 
					#include "./filesytems/FAT32/BiosParameterBlock.h"
 | 
				
			||||||
#include "./filesytems/FAT32/ExtendBootRecord.h"
 | 
					#include "./filesytems/FAT32/ExtendBootRecord.h"
 | 
				
			||||||
#include "./drivers/rsdp/rsdp.h"
 | 
					#include "drivers/ACPI/rsdp.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define CHECK_FLAG(flags, bit) ((flags) & (1 <<(bit)))
 | 
					#define CHECK_FLAG(flags, bit) ((flags) & (1 <<(bit)))
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
#pragma once 
 | 
					#pragma once 
 | 
				
			||||||
#include "../io.h"
 | 
					#include "../drivers/IO/io.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define PIC1		0x20		/* IO base address for master PIC */
 | 
					#define PIC1		0x20		/* IO base address for master PIC */
 | 
				
			||||||
#define PIC2		0xA0		/* IO base address for slave PIC */
 | 
					#define PIC2		0xA0		/* IO base address for slave PIC */
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "tty/kterm.h"
 | 
					#include "tty/kterm.h"
 | 
				
			||||||
#include "io.h"
 | 
					#include "drivers/IO/io.h"
 | 
				
			||||||
#define PORT 0x3f8 
 | 
					#define PORT 0x3f8 
 | 
				
			||||||
inline static int init_serial() {
 | 
					inline static int init_serial() {
 | 
				
			||||||
   outb(PORT + 1, 0x00);    // Disable all interrupts
 | 
					   outb(PORT + 1, 0x00);    // Disable all interrupts
 | 
				
			||||||
 | 
				
			|||||||
@ -4,8 +4,8 @@
 | 
				
			|||||||
#include <stdint.h>
 | 
					#include <stdint.h>
 | 
				
			||||||
#include <stdbool.h>
 | 
					#include <stdbool.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "../vga/colors.h"
 | 
					#include "../drivers/VGA/colors.h"
 | 
				
			||||||
#include "../io.h"
 | 
					#include "../drivers/IO/io.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern "C"{
 | 
					extern "C"{
 | 
				
			||||||
    #include "./../../libc/include/string.h"
 | 
					    #include "./../../libc/include/string.h"
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user