ya-mos-submit Mailing List for yaMOS - yet another My Operating System
Status: Alpha
Brought to you by:
mizztajonny
You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
(20) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: <miz...@us...> - 2010-06-18 20:16:40
|
Revision: 162 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=162&view=rev Author: mizztajonny Date: 2010-06-18 20:16:34 +0000 (Fri, 18 Jun 2010) Log Message: ----------- Started implemantation of BootInformationManager Class. Modified Paths: -------------- borium/src/Managers/Platform/Makefile.am Added Paths: ----------- borium/src/Managers/Platform/BootInformationManager.cpp borium/src/Managers/Platform/BootInformationManager.h Removed Paths: ------------- borium/src/Managers/Platform/BootInformation.cpp borium/src/Managers/Platform/BootInformation.h Deleted: borium/src/Managers/Platform/BootInformation.cpp =================================================================== --- borium/src/Managers/Platform/BootInformation.cpp 2010-06-12 23:23:05 UTC (rev 161) +++ borium/src/Managers/Platform/BootInformation.cpp 2010-06-18 20:16:34 UTC (rev 162) @@ -1,14 +0,0 @@ -#include "BootInformation.h" - -/** @author Harry Hornbacher - */ -namespace Managers { - /** @author Harry Hornbacher - */ - namespace Platform { - - - /* {src_lang=cpp}*/ - - } /* End of namespace Managers::Platform */ -} /* End of namespace Managers */ Deleted: borium/src/Managers/Platform/BootInformation.h =================================================================== --- borium/src/Managers/Platform/BootInformation.h 2010-06-12 23:23:05 UTC (rev 161) +++ borium/src/Managers/Platform/BootInformation.h 2010-06-18 20:16:34 UTC (rev 162) @@ -1,93 +0,0 @@ -#ifndef Managers_Platform_BootInformation_h -#define Managers_Platform_BootInformation_h - -#include "../../LibCpp/Types.h" - -/** @author Harry Hornbacher - */ -namespace Managers { - /** @author Harry Hornbacher - */ - namespace Platform { - - enum MultibootFlags { - /// Memory flag - Memory = 0x001, - - /// Device flag - Device = 0x002, - - /// Command line flag - CommandLine = 0x004, - - /// Modules flag - Modules = 0x008, - - /// a.out flag - AOut = 0x010, - - /// elf flag - Elf = 0x020, - - /// Memory map flag - MemoryMap = 0x040, - - /// Config flag - Config = 0x080, - - /// Bootloader name flag - BootloaderName = 0x100, - - /// APM flag - Apm = 0x200, - - /// VBE flag - Vbe = 0x400 - }; - - struct MultibootInformation { - Dword Flags; - - Dword LowMem; - Dword HighMem; - - Dword BootDevice; - - Dword CommandLine; - - Dword ModulesCount; - Dword ModulesBase; - - Dword Number; - Dword Size; - Dword Address; - Dword Shndx; - - Dword MemoryMapLength; - Dword MemoryMapBase; - - Dword DrivesLength; - Dword DrivesAddress; - - Dword ConfigTable; - - Dword BootloaderName; - - Dword ApmTable; - - Dword VbeControlInfo; - Dword VbeModeInfo; - Dword VbeMode; - Dword VbeInterfaceSegment; - Dword VbeInterfaceOffset; - Dword VbeInterfaceLength; - } __attribute__((packed)); - - class BootInformation { - /* {src_lang=cpp}*/ - }; - - } /* End of namespace Managers::Platform */ -} /* End of namespace Managers */ - -#endif // Managers_Platform_BootInformation_h Copied: borium/src/Managers/Platform/BootInformationManager.cpp (from rev 161, borium/src/Managers/Platform/BootInformation.cpp) =================================================================== --- borium/src/Managers/Platform/BootInformationManager.cpp (rev 0) +++ borium/src/Managers/Platform/BootInformationManager.cpp 2010-06-18 20:16:34 UTC (rev 162) @@ -0,0 +1,15 @@ +#include "BootInformationManager.h" + +/** @author Harry Hornbacher + */ +namespace Managers { + /** @author Harry Hornbacher + */ + namespace Platform { + + void BootInformationManager::Init() { + + } + + } /* End of namespace Managers::Platform */ +} /* End of namespace Managers */ Copied: borium/src/Managers/Platform/BootInformationManager.h (from rev 161, borium/src/Managers/Platform/BootInformation.h) =================================================================== --- borium/src/Managers/Platform/BootInformationManager.h (rev 0) +++ borium/src/Managers/Platform/BootInformationManager.h 2010-06-18 20:16:34 UTC (rev 162) @@ -0,0 +1,101 @@ +#ifndef Managers_Platform_BootInformation_h +#define Managers_Platform_BootInformation_h + +#include "../../LibCpp/Types.h" + +/** @author Harry Hornbacher + */ +namespace Managers { + /** @author Harry Hornbacher + */ + namespace Platform { + + enum MultibootFlags { + /// Memory flag + Memory = 0x001, + + /// Device flag + Device = 0x002, + + /// Command line flag + CommandLine = 0x004, + + /// Modules flag + Modules = 0x008, + + /// a.out flag + AOut = 0x010, + + /// elf flag + Elf = 0x020, + + /// Memory map flag + MemoryMap = 0x040, + + /// Config flag + Config = 0x080, + + /// Bootloader name flag + BootloaderName = 0x100, + + /// APM flag + Apm = 0x200, + + /// VBE flag + Vbe = 0x400 + }; + + struct MultibootInformation { + Dword Flags; + + Dword LowMem; + Dword HighMem; + + Dword BootDevice; + + Dword CommandLine; + + Dword ModulesCount; + Dword ModulesBase; + + Dword Number; + Dword Size; + Dword Address; + Dword Shndx; + + Dword MemoryMapLength; + Dword MemoryMapBase; + + Dword DrivesLength; + Dword DrivesAddress; + + Dword ConfigTable; + + Dword BootloaderName; + + Dword ApmTable; + + Dword VbeControlInfo; + Dword VbeModeInfo; + Dword VbeMode; + Dword VbeInterfaceSegment; + Dword VbeInterfaceOffset; + Dword VbeInterfaceLength; + } __attribute__((packed)); + + struct MultibootMemMap { + } __attribute__((packed)); + + class BootInformationManager { + /* {src_lang=cpp}*/ + private: + size_t MemorySize; + + public: + void Init(); + }; + + } /* End of namespace Managers::Platform */ +} /* End of namespace Managers */ + +#endif // Managers_Platform_BootInformation_h Modified: borium/src/Managers/Platform/Makefile.am =================================================================== --- borium/src/Managers/Platform/Makefile.am 2010-06-12 23:23:05 UTC (rev 161) +++ borium/src/Managers/Platform/Makefile.am 2010-06-18 20:16:34 UTC (rev 162) @@ -1,5 +1,5 @@ CXXFLAGS=-m32 -nostdinc -nostartfiles -nostdlib -ffreestanding -fno-builtin -fno-rtti -fno-exceptions -nostartfiles -nodefaultlibs -fno-stack-protector noinst_LIBRARIES = libPlatform.a -libPlatform_a_SOURCES = BootInformation.cpp Cpu.cpp CpuManager.cpp +libPlatform_a_SOURCES = BootInformationManager.cpp Cpu.cpp CpuManager.cpp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-12 23:23:14
|
Revision: 161 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=161&view=rev Author: mizztajonny Date: 2010-06-12 23:23:05 +0000 (Sat, 12 Jun 2010) Log Message: ----------- ... Modified Paths: -------------- borium/configure.ac borium/nbproject/Makefile-Default.mk borium/nbproject/Makefile-variables.mk borium/nbproject/Package-Default.bash borium/nbproject/configurations.xml borium/nbproject/private/configurations.xml borium/src/Kernel/Kernel.cpp borium/src/Kernel/Kernel.h borium/src/Makefile.am borium/src/Managers/Makefile.am borium/src/Managers/Memory/Bitmap.cpp borium/src/Managers/Memory/Bitmap.h borium/src/Managers/Memory/Makefile.am borium/src/Managers/Memory/PhysicalMemoryManager.cpp borium/src/Managers/Memory/PhysicalMemoryManager.h borium/src/Managers/Memory/VirtualMemoryManager.cpp borium/src/Managers/Memory/VirtualMemoryMap.cpp borium/src/Managers/Memory/VirtualMemoryRegion.cpp borium/src/Managers/Platform/BootInformation.cpp borium/src/Managers/Platform/Cpu.cpp borium/src/Managers/Platform/CpuManager.cpp borium/src/Managers/Platform/CpuManager.h borium/src/Managers/Platform/Makefile.am borium/src/Stage1/Stage1.cpp borium/testing/bootdisk.img borium/testing/grub.img borium/testing/grub_overlay/kernel Property Changed: ---------------- borium/src/ borium/src/Managers/ borium/src/Managers/Memory/ borium/src/Managers/Platform/ Modified: borium/configure.ac =================================================================== --- borium/configure.ac 2010-06-12 22:22:58 UTC (rev 160) +++ borium/configure.ac 2010-06-12 23:23:05 UTC (rev 161) @@ -9,7 +9,10 @@ src/Stage0/Makefile src/Stage1/Makefile src/Kernel/Makefile - src/LibCpp/Makefile]) + src/LibCpp/Makefile + src/Managers/Makefile + src/Managers/Platform/Makefile + src/Managers/Memory/Makefile]) # Checks for programs. AC_PROG_CXX Modified: borium/nbproject/Makefile-Default.mk =================================================================== --- borium/nbproject/Makefile-Default.mk 2010-06-12 22:22:58 UTC (rev 160) +++ borium/nbproject/Makefile-Default.mk 2010-06-12 23:23:05 UTC (rev 161) @@ -19,7 +19,7 @@ AS=as # Macros -CND_PLATFORM=Own_GNU-Linux-x86 +CND_PLATFORM=GNU-Linux-x86 CND_CONF=Default CND_DISTDIR=dist Modified: borium/nbproject/Makefile-variables.mk =================================================================== --- borium/nbproject/Makefile-variables.mk 2010-06-12 22:22:58 UTC (rev 160) +++ borium/nbproject/Makefile-variables.mk 2010-06-12 23:23:05 UTC (rev 161) @@ -7,10 +7,10 @@ CND_BUILDDIR=build CND_DISTDIR=dist # Default configuration -CND_PLATFORM_Default=Own_GNU-Linux-x86 +CND_PLATFORM_Default=GNU-Linux-x86 CND_ARTIFACT_DIR_Default= CND_ARTIFACT_NAME_Default= CND_ARTIFACT_PATH_Default= -CND_PACKAGE_DIR_Default=dist/Default/Own_GNU-Linux-x86/package +CND_PACKAGE_DIR_Default=dist/Default/GNU-Linux-x86/package CND_PACKAGE_NAME_Default=borium.tar -CND_PACKAGE_PATH_Default=dist/Default/Own_GNU-Linux-x86/package/borium.tar +CND_PACKAGE_PATH_Default=dist/Default/GNU-Linux-x86/package/borium.tar Modified: borium/nbproject/Package-Default.bash =================================================================== --- borium/nbproject/Package-Default.bash 2010-06-12 22:22:58 UTC (rev 160) +++ borium/nbproject/Package-Default.bash 2010-06-12 23:23:05 UTC (rev 161) @@ -6,7 +6,7 @@ # Macros TOP=`pwd` -CND_PLATFORM=Own_GNU-Linux-x86 +CND_PLATFORM=GNU-Linux-x86 CND_CONF=Default CND_DISTDIR=dist TMPDIR=build/${CND_CONF}/${CND_PLATFORM}/tmp-packaging Modified: borium/nbproject/configurations.xml =================================================================== --- borium/nbproject/configurations.xml 2010-06-12 22:22:58 UTC (rev 160) +++ borium/nbproject/configurations.xml 2010-06-12 23:23:05 UTC (rev 161) @@ -8,14 +8,12 @@ <df name="deprecated"> </df> </df> + <df name="nbproject-2"> + <df name="private"> + </df> + </df> <df name="src"> - <df name=".deps"> - </df> - <df name=".libs"> - </df> <df name="Kernel"> - <df name=".deps"> - </df> <in>Kernel.cpp</in> <in>Kernel.h</in> <in>Types.h</in> @@ -70,6 +68,8 @@ <in>Thread.h</in> </df> <df name="Platform"> + <df name=".deps"> + </df> <in>BootInformation.cpp</in> <in>BootInformation.h</in> <in>Cpu.cpp</in> @@ -83,12 +83,8 @@ </df> </df> <df name="Stage0"> - <df name=".deps"> - </df> </df> <df name="Stage1"> - <df name=".deps"> - </df> <in>Stage1.cpp</in> </df> </df> @@ -166,7 +162,7 @@ <conf name="Default" type="0"> <toolsSet> <developmentServer>localhost</developmentServer> - <compilerSet>Own_GNU|Unknown</compilerSet> + <compilerSet>GNU|GNU</compilerSet> <assemblerRequired>true</assemblerRequired> <platform>2</platform> </toolsSet> @@ -189,6 +185,160 @@ </ccTool> </makeTool> </makefileType> + <item path="config.h" ex="true" tool="3"> + </item> + <item path="src-deprecated/kernel/CKernel.cc" ex="true" tool="1"> + </item> + <item path="src-deprecated/kernel/CKernel.h" ex="true" tool="3"> + </item> + <item path="src-deprecated/kernel/Kernel.cc" ex="true" tool="1"> + </item> + <item path="src-deprecated/kernel/Kernel.h" ex="true" tool="3"> + </item> + <item path="src-deprecated/kernel/Multiboot.cc" ex="true" tool="1"> + </item> + <item path="src-deprecated/kernel/Multiboot.h" ex="true" tool="3"> + </item> + <item path="src-deprecated/kernel/SystemObject.cc" ex="true" tool="1"> + </item> + <item path="src-deprecated/kernel/SystemObject.h" ex="true" tool="3"> + </item> + <item path="src-deprecated/kernel/main.cc" ex="true" tool="1"> + </item> + <item path="src-deprecated/libCpp/ctype.h" ex="true" tool="3"> + </item> + <item path="src-deprecated/libCpp/cxa_ctors.cc" ex="true" tool="1"> + </item> + <item path="src-deprecated/libCpp/cxa_ctors.h" ex="true" tool="3"> + </item> + <item path="src-deprecated/libCpp/cxa_dtors.cc" ex="true" tool="1"> + </item> + <item path="src-deprecated/libCpp/cxa_dtors.h" ex="true" tool="3"> + </item> + <item path="src-deprecated/libCpp/cxa_virtual.cc" ex="true" tool="1"> + </item> + <item path="src-deprecated/libCpp/cxa_virtual.h" ex="true" tool="3"> + </item> + <item path="src-deprecated/libCpp/limits.h" ex="true" tool="3"> + </item> + <item path="src-deprecated/libCpp/operators.cc" ex="true" tool="1"> + </item> + <item path="src-deprecated/libCpp/operators.h" ex="true" tool="3"> + </item> + <item path="src-deprecated/libCpp/stdargs.h" ex="true" tool="3"> + </item> + <item path="src-deprecated/libCpp/stdlib.h" ex="true" tool="3"> + </item> + <item path="src-deprecated/libCpp/types.h" ex="true" tool="3"> + </item> + <item path="src-deprecated/libHal/arch/arch.h" ex="true" tool="3"> + </item> + <item path="src/Kernel/Kernel.cpp" ex="true" tool="1"> + </item> + <item path="src/Kernel/Kernel.h" ex="true" tool="3"> + </item> + <item path="src/Kernel/Types.h" ex="true" tool="3"> + </item> + <item path="src/Kernel/Version.h" ex="true" tool="3"> + </item> + <item path="src/LibCpp/CString.cpp" ex="true" tool="1"> + </item> + <item path="src/LibCpp/CString.h" ex="true" tool="3"> + </item> + <item path="src/LibCpp/CType.h" ex="true" tool="3"> + </item> + <item path="src/LibCpp/CxaVirtual.cpp" ex="true" tool="1"> + </item> + <item path="src/LibCpp/CxaVirtual.h" ex="true" tool="3"> + </item> + <item path="src/LibCpp/Limits.h" ex="true" tool="3"> + </item> + <item path="src/LibCpp/Operators.cpp" ex="true" tool="1"> + </item> + <item path="src/LibCpp/Operators.h" ex="true" tool="3"> + </item> + <item path="src/LibCpp/StdArgs.h" ex="true" tool="3"> + </item> + <item path="src/LibCpp/StdLib.h" ex="true" tool="3"> + </item> + <item path="src/LibCpp/Types.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Communication/ExceptionManager.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Communication/ExceptionManager.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Communication/ExceptionRoutine.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Communication/ExceptionRoutine.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Communication/HardwareIoManager.cpp" + ex="true" + tool="1"> + </item> + <item path="src/Managers/Communication/HardwareIoManager.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Communication/InterruptManager.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Communication/InterruptManager.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Communication/InterruptRoutine.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Communication/InterruptRoutine.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Communication/SyscallManager.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Communication/SyscallManager.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Memory/Bitmap.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Memory/Bitmap.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Memory/PhysicalMemoryManager.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Memory/PhysicalMemoryManager.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Memory/VirtualMemoryManager.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Memory/VirtualMemoryManager.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Memory/VirtualMemoryMap.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Memory/VirtualMemoryMap.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Memory/VirtualMemoryRegion.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Memory/VirtualMemoryRegion.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Multitasking/Task.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Multitasking/Task.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Multitasking/TaskManager.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Multitasking/TaskManager.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Multitasking/Thread.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Multitasking/Thread.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Platform/BootInformation.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Platform/BootInformation.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Platform/Cpu.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Platform/Cpu.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Platform/CpuManager.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Platform/CpuManager.h" ex="true" tool="3"> + </item> + <item path="src/Managers/Resources/ResourcesManager.cpp" ex="true" tool="1"> + </item> + <item path="src/Managers/Resources/ResourcesManager.h" ex="true" tool="3"> + </item> + <item path="src/Stage1/Stage1.cpp" ex="true" tool="1"> + </item> </conf> </confs> </configurationDescriptor> Modified: borium/nbproject/private/configurations.xml =================================================================== --- borium/nbproject/private/configurations.xml 2010-06-12 22:22:58 UTC (rev 160) +++ borium/nbproject/private/configurations.xml 2010-06-12 23:23:05 UTC (rev 161) @@ -9,7 +9,6 @@ <array_repeat_threshold>10</array_repeat_threshold> </gdbdebugger> <gizmo_options version="3"> - <configurationname>GizmoSimple</configurationname> </gizmo_options> <runprofile version="6"> <args></args> Property changes on: borium/src ___________________________________________________________________ Modified: svn:ignore - .deps borium Makefile.in Makefile Doxyfile + .deps borium Makefile.in Makefile Doxyfile .libs Modified: borium/src/Kernel/Kernel.cpp =================================================================== --- borium/src/Kernel/Kernel.cpp 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Kernel/Kernel.cpp 2010-06-12 23:23:05 UTC (rev 161) @@ -23,11 +23,14 @@ // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC begin { // Initialize the CPU Manager + TheCpuManager.Init(); + // Initialize physical memory + ThePhysicalMemoryManager.Init(); + // Copy all needed data (e.g. from bootloader) to a safe place + - // Initialize physical memory - // Initialize exception manager // Initialize virtual memory Modified: borium/src/Kernel/Kernel.h =================================================================== --- borium/src/Kernel/Kernel.h 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Kernel/Kernel.h 2010-06-12 23:23:05 UTC (rev 161) @@ -3,6 +3,8 @@ #include "Version.h" #include "../LibCpp/StdLib.h" +#include "../Managers/Platform/CpuManager.h" +#include "../Managers/Memory/PhysicalMemoryManager.h" /** @author Harry Hornbacher */ @@ -30,6 +32,9 @@ char CodeName[ 25]; Version KernelVersion; + // The Managers + Managers::Platform::CpuManager TheCpuManager; + Managers::Memory::PhysicalMemoryManager ThePhysicalMemoryManager; }; } Modified: borium/src/Makefile.am =================================================================== --- borium/src/Makefile.am 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Makefile.am 2010-06-12 23:23:05 UTC (rev 161) @@ -1,4 +1,4 @@ -SUBDIRS = Stage0 Stage1 LibCpp Kernel +SUBDIRS = Stage0 Stage1 LibCpp Kernel Managers CFLAGS=-m32 -nostdinc -nostartfiles -nostdlib -ffreestanding -fno-builtin -fno-rtti -fno-exceptions -nostartfiles -nodefaultlibs -fno-stack-protector CCASFLAGS=-m32 @@ -6,5 +6,5 @@ boriumdir = ../ borium_PROGRAMS = borium borium_SOURCES = -borium_LDADD = Stage0/libStage0.a Stage1/libStage1.a Kernel/libKernel.a LibCpp/libCpp.a +borium_LDADD = Stage0/libStage0.a Stage1/libStage1.a Kernel/libKernel.a LibCpp/libCpp.a Managers/Platform/libPlatform.a Managers/Memory/libMemory.a borium_LDFLAGS = -Tkernel.ld Property changes on: borium/src/Managers ___________________________________________________________________ Modified: svn:ignore - Makefile.in Makefile + Makefile.in Makefile libManagers.a .deps Modified: borium/src/Managers/Makefile.am =================================================================== --- borium/src/Managers/Makefile.am 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Managers/Makefile.am 2010-06-12 23:23:05 UTC (rev 161) @@ -0,0 +1,2 @@ +SUBDIRS = Platform Memory + Property changes on: borium/src/Managers/Memory ___________________________________________________________________ Modified: svn:ignore - Makefile.in Makefile + Makefile.in Makefile .deps libMemory.a Modified: borium/src/Managers/Memory/Bitmap.cpp =================================================================== --- borium/src/Managers/Memory/Bitmap.cpp 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Managers/Memory/Bitmap.cpp 2010-06-12 23:23:05 UTC (rev 161) @@ -13,7 +13,7 @@ } void Bitmap::ClearAll() { - for(size_t i = 0; i < Size; i++) + for(size_t i = 0; i < BitmapSize; i++) BitmapPointer[i] = 0; } @@ -30,13 +30,13 @@ } - size_t Bitmap::GetFirstSet(size_t Length = 1) { + size_t Bitmap::GetFirstSet(size_t Length) { if(Length == 0) return (size_t)-1; Dword free = 0; - for(size_t i = 0; i < Size; i++) + for(size_t i = 0; i < BitmapSize; i++) { if(BitmapPointer[i] != 0xFFFFFFFF) { Modified: borium/src/Managers/Memory/Bitmap.h =================================================================== --- borium/src/Managers/Memory/Bitmap.h 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Managers/Memory/Bitmap.h 2010-06-12 23:23:05 UTC (rev 161) @@ -1,7 +1,8 @@ #ifndef Managers_Memory_Bitmap_h #define Managers_Memory_Bitmap_h -#include "../../Version.h" +#include "../../Kernel/Version.h" +#include "../../LibCpp/StdLib.h" /** @author Harry Hornbacher @@ -20,9 +21,9 @@ Bitmap(); void ClearAll(); - void Set(); - bool Get(); - void Clear(); + void Set(size_t Index); + bool Get(size_t Index); + void Clear(size_t Index); size_t GetFirstSet(size_t Length = 1); }; Modified: borium/src/Managers/Memory/Makefile.am =================================================================== --- borium/src/Managers/Memory/Makefile.am 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Managers/Memory/Makefile.am 2010-06-12 23:23:05 UTC (rev 161) @@ -0,0 +1,6 @@ +CXXFLAGS=-m32 -nostdinc -nostartfiles -nostdlib -ffreestanding -fno-builtin -fno-rtti -fno-exceptions -nostartfiles -nodefaultlibs -fno-stack-protector + +noinst_LIBRARIES = libMemory.a +libMemory_a_SOURCES = Bitmap.cpp PhysicalMemoryManager.cpp VirtualMemoryManager.cpp VirtualMemoryMap.cpp VirtualMemoryRegion.cpp + + Modified: borium/src/Managers/Memory/PhysicalMemoryManager.cpp =================================================================== --- borium/src/Managers/Memory/PhysicalMemoryManager.cpp 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Managers/Memory/PhysicalMemoryManager.cpp 2010-06-12 23:23:05 UTC (rev 161) @@ -7,10 +7,13 @@ */ namespace Memory { - /* {src_lang=cpp}*/ + /* {src_lang=cpp}*/ + void PhysicalMemoryManager::Init() { + } + PhysicalAddress *PhysicalMemoryManager::AllocBlock() // don't delete the following line as it's needed to preserve source code of this autogenerated element // section 127-0-0-1-16a504c9:128bd419af3:-8000:0000000000001196 begin @@ -48,7 +51,7 @@ // don't delete the following line as it's needed to preserve source code of this autogenerated element // section 127-0-0-1-16a504c9:128bd419af3:-8000:00000000000011A4 begin { - return (AvailibleBlocks-FreeBlocks)*BLOCK_SIZE; + return (AvailibleBlocks - FreeBlocks)*BLOCK_SIZE; } // section 127-0-0-1-16a504c9:128bd419af3:-8000:00000000000011A4 end // don't delete the previous line as it's needed to preserve source code of this autogenerated element Modified: borium/src/Managers/Memory/PhysicalMemoryManager.h =================================================================== --- borium/src/Managers/Memory/PhysicalMemoryManager.h 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Managers/Memory/PhysicalMemoryManager.h 2010-06-12 23:23:05 UTC (rev 161) @@ -2,7 +2,8 @@ #define Managers_Memory_PhysicalMemoryManager_h #include "Bitmap.h" -#include "../../Version.h" +#include "../../Kernel/Version.h" +#include "../../LibCpp/StdLib.h" @@ -31,6 +32,8 @@ public: + void Init(); + PhysicalAddress *AllocBlock(); void FreeBlock(PhysicalAddress Pointer, size_t Length = 0); Modified: borium/src/Managers/Memory/VirtualMemoryManager.cpp =================================================================== --- borium/src/Managers/Memory/VirtualMemoryManager.cpp 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Managers/Memory/VirtualMemoryManager.cpp 2010-06-12 23:23:05 UTC (rev 161) @@ -1,84 +1,74 @@ #include "VirtualMemoryManager.h" /** @author Harry Hornbacher - */ + */ namespace Managers { -/** @author Harry Hornbacher + /** @author Harry Hornbacher */ -namespace Memory { + namespace Memory { + /* {src_lang=cpp}*/ + /** + * Allocate a/some free Page/-s + */ + void VirtualMemoryManager::AllocPage() + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1--7594528:1287e7358a9:-8000:00000000000024A0 begin + { + } + // section 127-0-0-1--7594528:1287e7358a9:-8000:00000000000024A0 end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element -{ - /* {src_lang=cpp}*/ + /** + * Free an/some allocated Page/-s + */ + void VirtualMemoryManager::FreePage() + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011A6 begin + { + } + // section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011A6 end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element + /** + * Identity map some memory + */ + void VirtualMemoryManager::IdentityMap() + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011A8 begin + { + } + // section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011A8 end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element + /** + * Translate the VirtualAddress to the corresponding PhysicalAddress + */ + void VirtualMemoryManager::TranslateAddress() + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011AA begin + { + } + // section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011AA end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element + /** + * Flush the Translation Lookaside Buffer + */ + void VirtualMemoryManager::FlushTlb() + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011EB begin + { + } + // section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011EB end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element -/** - * Allocate a/some free Page/-s - */ -void VirtualMemoryManager::AllocPage() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1--7594528:1287e7358a9:-8000:00000000000024A0 begin -{ -} -// section 127-0-0-1--7594528:1287e7358a9:-8000:00000000000024A0 end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element - -/** - * Free an/some allocated Page/-s - */ -void VirtualMemoryManager::FreePage() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011A6 begin -{ -} -// section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011A6 end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element - - -/** - * Identity map some memory - */ -void VirtualMemoryManager::IdentityMap() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011A8 begin -{ -} -// section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011A8 end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element - - -/** - * Translate the VirtualAddress to the corresponding PhysicalAddress - */ -void VirtualMemoryManager::TranslateAddress() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011AA begin -{ -} -// section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011AA end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element - - -/** - * Flush the Translation Lookaside Buffer - */ -void VirtualMemoryManager::FlushTlb() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011EB begin -{ -} -// section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011EB end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element - - -} /* End of namespace Managers::Memory */ + } /* End of namespace Managers::Memory */ } /* End of namespace Managers */ /* lost code following: // section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011AC begin { } // section 127-0-0-1--5acc753c:128d6ae1493:-8000:00000000000011AC end -*/ \ No newline at end of file + */ \ No newline at end of file Modified: borium/src/Managers/Memory/VirtualMemoryMap.cpp =================================================================== --- borium/src/Managers/Memory/VirtualMemoryMap.cpp 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Managers/Memory/VirtualMemoryMap.cpp 2010-06-12 23:23:05 UTC (rev 161) @@ -1,15 +1,15 @@ #include "VirtualMemoryMap.h" /** @author Harry Hornbacher - */ + */ namespace Managers { -/** @author Harry Hornbacher + /** @author Harry Hornbacher */ -namespace Memory { + namespace Memory { -{ - /* {src_lang=cpp}*/ -} /* End of namespace Managers::Memory */ + /* {src_lang=cpp}*/ + + } /* End of namespace Managers::Memory */ } /* End of namespace Managers */ Modified: borium/src/Managers/Memory/VirtualMemoryRegion.cpp =================================================================== --- borium/src/Managers/Memory/VirtualMemoryRegion.cpp 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Managers/Memory/VirtualMemoryRegion.cpp 2010-06-12 23:23:05 UTC (rev 161) @@ -1,15 +1,13 @@ #include "VirtualMemoryRegion.h" /** @author Harry Hornbacher - */ + */ namespace Managers { -/** @author Harry Hornbacher + /** @author Harry Hornbacher */ -namespace Memory { + namespace Memory { + /* {src_lang=cpp}*/ -{ - /* {src_lang=cpp}*/ - -} /* End of namespace Managers::Memory */ + } /* End of namespace Managers::Memory */ } /* End of namespace Managers */ Property changes on: borium/src/Managers/Platform ___________________________________________________________________ Modified: svn:ignore - Makefile.in Makefile + Makefile.in Makefile .deps libPlatform.a Modified: borium/src/Managers/Platform/BootInformation.cpp =================================================================== --- borium/src/Managers/Platform/BootInformation.cpp 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Managers/Platform/BootInformation.cpp 2010-06-12 23:23:05 UTC (rev 161) @@ -1,15 +1,14 @@ #include "BootInformation.h" /** @author Harry Hornbacher - */ + */ namespace Managers { -/** @author Harry Hornbacher + /** @author Harry Hornbacher */ -namespace Platform { + namespace Platform { -{ - /* {src_lang=cpp}*/ + /* {src_lang=cpp}*/ -} /* End of namespace Managers::Platform */ + } /* End of namespace Managers::Platform */ } /* End of namespace Managers */ Modified: borium/src/Managers/Platform/Cpu.cpp =================================================================== --- borium/src/Managers/Platform/Cpu.cpp 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Managers/Platform/Cpu.cpp 2010-06-12 23:23:05 UTC (rev 161) @@ -1,20 +1,19 @@ #include "Cpu.h" /** @author Harry Hornbacher - */ + */ namespace Managers { -/** @author Harry Hornbacher + /** @author Harry Hornbacher */ -namespace Platform { + namespace Platform { - /** - * This STRUCT bundles all important CPU information - * @author Harry Hornbacher - */ + /** + * This STRUCT bundles all important CPU information + * @author Harry Hornbacher + */ + + /* {src_lang=cpp}*/ -{ - /* {src_lang=cpp}*/ - -} /* End of namespace Managers::Platform */ + } /* End of namespace Managers::Platform */ } /* End of namespace Managers */ Modified: borium/src/Managers/Platform/CpuManager.cpp =================================================================== --- borium/src/Managers/Platform/CpuManager.cpp 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Managers/Platform/CpuManager.cpp 2010-06-12 23:23:05 UTC (rev 161) @@ -1,15 +1,19 @@ #include "CpuManager.h" /** @author Harry Hornbacher - */ + */ namespace Managers { -/** @author Harry Hornbacher + /** @author Harry Hornbacher */ -namespace Platform { + namespace Platform { + /* {src_lang=cpp}*/ -{ - /* {src_lang=cpp}*/ + void CpuManager::Init() { + // Initialize GDT + // Initialize IDT + } -} /* End of namespace Managers::Platform */ -} /* End of namespace Managers */ + /* End of namespace Managers::Platform */ + } /* End of namespace Managers */ +} \ No newline at end of file Modified: borium/src/Managers/Platform/CpuManager.h =================================================================== --- borium/src/Managers/Platform/CpuManager.h 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Managers/Platform/CpuManager.h 2010-06-12 23:23:05 UTC (rev 161) @@ -1,30 +1,34 @@ #ifndef Managers_Platform_CpuManager_h #define Managers_Platform_CpuManager_h -#include <vector> - #include "Cpu.h" /** @author Harry Hornbacher - */ + */ namespace Managers { -/** @author Harry Hornbacher + /** @author Harry Hornbacher */ -namespace Platform { + namespace Platform { -class CpuManager -{ - /* {src_lang=cpp}*/ + class CpuManager { + /* {src_lang=cpp}*/ + public: + void Init(); - private: - std::vector< Cpu > mCpus; + private: + Cpu BootstrapProcessor; -}; + /** + * FIXME: Change type to own template class + */ + //std::vector< Cpu > ApplicationProcessors; -} /* End of namespace Managers::Platform */ + }; + + } /* End of namespace Managers::Platform */ } /* End of namespace Managers */ #endif // Managers_Platform_CpuManager_h Modified: borium/src/Managers/Platform/Makefile.am =================================================================== --- borium/src/Managers/Platform/Makefile.am 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Managers/Platform/Makefile.am 2010-06-12 23:23:05 UTC (rev 161) @@ -0,0 +1,5 @@ +CXXFLAGS=-m32 -nostdinc -nostartfiles -nostdlib -ffreestanding -fno-builtin -fno-rtti -fno-exceptions -nostartfiles -nodefaultlibs -fno-stack-protector + +noinst_LIBRARIES = libPlatform.a +libPlatform_a_SOURCES = BootInformation.cpp Cpu.cpp CpuManager.cpp + Modified: borium/src/Stage1/Stage1.cpp =================================================================== --- borium/src/Stage1/Stage1.cpp 2010-06-12 22:22:58 UTC (rev 160) +++ borium/src/Stage1/Stage1.cpp 2010-06-12 23:23:05 UTC (rev 161) @@ -60,14 +60,14 @@ /** * Global Kernel Class */ -Kernel::Kernel theKernel; +Kernel::Kernel TheKernel; void InitStage1(void *MultibootHeader) { CallConstructors(); - theKernel.Init(); + TheKernel.Init(); - theKernel.Run(); + TheKernel.Run(); CallDestructors(); } Modified: borium/testing/bootdisk.img =================================================================== (Binary files differ) Modified: borium/testing/grub.img =================================================================== (Binary files differ) Modified: borium/testing/grub_overlay/kernel =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-12 22:23:04
|
Revision: 160 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=160&view=rev Author: mizztajonny Date: 2010-06-12 22:22:58 +0000 (Sat, 12 Jun 2010) Log Message: ----------- Fixed errors in SVN repository. The project now supports autotools. Modified Paths: -------------- borium/src/Kernel/Kernel.cpp Modified: borium/src/Kernel/Kernel.cpp =================================================================== --- borium/src/Kernel/Kernel.cpp 2010-06-12 22:19:54 UTC (rev 159) +++ borium/src/Kernel/Kernel.cpp 2010-06-12 22:22:58 UTC (rev 160) @@ -1,60 +1,65 @@ #include "Kernel.h" #include "../LibCpp/CString.h" -/** - * This is the main part of the kernel. - */ -void Kernel::Run() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1--7594528:1287e7358a9:-8000:0000000000001C68 begin -{ -} -// section 127-0-0-1--7594528:1287e7358a9:-8000:0000000000001C68 end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element -/** - * This function initializes all the managers and the kernel itself. - */ -void Kernel::Init() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC begin -{ - // Initialize the CPU Manager +namespace Kernel { - // Copy all needed data (e.g. from bootloader) to a safe place + /** + * This is the main part of the kernel. + */ + void Kernel::Run() + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1--7594528:1287e7358a9:-8000:0000000000001C68 begin + { + } + // section 127-0-0-1--7594528:1287e7358a9:-8000:0000000000001C68 end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element - // Initialize physical memory + /** + * This function initializes all the managers and the kernel itself. + */ + void Kernel::Init() + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC begin + { + // Initialize the CPU Manager - // Initialize exception manager + // Copy all needed data (e.g. from bootloader) to a safe place - // Initialize virtual memory -} -// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element + // Initialize physical memory -/** - * Returns the kernel's version - * @param Buffer A pointer to the buffer, where the information will be copied in. - */ -void Kernel::GetVersion(Version* Buffer) -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EE begin -{ - MemCpy((Address*) Buffer, (Address*) & KernelVersion, sizeof (Version)); -} -// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EE end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element + // Initialize exception manager -/** - * Returns the kernel's code name - * @param Buffer A pointer to the buffer, where the information will be copied in. - */ -void Kernel::GetCodeName(char* Buffer) -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011F0 begin -{ - MemCpy((Address*) Buffer, (Address*) & CodeName, StrLen(CodeName)); + // Initialize virtual memory + } + // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element + + /** + * Returns the kernel's version + * @param Buffer A pointer to the buffer, where the information will be copied in. + */ + void Kernel::GetVersion(Version* Buffer) + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EE begin + { + MemCpy((Address*) Buffer, (Address*) & KernelVersion, sizeof (Version)); + } + // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EE end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element + + /** + * Returns the kernel's code name + * @param Buffer A pointer to the buffer, where the information will be copied in. + */ + void Kernel::GetCodeName(char* Buffer) + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011F0 begin + { + MemCpy((Address*) Buffer, (Address*) & CodeName, StrLen(CodeName)); + } + // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011F0 end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element + + } -// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011F0 end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-12 22:20:00
|
Revision: 159 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=159&view=rev Author: mizztajonny Date: 2010-06-12 22:19:54 +0000 (Sat, 12 Jun 2010) Log Message: ----------- ... Modified Paths: -------------- borium/src/Stage0/Makefile.am borium/src/Stage0/Stage0.S borium/src/Stage1/Makefile.am borium/src/Stage1/Stage1.cpp Modified: borium/src/Stage0/Makefile.am =================================================================== --- borium/src/Stage0/Makefile.am 2010-06-12 22:17:34 UTC (rev 158) +++ borium/src/Stage0/Makefile.am 2010-06-12 22:19:54 UTC (rev 159) @@ -1,4 +1,5 @@ -CCASFLAGS = -m32 +CCASFLAGS=-m32 + noinst_LIBRARIES = libStage0.a libStage0_a_SOURCES = Stage0.S Modified: borium/src/Stage0/Stage0.S =================================================================== --- borium/src/Stage0/Stage0.S 2010-06-12 22:17:34 UTC (rev 158) +++ borium/src/Stage0/Stage0.S 2010-06-12 22:19:54 UTC (rev 159) @@ -26,11 +26,11 @@ -------------------------------------------------------------------------------------*/ // Multiboot header -.section multiboot #define MB_MAGIC 0x1badb002 #define MB_FLAGS 0x0 #define MB_CHECKSUM -(MB_MAGIC + MB_FLAGS) +.section multiboot .align 4 .int MB_MAGIC .int MB_FLAGS @@ -41,7 +41,7 @@ // stage1_init from Stage1/Stage1.cpp (extern) .extern InitStage1 -// define _start and kernel_stack as global +// define InitStage0 and KernelStack as global .global InitStage0 .global KernelStack @@ -49,7 +49,10 @@ // Initialize the Stack mov $KernelStack, %esp - // Load multiboot information from the bootloader + // Pass the Multiboot magic number to InitStage1() + push %eax + + // Pass the pointer to the Multiboot structure to InitStage1() push %ebx // Set the basepointer to 0 @@ -57,7 +60,7 @@ cli - // call InitStage1 from Stage1/Stage1.cpp + // call InitStage1() from Stage1/Stage1.cpp call InitStage1 hlt Modified: borium/src/Stage1/Makefile.am =================================================================== --- borium/src/Stage1/Makefile.am 2010-06-12 22:17:34 UTC (rev 158) +++ borium/src/Stage1/Makefile.am 2010-06-12 22:19:54 UTC (rev 159) @@ -1,4 +1,4 @@ -CXXFLAGS = -m32 -Wall -g -nostdinc -nostartfiles -nostdlib -ffreestanding -fno-builtin -fno-rtti -fno-exceptions +CXXFLAGS=-m32 -nostdinc -nostartfiles -nostdlib -ffreestanding -fno-builtin -fno-rtti -fno-exceptions -nostartfiles -nodefaultlibs -fno-stack-protector + noinst_LIBRARIES = libStage1.a libStage1_a_SOURCES = Stage1.cpp - Modified: borium/src/Stage1/Stage1.cpp =================================================================== --- borium/src/Stage1/Stage1.cpp 2010-06-12 22:17:34 UTC (rev 158) +++ borium/src/Stage1/Stage1.cpp 2010-06-12 22:19:54 UTC (rev 159) @@ -25,7 +25,8 @@ Descr.: Kernel Stage1 loader -------------------------------------------------------------------------------------*/ -#include "src/Kernel/Types.h" +#include "../LibCpp/Types.h" +#include "../Kernel/Kernel.h" extern "C" void InitStage1(void*); @@ -54,14 +55,19 @@ // Could possibly be handled like a "virtual" Exception } +// The Kernel and the Managers are global Objects + +/** + * Global Kernel Class + */ +Kernel::Kernel theKernel; + void InitStage1(void *MultibootHeader) { CallConstructors(); - // Kernel entrypoint - Word *video = (Word*)0xb8000; - for(int i = 0; i < 15; i++) { - video[i] = (Word)0x6607; - } + theKernel.Init(); + theKernel.Run(); + CallDestructors(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-12 22:17:40
|
Revision: 158 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=158&view=rev Author: mizztajonny Date: 2010-06-12 22:17:34 +0000 (Sat, 12 Jun 2010) Log Message: ----------- ... Modified Paths: -------------- borium/configure.ac Modified: borium/configure.ac =================================================================== --- borium/configure.ac 2010-06-12 22:12:36 UTC (rev 157) +++ borium/configure.ac 2010-06-12 22:17:34 UTC (rev 158) @@ -6,9 +6,10 @@ AC_CONFIG_FILES([Makefile src/Makefile + src/Stage0/Makefile + src/Stage1/Makefile src/Kernel/Makefile - src/Stage0/Makefile - src/Stage1/Makefile]) + src/LibCpp/Makefile]) # Checks for programs. AC_PROG_CXX This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-12 22:12:42
|
Revision: 157 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=157&view=rev Author: mizztajonny Date: 2010-06-12 22:12:36 +0000 (Sat, 12 Jun 2010) Log Message: ----------- ... Modified Paths: -------------- borium/src/kernel.ld Modified: borium/src/kernel.ld =================================================================== --- borium/src/kernel.ld 2010-06-12 22:11:14 UTC (rev 156) +++ borium/src/kernel.ld 2010-06-12 22:12:36 UTC (rev 157) @@ -29,36 +29,46 @@ SECTIONS { - .text 0x100000: { KernelStart = .; - *(multiboot) + *(multiboot) *(.text*) - *(.rodata) + *(.rodata*) } .data ALIGN(4096) : { ConstructorsStart = .; - *(.ctors) + *(.ctors*) ConstructorsEnd = .; DestructorsStart = .; - *(.dtors) + *(.dtors*) DestructorsEnd = .; - *(.data) + *(.data*) } - .rodata ALIGN(4096) : { - *(.rodata) - } + .note.gnu.build-id ALIGN(4096) : + { + *(.note.gnu.build-id) + } + .rodata ALIGN(4096) : { + *(.rodata*) + } + .bss ALIGN(4096) : { - *(.bss) + *(.bss*) } + /DISCARD/ : + { + *(.comment*) + *(.eh_frame) + } + . = ALIGN(4096); KernelEnd = .; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-12 22:11:21
|
Revision: 156 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=156&view=rev Author: mizztajonny Date: 2010-06-12 22:11:14 +0000 (Sat, 12 Jun 2010) Log Message: ----------- ... Modified Paths: -------------- borium/src/Makefile.am borium/src/Managers/Platform/BootInformation.h Property Changed: ---------------- borium/src/ borium/src/Kernel/ Property changes on: borium/src ___________________________________________________________________ Modified: svn:ignore - Makefile.in Makefile Doxyfile .libs .deps + .deps borium Makefile.in Makefile Doxyfile Property changes on: borium/src/Kernel ___________________________________________________________________ Modified: svn:ignore - Makefile.in Makefile .deps + Makefile.in Makefile .deps libKernel.a Modified: borium/src/Makefile.am =================================================================== --- borium/src/Makefile.am 2010-06-12 22:05:53 UTC (rev 155) +++ borium/src/Makefile.am 2010-06-12 22:11:14 UTC (rev 156) @@ -1,12 +1,10 @@ -LDFLAGS = -melf_i386 -CFLAGS = -m32 -Wall -g -nostdinc -nostartfiles -nostdlib -ffreestanding -fno-builtin -fno-rtti -fno-exceptions +SUBDIRS = Stage0 Stage1 LibCpp Kernel -SUBDIRS = Stage0 Stage1 +CFLAGS=-m32 -nostdinc -nostartfiles -nostdlib -ffreestanding -fno-builtin -fno-rtti -fno-exceptions -nostartfiles -nodefaultlibs -fno-stack-protector +CCASFLAGS=-m32 boriumdir = ../ borium_PROGRAMS = borium borium_SOURCES = -borium_LDADD = Stage0/libStage0.a Stage1/libStage1.a +borium_LDADD = Stage0/libStage0.a Stage1/libStage1.a Kernel/libKernel.a LibCpp/libCpp.a borium_LDFLAGS = -Tkernel.ld - - Modified: borium/src/Managers/Platform/BootInformation.h =================================================================== --- borium/src/Managers/Platform/BootInformation.h 2010-06-12 22:05:53 UTC (rev 155) +++ borium/src/Managers/Platform/BootInformation.h 2010-06-12 22:11:14 UTC (rev 156) @@ -1,6 +1,7 @@ #ifndef Managers_Platform_BootInformation_h #define Managers_Platform_BootInformation_h +#include "../../LibCpp/Types.h" /** @author Harry Hornbacher */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-12 22:05:59
|
Revision: 155 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=155&view=rev Author: mizztajonny Date: 2010-06-12 22:05:53 +0000 (Sat, 12 Jun 2010) Log Message: ----------- ... Modified Paths: -------------- borium/src/LibCpp/CString.cpp borium/src/LibCpp/CString.h borium/src/LibCpp/Makefile.am Added Paths: ----------- borium/src/LibCpp/Types.h Modified: borium/src/LibCpp/CString.cpp =================================================================== --- borium/src/LibCpp/CString.cpp 2010-06-12 22:03:48 UTC (rev 154) +++ borium/src/LibCpp/CString.cpp 2010-06-12 22:05:53 UTC (rev 155) @@ -34,6 +34,7 @@ Pointer[i] = Value; } + // Fill a variable with a value (Word-version) void MemSetW(Word *Pointer, Word Value, size_t Number) { for(size_t i=0; i<Number; i++) @@ -42,7 +43,7 @@ // Copy the value of one variable to another -void MemCpy(void *Destination, const void *Source, size_t Number) { +void MemCpy(Address *Destination, const Address *Source, size_t Number) { for(size_t i=0; i<Number; i++) Destination[i] = Source[i]; } Modified: borium/src/LibCpp/CString.h =================================================================== --- borium/src/LibCpp/CString.h 2010-06-12 22:03:48 UTC (rev 154) +++ borium/src/LibCpp/CString.h 2010-06-12 22:05:53 UTC (rev 155) @@ -28,7 +28,9 @@ #ifndef CString_h #define CString_h +#include "Types.h" + /** * Fill a variable with a value *@param Pointer The address to write to @@ -52,7 +54,7 @@ *@param Source The address to read from *@param Number The count of Bytes which will be copied */ -void MemCpy(void *Destination, const void *Source, size_t Number); +void MemCpy(Address *Destination, const Address *Source, size_t Number); /** * Compare two strings Modified: borium/src/LibCpp/Makefile.am =================================================================== --- borium/src/LibCpp/Makefile.am 2010-06-12 22:03:48 UTC (rev 154) +++ borium/src/LibCpp/Makefile.am 2010-06-12 22:05:53 UTC (rev 155) @@ -0,0 +1,4 @@ +CXXFLAGS=-m32 -nostdinc -nostartfiles -nostdlib -ffreestanding -fno-builtin -fno-rtti -fno-exceptions -nostartfiles -nodefaultlibs -fno-stack-protector + +noinst_LIBRARIES = libCpp.a +libCpp_a_SOURCES = CString.cpp CxaVirtual.cpp Operators.cpp \ No newline at end of file Added: borium/src/LibCpp/Types.h =================================================================== --- borium/src/LibCpp/Types.h (rev 0) +++ borium/src/LibCpp/Types.h 2010-06-12 22:05:53 UTC (rev 155) @@ -0,0 +1,82 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: George Karpouzas +Mail: gka...@we... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 George Karpouzas + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: Types.h +Created on 20. April 2010, 16:40 +Descr.: types +-------------------------------------------------------------------------------------*/ + +#ifndef Types_h +#define Types_h + +#ifndef _SIZE_T_DEFINED + +typedef unsigned int size_t; + +#define _SIZE_T_DEFINED +#endif + +#ifndef _SSIZE_T_DEFINED +typedef int ssize_t; +#define _SSIZE_T_DEFINED +#endif + +#ifndef NULL +#define NULL 0 +#endif + +typedef unsigned char uchar; +typedef unsigned short ushort; +typedef unsigned int uint; +typedef unsigned long ulong; + +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned long uint32_t; +typedef unsigned long int uint64_t; + +typedef signed char int8_t; +typedef signed short int16_t; +typedef signed long int32_t; +typedef signed long int int64_t; + +//we have to define POSIX types + +// borium native types + + + +/** + * Basic datatypes + */ +typedef unsigned char Byte; +typedef unsigned short Word; +typedef unsigned long Dword; + +/** + * Memory datatypes + */ +typedef Dword Address; + +#endif + + Property changes on: borium/src/LibCpp/Types.h ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-12 22:03:55
|
Revision: 154 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=154&view=rev Author: mizztajonny Date: 2010-06-12 22:03:48 +0000 (Sat, 12 Jun 2010) Log Message: ----------- ... Property Changed: ---------------- borium/src/LibCpp/ Property changes on: borium/src/LibCpp ___________________________________________________________________ Modified: svn:ignore - Makefile.in Makefile + Makefile.in Makefile .deps libCpp.a This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-12 21:43:29
|
Revision: 153 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=153&view=rev Author: mizztajonny Date: 2010-06-12 21:43:22 +0000 (Sat, 12 Jun 2010) Log Message: ----------- ... Removed Paths: ------------- borium/src/LibCpp/Types.h Deleted: borium/src/LibCpp/Types.h =================================================================== --- borium/src/LibCpp/Types.h 2010-06-12 21:29:30 UTC (rev 152) +++ borium/src/LibCpp/Types.h 2010-06-12 21:43:22 UTC (rev 153) @@ -1,66 +0,0 @@ -/*------------------------------------------------------------------------------------- -yaMOS - "borium" - -Author: George Karpouzas -Mail: gka...@we... -Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). - ---------------------------------------------------------------------------------------- - -License: Copyright (C) 2010 George Karpouzas - -This program is free software; you can redistribute it and/or modify it under the terms -of the GNU General Public License as published by the Free Software Foundation; either -version 3 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with this -program; if not, see <http://www.gnu.org/licenses/>. - ---------------------------------------------------------------------------------------- - -File: Types.h -Created on 20. April 2010, 16:40 -Descr.: types --------------------------------------------------------------------------------------*/ - -#ifndef Types_h -#define Types_h - -#ifndef _SIZE_T_DEFINED - -typedef unsigned int size_t; - -#define _SIZE_T_DEFINED -#endif - -#ifndef _SSIZE_T_DEFINED -typedef int ssize_t; -#define _SSIZE_T_DEFINED -#endif - -#ifndef NULL -#define NULL 0 -#endif - -typedef unsigned char uchar; -typedef unsigned short ushort; -typedef unsigned int uint; -typedef unsigned long ulong; - -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned long uint32_t; -typedef unsigned long int uint64_t; - -typedef signed char int8_t; -typedef signed short int16_t; -typedef signed long int32_t; -typedef signed long int int64_t; - -//we have to define POSIX types - -#endif - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-12 21:29:39
|
Revision: 152 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=152&view=rev Author: mizztajonny Date: 2010-06-12 21:29:30 +0000 (Sat, 12 Jun 2010) Log Message: ----------- ... Modified Paths: -------------- borium/src/Kernel/Makefile.am Modified: borium/src/Kernel/Makefile.am =================================================================== --- borium/src/Kernel/Makefile.am 2010-06-12 21:26:08 UTC (rev 151) +++ borium/src/Kernel/Makefile.am 2010-06-12 21:29:30 UTC (rev 152) @@ -1,2 +1,5 @@ +CXXFLAGS=-m32 -nostdinc -nostartfiles -nostdlib -ffreestanding -fno-builtin -fno-rtti -fno-exceptions -nostartfiles -nodefaultlibs -fno-stack-protector + + noinst_LIBRARIES = libKernel.a -libKernel_a_SOURCES = Kernel.cpp Kernel.h Types.h Version.h +libKernel_a_SOURCES = Kernel.cpp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-12 21:26:14
|
Revision: 151 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=151&view=rev Author: mizztajonny Date: 2010-06-12 21:26:08 +0000 (Sat, 12 Jun 2010) Log Message: ----------- ... Modified Paths: -------------- borium/src/Kernel/Version.h Modified: borium/src/Kernel/Version.h =================================================================== --- borium/src/Kernel/Version.h 2010-06-12 21:25:29 UTC (rev 150) +++ borium/src/Kernel/Version.h 2010-06-12 21:26:08 UTC (rev 151) @@ -11,9 +11,9 @@ * @author Harry Hornbacher */ struct Version { - const SubVersion Main; - const SubVersion Middle; - const SubVersion Last; + SubVersion Main; + SubVersion Middle; + SubVersion Last; }; #endif // Version_h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-12 21:25:35
|
Revision: 150 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=150&view=rev Author: mizztajonny Date: 2010-06-12 21:25:29 +0000 (Sat, 12 Jun 2010) Log Message: ----------- ... Modified Paths: -------------- borium/src/Kernel/Kernel.cpp Modified: borium/src/Kernel/Kernel.cpp =================================================================== --- borium/src/Kernel/Kernel.cpp 2010-06-12 21:21:55 UTC (rev 149) +++ borium/src/Kernel/Kernel.cpp 2010-06-12 21:25:29 UTC (rev 150) @@ -1,65 +1,60 @@ #include "Kernel.h" +#include "../LibCpp/CString.h" +/** + * This is the main part of the kernel. + */ +void Kernel::Run() +// don't delete the following line as it's needed to preserve source code of this autogenerated element +// section 127-0-0-1--7594528:1287e7358a9:-8000:0000000000001C68 begin +{ +} +// section 127-0-0-1--7594528:1287e7358a9:-8000:0000000000001C68 end +// don't delete the previous line as it's needed to preserve source code of this autogenerated element -/** @author Harry Hornbacher +/** + * This function initializes all the managers and the kernel itself. */ -namespace Kernel { +void Kernel::Init() +// don't delete the following line as it's needed to preserve source code of this autogenerated element +// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC begin +{ + // Initialize the CPU Manager - /** - * This is the main part of the kernel. - */ - void Kernel::Run() - // don't delete the following line as it's needed to preserve source code of this autogenerated element - // section 127-0-0-1--7594528:1287e7358a9:-8000:0000000000001C68 begin - { - } - // section 127-0-0-1--7594528:1287e7358a9:-8000:0000000000001C68 end - // don't delete the previous line as it's needed to preserve source code of this autogenerated element + // Copy all needed data (e.g. from bootloader) to a safe place - /** - * This function initializes all the managers and the kernel itself. - */ - void Kernel::Init() - // don't delete the following line as it's needed to preserve source code of this autogenerated element - // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC begin - { - // Initialize the CPU Manager + // Initialize physical memory - // Copy all needed data (e.g. from bootloader) to a safe place + // Initialize exception manager - // Initialize physical memory + // Initialize virtual memory +} +// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC end +// don't delete the previous line as it's needed to preserve source code of this autogenerated element - // Initialize exception manager +/** + * Returns the kernel's version + * @param Buffer A pointer to the buffer, where the information will be copied in. + */ +void Kernel::GetVersion(Version* Buffer) +// don't delete the following line as it's needed to preserve source code of this autogenerated element +// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EE begin +{ + MemCpy((Address*) Buffer, (Address*) & KernelVersion, sizeof (Version)); +} +// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EE end +// don't delete the previous line as it's needed to preserve source code of this autogenerated element - // Initialize virtual memory - } - // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC end - // don't delete the previous line as it's needed to preserve source code of this autogenerated element - - /** - * Returns the kernel's version - * @param Buffer A pointer to the buffer, where the information will be copied in. - */ - void Kernel::GetVersion(Version* Buffer) - // don't delete the following line as it's needed to preserve source code of this autogenerated element - // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EE begin - { - MemCpy(Buffer, &KernelVersion, sizeof(Version)); - } - // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EE end - // don't delete the previous line as it's needed to preserve source code of this autogenerated element - - /** - * Returns the kernel's code name - * @param Buffer A pointer to the buffer, where the information will be copied in. - */ - void Kernel::GetCodeName(char* Buffer) - // don't delete the following line as it's needed to preserve source code of this autogenerated element - // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011F0 begin - { - MemCpy(Buffer, &CodeName, StrLen(CodeName)); - } - // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011F0 end - // don't delete the previous line as it's needed to preserve source code of this autogenerated element - +/** + * Returns the kernel's code name + * @param Buffer A pointer to the buffer, where the information will be copied in. + */ +void Kernel::GetCodeName(char* Buffer) +// don't delete the following line as it's needed to preserve source code of this autogenerated element +// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011F0 begin +{ + MemCpy((Address*) Buffer, (Address*) & CodeName, StrLen(CodeName)); } +// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011F0 end +// don't delete the previous line as it's needed to preserve source code of this autogenerated element + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-12 21:22:01
|
Revision: 149 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=149&view=rev Author: mizztajonny Date: 2010-06-12 21:21:55 +0000 (Sat, 12 Jun 2010) Log Message: ----------- ... Removed Paths: ------------- borium/src/borium Deleted: borium/src/borium =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-04 21:49:00
|
Revision: 147 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=147&view=rev Author: mizztajonny Date: 2010-06-04 21:48:54 +0000 (Fri, 04 Jun 2010) Log Message: ----------- ... Added Paths: ----------- borium/src/LibCpp/CString.cpp borium/src/LibCpp/CString.h borium/src/Stage1/Stage1.cpp Added: borium/src/LibCpp/CString.cpp =================================================================== --- borium/src/LibCpp/CString.cpp (rev 0) +++ borium/src/LibCpp/CString.cpp 2010-06-04 21:48:54 UTC (rev 147) @@ -0,0 +1,28 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: mizztajonny +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 mizztajonny + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: Helper.cpp +Created on 3. Juni 2010, 21:59 +Descr.: This is a collection of needed helper functions (like a "nano-libc") +-------------------------------------------------------------------------------------*/ + + Property changes on: borium/src/LibCpp/CString.cpp ___________________________________________________________________ Added: svn:executable + * Added: borium/src/LibCpp/CString.h =================================================================== --- borium/src/LibCpp/CString.h (rev 0) +++ borium/src/LibCpp/CString.h 2010-06-04 21:48:54 UTC (rev 147) @@ -0,0 +1,71 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: mizztajonny +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 mizztajonny + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: Helpers.h +Created on 3. Juni 2010, 22:03 +Descr.: +-------------------------------------------------------------------------------------*/ + +#ifndef Helpers_h +#define Helpers_h + + +/** +* Fill a variable with a value +*@param addr The address to write to +*@param val The value which will be written +*@param size The count of Bytes which will be written +*/ +void memset(Byte *addr, Byte val, size_t size); + +/** +* Fill a variable with a value (Word-version) +*@param addr The address to write to +*@param val The value which will be written +*@param size The count of Words which will be written +*/ +void memsetw(Word *addr, Word val, size_t size); + + +/** +* Copy the value of one variable to another +*@param dest The address to write to +*@param src The address to read from +*@param size The count of Bytes which will be copied +*/ +void memcpy(Byte *dest, Byte *src, size_t size); + +/** +* Get the size of a null terminated string +*@param string The string whos size will be calculated +*@return The size of the string +*/ +int strlen(char *string); + +/** +* Compare two strings +*@return This is 0 if both are the same, otherwise != 0 +*/ +int strcmp(char *str1, char *str2); + +#endif // Helpers_h + Property changes on: borium/src/LibCpp/CString.h ___________________________________________________________________ Added: svn:executable + * Added: borium/src/Stage1/Stage1.cpp =================================================================== --- borium/src/Stage1/Stage1.cpp (rev 0) +++ borium/src/Stage1/Stage1.cpp 2010-06-04 21:48:54 UTC (rev 147) @@ -0,0 +1,62 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: mizztajonny +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 mizztajonny + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: stage1.cpp +Created on 3. Juni 2010, 21:34 +Descr.: Kernel Stage1 loader +-------------------------------------------------------------------------------------*/ + +extern "C" void stage1_init(void*); + +// minimal C++ support functions + +typedef void (*Constructor)(); +typedef void (*Destructor)(); + +extern "C" Constructor ConstructorsStart; +extern "C" Constructor ConstructorsEnd; + +extern "C" Destructor DestructorsStart; +extern "C" Destructor DestructorsEnd; + +void CallConstructors() { + for(Constructor *i = &ConstructorsStart; i != &ConstructorsEnd; ++i) + (*i)(); +} + +void CallDestructors() { + for(Destructor *i = &DestructorsStart; i != &DestructorsEnd; ++i) + (*i)(); +} + +extern "C" void __cxa_pure_virtual() { + // Could possibly be handled like a "virtual" Exception +} + +void stage1_init(void *MultibootHeader) { + CallConstructors(); + + // Kernel entrypoint + + + CallDestructors(); +} Property changes on: borium/src/Stage1/Stage1.cpp ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-04 21:45:46
|
Revision: 146 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=146&view=rev Author: mizztajonny Date: 2010-06-04 21:45:39 +0000 (Fri, 04 Jun 2010) Log Message: ----------- Modified the LibCpp to fit in the new kernel model. Modified Paths: -------------- borium/src/LibCpp/CType.h borium/src/LibCpp/CxaVirtual.cpp borium/src/LibCpp/CxaVirtual.h borium/src/LibCpp/Limits.h borium/src/LibCpp/Operators.cpp borium/src/LibCpp/Operators.h borium/src/LibCpp/StdArgs.h borium/src/LibCpp/StdLib.h borium/src/LibCpp/Types.h borium/src-deprecated/libCpp/cxa_virtual.h borium/src-deprecated/libCpp/limits.h borium/src-deprecated/libCpp/operators.h borium/src-deprecated/libCpp/stdargs.h borium/src-deprecated/libCpp/stdlib.h Removed Paths: ------------- borium/src/LibCpp/CxaCtors.cpp borium/src/LibCpp/CxaCtors.h borium/src/LibCpp/CxaDtors.cpp borium/src/LibCpp/CxaDtors.h Modified: borium/src/LibCpp/CType.h =================================================================== --- borium/src/LibCpp/CType.h 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src/LibCpp/CType.h 2010-06-04 21:45:39 UTC (rev 146) @@ -20,13 +20,13 @@ --------------------------------------------------------------------------------------- -File: ctype.h +File: CType.h Created on 19. April 2010, 16:57 Descr.: -------------------------------------------------------------------------------------*/ -#ifndef _CTYPE_H -#define _CTYPE_H +#ifndef CType_h +#define CType_h #define isascii(c) (c > 0 && c <= 0x7f) @@ -51,5 +51,5 @@ #define todigit(c) (c)<='0' ? 0 : ( (c>='9') ? 9:c-'0' ) #define tochar(n) (n)>=9 ? '9' : ( (n<=0) ? 0:n+'0' ) -#endif // _CTYPE_H +#endif // CType_h Deleted: borium/src/LibCpp/CxaCtors.cpp =================================================================== --- borium/src/LibCpp/CxaCtors.cpp 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src/LibCpp/CxaCtors.cpp 2010-06-04 21:45:39 UTC (rev 146) @@ -1,37 +0,0 @@ -/*------------------------------------------------------------------------------------- -yaMOS - "borium" - -Author: Harry Hornbacher -Mail: h.h...@go... -Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). - ---------------------------------------------------------------------------------------- - -License: Copyright (C) 2010 Harry Hornbacher - -This program is free software; you can redistribute it and/or modify it under the terms -of the GNU General Public License as published by the Free Software Foundation; either -version 3 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with this -program; if not, see <http://www.gnu.org/licenses/>. - ---------------------------------------------------------------------------------------- - -File: cxa_ctors.cc -Created on 19. April 2010, 16:12 -Descr.: Calls constructors of every global/static object --------------------------------------------------------------------------------------*/ - -#include "cxa_ctors.h" - -// Lizenz: public domain - -/// Initializes the Constructors of all static/global objects -void initCtors() -{ - for (constructor* i = &start_ctors;i != &end_ctors;++i) - (*i)(); -} Deleted: borium/src/LibCpp/CxaCtors.h =================================================================== --- borium/src/LibCpp/CxaCtors.h 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src/LibCpp/CxaCtors.h 2010-06-04 21:45:39 UTC (rev 146) @@ -1,48 +0,0 @@ -/*------------------------------------------------------------------------------------- -yaMOS - "borium" - -Author: Harry Hornbacher -Mail: h.h...@go... -Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). - ---------------------------------------------------------------------------------------- - -License: Copyright (C) 2010 Harry Hornbacher - -This program is free software; you can redistribute it and/or modify it under the terms -of the GNU General Public License as published by the Free Software Foundation; either -version 3 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with this -program; if not, see <http://www.gnu.org/licenses/>. - ---------------------------------------------------------------------------------------- - -File: cxa_ctors.h -Created on 19. April 2010, 16:10 -Descr.: Calls constructors of every global/static object --------------------------------------------------------------------------------------*/ - -#ifndef _CXA_CTORS_H -#define _CXA_CTORS_H - -// Lizenz: public domain - -/** - * Prototype for a constrcutor function - */ -typedef void (*constructor)(); - - -/// Defined in the linker script -extern "C" constructor start_ctors; -/// Defined in the linker script -extern "C" constructor end_ctors; - -/// Initializes the Constructors of all static/global objects -extern "C" void initCtors(); - -#endif // _CXA_CTORS_H - Deleted: borium/src/LibCpp/CxaDtors.cpp =================================================================== --- borium/src/LibCpp/CxaDtors.cpp 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src/LibCpp/CxaDtors.cpp 2010-06-04 21:45:39 UTC (rev 146) @@ -1,53 +0,0 @@ -/*------------------------------------------------------------------------------------- -yaMOS - "borium" - -Author: Harry Hornbacher -Mail: h.h...@go... -Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). - ---------------------------------------------------------------------------------------- - -License: Copyright (C) 2010 Harry Hornbacher - -This program is free software; you can redistribute it and/or modify it under the terms -of the GNU General Public License as published by the Free Software Foundation; either -version 3 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with this -program; if not, see <http://www.gnu.org/licenses/>. - ---------------------------------------------------------------------------------------- - -File: cxa_dtors.cc -Created on 19. April 2010, 16:22 -Descr.: Calls every destructor of a global/static object (with --enable-__cxa_atexit) --------------------------------------------------------------------------------------*/ - -#include "cxa_dtors.h" - -object objects[32] = {0}; - -unsigned int iObject = 0; - -int __cxa_atexit(void (*f)(void *), void *p, void *d) -{ - if (iObject >= 32) return -1; - objects[iObject].f = f; - objects[iObject].p = p; - objects[iObject].d = d; - ++iObject; - return 0; -} - -/* NOTE: Zerstört momentan unabhängig von d alle Objekte */ -void __cxa_finalize(void *d) -{ - unsigned int i = iObject; - for (; i > 0; --i) - { - --iObject; - objects[iObject].f(objects[iObject].p); - } -} Deleted: borium/src/LibCpp/CxaDtors.h =================================================================== --- borium/src/LibCpp/CxaDtors.h 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src/LibCpp/CxaDtors.h 2010-06-04 21:45:39 UTC (rev 146) @@ -1,55 +0,0 @@ -/*------------------------------------------------------------------------------------- -yaMOS - "borium" - -Author: Harry Hornbacher -Mail: h.h...@go... -Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). - ---------------------------------------------------------------------------------------- - -License: Copyright (C) 2010 Harry Hornbacher - -This program is free software; you can redistribute it and/or modify it under the terms -of the GNU General Public License as published by the Free Software Foundation; either -version 3 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with this -program; if not, see <http://www.gnu.org/licenses/>. - ---------------------------------------------------------------------------------------- - -File: cxa_dtors.h -Created on 19. April 2010, 16:19 -Descr.: Calls every destructor of a global/static object (with --enable-__cxa_atexit) --------------------------------------------------------------------------------------*/ - -#ifndef _CXA_DTORS_H -#define _CXA_DTORS_H - - -// Lizenz: public domain -extern void *__dso_handle; - -extern "C" -{ - int __cxa_atexit(void (*f)(void *), void *p, void *d); - void __cxa_finalize(void *d); -}; - - -struct object -{ - void (*f)(void*); - void *p; - void *d; -}; - -int __cxa_atexit(void (*f)(void *), void *p, void *d); - -/* NOTE: Zerstört momentan unabhängig von d alle Objekte */ -void __cxa_finalize(void *d); - -#endif // _CXA_DTORS_H - Modified: borium/src/LibCpp/CxaVirtual.cpp =================================================================== --- borium/src/LibCpp/CxaVirtual.cpp 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src/LibCpp/CxaVirtual.cpp 2010-06-04 21:45:39 UTC (rev 146) @@ -20,12 +20,12 @@ --------------------------------------------------------------------------------------- -File: cxa_virtual.cc +File: CxaVirtual.cpp Created on 19. April 2010, 16:15 Descr.: Will be called if virtual method in class isn't implimented -------------------------------------------------------------------------------------*/ -#include "cxa_virtual.h" +#include "CxaVirtual.h" /// Will be called if virtual method in class isn't implimented void __cxa_pure_virtual() Modified: borium/src/LibCpp/CxaVirtual.h =================================================================== --- borium/src/LibCpp/CxaVirtual.h 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src/LibCpp/CxaVirtual.h 2010-06-04 21:45:39 UTC (rev 146) @@ -20,14 +20,14 @@ --------------------------------------------------------------------------------------- -File: cxa_virtual.h +File: CxaVirtual.h Descr.: Will be called if virtual method in class isn't implimented -------------------------------------------------------------------------------------*/ -#ifndef _CXA_VIRTUAL_H_ -#define _CXA_VIRTUAL_H_ +#ifndef CxaVirtual_h +#define CxaVirtual_h /// Will be called if virtual method in class isn't implimented extern "C" void __cxa_pure_virtual(); -#endif // _CXA_VIRTUAL_H_ +#endif // CxaVirtual_h Modified: borium/src/LibCpp/Limits.h =================================================================== --- borium/src/LibCpp/Limits.h 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src/LibCpp/Limits.h 2010-06-04 21:45:39 UTC (rev 146) @@ -20,13 +20,13 @@ --------------------------------------------------------------------------------------- -File: limits.h +File: Limits.h Created on 20. April 2010, 16:40 Descr.: types limits -------------------------------------------------------------------------------------*/ -#ifndef _LIMITS_H -#define _LIMITS_H +#ifndef Limits_h +#define Limits_h //character limits #define charMIN -128 @@ -56,5 +56,5 @@ //we have to define POSIX limits -#endif /* _LIMITS_H */ +#endif // Limits_h Modified: borium/src/LibCpp/Operators.cpp =================================================================== --- borium/src/LibCpp/Operators.cpp 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src/LibCpp/Operators.cpp 2010-06-04 21:45:39 UTC (rev 146) @@ -20,12 +20,12 @@ --------------------------------------------------------------------------------------- -File: operators.cc +File: Operators.cpp Created on 19. April 2010, 16:40 Descr.: -------------------------------------------------------------------------------------*/ -#include "operators.h" +#include "Operators.h" // License: Public domain Modified: borium/src/LibCpp/Operators.h =================================================================== --- borium/src/LibCpp/Operators.h 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src/LibCpp/Operators.h 2010-06-04 21:45:39 UTC (rev 146) @@ -20,13 +20,13 @@ --------------------------------------------------------------------------------------- -File: operators.h +File: Operators.h Created on 19. April 2010, 16:41 Descr.: -------------------------------------------------------------------------------------*/ -#ifndef _OPERATORS_H -#define _OPERATORS_H +#ifndef Operators_h +#define Operators_h // License: Public domain @@ -39,5 +39,5 @@ //void operator delete[]( void *obj ); -#endif // _OPERATORS_H +#endif // Operators_h Modified: borium/src/LibCpp/StdArgs.h =================================================================== --- borium/src/LibCpp/StdArgs.h 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src/LibCpp/StdArgs.h 2010-06-04 21:45:39 UTC (rev 146) @@ -20,12 +20,12 @@ --------------------------------------------------------------------------------------- -File: stdargs.h +File: StdArgs.h Descr.: This is needed if a function has a variable count of arguments -------------------------------------------------------------------------------------*/ -#ifndef _STDARGS_H -#define _STDARGS_H +#ifndef StdArgs_h +#define StdArgs_h typedef __builtin_va_list va_list; #define va_start(ap, X) __builtin_va_start(ap, X) @@ -33,4 +33,4 @@ #define va_end(ap) __builtin_va_end(ap) -#endif // _STDARGS_H +#endif // StdArgs_h Modified: borium/src/LibCpp/StdLib.h =================================================================== --- borium/src/LibCpp/StdLib.h 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src/LibCpp/StdLib.h 2010-06-04 21:45:39 UTC (rev 146) @@ -20,22 +20,22 @@ --------------------------------------------------------------------------------------- -File: stdlib.h +File: StdLib.h Created on 19. April 2010, 16:51 Descr.: -------------------------------------------------------------------------------------*/ -#ifndef _STDLIB_H -#define _STDLIB_H +#ifndef StdLib_h +#define StdLib_h -#include "limits.h" -#include "types.h" -#include "operators.h" -#include "ctype.h" -#include "cxa_ctors.h" -#include "cxa_dtors.h" -#include "cxa_virtual.h" +#include "Limits.h" +#include "Types.h" +#include "Operators.h" +#include "CType.h" +#include "CxaCtors.h" +#include "CxaDtors.h" +#include "CxaVirtual.h" -#endif // _STDLIB_H +#endif // StdLib_h Modified: borium/src/LibCpp/Types.h =================================================================== --- borium/src/LibCpp/Types.h 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src/LibCpp/Types.h 2010-06-04 21:45:39 UTC (rev 146) @@ -20,13 +20,13 @@ --------------------------------------------------------------------------------------- -File: limits.h +File: Types.h Created on 20. April 2010, 16:40 -Descr.: types limits +Descr.: types -------------------------------------------------------------------------------------*/ -#ifndef _TYPES_H -#define _TYPES_H +#ifndef Types_h +#define Types_h #ifndef _SIZE_T_DEFINED Modified: borium/src-deprecated/libCpp/cxa_virtual.h =================================================================== --- borium/src-deprecated/libCpp/cxa_virtual.h 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src-deprecated/libCpp/cxa_virtual.h 2010-06-04 21:45:39 UTC (rev 146) @@ -24,8 +24,8 @@ Descr.: Will be called if virtual method in class isn't implimented -------------------------------------------------------------------------------------*/ -#ifndef _CXA_VIRTUAL_H_ -#define _CXA_VIRTUAL_H_ +#ifndef CxaVirtual_h +#define CxaVirtual_h /// Will be called if virtual method in class isn't implimented extern "C" void __cxa_pure_virtual(); Modified: borium/src-deprecated/libCpp/limits.h =================================================================== --- borium/src-deprecated/libCpp/limits.h 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src-deprecated/libCpp/limits.h 2010-06-04 21:45:39 UTC (rev 146) @@ -25,8 +25,8 @@ Descr.: types limits -------------------------------------------------------------------------------------*/ -#ifndef _LIMITS_H -#define _LIMITS_H +#ifndef Limits_h +#define Limits_h //character limits #define charMIN -128 Modified: borium/src-deprecated/libCpp/operators.h =================================================================== --- borium/src-deprecated/libCpp/operators.h 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src-deprecated/libCpp/operators.h 2010-06-04 21:45:39 UTC (rev 146) @@ -25,8 +25,8 @@ Descr.: -------------------------------------------------------------------------------------*/ -#ifndef _OPERATORS_H -#define _OPERATORS_H +#ifndef Operators_h +#define Operators_h // License: Public domain Modified: borium/src-deprecated/libCpp/stdargs.h =================================================================== --- borium/src-deprecated/libCpp/stdargs.h 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src-deprecated/libCpp/stdargs.h 2010-06-04 21:45:39 UTC (rev 146) @@ -24,8 +24,8 @@ Descr.: This is needed if a function has a variable count of arguments -------------------------------------------------------------------------------------*/ -#ifndef _STDARGS_H -#define _STDARGS_H +#ifndef StdArgs_h +#define StdArgs_h typedef __builtin_va_list va_list; #define va_start(ap, X) __builtin_va_start(ap, X) Modified: borium/src-deprecated/libCpp/stdlib.h =================================================================== --- borium/src-deprecated/libCpp/stdlib.h 2010-06-04 21:37:30 UTC (rev 145) +++ borium/src-deprecated/libCpp/stdlib.h 2010-06-04 21:45:39 UTC (rev 146) @@ -25,8 +25,8 @@ Descr.: -------------------------------------------------------------------------------------*/ -#ifndef _STDLIB_H -#define _STDLIB_H +#ifndef StdLib_h +#define StdLib_h #include "limits.h" #include "types.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-04 21:37:36
|
Revision: 145 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=145&view=rev Author: mizztajonny Date: 2010-06-04 21:37:30 +0000 (Fri, 04 Jun 2010) Log Message: ----------- Migrated libcpp from deprecated-src to the new source tree. (Thanks to gkarpouzas) Modified Paths: -------------- borium/concept/borium-0.0.5-concept.odt borium/concept/borium-0.0.5-concept.pdf Added Paths: ----------- borium/src/LibCpp/CType.h borium/src/LibCpp/CxaCtors.cpp borium/src/LibCpp/CxaCtors.h borium/src/LibCpp/CxaDtors.cpp borium/src/LibCpp/CxaDtors.h borium/src/LibCpp/CxaVirtual.cpp borium/src/LibCpp/CxaVirtual.h borium/src/LibCpp/Limits.h borium/src/LibCpp/Operators.cpp borium/src/LibCpp/Operators.h borium/src/LibCpp/StdArgs.h borium/src/LibCpp/StdLib.h borium/src/LibCpp/Types.h Modified: borium/concept/borium-0.0.5-concept.odt =================================================================== (Binary files differ) Modified: borium/concept/borium-0.0.5-concept.pdf =================================================================== (Binary files differ) Added: borium/src/LibCpp/CType.h =================================================================== --- borium/src/LibCpp/CType.h (rev 0) +++ borium/src/LibCpp/CType.h 2010-06-04 21:37:30 UTC (rev 145) @@ -0,0 +1,55 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: Harry Hornbacher +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 Harry Hornbacher + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: ctype.h +Created on 19. April 2010, 16:57 +Descr.: +-------------------------------------------------------------------------------------*/ + +#ifndef _CTYPE_H +#define _CTYPE_H + + +#define isascii(c) (c > 0 && c <= 0x7f) +#define iscntrl(c) ((c > 0) && ((c < ' ') || (c == 0x7f))) +#define isdigit(c) (c >= '0' && c <= '9') +#define isupper(c) (c >= 'A' && c <= 'Z') +#define islower(c) (c >= 'a' && c <= 'z') +#define isprint(c) (c >= ' ' && c <= '~') +#define isspace(c) (c == ' ' || c == '\f' || c == '\n' || c == '\r' ||\ + c == '\t') +#define isalpha(c) (isupper(c) || islower(c)) +#define isalnum(c) (isalpha(c) || isdigit(c)) +#define isgraph(c) (c != ' ' && isprint(c)) +#define ispunct(c) ((c > ' ' && c <= '~') && !isalnum(c)) +#define isxupper(c) (isdigit(c) || (c >= 'A' && c <= 'F')) +#define isxlower(c) (isdigit(c) || (c >= 'a' && c <= 'f')) +#define isxdigit(c) (isxupper(c) || isxlower(c)) +#define toascii(c) (c & 0x7f) +#define toupper(c) (islower(c) ? (c - ' ') : (c)) +#define tolower(c) (isupper(c) ? (c + ' ') : (c)) + +#define todigit(c) (c)<='0' ? 0 : ( (c>='9') ? 9:c-'0' ) +#define tochar(n) (n)>=9 ? '9' : ( (n<=0) ? 0:n+'0' ) + +#endif // _CTYPE_H + Property changes on: borium/src/LibCpp/CType.h ___________________________________________________________________ Added: svn:executable + * Added: borium/src/LibCpp/CxaCtors.cpp =================================================================== --- borium/src/LibCpp/CxaCtors.cpp (rev 0) +++ borium/src/LibCpp/CxaCtors.cpp 2010-06-04 21:37:30 UTC (rev 145) @@ -0,0 +1,37 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: Harry Hornbacher +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 Harry Hornbacher + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: cxa_ctors.cc +Created on 19. April 2010, 16:12 +Descr.: Calls constructors of every global/static object +-------------------------------------------------------------------------------------*/ + +#include "cxa_ctors.h" + +// Lizenz: public domain + +/// Initializes the Constructors of all static/global objects +void initCtors() +{ + for (constructor* i = &start_ctors;i != &end_ctors;++i) + (*i)(); +} Property changes on: borium/src/LibCpp/CxaCtors.cpp ___________________________________________________________________ Added: svn:executable + * Added: borium/src/LibCpp/CxaCtors.h =================================================================== --- borium/src/LibCpp/CxaCtors.h (rev 0) +++ borium/src/LibCpp/CxaCtors.h 2010-06-04 21:37:30 UTC (rev 145) @@ -0,0 +1,48 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: Harry Hornbacher +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 Harry Hornbacher + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: cxa_ctors.h +Created on 19. April 2010, 16:10 +Descr.: Calls constructors of every global/static object +-------------------------------------------------------------------------------------*/ + +#ifndef _CXA_CTORS_H +#define _CXA_CTORS_H + +// Lizenz: public domain + +/** + * Prototype for a constrcutor function + */ +typedef void (*constructor)(); + + +/// Defined in the linker script +extern "C" constructor start_ctors; +/// Defined in the linker script +extern "C" constructor end_ctors; + +/// Initializes the Constructors of all static/global objects +extern "C" void initCtors(); + +#endif // _CXA_CTORS_H + Property changes on: borium/src/LibCpp/CxaCtors.h ___________________________________________________________________ Added: svn:executable + * Added: borium/src/LibCpp/CxaDtors.cpp =================================================================== --- borium/src/LibCpp/CxaDtors.cpp (rev 0) +++ borium/src/LibCpp/CxaDtors.cpp 2010-06-04 21:37:30 UTC (rev 145) @@ -0,0 +1,53 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: Harry Hornbacher +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 Harry Hornbacher + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: cxa_dtors.cc +Created on 19. April 2010, 16:22 +Descr.: Calls every destructor of a global/static object (with --enable-__cxa_atexit) +-------------------------------------------------------------------------------------*/ + +#include "cxa_dtors.h" + +object objects[32] = {0}; + +unsigned int iObject = 0; + +int __cxa_atexit(void (*f)(void *), void *p, void *d) +{ + if (iObject >= 32) return -1; + objects[iObject].f = f; + objects[iObject].p = p; + objects[iObject].d = d; + ++iObject; + return 0; +} + +/* NOTE: Zerstört momentan unabhängig von d alle Objekte */ +void __cxa_finalize(void *d) +{ + unsigned int i = iObject; + for (; i > 0; --i) + { + --iObject; + objects[iObject].f(objects[iObject].p); + } +} Property changes on: borium/src/LibCpp/CxaDtors.cpp ___________________________________________________________________ Added: svn:executable + * Added: borium/src/LibCpp/CxaDtors.h =================================================================== --- borium/src/LibCpp/CxaDtors.h (rev 0) +++ borium/src/LibCpp/CxaDtors.h 2010-06-04 21:37:30 UTC (rev 145) @@ -0,0 +1,55 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: Harry Hornbacher +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 Harry Hornbacher + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: cxa_dtors.h +Created on 19. April 2010, 16:19 +Descr.: Calls every destructor of a global/static object (with --enable-__cxa_atexit) +-------------------------------------------------------------------------------------*/ + +#ifndef _CXA_DTORS_H +#define _CXA_DTORS_H + + +// Lizenz: public domain +extern void *__dso_handle; + +extern "C" +{ + int __cxa_atexit(void (*f)(void *), void *p, void *d); + void __cxa_finalize(void *d); +}; + + +struct object +{ + void (*f)(void*); + void *p; + void *d; +}; + +int __cxa_atexit(void (*f)(void *), void *p, void *d); + +/* NOTE: Zerstört momentan unabhängig von d alle Objekte */ +void __cxa_finalize(void *d); + +#endif // _CXA_DTORS_H + Property changes on: borium/src/LibCpp/CxaDtors.h ___________________________________________________________________ Added: svn:executable + * Added: borium/src/LibCpp/CxaVirtual.cpp =================================================================== --- borium/src/LibCpp/CxaVirtual.cpp (rev 0) +++ borium/src/LibCpp/CxaVirtual.cpp 2010-06-04 21:37:30 UTC (rev 145) @@ -0,0 +1,34 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: Harry Hornbacher +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 Harry Hornbacher + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: cxa_virtual.cc +Created on 19. April 2010, 16:15 +Descr.: Will be called if virtual method in class isn't implimented +-------------------------------------------------------------------------------------*/ + +#include "cxa_virtual.h" + +/// Will be called if virtual method in class isn't implimented +void __cxa_pure_virtual() +{ + +} Property changes on: borium/src/LibCpp/CxaVirtual.cpp ___________________________________________________________________ Added: svn:executable + * Added: borium/src/LibCpp/CxaVirtual.h =================================================================== --- borium/src/LibCpp/CxaVirtual.h (rev 0) +++ borium/src/LibCpp/CxaVirtual.h 2010-06-04 21:37:30 UTC (rev 145) @@ -0,0 +1,33 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: Harry Hornbacher +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 Harry Hornbacher + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: cxa_virtual.h +Descr.: Will be called if virtual method in class isn't implimented +-------------------------------------------------------------------------------------*/ + +#ifndef _CXA_VIRTUAL_H_ +#define _CXA_VIRTUAL_H_ + +/// Will be called if virtual method in class isn't implimented +extern "C" void __cxa_pure_virtual(); + +#endif // _CXA_VIRTUAL_H_ Property changes on: borium/src/LibCpp/CxaVirtual.h ___________________________________________________________________ Added: svn:executable + * Added: borium/src/LibCpp/Limits.h =================================================================== --- borium/src/LibCpp/Limits.h (rev 0) +++ borium/src/LibCpp/Limits.h 2010-06-04 21:37:30 UTC (rev 145) @@ -0,0 +1,60 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: George Karpouzas +Mail: gka...@we... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 George Karpouzas + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: limits.h +Created on 20. April 2010, 16:40 +Descr.: types limits +-------------------------------------------------------------------------------------*/ + +#ifndef _LIMITS_H +#define _LIMITS_H + +//character limits +#define charMIN -128 +#define charMAX 127 +#define ucharMAX 255 + +//short limits +#define shortMIN -32768 +#define shortMAX 32767 +#define ushortMAX 65535 + +//integer limits +#define int16MIN -32768 +#define int16MAX 32767 +#define uint16MAX 65535 + +#define int32MIN -2147483648 +#define int32MAX 2147483647 +#define uint32MAX 4294967295 + +#define longMIN -2147483648L +#define longMAX 2147483647L +#define ulongMAX 4294967295L + +#define filenameMAX 255 +#define filepathMAX 4096 + +//we have to define POSIX limits + +#endif /* _LIMITS_H */ + Property changes on: borium/src/LibCpp/Limits.h ___________________________________________________________________ Added: svn:executable + * Added: borium/src/LibCpp/Operators.cpp =================================================================== --- borium/src/LibCpp/Operators.cpp (rev 0) +++ borium/src/LibCpp/Operators.cpp 2010-06-04 21:37:30 UTC (rev 145) @@ -0,0 +1,51 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: Harry Hornbacher +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 Harry Hornbacher + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: operators.cc +Created on 19. April 2010, 16:40 +Descr.: +-------------------------------------------------------------------------------------*/ + +#include "operators.h" + + +// License: Public domain + +//void *operator new( size_t size ) +//{ +// return kcalloc( size ); +//} +// +//void *operator new[]( size_t size ) +//{ +// return kcalloc( size ); +//} +// +//void operator delete( void *ojb ) +//{ +// kfree( obj ); +//} +// +//void operator delete[]( void *obj ) +//{ +// kfree( obj ); +//} Property changes on: borium/src/LibCpp/Operators.cpp ___________________________________________________________________ Added: svn:executable + * Added: borium/src/LibCpp/Operators.h =================================================================== --- borium/src/LibCpp/Operators.h (rev 0) +++ borium/src/LibCpp/Operators.h 2010-06-04 21:37:30 UTC (rev 145) @@ -0,0 +1,43 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: Harry Hornbacher +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 Harry Hornbacher + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: operators.h +Created on 19. April 2010, 16:41 +Descr.: +-------------------------------------------------------------------------------------*/ + +#ifndef _OPERATORS_H +#define _OPERATORS_H + +// License: Public domain + +//void *operator new( size_t size ); +// +//void *operator new[]( size_t size ); +// +//void operator delete( void *ojb ); +// +//void operator delete[]( void *obj ); + + +#endif // _OPERATORS_H + Property changes on: borium/src/LibCpp/Operators.h ___________________________________________________________________ Added: svn:executable + * Added: borium/src/LibCpp/StdArgs.h =================================================================== --- borium/src/LibCpp/StdArgs.h (rev 0) +++ borium/src/LibCpp/StdArgs.h 2010-06-04 21:37:30 UTC (rev 145) @@ -0,0 +1,36 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: Harry Hornbacher +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 Harry Hornbacher + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: stdargs.h +Descr.: This is needed if a function has a variable count of arguments +-------------------------------------------------------------------------------------*/ + +#ifndef _STDARGS_H +#define _STDARGS_H + +typedef __builtin_va_list va_list; +#define va_start(ap, X) __builtin_va_start(ap, X) +#define va_arg(ap, type) __builtin_va_arg(ap, type) +#define va_end(ap) __builtin_va_end(ap) + + +#endif // _STDARGS_H Property changes on: borium/src/LibCpp/StdArgs.h ___________________________________________________________________ Added: svn:executable + * Added: borium/src/LibCpp/StdLib.h =================================================================== --- borium/src/LibCpp/StdLib.h (rev 0) +++ borium/src/LibCpp/StdLib.h 2010-06-04 21:37:30 UTC (rev 145) @@ -0,0 +1,41 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: Harry Hornbacher +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 Harry Hornbacher + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: stdlib.h +Created on 19. April 2010, 16:51 +Descr.: +-------------------------------------------------------------------------------------*/ + +#ifndef _STDLIB_H +#define _STDLIB_H + +#include "limits.h" +#include "types.h" +#include "operators.h" +#include "ctype.h" +#include "cxa_ctors.h" +#include "cxa_dtors.h" +#include "cxa_virtual.h" + + +#endif // _STDLIB_H + Property changes on: borium/src/LibCpp/StdLib.h ___________________________________________________________________ Added: svn:executable + * Added: borium/src/LibCpp/Types.h =================================================================== --- borium/src/LibCpp/Types.h (rev 0) +++ borium/src/LibCpp/Types.h 2010-06-04 21:37:30 UTC (rev 145) @@ -0,0 +1,66 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "borium" + +Author: George Karpouzas +Mail: gka...@we... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: borium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 George Karpouzas + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: limits.h +Created on 20. April 2010, 16:40 +Descr.: types limits +-------------------------------------------------------------------------------------*/ + +#ifndef _TYPES_H +#define _TYPES_H + +#ifndef _SIZE_T_DEFINED + +typedef unsigned int size_t; + +#define _SIZE_T_DEFINED +#endif + +#ifndef _SSIZE_T_DEFINED +typedef int ssize_t; +#define _SSIZE_T_DEFINED +#endif + +#ifndef NULL +#define NULL 0 +#endif + +typedef unsigned char uchar; +typedef unsigned short ushort; +typedef unsigned int uint; +typedef unsigned long ulong; + +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned long uint32_t; +typedef unsigned long int uint64_t; + +typedef signed char int8_t; +typedef signed short int16_t; +typedef signed long int32_t; +typedef signed long int int64_t; + +//we have to define POSIX types + +#endif + + Property changes on: borium/src/LibCpp/Types.h ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-04 21:23:30
|
Revision: 144 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=144&view=rev Author: mizztajonny Date: 2010-06-04 21:23:23 +0000 (Fri, 04 Jun 2010) Log Message: ----------- Modified directory structure. Modified Paths: -------------- borium/concept/borium-0.0.5-concept.odt Added Paths: ----------- borium/src/Kernel/ borium/src/Kernel/Kernel.cpp borium/src/Kernel/Kernel.h borium/src/Kernel/Types.h borium/src/Kernel/Version.h borium/src/LibCpp/ Removed Paths: ------------- borium/src/Kernel.cpp borium/src/Kernel.h borium/src/Types.h borium/src/Version.h Modified: borium/concept/borium-0.0.5-concept.odt =================================================================== (Binary files differ) Copied: borium/src/Kernel/Kernel.cpp (from rev 142, borium/src/Kernel.cpp) =================================================================== --- borium/src/Kernel/Kernel.cpp (rev 0) +++ borium/src/Kernel/Kernel.cpp 2010-06-04 21:23:23 UTC (rev 144) @@ -0,0 +1,59 @@ +#include "Kernel.h" + +/** + * This is the main part of the kernel. + */ +void Kernel::Run() +// don't delete the following line as it's needed to preserve source code of this autogenerated element +// section 127-0-0-1--7594528:1287e7358a9:-8000:0000000000001C68 begin +{ +} +// section 127-0-0-1--7594528:1287e7358a9:-8000:0000000000001C68 end +// don't delete the previous line as it's needed to preserve source code of this autogenerated element + +/** + * This function initializes all the managers and the kernel itself. + */ +void Kernel::Init() +// don't delete the following line as it's needed to preserve source code of this autogenerated element +// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC begin +{ + // Initialize the CPU Manager + + // Copy all needed data (e.g. from bootloader) to a safe place + + // Initialize physical memory + + // Initialize exception manager + + // Initialize virtual memory +} +// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC end +// don't delete the previous line as it's needed to preserve source code of this autogenerated element + +/** + * Returns the kernel's version + * @param Buffer A pointer to the buffer, where the information will be copied in. + */ +void Kernel::GetVersion(Version* Buffer) +// don't delete the following line as it's needed to preserve source code of this autogenerated element +// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EE begin +{ + memcpy(Buffer, &KernelVersion, sizeof(Version)); +} +// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EE end +// don't delete the previous line as it's needed to preserve source code of this autogenerated element + +/** + * Returns the kernel's code name + * @param Buffer A pointer to the buffer, where the information will be copied in. + */ +void Kernel::GetCodeName(char* Buffer) +// don't delete the following line as it's needed to preserve source code of this autogenerated element +// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011F0 begin +{ + memcpy(Buffer, &CodeName, strlen(CodeName)); +} +// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011F0 end +// don't delete the previous line as it's needed to preserve source code of this autogenerated element + Copied: borium/src/Kernel/Kernel.h (from rev 142, borium/src/Kernel.h) =================================================================== --- borium/src/Kernel/Kernel.h (rev 0) +++ borium/src/Kernel/Kernel.h 2010-06-04 21:23:23 UTC (rev 144) @@ -0,0 +1,30 @@ +#ifndef Kernel_h +#define Kernel_h + +#include "Version.h" + +/** + * This is the Kernel class; it starts up the Managers + * @author Harry Hornbacher + */ +class Kernel { + /* {src_lang=cpp}*/ + + +public: + + void Run(); + + void Init(); + + void GetVersion(Version* Buffer); + + void GetCodeName(char* Buffer); + +private: + char CodeName[ 25]; + Version KernelVersion; + +}; + +#endif // Kernel_h Copied: borium/src/Kernel/Types.h (from rev 142, borium/src/Types.h) =================================================================== --- borium/src/Kernel/Types.h (rev 0) +++ borium/src/Kernel/Types.h 2010-06-04 21:23:23 UTC (rev 144) @@ -0,0 +1,21 @@ +#ifndef Types_h +#define Types_h + +/** + * Basic datatypes + */ +typedef unsigned char Byte; +typedef unsigned short Word; +typedef unsigned long Dword; + +/** + * Memory datatypes + */ +typedef Dword Address; + +/** + * Misc datatypes + */ +typedef Dword size_t; + +#endif // Types_h \ No newline at end of file Copied: borium/src/Kernel/Version.h (from rev 142, borium/src/Version.h) =================================================================== --- borium/src/Kernel/Version.h (rev 0) +++ borium/src/Kernel/Version.h 2010-06-04 21:23:23 UTC (rev 144) @@ -0,0 +1,19 @@ +#ifndef Version_h +#define Version_h + +/* + * FIXME: replace with special type + */ +typedef unsigned short SubVersion; + +/** + * This STRUCT bundles the kernel versions information + * @author Harry Hornbacher + */ +struct Version { + const SubVersion Main; + const SubVersion Middle; + const SubVersion Last; +}; + +#endif // Version_h Deleted: borium/src/Kernel.cpp =================================================================== --- borium/src/Kernel.cpp 2010-06-04 21:19:50 UTC (rev 143) +++ borium/src/Kernel.cpp 2010-06-04 21:23:23 UTC (rev 144) @@ -1,59 +0,0 @@ -#include "Kernel.h" - -/** - * This is the main part of the kernel. - */ -void Kernel::Run() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1--7594528:1287e7358a9:-8000:0000000000001C68 begin -{ -} -// section 127-0-0-1--7594528:1287e7358a9:-8000:0000000000001C68 end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element - -/** - * This function initializes all the managers and the kernel itself. - */ -void Kernel::Init() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC begin -{ - // Initialize the CPU Manager - - // Copy all needed data (e.g. from bootloader) to a safe place - - // Initialize physical memory - - // Initialize exception manager - - // Initialize virtual memory -} -// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element - -/** - * Returns the kernel's version - * @param Buffer A pointer to the buffer, where the information will be copied in. - */ -void Kernel::GetVersion(Version* Buffer) -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EE begin -{ - memcpy(Buffer, &KernelVersion, sizeof(Version)); -} -// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EE end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element - -/** - * Returns the kernel's code name - * @param Buffer A pointer to the buffer, where the information will be copied in. - */ -void Kernel::GetCodeName(char* Buffer) -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011F0 begin -{ - memcpy(Buffer, &CodeName, strlen(CodeName)); -} -// section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011F0 end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element - Deleted: borium/src/Kernel.h =================================================================== --- borium/src/Kernel.h 2010-06-04 21:19:50 UTC (rev 143) +++ borium/src/Kernel.h 2010-06-04 21:23:23 UTC (rev 144) @@ -1,30 +0,0 @@ -#ifndef Kernel_h -#define Kernel_h - -#include "Version.h" - -/** - * This is the Kernel class; it starts up the Managers - * @author Harry Hornbacher - */ -class Kernel { - /* {src_lang=cpp}*/ - - -public: - - void Run(); - - void Init(); - - void GetVersion(Version* Buffer); - - void GetCodeName(char* Buffer); - -private: - char CodeName[ 25]; - Version KernelVersion; - -}; - -#endif // Kernel_h Deleted: borium/src/Types.h =================================================================== --- borium/src/Types.h 2010-06-04 21:19:50 UTC (rev 143) +++ borium/src/Types.h 2010-06-04 21:23:23 UTC (rev 144) @@ -1,21 +0,0 @@ -#ifndef Types_h -#define Types_h - -/** - * Basic datatypes - */ -typedef unsigned char Byte; -typedef unsigned short Word; -typedef unsigned long Dword; - -/** - * Memory datatypes - */ -typedef Dword Address; - -/** - * Misc datatypes - */ -typedef Dword size_t; - -#endif // Types_h \ No newline at end of file Deleted: borium/src/Version.h =================================================================== --- borium/src/Version.h 2010-06-04 21:19:50 UTC (rev 143) +++ borium/src/Version.h 2010-06-04 21:23:23 UTC (rev 144) @@ -1,19 +0,0 @@ -#ifndef Version_h -#define Version_h - -/* - * FIXME: replace with special type - */ -typedef unsigned short SubVersion; - -/** - * This STRUCT bundles the kernel versions information - * @author Harry Hornbacher - */ -struct Version { - const SubVersion Main; - const SubVersion Middle; - const SubVersion Last; -}; - -#endif // Version_h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-04 21:19:57
|
Revision: 143 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=143&view=rev Author: mizztajonny Date: 2010-06-04 21:19:50 +0000 (Fri, 04 Jun 2010) Log Message: ----------- Modified directory structure. Added Paths: ----------- borium/src-deprecated/ Removed Paths: ------------- borium/src/deprecated/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-06-03 20:28:13
|
Revision: 142 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=142&view=rev Author: mizztajonny Date: 2010-06-03 20:28:07 +0000 (Thu, 03 Jun 2010) Log Message: ----------- ... Modified Paths: -------------- borium/concept/borium-0.0.5-concept.odt borium/concept/borium-0.0.5-concept.pdf borium/nbproject/configurations.xml borium/nbproject/private/configurations.xml borium/src/Managers/Platform/BootInformation.h Property Changed: ---------------- borium/src/ Modified: borium/concept/borium-0.0.5-concept.odt =================================================================== (Binary files differ) Modified: borium/concept/borium-0.0.5-concept.pdf =================================================================== (Binary files differ) Modified: borium/nbproject/configurations.xml =================================================================== --- borium/nbproject/configurations.xml 2010-05-31 20:05:45 UTC (rev 141) +++ borium/nbproject/configurations.xml 2010-06-03 20:28:07 UTC (rev 142) @@ -105,6 +105,8 @@ <df name="Stage0"> </df> <df name="Stage1"> + <in>Helpers.cpp</in> + <in>Helpers.h</in> </df> <in>Kernel.cpp</in> <in>Kernel.h</in> Modified: borium/nbproject/private/configurations.xml =================================================================== --- borium/nbproject/private/configurations.xml 2010-05-31 20:05:45 UTC (rev 141) +++ borium/nbproject/private/configurations.xml 2010-06-03 20:28:07 UTC (rev 142) @@ -9,6 +9,7 @@ <array_repeat_threshold>10</array_repeat_threshold> </gdbdebugger> <gizmo_options version="3"> + <configurationname>GizmoSimple</configurationname> </gizmo_options> <runprofile version="6"> <args></args> Property changes on: borium/src ___________________________________________________________________ Added: svn:ignore + Doxyfile Modified: borium/src/Managers/Platform/BootInformation.h =================================================================== --- borium/src/Managers/Platform/BootInformation.h 2010-05-31 20:05:45 UTC (rev 141) +++ borium/src/Managers/Platform/BootInformation.h 2010-06-03 20:28:07 UTC (rev 142) @@ -3,18 +3,90 @@ /** @author Harry Hornbacher - */ + */ namespace Managers { -/** @author Harry Hornbacher + /** @author Harry Hornbacher */ -namespace Platform { + namespace Platform { -class BootInformation -{ - /* {src_lang=cpp}*/ -}; + enum MultibootFlags { + /// Memory flag + Memory = 0x001, -} /* End of namespace Managers::Platform */ + /// Device flag + Device = 0x002, + + /// Command line flag + CommandLine = 0x004, + + /// Modules flag + Modules = 0x008, + + /// a.out flag + AOut = 0x010, + + /// elf flag + Elf = 0x020, + + /// Memory map flag + MemoryMap = 0x040, + + /// Config flag + Config = 0x080, + + /// Bootloader name flag + BootloaderName = 0x100, + + /// APM flag + Apm = 0x200, + + /// VBE flag + Vbe = 0x400 + }; + + struct MultibootInformation { + Dword Flags; + + Dword LowMem; + Dword HighMem; + + Dword BootDevice; + + Dword CommandLine; + + Dword ModulesCount; + Dword ModulesBase; + + Dword Number; + Dword Size; + Dword Address; + Dword Shndx; + + Dword MemoryMapLength; + Dword MemoryMapBase; + + Dword DrivesLength; + Dword DrivesAddress; + + Dword ConfigTable; + + Dword BootloaderName; + + Dword ApmTable; + + Dword VbeControlInfo; + Dword VbeModeInfo; + Dword VbeMode; + Dword VbeInterfaceSegment; + Dword VbeInterfaceOffset; + Dword VbeInterfaceLength; + } __attribute__((packed)); + + class BootInformation { + /* {src_lang=cpp}*/ + }; + + } /* End of namespace Managers::Platform */ } /* End of namespace Managers */ #endif // Managers_Platform_BootInformation_h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-05-31 20:05:55
|
Revision: 141 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=141&view=rev Author: mizztajonny Date: 2010-05-31 20:05:45 +0000 (Mon, 31 May 2010) Log Message: ----------- Made some changes on source code and concept. Modified Paths: -------------- borium/concept/borium-0.0.5-concept.odt borium/concept/borium-0.0.5-concept.pdf borium/nbproject/configurations.xml borium/src/Kernel.h borium/src/Managers/Memory/Bitmap.cpp borium/src/Managers/Memory/Bitmap.h borium/src/Managers/Memory/PhysicalMemoryManager.cpp borium/src/Managers/Memory/PhysicalMemoryManager.h Added Paths: ----------- borium/src/Types.h Modified: borium/concept/borium-0.0.5-concept.odt =================================================================== (Binary files differ) Modified: borium/concept/borium-0.0.5-concept.pdf =================================================================== (Binary files differ) Modified: borium/nbproject/configurations.xml =================================================================== --- borium/nbproject/configurations.xml 2010-05-31 12:47:04 UTC (rev 140) +++ borium/nbproject/configurations.xml 2010-05-31 20:05:45 UTC (rev 141) @@ -2,96 +2,114 @@ <configurationDescriptor version="62"> <logicalFolder name="root" displayName="root" projectFiles="true"> <df name="borium" root="."> + <df name="concept"> + <df name="deprecated"> + </df> + </df> <df name="src"> - <df name="kernel"> - <df name="startup"> + <df name="deprecated"> + <df name="kernel"> + <df name="startup"> + </df> + <in>CKernel.cc</in> + <in>CKernel.h</in> + <in>Kernel.cc</in> + <in>Kernel.h</in> + <in>Multiboot.cc</in> + <in>Multiboot.h</in> + <in>SystemObject.cc</in> + <in>SystemObject.h</in> + <in>main.cc</in> </df> - <in>CKernel.cc</in> - <in>CKernel.h</in> - <in>Kernel.cc</in> - <in>Kernel.h</in> - <in>Multiboot.cc</in> - <in>Multiboot.h</in> - <in>SystemObject.cc</in> - <in>SystemObject.h</in> - <in>main.cc</in> - </df> - <df name="libCpp"> - <in>ctype.h</in> - <in>cxa_ctors.cc</in> - <in>cxa_ctors.h</in> - <in>cxa_dtors.cc</in> - <in>cxa_dtors.h</in> - <in>cxa_virtual.cc</in> - <in>cxa_virtual.h</in> - <in>limits.h</in> - <in>operators.cc</in> - <in>operators.h</in> - <in>stdargs.h</in> - <in>stdlib.h</in> - <in>types.h</in> - </df> - <df name="libFs"> - </df> - <df name="libHal"> - <df name="arch"> - <df name="x86"> + <df name="libCpp"> + <in>ctype.h</in> + <in>cxa_ctors.cc</in> + <in>cxa_ctors.h</in> + <in>cxa_dtors.cc</in> + <in>cxa_dtors.h</in> + <in>cxa_virtual.cc</in> + <in>cxa_virtual.h</in> + <in>limits.h</in> + <in>operators.cc</in> + <in>operators.h</in> + <in>stdargs.h</in> + <in>stdlib.h</in> + <in>types.h</in> + </df> + <df name="libFs"> + </df> + <df name="libHal"> + <df name="arch"> + <df name="x86"> + </df> + <df name="x86_64"> + </df> + <in>arch.h</in> </df> - <df name="x86_64"> - </df> - <in>arch.h</in> </df> + <df name="libPrc"> + </df> + <df name="mem"> + </df> + <df name="sys"> + </df> </df> - <df name="libPrc"> - </df> - <df name="mem"> - </df> - <df name="sys"> - </df> - </df> - <df name="uml"> - <df name="generated_sources"> - <df name="Hal"> - <in>CpuManager.cpp</in> - <in>CpuManager.h</in> - <in>InterruptDispatcher.cpp</in> - <in>InterruptDispatcher.h</in> + <df name="Managers"> + <df name="Communication"> + <in>ExceptionManager.cpp</in> + <in>ExceptionManager.h</in> + <in>ExceptionRoutine.cpp</in> + <in>ExceptionRoutine.h</in> + <in>HardwareIoManager.cpp</in> + <in>HardwareIoManager.h</in> + <in>InterruptManager.cpp</in> + <in>InterruptManager.h</in> + <in>InterruptRoutine.cpp</in> + <in>InterruptRoutine.h</in> + <in>SyscallManager.cpp</in> + <in>SyscallManager.h</in> + </df> + <df name="Memory"> + <in>Bitmap.cpp</in> + <in>Bitmap.h</in> <in>PhysicalMemoryManager.cpp</in> <in>PhysicalMemoryManager.h</in> <in>VirtualMemoryManager.cpp</in> <in>VirtualMemoryManager.h</in> + <in>VirtualMemoryMap.cpp</in> + <in>VirtualMemoryMap.h</in> + <in>VirtualMemoryRegion.cpp</in> + <in>VirtualMemoryRegion.h</in> </df> - <df name="Ipc"> - <in>IpcChannel.cpp</in> - <in>IpcChannel.h</in> - <in>IpcManager.cpp</in> - <in>IpcManager.h</in> + <df name="Multitasking"> + <in>Task.cpp</in> + <in>Task.h</in> + <in>TaskManager.cpp</in> + <in>TaskManager.h</in> + <in>Thread.cpp</in> + <in>Thread.h</in> </df> - <df name="Kernel"> + <df name="Platform"> <in>BootInformation.cpp</in> <in>BootInformation.h</in> - <in>Kernel.cpp</in> - <in>Kernel.h</in> - <in>Mutex.cpp</in> - <in>Mutex.h</in> - <in>Process.cpp</in> - <in>Process.h</in> - <in>ProcessManager.cpp</in> - <in>ProcessManager.h</in> + <in>Cpu.cpp</in> + <in>Cpu.h</in> + <in>CpuManager.cpp</in> + <in>CpuManager.h</in> </df> - <df name="Support"> - <df name="libelf"> - <in>ElfParser.cpp</in> - <in>ElfParser.h</in> - </df> - <df name="libtpl"> - <in>Dictionary.cpp</in> - <in>Dictionary.h</in> - <in>LinkedList.cpp</in> - <in>LinkedList.h</in> - </df> + <df name="Resources"> + <in>ResourcesManager.cpp</in> + <in>ResourcesManager.h</in> </df> </df> + <df name="Stage0"> + </df> + <df name="Stage1"> + </df> + <in>Kernel.cpp</in> + <in>Kernel.h</in> + <in>Types.h</in> + <in>Version.h</in> </df> </df> <logicalFolder name="ExternalFiles" Modified: borium/src/Kernel.h =================================================================== --- borium/src/Kernel.h 2010-05-31 12:47:04 UTC (rev 140) +++ borium/src/Kernel.h 2010-05-31 20:05:45 UTC (rev 141) @@ -15,11 +15,11 @@ void Run(); - virtual void Init(); + void Init(); - virtual void GetVersion(Version* Buffer); + void GetVersion(Version* Buffer); - virtual void GetCodeName(char* Buffer); + void GetCodeName(char* Buffer); private: char CodeName[ 25]; Modified: borium/src/Managers/Memory/Bitmap.cpp =================================================================== --- borium/src/Managers/Memory/Bitmap.cpp 2010-05-31 12:47:04 UTC (rev 140) +++ borium/src/Managers/Memory/Bitmap.cpp 2010-05-31 20:05:45 UTC (rev 141) @@ -1,15 +1,65 @@ #include "Bitmap.h" /** @author Harry Hornbacher - */ + */ namespace Managers { -/** @author Harry Hornbacher + /** @author Harry Hornbacher */ -namespace Memory { + namespace Memory { -{ - /* {src_lang=cpp}*/ + Bitmap::Bitmap() { -} /* End of namespace Managers::Memory */ + } + + void Bitmap::ClearAll() { + for(size_t i = 0; i < Size; i++) + BitmapPointer[i] = 0; + } + + void Bitmap::Set(size_t Index) { + BitmapPointer[Index/32] |= (0x1 << Index%32); + } + + bool Bitmap::Get(size_t Index) { + return (BitmapPointer[Index/32] & (0x1 << Index%32)); + } + + void Bitmap::Clear(size_t Index) { + BitmapPointer[Index/32] &= ~(0x1 << Index%32); + } + + + size_t Bitmap::GetFirstSet(size_t Length = 1) { + if(Length == 0) + return (size_t)-1; + + Dword free = 0; + + for(size_t i = 0; i < Size; i++) + { + if(BitmapPointer[i] != 0xFFFFFFFF) + { + for(size_t j=0; j < 32; j++) + { + Dword to_test = 0x1 << j; + if( !(BitmapPointer[i] & to_test) ) + { + Dword starting_bit = i*32+j; + for(size_t count = 0; count <= Length; count++) { + if(!this->Get(starting_bit+count)) + free++; + else + free = 0; + + if(free == Length) + return i*32+j; + } + } + } + } + } + return (size_t)-1; + } + } /* End of namespace Managers::Memory */ } /* End of namespace Managers */ Modified: borium/src/Managers/Memory/Bitmap.h =================================================================== --- borium/src/Managers/Memory/Bitmap.h 2010-05-31 12:47:04 UTC (rev 140) +++ borium/src/Managers/Memory/Bitmap.h 2010-05-31 20:05:45 UTC (rev 141) @@ -1,20 +1,33 @@ #ifndef Managers_Memory_Bitmap_h #define Managers_Memory_Bitmap_h +#include "../../Version.h" + /** @author Harry Hornbacher - */ + */ namespace Managers { -/** @author Harry Hornbacher + /** @author Harry Hornbacher */ -namespace Memory { + namespace Memory { -class Bitmap -{ - /* {src_lang=cpp}*/ -}; + class Bitmap { + private: + Dword *BitmapPointer; + size_t BitmapSize; + + public: + Bitmap(); -} /* End of namespace Managers::Memory */ + void ClearAll(); + void Set(); + bool Get(); + void Clear(); + size_t GetFirstSet(size_t Length = 1); + + }; + + } /* End of namespace Managers::Memory */ } /* End of namespace Managers */ #endif // Managers_Memory_Bitmap_h Modified: borium/src/Managers/Memory/PhysicalMemoryManager.cpp =================================================================== --- borium/src/Managers/Memory/PhysicalMemoryManager.cpp 2010-05-31 12:47:04 UTC (rev 140) +++ borium/src/Managers/Memory/PhysicalMemoryManager.cpp 2010-05-31 20:05:45 UTC (rev 141) @@ -1,66 +1,67 @@ #include "PhysicalMemoryManager.h" /** @author Harry Hornbacher - */ + */ namespace Managers { -/** @author Harry Hornbacher + /** @author Harry Hornbacher */ -namespace Memory { + namespace Memory { + /* {src_lang=cpp}*/ -{ - /* {src_lang=cpp}*/ + PhysicalAddress *PhysicalMemoryManager::AllocBlock() + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1-16a504c9:128bd419af3:-8000:0000000000001196 begin + { + } + // section 127-0-0-1-16a504c9:128bd419af3:-8000:0000000000001196 end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element -void PhysicalMemoryManager::AllocBlock() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1-16a504c9:128bd419af3:-8000:0000000000001196 begin -{ -} -// section 127-0-0-1-16a504c9:128bd419af3:-8000:0000000000001196 end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element + void PhysicalMemoryManager::FreeBlock(PhysicalAddress Pointer, size_t Length) + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1-16a504c9:128bd419af3:-8000:000000000000119A begin + { + } + // section 127-0-0-1-16a504c9:128bd419af3:-8000:000000000000119A end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element -void PhysicalMemoryManager::FreeBlock() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1-16a504c9:128bd419af3:-8000:000000000000119A begin -{ -} -// section 127-0-0-1-16a504c9:128bd419af3:-8000:000000000000119A end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element + void PhysicalMemoryManager::ReserveArea(PhysicalAddress Base, size_t Size) + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1-16a504c9:128bd419af3:-8000:000000000000119C begin + { + } + // section 127-0-0-1-16a504c9:128bd419af3:-8000:000000000000119C end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element -void PhysicalMemoryManager::ReserveArea() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1-16a504c9:128bd419af3:-8000:000000000000119C begin -{ -} -// section 127-0-0-1-16a504c9:128bd419af3:-8000:000000000000119C end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element + size_t PhysicalMemoryManager::GetFreeMemory() + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1-16a504c9:128bd419af3:-8000:00000000000011A2 begin + { + return FreeBlocks*BLOCK_SIZE; + } + // section 127-0-0-1-16a504c9:128bd419af3:-8000:00000000000011A2 end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element -void PhysicalMemoryManager::GetFreeMemory() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1-16a504c9:128bd419af3:-8000:00000000000011A2 begin -{ -} -// section 127-0-0-1-16a504c9:128bd419af3:-8000:00000000000011A2 end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element + size_t PhysicalMemoryManager::GetUsedMemory() + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1-16a504c9:128bd419af3:-8000:00000000000011A4 begin + { + return (AvailibleBlocks-FreeBlocks)*BLOCK_SIZE; + } + // section 127-0-0-1-16a504c9:128bd419af3:-8000:00000000000011A4 end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element -void PhysicalMemoryManager::GetUsedMemory() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1-16a504c9:128bd419af3:-8000:00000000000011A4 begin -{ -} -// section 127-0-0-1-16a504c9:128bd419af3:-8000:00000000000011A4 end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element + size_t PhysicalMemoryManager::GetAvailibleMemory() + // don't delete the following line as it's needed to preserve source code of this autogenerated element + // section 127-0-0-1-16a504c9:128bd419af3:-8000:00000000000011A6 begin + { + return AvailibleBlocks*BLOCK_SIZE; + } + // section 127-0-0-1-16a504c9:128bd419af3:-8000:00000000000011A6 end + // don't delete the previous line as it's needed to preserve source code of this autogenerated element -void PhysicalMemoryManager::GetAvailibleMemory() -// don't delete the following line as it's needed to preserve source code of this autogenerated element -// section 127-0-0-1-16a504c9:128bd419af3:-8000:00000000000011A6 begin -{ -} -// section 127-0-0-1-16a504c9:128bd419af3:-8000:00000000000011A6 end -// don't delete the previous line as it's needed to preserve source code of this autogenerated element - -} /* End of namespace Managers::Memory */ + } /* End of namespace Managers::Memory */ } /* End of namespace Managers */ Modified: borium/src/Managers/Memory/PhysicalMemoryManager.h =================================================================== --- borium/src/Managers/Memory/PhysicalMemoryManager.h 2010-05-31 12:47:04 UTC (rev 140) +++ borium/src/Managers/Memory/PhysicalMemoryManager.h 2010-05-31 20:05:45 UTC (rev 141) @@ -2,42 +2,57 @@ #define Managers_Memory_PhysicalMemoryManager_h #include "Bitmap.h" +#include "../../Version.h" + /** @author Harry Hornbacher - */ + */ namespace Managers { -/** @author Harry Hornbacher + /** @author Harry Hornbacher */ -namespace Memory { + namespace Memory { -class PhysicalMemoryManager -{ - /* {src_lang=cpp}*/ + /** + * MemoryManager settings + */ + enum Settings { + BLOCK_SIZE = 4096 + }; + /** + * Type for a physical memory address + */ + typedef Address PhysicalAddress; - public: + class PhysicalMemoryManager { + /* {src_lang=cpp}*/ - void AllocBlock(); - void FreeBlock(); + public: - void ReserveArea(); + PhysicalAddress *AllocBlock(); - void GetFreeMemory(); + void FreeBlock(PhysicalAddress Pointer, size_t Length = 0); - void GetUsedMemory(); + void ReserveArea(PhysicalAddress Base, size_t Size); - void GetAvailibleMemory(); + size_t GetFreeMemory(); + size_t GetUsedMemory(); - private: - Bitmap Blocks; - Bitmap SuperBlocks; + size_t GetAvailibleMemory(); -}; -} /* End of namespace Managers::Memory */ + private: + Bitmap Blocks; + Bitmap SuperBlocks; + size_t AvailibleBlocks; + size_t FreeBlocks; + + }; + + } /* End of namespace Managers::Memory */ } /* End of namespace Managers */ #endif // Managers_Memory_PhysicalMemoryManager_h Added: borium/src/Types.h =================================================================== --- borium/src/Types.h (rev 0) +++ borium/src/Types.h 2010-05-31 20:05:45 UTC (rev 141) @@ -0,0 +1,21 @@ +#ifndef Types_h +#define Types_h + +/** + * Basic datatypes + */ +typedef unsigned char Byte; +typedef unsigned short Word; +typedef unsigned long Dword; + +/** + * Memory datatypes + */ +typedef Dword Address; + +/** + * Misc datatypes + */ +typedef Dword size_t; + +#endif // Types_h \ No newline at end of file Property changes on: borium/src/Types.h ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-05-31 12:47:16
|
Revision: 140 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=140&view=rev Author: mizztajonny Date: 2010-05-31 12:47:04 +0000 (Mon, 31 May 2010) Log Message: ----------- Edited some of the sources, the concept and the uml diagram. Modified Paths: -------------- borium/concept/borium-0.0.5-concept.odt borium/concept/concept-uml.zargo borium/src/Kernel.cpp borium/src/Kernel.h Added Paths: ----------- borium/src/Version.h Property Changed: ---------------- borium/concept/ Property changes on: borium/concept ___________________________________________________________________ Added: svn:ignore + .~lock.borium-0.0.5-concept.odt# Modified: borium/concept/borium-0.0.5-concept.odt =================================================================== (Binary files differ) Modified: borium/concept/concept-uml.zargo =================================================================== (Binary files differ) Modified: borium/src/Kernel.cpp =================================================================== --- borium/src/Kernel.cpp 2010-05-31 12:11:18 UTC (rev 139) +++ borium/src/Kernel.cpp 2010-05-31 12:47:04 UTC (rev 140) @@ -1,27 +1,8 @@ #include "Kernel.h" - - /** - * This is the Kernel class; it starts up the Managers - * @author Harry Hornbacher - */ - -{ - /* {src_lang=cpp}*/ - - - - - /** - * This STRUCT bundles the kernel versions information - * @author Harry Hornbacher - */ - -{ - /* {src_lang=cpp}*/ - - - +/** + * This is the main part of the kernel. + */ void Kernel::Run() // don't delete the following line as it's needed to preserve source code of this autogenerated element // section 127-0-0-1--7594528:1287e7358a9:-8000:0000000000001C68 begin @@ -30,26 +11,48 @@ // section 127-0-0-1--7594528:1287e7358a9:-8000:0000000000001C68 end // don't delete the previous line as it's needed to preserve source code of this autogenerated element +/** + * This function initializes all the managers and the kernel itself. + */ void Kernel::Init() // don't delete the following line as it's needed to preserve source code of this autogenerated element // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC begin { + // Initialize the CPU Manager + + // Copy all needed data (e.g. from bootloader) to a safe place + + // Initialize physical memory + + // Initialize exception manager + + // Initialize virtual memory } // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EC end // don't delete the previous line as it's needed to preserve source code of this autogenerated element -void Kernel::GetVersion() +/** + * Returns the kernel's version + * @param Buffer A pointer to the buffer, where the information will be copied in. + */ +void Kernel::GetVersion(Version* Buffer) // don't delete the following line as it's needed to preserve source code of this autogenerated element // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EE begin { + memcpy(Buffer, &KernelVersion, sizeof(Version)); } // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011EE end // don't delete the previous line as it's needed to preserve source code of this autogenerated element -void Kernel::GetCodeName() +/** + * Returns the kernel's code name + * @param Buffer A pointer to the buffer, where the information will be copied in. + */ +void Kernel::GetCodeName(char* Buffer) // don't delete the following line as it's needed to preserve source code of this autogenerated element // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011F0 begin { + memcpy(Buffer, &CodeName, strlen(CodeName)); } // section 127-0-0-1--112e3091:128e3c69e1d:-8000:00000000000011F0 end // don't delete the previous line as it's needed to preserve source code of this autogenerated element Modified: borium/src/Kernel.h =================================================================== --- borium/src/Kernel.h 2010-05-31 12:11:18 UTC (rev 139) +++ borium/src/Kernel.h 2010-05-31 12:47:04 UTC (rev 140) @@ -1,49 +1,29 @@ #ifndef Kernel_h #define Kernel_h +#include "Version.h" - - /** - * This is the Kernel class; it starts up the Managers - * @author Harry Hornbacher - */ -class Kernel -{ +/** + * This is the Kernel class; it starts up the Managers + * @author Harry Hornbacher + */ +class Kernel { /* {src_lang=cpp}*/ - public: - - - /** - * This STRUCT bundles the kernel versions information - * @author Harry Hornbacher - */ - class Version - { - /* {src_lang=cpp}*/ - - - public: - const SubVersion Main; - const SubVersion Middle; - const SubVersion Last; - - }; +public: - - public: - void Run(); virtual void Init(); - virtual void GetVersion(); + virtual void GetVersion(Version* Buffer); - virtual void GetCodeName(); + virtual void GetCodeName(char* Buffer); - public: +private: char CodeName[ 25]; + Version KernelVersion; }; Added: borium/src/Version.h =================================================================== --- borium/src/Version.h (rev 0) +++ borium/src/Version.h 2010-05-31 12:47:04 UTC (rev 140) @@ -0,0 +1,19 @@ +#ifndef Version_h +#define Version_h + +/* + * FIXME: replace with special type + */ +typedef unsigned short SubVersion; + +/** + * This STRUCT bundles the kernel versions information + * @author Harry Hornbacher + */ +struct Version { + const SubVersion Main; + const SubVersion Middle; + const SubVersion Last; +}; + +#endif // Version_h Property changes on: borium/src/Version.h ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-05-31 11:55:54
|
Revision: 138 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=138&view=rev Author: mizztajonny Date: 2010-05-31 11:55:47 +0000 (Mon, 31 May 2010) Log Message: ----------- Moved old sources to src/deprecated Modified Paths: -------------- borium/concept/concept-uml.zargo Added Paths: ----------- borium/src/deprecated/ borium/src/deprecated/Makefile borium/src/deprecated/config.mk borium/src/deprecated/kernel/ borium/src/deprecated/kernel.ld borium/src/deprecated/libCpp/ borium/src/deprecated/libFs/ borium/src/deprecated/libHal/ borium/src/deprecated/libPrc/ borium/src/deprecated/mem/ borium/src/deprecated/sys/ Removed Paths: ------------- borium/src/Makefile borium/src/config.mk borium/src/kernel/ borium/src/kernel.ld borium/src/libCpp/ borium/src/libFs/ borium/src/libHal/ borium/src/libPrc/ borium/src/mem/ borium/src/sys/ Modified: borium/concept/concept-uml.zargo =================================================================== (Binary files differ) Deleted: borium/src/Makefile =================================================================== --- borium/src/Makefile 2010-05-27 22:01:53 UTC (rev 137) +++ borium/src/Makefile 2010-05-31 11:55:47 UTC (rev 138) @@ -1,17 +0,0 @@ -include ./config.mk - -TARGETS = libHal/arch/libarch.o libCpp/libcpp.o kernel/kernel.o - -all: - @for i in $(SOURCE_DIRS); do \ - (cd $$i; make all); done - -kernel: all - $(LD) $(LDFLAGS) -T$(LDSCRIPT) -o $(KERNEL_NAME) $(TARGETS) - -clean: - @for i in $(SOURCE_DIRS); do \ - (cd $$i; make clean); done - rm -f $(KERNEL_NAME) - -#.PHONY: clean Deleted: borium/src/config.mk =================================================================== --- borium/src/config.mk 2010-05-27 22:01:53 UTC (rev 137) +++ borium/src/config.mk 2010-05-31 11:55:47 UTC (rev 138) @@ -1,37 +0,0 @@ -# Linker script -LDSCRIPT = kernel.ld - -# Include path -INCLUDE_PATH = /home/mizztajonny/Dokumente/Entwicklung/MyOS/Sources/borium/src - -# Target architecture -ARCH = x86 -#ARCH = arm - -# Toolchain prefix (only set for cross compiling) -TOOLCHAIN = -#TOOLCHAIN = /home/mizztajonny/Dokumente/Entwicklung/MyOS/cross/toolchain/bin/arm-elf- - -# Compilers and linker -CXX = $(TOOLCHAIN)g++ -LD = $(TOOLCHAIN)ld -AR = $(TOOLCHAIN)ar -AS = $(TOOLCHAIN)as - -# Flags of the compilers and linker (x86) -ARFLAGS = rcs -ASFLAGS = --32 -CXXFLAGS = -m32 -I$(INCLUDE_PATH) -DARCH=$(ARCH) -Wall -g -nostdinc -nostartfiles -nostdlib -ffreestanding -fno-builtin -fno-rtti -fno-exceptions -LDFLAGS = -melf_i386 - -# Flags of the compilers and linker (arm) -#ARFLAGS = rcs -#ASFLAGS = -#CXXFLAGS = -I$(INCLUDE_PATH) -DARCH=$(ARCH) -Wall -g -nostdinc -nostartfiles -nostdlib -ffreestanding -fno-builtin -fno-rtti -fno-exceptions -#LDFLAGS = -marmelf - -# Source directories -SOURCE_DIRS = libCpp libHal libFs libPrc kernel mem sys - -# Kernel name -KERNEL_NAME = borium-0.0.5 Copied: borium/src/deprecated/Makefile (from rev 137, borium/src/Makefile) =================================================================== --- borium/src/deprecated/Makefile (rev 0) +++ borium/src/deprecated/Makefile 2010-05-31 11:55:47 UTC (rev 138) @@ -0,0 +1,17 @@ +include ./config.mk + +TARGETS = libHal/arch/libarch.o libCpp/libcpp.o kernel/kernel.o + +all: + @for i in $(SOURCE_DIRS); do \ + (cd $$i; make all); done + +kernel: all + $(LD) $(LDFLAGS) -T$(LDSCRIPT) -o $(KERNEL_NAME) $(TARGETS) + +clean: + @for i in $(SOURCE_DIRS); do \ + (cd $$i; make clean); done + rm -f $(KERNEL_NAME) + +#.PHONY: clean Copied: borium/src/deprecated/config.mk (from rev 137, borium/src/config.mk) =================================================================== --- borium/src/deprecated/config.mk (rev 0) +++ borium/src/deprecated/config.mk 2010-05-31 11:55:47 UTC (rev 138) @@ -0,0 +1,37 @@ +# Linker script +LDSCRIPT = kernel.ld + +# Include path +INCLUDE_PATH = /home/mizztajonny/Dokumente/Entwicklung/MyOS/Sources/borium/src + +# Target architecture +ARCH = x86 +#ARCH = arm + +# Toolchain prefix (only set for cross compiling) +TOOLCHAIN = +#TOOLCHAIN = /home/mizztajonny/Dokumente/Entwicklung/MyOS/cross/toolchain/bin/arm-elf- + +# Compilers and linker +CXX = $(TOOLCHAIN)g++ +LD = $(TOOLCHAIN)ld +AR = $(TOOLCHAIN)ar +AS = $(TOOLCHAIN)as + +# Flags of the compilers and linker (x86) +ARFLAGS = rcs +ASFLAGS = --32 +CXXFLAGS = -m32 -I$(INCLUDE_PATH) -DARCH=$(ARCH) -Wall -g -nostdinc -nostartfiles -nostdlib -ffreestanding -fno-builtin -fno-rtti -fno-exceptions +LDFLAGS = -melf_i386 + +# Flags of the compilers and linker (arm) +#ARFLAGS = rcs +#ASFLAGS = +#CXXFLAGS = -I$(INCLUDE_PATH) -DARCH=$(ARCH) -Wall -g -nostdinc -nostartfiles -nostdlib -ffreestanding -fno-builtin -fno-rtti -fno-exceptions +#LDFLAGS = -marmelf + +# Source directories +SOURCE_DIRS = libCpp libHal libFs libPrc kernel mem sys + +# Kernel name +KERNEL_NAME = borium-0.0.5 Copied: borium/src/deprecated/kernel.ld (from rev 137, borium/src/kernel.ld) =================================================================== --- borium/src/deprecated/kernel.ld (rev 0) +++ borium/src/deprecated/kernel.ld 2010-05-31 11:55:47 UTC (rev 138) @@ -0,0 +1,65 @@ +/*------------------------------------------------------------------------------------- +yaMOS - "tritium" + +Author: Harry Hornbacher +Mail: h.h...@go... +Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: tritium). + +--------------------------------------------------------------------------------------- + +License: Copyright (C) 2010 Harry Hornbacher + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with this +program; if not, see <http://www.gnu.org/licenses/>. + +--------------------------------------------------------------------------------------- + +File: kernel.ld +Descr.: This is the linker script for the kernel. +-------------------------------------------------------------------------------------*/ + +/* Einsprungfunktion */ +/* Entry point */ +ENTRY(_start) + +SECTIONS +{ + + .text 0x100000: + { + kernel_start = .; + *(multiboot) + *(.text*) + *(.rodata) + } + + .data ALIGN(4096) : + { + start_ctors = .; + *(.ctors) + end_ctors = .; + start_dtors = .; + *(.dtors) + end_dtors = .; + + *(.data) + } + + .rodata ALIGN(4096) : { + *(.rodata) + } + + .bss ALIGN(4096) : + { + *(.bss) + } + + . = ALIGN(4096); + kernel_end = .; +} Deleted: borium/src/kernel.ld =================================================================== --- borium/src/kernel.ld 2010-05-27 22:01:53 UTC (rev 137) +++ borium/src/kernel.ld 2010-05-31 11:55:47 UTC (rev 138) @@ -1,65 +0,0 @@ -/*------------------------------------------------------------------------------------- -yaMOS - "tritium" - -Author: Harry Hornbacher -Mail: h.h...@go... -Descr.: Alpha-Version of the hobby OS named yaMOS (Codename: tritium). - ---------------------------------------------------------------------------------------- - -License: Copyright (C) 2010 Harry Hornbacher - -This program is free software; you can redistribute it and/or modify it under the terms -of the GNU General Public License as published by the Free Software Foundation; either -version 3 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with this -program; if not, see <http://www.gnu.org/licenses/>. - ---------------------------------------------------------------------------------------- - -File: kernel.ld -Descr.: This is the linker script for the kernel. --------------------------------------------------------------------------------------*/ - -/* Einsprungfunktion */ -/* Entry point */ -ENTRY(_start) - -SECTIONS -{ - - .text 0x100000: - { - kernel_start = .; - *(multiboot) - *(.text*) - *(.rodata) - } - - .data ALIGN(4096) : - { - start_ctors = .; - *(.ctors) - end_ctors = .; - start_dtors = .; - *(.dtors) - end_dtors = .; - - *(.data) - } - - .rodata ALIGN(4096) : { - *(.rodata) - } - - .bss ALIGN(4096) : - { - *(.bss) - } - - . = ALIGN(4096); - kernel_end = .; -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-05-27 22:01:59
|
Revision: 137 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=137&view=rev Author: mizztajonny Date: 2010-05-27 22:01:53 +0000 (Thu, 27 May 2010) Log Message: ----------- Deleted images directory. Edited concept/uml diagrams. Modified Paths: -------------- borium/concept/borium-0.0.5-concept.odt borium/concept/borium-0.0.5-concept.pdf borium/concept/concept-uml.zargo Removed Paths: ------------- borium/concept/images/ Modified: borium/concept/borium-0.0.5-concept.odt =================================================================== (Binary files differ) Modified: borium/concept/borium-0.0.5-concept.pdf =================================================================== (Binary files differ) Modified: borium/concept/concept-uml.zargo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <miz...@us...> - 2010-05-27 21:47:52
|
Revision: 136 http://ya-mos.svn.sourceforge.net/ya-mos/?rev=136&view=rev Author: mizztajonny Date: 2010-05-27 21:47:46 +0000 (Thu, 27 May 2010) Log Message: ----------- Deleted images directory. Removed Paths: ------------- borium/concept/images/pmm.png Deleted: borium/concept/images/pmm.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |