Adapt the kernel to the new path

This commit is contained in:
Baptiste Wicht 2014-02-08 22:18:33 +01:00
parent d94c1139d3
commit ac1685eebb
48 changed files with 88 additions and 85 deletions

2
cpp.mk
View File

@ -4,7 +4,7 @@ OC=x86_64-elf-objcopy
AR=x86_64-elf-ar
WARNING_FLAGS=-Wall -Wextra -pedantic -Wold-style-cast -Wshadow
COMMON_CPP_FLAGS=-masm=intel -Iinclude/ -nostdlib -g -Os -std=c++11 -fno-stack-protector -fno-exceptions -funsigned-char -fno-rtti -ffreestanding -fomit-frame-pointer -mno-red-zone -mno-3dnow -mno-mmx -fno-asynchronous-unwind-tables
COMMON_CPP_FLAGS=-masm=intel -I../../tstl/include/ -I../tstl/include/ -Iinclude/ -nostdlib -g -Os -std=c++11 -fno-stack-protector -fno-exceptions -funsigned-char -fno-rtti -ffreestanding -fomit-frame-pointer -mno-red-zone -mno-3dnow -mno-mmx -fno-asynchronous-unwind-tables
CPP_FLAGS_LOW=-march=i386 -m32 -fno-strict-aliasing -fno-pic -fno-toplevel-reorder -mno-sse -mno-sse2 -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2

View File

