Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ SUBDIRS = src
include makefile.inc

kernel.bin: $(SUBDIRS)
@$(GCC) -T $(OS_CPP)/linker.ld -o $(BUILD_TO) -ffreestanding -O2 -fno-rtti -fno-exceptions -nostartfiles -nostdlib $(OBJ_DIR)/*.o -lgcc
@$(GCC) -T $(OS_CPP)/linker.ld -o $(BUILD_TO) -ffreestanding -O2 -fno-rtti -fno-exceptions -nostartfiles -nostdlib $(OBJ_DIR)/*.o -lgcc
@sync

clean:
rm $(OBJ_DIR)/*.o
rm $(OBJ_DIR)/*.o
6 changes: 3 additions & 3 deletions makefile.inc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
AS = i686-elf-as
GPP = i686-elf-g++
GCC = i686-elf-gcc
OS_CPP = /media/sdcard/ExOS
BUILD_TO = /mnt/boot/kernel.bin
CFLAGS = -c -ffreestanding -O2 -Wall -Wextra -fno-rtti -fno-exceptions -std=gnu++14
OS_CPP = /home/garrett/workspace/ExOS
BUILD_TO = /run/media/garrett/EXOS/boot/kernel.bin
CFLAGS = -c -ffreestanding -O2 -Wall -Wextra -fno-rtti -fno-exceptions -std=gnu++14 -I$(OS_CPP)/src
OBJ_DIR = $(OS_CPP)/build

%.o: %.c
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/clib_misc/Abort.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* Created on: Aug 14, 2017
* Author: garrett
*/
#include "abort.h"
#include "../drivers/TTY/Console.h"
#include "clib_misc/Abort.h"
#include "drivers/TTY/Console.h"

