diff options
Diffstat (limited to 'Source/Kernel')
-rw-r--r-- | Source/Kernel/Core/kmain.wtf.cpp | 2 | ||||
-rw-r--r-- | Source/Kernel/Devices/Floppy/FloppyDrive.class.cpp | 2 | ||||
-rw-r--r-- | Source/Kernel/FileSystems/FAT/FATFS.class.cpp | 6 | ||||
-rw-r--r-- | Source/Kernel/Makefile | 12 | ||||
-rw-r--r-- | Source/Kernel/TaskManager/Task.ns.cpp | 7 | ||||
-rw-r--r-- | Source/Kernel/TaskManager/V86/V86Thread.class.cpp | 2 | ||||
-rw-r--r-- | Source/Kernel/common.h | 1 |
7 files changed, 17 insertions, 15 deletions
diff --git a/Source/Kernel/Core/kmain.wtf.cpp b/Source/Kernel/Core/kmain.wtf.cpp index fd69f39..40388e6 100644 --- a/Source/Kernel/Core/kmain.wtf.cpp +++ b/Source/Kernel/Core/kmain.wtf.cpp @@ -73,6 +73,7 @@ void kmain(multiboot_info_t* mbd, u32int magic) { SB::init(); + //Create a VT for logging what kernel does SB::progress("Create kernel VT"); kvt = new ScrollableVT(24, 80, 20, KVT_FGCOLOR, KVT_BGCOLOR); @@ -102,6 +103,7 @@ void kmain(multiboot_info_t* mbd, u32int magic) { SB::progress("Timer"); Dev::registerDevice(new Timer()); //Initialize timer String kcmdline((char*)mbd->cmdline); + SB::progress("Multitasking"); Task::initialize(kcmdline, kvt); //Initialize multitasking SB::gomulti(); diff --git a/Source/Kernel/Devices/Floppy/FloppyDrive.class.cpp b/Source/Kernel/Devices/Floppy/FloppyDrive.class.cpp index b7fd69b..881154a 100644 --- a/Source/Kernel/Devices/Floppy/FloppyDrive.class.cpp +++ b/Source/Kernel/Devices/Floppy/FloppyDrive.class.cpp @@ -229,7 +229,7 @@ bool FloppyDrive::doTrack(u32int cyl, u8int dir) { int error = 0; if (st0 & 0xC0) error = 1; - if (st1 & 0x80) { Log::log(KL_ERROR, "FloppyDrive.class : error while I/O : end of cyilnder."); error = 1; } + if (st1 & 0x80) { Log::log(KL_ERROR, "FloppyDrive.class : error while I/O : end of cylinder."); error = 1; } if (st0 & 0x08) { Log::log(KL_ERROR, "FloppyDrive.class : error while I/O : drive not ready."); error = 1; } if (st1 & 0x20) { Log::log(KL_ERROR, "FloppyDrive.class : error while I/O : CRC error."); error = 1; } if (st1 & 0x10) { Log::log(KL_ERROR, "FloppyDrive.class : error while I/O : controller timeout."); error = 1; } diff --git a/Source/Kernel/FileSystems/FAT/FATFS.class.cpp b/Source/Kernel/FileSystems/FAT/FATFS.class.cpp index f1d01c5..6e7df9b 100644 --- a/Source/Kernel/FileSystems/FAT/FATFS.class.cpp +++ b/Source/Kernel/FileSystems/FAT/FATFS.class.cpp @@ -57,7 +57,7 @@ FileSystem* FATFS::mount(Partition* p, DirectoryNode* mountpoint, bool readwrite *kvt << "Detected a FAT" << (s64int)fs->m_fatType << " filesystem.\n" << "root_dir_sectors:" << fs->m_rootDirSectors << " fat_size:" << fs->m_fatSize << " total_sectors:" << fs->m_totalSectors << " data_sectors:" << dataSectors << " count_of_clusters:" << fs->m_countOfClusters << - " sizeof(fat_dir_entry_t):" << sizeof(fat_dir_entry_t) << " first_data_sector:" << fs->m_firstDataSector << + " sizeof(fat_dir_entry_t):" << (s64int)sizeof(fat_dir_entry_t) << (const String&)" first_data_sector:" << fs->m_firstDataSector << " cluster_size:" << fs->m_clusterSize << "\n"; return fs; } @@ -234,12 +234,12 @@ bool FATFS::loadContents(DirectoryNode* dir) { } FileNode* FATFS::createFile(DirectoryNode* parent, String name) { - if (m_readOnly) return false; + if (m_readOnly) return 0; return 0; } DirectoryNode* FATFS::createDirectory(DirectoryNode* parent, String name) { - if (m_readOnly) return false; + if (m_readOnly) return 0; return 0; } diff --git a/Source/Kernel/Makefile b/Source/Kernel/Makefile index cb51309..74c87e4 100644 --- a/Source/Kernel/Makefile +++ b/Source/Kernel/Makefile @@ -1,11 +1,11 @@ .PHONY: clean, mrproper -CC = gcc -CXX = g++ -LD = ld -LDFLAGS = -T Kernel.ld -Map Kernel.map --oformat=elf32-i386 -CFLAGS = -nostdlib -nostartfiles -nodefaultlibs -fno-builtin -fno-stack-protector -Wall -Wextra -Werror -I . -CXXFLAGS = -nostartfiles -nostdlib -fno-exceptions -fno-rtti -I . -I ../Library/Common -I ../Library/Interface -Wall -Werror -Wno-write-strings -funsigned-char -D THIS_IS_MELON_KERNEL -D RANDOM_SEED=1`date +%N`LL -O2 +CC = i586-elf-gcc +CXX = i586-elf-g++ +LD = i586-elf-ld +LDFLAGS = -T Kernel.ld -Map Kernel.map --oformat=elf32-i386 -m elf_i386 +CFLAGS = -nostdlib -nostartfiles -nodefaultlibs -fno-builtin -fno-stack-protector -Wall -Wextra -Werror -I . -m32 +CXXFLAGS = -nostartfiles -nostdlib -fno-exceptions -fno-rtti -I . -I ../Library/Common -I ../Library/Interface -Wall -Werror -Wno-write-strings -funsigned-char -Wno-error=unused-but-set-variable -D THIS_IS_MELON_KERNEL -D RANDOM_SEED=1`date +%N`LL -O2 -m32 ASM = nasm ASMFLAGS = -f elf diff --git a/Source/Kernel/TaskManager/Task.ns.cpp b/Source/Kernel/TaskManager/Task.ns.cpp index 75f9c3d..44b5e3a 100644 --- a/Source/Kernel/TaskManager/Task.ns.cpp +++ b/Source/Kernel/TaskManager/Task.ns.cpp @@ -97,12 +97,11 @@ void doSwitch() { t->setKernelStack(); asm volatile(" \ - mov %0, %%ebp; \ - mov %1, %%esp; \ - mov %2, %%ecx; \ + mov %%eax, %%ebp; \ + mov %%ebx, %%esp; \ mov $0x12345, %%eax; \ jmp *%%ecx;" - : : "r"(ebp), "r"(esp), "r"(eip)); + : : "a"(ebp), "b"(esp), "c"(eip)); } void triggerSwitch() { diff --git a/Source/Kernel/TaskManager/V86/V86Thread.class.cpp b/Source/Kernel/TaskManager/V86/V86Thread.class.cpp index 5002225..63bc2d8 100644 --- a/Source/Kernel/TaskManager/V86/V86Thread.class.cpp +++ b/Source/Kernel/TaskManager/V86/V86Thread.class.cpp @@ -79,7 +79,7 @@ bool V86Thread::handleV86GPF(registers_t *regs) { u16int *ivt = 0; u16int *stack = (u16int*)FP_TO_LINEAR(regs->ss, (regs->useresp & 0xFFFF)); u32int *stack32 = (u32int*)stack; - bool is_operand32 = false, is_address32 = false; + bool is_operand32 = false; while (true) { switch (ip[0]) { diff --git a/Source/Kernel/common.h b/Source/Kernel/common.h index d35ba84..482d106 100644 --- a/Source/Kernel/common.h +++ b/Source/Kernel/common.h @@ -14,6 +14,7 @@ #include <MemoryManager/Mem.ns.h> + //Standard implemenations of operator new/delete inline void* operator new(size_t, void *p) { return p; } inline void* operator new[](size_t, void *p) { return p; } |