@ -8,8 +8,8 @@
#ifndef ATA_H
#define ATA_H
#include "stl/types.hpp"
#include "stl/string.hpp"
#include <types.hpp>
#include <string.hpp>
namespace ata {

View File

@ -8,7 +8,7 @@
#ifndef BUDDY_ALLOCATOR_H
#define BUDDY_ALLOCATOR_H
#include "stl/array.hpp"
#include <array.hpp>
#include "bitmap.hpp"

View File

@ -8,9 +8,9 @@
#ifndef CONSOLE_H
#define CONSOLE_H
#include "stl/types.hpp"
#include "stl/enable_if.hpp"
#include "stl/string.hpp"
#include <types.hpp>
#include <enable_if.hpp>
#include <string.hpp>
void init_console();

View File

@ -8,7 +8,7 @@
#ifndef DATETIME_H
#define DATETIME_H
#include "stl/types.hpp"
#include <types.hpp>
struct datetime {
uint8_t year;

View File

@ -10,10 +10,10 @@
#include "datetime.hpp"
#include "stl/types.hpp"
#include "stl/array.hpp"
#include "stl/vector.hpp"
#include "stl/string.hpp"
#include <types.hpp>
#include <array.hpp>
#include <vector.hpp>
#include <string.hpp>
namespace disks {

View File

@ -11,7 +11,7 @@
* mode.
*/
#include "stl/types.hpp"
#include <types.hpp>
#ifndef E820_HPP
#define E820_HPP

View File

@ -8,8 +8,8 @@
#ifndef ELF_H
#define ELF_H
#include "stl/types.hpp"
#include "stl/string.hpp"
#include <types.hpp>
#include <string.hpp>
namespace elf {

View File

@ -8,10 +8,10 @@
#ifndef FAT32_H
#define FAT32_H
#include "disks.hpp"
#include <vector.hpp>
#include <string.hpp>
#include "stl/vector.hpp"
#include "stl/string.hpp"
#include "disks.hpp"
namespace fat32 {

View File

@ -8,7 +8,7 @@
#ifndef GDT_H
#define GDT_H
#include "stl/types.hpp"
#include <types.hpp>
namespace gdt {

View File

@ -8,7 +8,7 @@
#ifndef INTERRUPTS_H
#define INTERRUPTS_H
#include "stl/types.hpp"
#include <types.hpp>
namespace interrupt {

View File

@ -8,7 +8,7 @@
#ifndef KERNEL_UTILS_H
#define KERNEL_UTILS_H
#include "stl/types.hpp"
#include <types.hpp>
uint8_t in_byte(uint16_t _port);
void out_byte(uint16_t _port, uint8_t _data);

View File

@ -8,7 +8,7 @@
#ifndef KEYBOARD_H
#define KEYBOARD_H
#include "stl/types.hpp"
#include <types.hpp>
namespace keyboard {

View File

@ -8,7 +8,7 @@
#ifndef MALLOC_H
#define MALLOC_H
#include "stl/types.hpp"
#include <types.hpp>
namespace malloc {

View File

@ -8,8 +8,8 @@
#ifndef PAGING_H
#define PAGING_H
#include "stl/types.hpp"
#include "stl/literals.hpp"
#include <types.hpp>
#include <literals.hpp>
#include "virtual_allocator.hpp"

View File

@ -8,7 +8,7 @@
#ifndef PHYSICAL_ALLOCATOR_H
#define PHYSICAL_ALLOCATOR_H
#include "stl/types.hpp"
#include <types.hpp>
namespace physical_allocator {

View File

@ -8,8 +8,8 @@
#ifndef PROCESS_H
#define PROCESS_H
#include "stl/types.hpp"
#include "stl/vector.hpp"
#include <types.hpp>
#include <vector.hpp>
#include "paging.hpp"
#include "interrupts.hpp"

View File

@ -8,7 +8,7 @@
#ifndef RTC_H
#define RTC_H
#include "stl/types.hpp"
#include <types.hpp>
namespace rtc {

View File

@ -8,7 +8,7 @@
#ifndef SCHEDULER_H
#define SCHEDULER_H
#include "stl/string.hpp"
#include <string.hpp>
#include "process.hpp"

View File

@ -8,8 +8,8 @@
#ifndef SEMAPHORE_H
#define SEMAPHORE_H
#include "stl/queue.hpp"
#include "stl/lock_guard.hpp"
#include <queue.hpp>
#include <lock_guard.hpp>
#include "spinlock.hpp"
#include "scheduler.hpp"

View File

@ -8,8 +8,8 @@
#ifndef SLEEP_QUEUE_H
#define SLEEP_QUEUE_H
#include "stl/queue.hpp"
#include "stl/lock_guard.hpp"
#include <queue.hpp>
#include <lock_guard.hpp>
#include "spinlock.hpp"
#include "scheduler.hpp"

View File

@ -8,8 +8,8 @@
#ifndef SYSINFO_H
#define SYSINFO_H
#include "stl/string.hpp"
#include "stl/vector.hpp"
#include <string.hpp>
#include <vector.hpp>
void sysinfo_command(const std::vector<std::string>& params);

View File

@ -8,8 +8,8 @@
#ifndef TERMINAL_H
#define TERMINAL_H
#include "stl/types.hpp"
#include "stl/circular_buffer.hpp"
#include <types.hpp>
#include <circular_buffer.hpp>
#include "sleep_queue.hpp"

View File

@ -8,7 +8,7 @@
#ifndef TEXT_CONSOLE_H
#define TEXT_CONSOLE_H
#include "stl/types.hpp"
#include <types.hpp>
struct text_console {
void init();

View File

@ -8,7 +8,7 @@
#ifndef THOR_H
#define THOR_H
#include "stl/types.hpp"
#include <types.hpp>
void* operator new(uint64_t size);
void operator delete(void* p);

View File

@ -8,7 +8,7 @@
#ifndef TIMER_H
#define TIMER_H
#include "stl/types.hpp"
#include <types.hpp>
namespace timer {

View File

@ -8,7 +8,7 @@
#ifndef VESA_H
#define VESA_H
#include "stl/types.hpp"
#include <types.hpp>
namespace vesa {

View File

@ -8,7 +8,7 @@
#ifndef VESA_CONSOLE_H
#define VESA_CONSOLE_H
#include "stl/types.hpp"
#include <types.hpp>
struct vesa_console {
void init();

View File

@ -8,8 +8,8 @@
#ifndef VIRTUAL_ALLOCATOR_H
#define VIRTUAL_ALLOCATOR_H
#include "stl/types.hpp"
#include "stl/literals.hpp"
#include <types.hpp>
#include <literals.hpp>
namespace virtual_allocator {

View File

@ -5,14 +5,14 @@
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include <types.hpp>
#include "acpi.hpp"
#include "kernel_utils.hpp"
#include "timer.hpp"
#include "paging.hpp"
#include "console.hpp"
#include "stl/types.hpp"
namespace {
uint32_t SMI_CMD; //ptr

View File

@ -7,8 +7,8 @@
#include <stdarg.h>
#include "stl/types.hpp"
#include "stl/string.hpp"
#include <types.hpp>
#include <string.hpp>
#include "console.hpp"
#include "vesa.hpp"

View File

@ -5,16 +5,16 @@
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include <unique_ptr.hpp>
#include <array.hpp>
#include <string.hpp>
#include "disks.hpp"
#include "ata.hpp"
#include "thor.hpp"
#include "console.hpp"
#include "fat32.hpp"
#include "stl/unique_ptr.hpp"
#include "stl/array.hpp"
#include "stl/string.hpp"
namespace {
//For now, 4 is enough as only the ata driver is implemented

View File

@ -9,10 +9,10 @@
#include "console.hpp"
#include "rtc.hpp"
#include "stl/types.hpp"
#include "stl/unique_ptr.hpp"
#include "stl/algorithms.hpp"
#include "stl/pair.hpp"
#include <types.hpp>
#include <unique_ptr.hpp>
#include <algorithms.hpp>
#include <pair.hpp>
namespace {

View File

@ -5,6 +5,8 @@
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include <types.hpp>
#include "interrupts.hpp"
#include "console.hpp"
#include "kernel_utils.hpp"
@ -14,8 +16,6 @@
#include "irqs.hpp"
#include "syscalls.hpp"
#include "stl/types.hpp"
namespace {
struct idt_flags {

View File

@ -5,8 +5,8 @@
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include "stl/types.hpp"
#include "stl/algorithms.hpp"
#include <types.hpp>
#include <algorithms.hpp>
#include "paging.hpp"
#include "kernel.hpp"

View File

@ -5,11 +5,11 @@
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include "stl/array.hpp"
#include "stl/vector.hpp"
#include "stl/optional.hpp"
#include "stl/string.hpp"
#include "stl/lock_guard.hpp"
#include <array.hpp>
#include <vector.hpp>
#include <optional.hpp>
#include <string.hpp>
#include <lock_guard.hpp>
#include "scheduler.hpp"
#include "paging.hpp"

View File

@ -5,11 +5,11 @@
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include "stl/types.hpp"
#include "stl/algorithms.hpp"
#include "stl/vector.hpp"
#include "stl/string.hpp"
#include "stl/optional.hpp"
#include <types.hpp>
#include <algorithms.hpp>
#include <vector.hpp>
#include <string.hpp>
#include <optional.hpp>
#include "shell.hpp"
#include "keyboard.hpp"

View File

@ -5,7 +5,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include "stl/array.hpp"
#include <array.hpp>
#include "terminal.hpp"
#include "keyboard.hpp"

View File

@ -5,8 +5,9 @@
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include <algorithms.hpp>
#include "text_console.hpp"
#include "stl/algorithms.hpp"
namespace {

View File

@ -5,7 +5,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include "stl/types.hpp"
#include <types.hpp>
#include "vesa.hpp"
#include "paging.hpp"

View File

@ -5,7 +5,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include "stl/array.hpp"
#include <array.hpp>
#include "virtual_allocator.hpp"
#include "paging.hpp"

View File

@ -8,6 +8,8 @@
#ifndef ALGORITHMS_H
#define ALGORITHMS_H
#include <types.hpp>
namespace std {
template< class T > struct remove_reference {typedef T type;};

View File

@ -8,7 +8,7 @@
#ifndef ARRAY_H
#define ARRAY_H
#include "stl/types.hpp"
#include <types.hpp>
namespace std {

View File

@ -8,7 +8,7 @@
#ifndef LIST_H
#define LIST_H
#include "stl/types.hpp"
#include <types.hpp>
namespace std {

View File

@ -8,7 +8,7 @@
#ifndef LITERALS_HPP
#define LITERALS_HPP
#include "stl/types.hpp"
#include <types.hpp>
static_assert(sizeof(size_t) == sizeof(unsigned long long), "Unmatching sizes for literals");

View File

@ -8,8 +8,8 @@
#ifndef STL_QUEUE_H
#define STL_QUEUE_H
#include "stl/list.hpp"
#include "stl/types.hpp"
#include <list.hpp>
#include <types.hpp>
namespace std {

View File

@ -8,9 +8,9 @@
#ifndef STRING_H
#define STRING_H
#include "stl/types.hpp"
#include "stl/algorithms.hpp"
#include "stl/vector.hpp"
#include <types.hpp>
#include <algorithms.hpp>
#include <vector.hpp>
namespace std {

View File

@ -8,8 +8,8 @@
#ifndef VECTOR_H
#define VECTOR_H
#include "stl/types.hpp"
#include "stl/algorithms.hpp"
#include <types.hpp>
#include <algorithms.hpp>
//TODO The vector does not call any destructor