extern "C"
void /*__cxxabiv1::*/__cxa_pure_virtual(void) {
Expand Down
2 changes: 1 addition & 1 deletion src/clib_misc/Abort.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef SRC_CLIBMISC_ABORT_H_
#define SRC_CLIBMISC_ABORT_H_

#include "../global.h"
#include "Global.h"

#if defined(__cplusplus)
extern "C" {/* Use C linkage for kernel_main. */
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/Keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: garrett
*/

#include "Keyboard.h"
#include "drivers/Keyboard.h"

Keyboard::Keyboard( ) {

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/Keyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef KEYBOARD_H_
#define KEYBOARD_H_

#include "../Global.h"
#include "Global.h"
/**
* the possible scan code sets
*/
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/PCI/PCI.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: garrett
*/

#include "PCI.h"
#include "drivers/PCI/PCI.h"

//TODO clean up a lot

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/PCI/PCI.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef SRC_DRIVERS_PCI_PCI_H_
#define SRC_DRIVERS_PCI_PCI_H_

#include "../../Global.h"
#include "Global.h"

extern int8_t MAX_PCI_FUNCTIONS;
/**
Expand Down
12 changes: 6 additions & 6 deletions src/drivers/PCI/PCIDeviceList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* Author: garrett
*/

#include "PCIDeviceList.h"
#include "PCI.h"
#include "PCI_devices/PCIStandardDevice.h"
#include "PCI_devices/PCIBridgeDevice.h"
#include "PCI_devices/PCICardBusDevice.h"
#include "../TTY/Console.h"
#include "drivers/PCI/PCIDeviceList.h"
#include "drivers/PCI/PCI.h"
#include "drivers/PCI/PCI_devices/PCIStandardDevice.h"
#include "drivers/PCI/PCI_devices/PCIBridgeDevice.h"
#include "drivers/PCI/PCI_devices/PCICardBusDevice.h"
#include "drivers/TTY/Console.h"

PCIDeviceList::PCIDeviceList( ) {
_list = new LinkedList<PCIDevice*>;
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/PCI/PCIDeviceList.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#ifndef SRC_DRIVERS_PCI_PCIDEVICELIST_H_
#define SRC_DRIVERS_PCI_PCIDEVICELIST_H_

#include "../../Global.h"
#include "../../utils/linked_list/LinkedList.h"
#include "Global.h"
#include "utils/linked_list/LinkedList.h"

class PCIDevice;

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/PCI/PCI_devices/PCIBridgeDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Created on: Aug 16, 2017
* Author: garrett
*/
#include "PCIBridgeDevice.h"
#include "drivers/PCI/PCI_devices/PCIBridgeDevice.h"
PCIBridgeDevice::PCIBridgeDevice( ) {
// TODO Auto-generated constructor stub

Expand Down
4 changes: 2 additions & 2 deletions src/drivers/PCI/PCI_devices/PCIBridgeDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#ifndef SRC_DRIVERS_PCI_PCIDEVICES_PCIBRIDGEDEVICE_H_
#define SRC_DRIVERS_PCI_PCIDEVICES_PCIBRIDGEDEVICE_H_

#include "PCIDevice.h"
#include "../../../Global.h"
#include "drivers/PCI/PCI_devices/PCIDevice.h"
#include "Global.h"

class PCIBridgeDevice: public PCIDevice {
public:
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/PCI/PCI_devices/PCICardBusDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Created on: Aug 16, 2017
* Author: garrett
*/
#include "PCICardBusDevice.h"
#include "drivers/PCI/PCI_devices/PCICardBusDevice.h"
PCICardBusDevice::PCICardBusDevice( ) {
// TODO Auto-generated constructor stub

Expand Down
4 changes: 2 additions & 2 deletions src/drivers/PCI/PCI_devices/PCICardBusDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#ifndef SRC_DRIVERS_PCI_PCIDEVICES_PCICARDBUSDEVICE_H_
#define SRC_DRIVERS_PCI_PCIDEVICES_PCICARDBUSDEVICE_H_

#include "PCIDevice.h"
#include "../../../Global.h"
#include "drivers/PCI/PCI_devices/PCIDevice.h"
#include "Global.h"

class PCICardBusDevice: public PCIDevice {
public:
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/PCI/PCI_devices/PCIDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* Author: garrett
*/

#include "PCIDevice.h"
#include "../PCI.h"
#include "drivers/PCI/PCI_devices/PCIDevice.h"
#include "drivers/PCI/PCI.h"

PCIDevice::PCIDevice( ) {
// TODO Auto-generated constructor stub
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/PCI/PCI_devices/PCIDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef SRC_DRIVERS_PCI_PCIDEVICE_H_
#define SRC_DRIVERS_PCI_PCIDEVICE_H_

#include "../../../Global.h"
#include "Global.h"


class PCIDevice {
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/PCI/PCI_devices/PCIStandardDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* Author: garrett
*/

#include "PCIStandardDevice.h"
#include "../PCI.h"
#include "drivers/PCI/PCI_devices/PCIStandardDevice.h"
#include "drivers/PCI/PCI.h"

PCIStandardDevice::PCIStandardDevice( ) :
PCIDevice( ) {
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/PCI/PCI_devices/PCIStandardDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#ifndef PCISTANDARDDEVICE_H_
#define PCISTANDARDDEVICE_H_

#include "../../../global.h"
#include "PCIDevice.h"
#include "Global.h"
#include "drivers/PCI/PCI_devices/PCIDevice.h"


//class PCIDevice;
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/PCI/USB/USB.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: garrett
*/

#include "USB.h"
#include "drivers/PCI/USB/USB.h"

uint8_t maxUSBVersion = 0;
USBController* uSBControllers;
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/PCI/USB/USB.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef SRC_DRIVERS_PCI_USB_USB_H_
#define SRC_DRIVERS_PCI_USB_USB_H_

#include "../../../Global.h"
#include "Global.h"
class USBController;

extern uint8_t maxUSBVersion;
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/PCI/USB/USBController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: garrett
*/

#include "USBController.h"
#include "drivers/PCI/USB/USBController.h"

USBController::USBController( ) {
// TODO Auto-generated constructor stub
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/PCI/USB/USBController.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef USBCONTROLLER_H_
#define USBCONTROLLER_H_

#include "../../../Global.h"
#include "Global.h"

class USBController {
public:
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/ProgrammableInterruptController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: garrett
*/

#include "ProgrammableInterruptController.h"
#include "drivers/ProgrammableInterruptController.h"

//TODO comment

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/ProgrammableInterruptController.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef PROGRAMMABLEINTERRUPTCONTROLLER_H_
#define PROGRAMMABLEINTERRUPTCONTROLLER_H_

#include "../Global.h"
#include "Global.h"


/*
Expand Down
14 changes: 8 additions & 6 deletions src/drivers/TTY/Console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
* Oskari
*/

#include "Console.h"
#include "../../Kernel.h"
#include "../Keyboard.h"
#include "../../memory/structures/PageTable.h"
#include "../../memory/Mem.h"
#include "drivers/TTY/Console.h"
#include "Kernel.h"
#include "drivers/Keyboard.h"
#include "memory/structures/PageTable.h"
#include "memory/Mem.h"

/**
* Function prototype for the internal use newline()
Expand Down Expand Up @@ -293,7 +293,9 @@ void writeIntBase(uint64_t num, uint64_t base) {

/* Skip to the first non null char */
int pos;
for (pos = 0; !out[pos]; pos++);
for (pos = 0; !out[pos]; pos++){

}

terminalWriteString((const char*)(out + pos));
}
2 changes: 1 addition & 1 deletion src/drivers/TTY/Console.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef CONSOLE_H_
#define CONSOLE_H_

#include "../../Global.h"
#include "Global.h"

/**
* Dimensions of the VGA console
Expand Down
2 changes: 1 addition & 1 deletion src/interrupts/InterruptDescriptorTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: garrett
*/

#include "InterruptDescriptorTable.h"
#include "interrupts/InterruptDescriptorTable.h"

//TODO comment what each interrupt is
InterruptDescriptorTable::InterruptDescriptorTable( ) {
Expand Down
2 changes: 1 addition & 1 deletion src/interrupts/InterruptDescriptorTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef INTERRUPTDESCRIPTORTABLE_H_
#define INTERRUPTDESCRIPTORTABLE_H_

#include "../Global.h"
#include "Global.h"

/**
* structure used by the cpu to handler interrupts
Expand Down
10 changes: 5 additions & 5 deletions src/interrupts/InterruptHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* Author: garrett
*/

#include "InterruptHandler.h"
#include "../Kernel.h"
#include "../drivers/Keyboard.h"
#include "../drivers/TTY/Console.h"
#include "../drivers/ProgrammableInterruptController.h"
#include "interrupts/InterruptHandler.h"
#include "Kernel.h"
#include "drivers/Keyboard.h"
#include "drivers/TTY/Console.h"
#include "drivers/ProgrammableInterruptController.h"
#if defined(__cplusplus)
extern "C" {/* Use C linkage for kernel_main. */
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/interrupts/InterruptHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef INTERRUPTHANDLER_H_
#define INTERRUPTHANDLER_H_

#include "../Global.h"
#include "Global.h"
//#include "../drivers/Keyboard.h"

#endif /* INTERRUPTHANDLER_H_ */
4 changes: 2 additions & 2 deletions src/memory/Mem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* Author: garrett
*/

#include "Mem.h"
#include "structures/PageTable.h"
#include "memory/Mem.h"
#include "memory/structures/PageTable.h"
MultibootMemoryMap memMap[256];
/**
* read the multiboot mem map
Expand Down
6 changes: 3 additions & 3 deletions src/memory/Mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#ifndef MEM_H_
#define MEM_H_

#include "../Global.h"
#include "../Kernel.h"
#include "../multiboot_spec/Multiboot.h"
#include "Global.h"
#include "Kernel.h"
#include "multiboot_spec/Multiboot.h"


struct MultibootMemoryMap{
Expand Down
8 changes: 4 additions & 4 deletions src/memory/alloc/Malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* Author: garrett
*/

#include "Malloc.h"
#include "../../Kernel.h"
#include "../structures/PageTable.h"
#include "PageFrameAllocator.h"
#include "memory/alloc/Malloc.h"
#include "Kernel.h"
#include "memory/structures/PageTable.h"
#include "memory/alloc/PageFrameAllocator.h"

/**
* top of the paged in mem
Expand Down
2 changes: 1 addition & 1 deletion src/memory/alloc/Malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef MALLOC_H_
#define MALLOC_H_

#include "../../Global.h"
#include "Global.h"

/**
* top of the paged in mem
Expand Down
2 changes: 1 addition & 1 deletion src/memory/alloc/New.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: garrett
*/

#include "New.h"
#include "memory/alloc/New.h"

//TODO fix this file

Expand Down
2 changes: 1 addition & 1 deletion src/memory/alloc/New.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef NEW_H_
#define NEW_H_

#include "../../Global.h"
#include "Global.h"

void * operator new(size_t size);
void operator delete(void * p);
Expand Down
Loading