Development

Power Management

Sunday, August 24th, 2008

Symmetry now can shutdown using ACPI! The code is not entirely finished, but there is still enough to shut the computer down. Thanks a lot to kaworu from OSdev.org for the great ACPI code.

Next, maybe I’ll look at standby… But in the meantime, I still have to finish paging and heap management.

It’s all in the latest Git if you want to check it out.

Build Issue Sorted

Sunday, August 24th, 2008

Well, I fixed the little build error that I was getting… Pretty much the only thing I had to do was to remove the prototype for the main() function, then rename it to _main(). This was because for some reason, the new version of GCC doesn’t let you have a function called main() that doesn’t have either zero or two arguments, and the first one has to be an integer.

Anyway, I suppose it’s back to work then!

Introducing Symmetry

Saturday, August 23rd, 2008

I haven’t really worked on my operating system lately, but I have done a little in the way of getting paging and some basic ACPI (!) support done.

I have been using Git to manage the project’s source code since I rewrote the C++ version, and today I found a pretty nice Git hosting site for open source development called Gitorious. The main repository will be hosted there now, instead of at the Google Code site as before.

Also, SoS now has a new name - Symmetry. I changed it for a few reasons. First, Stephen’s Operating System is kinda a lame name… Because of that I had been using SoS, but that still isn’t a really good name, because it has weird capitalisation, and names with OS in it are sort of unoriginal. Anyway, the abbreviation will continue to be sos, but the name of the project is now Symmetry.

Lastly, I upgraded to Ubuntu 8.10, which has a new GCC version. Just like last time, the operating system fails to build. Then, it was because it got too many warnings about char*s which should have been const char*s, and now it is that it doesn’t like me having one argument in the main function, and it wants the first argument to be an int. I don’t see why though, since I’m not using any standard libs or builtins or anything… It shouldn’t matter…

Anyway, I’ll try to find a solution for that eventually. But it’s annoying because I can’t really do much until I can build and test it…

Kernel Rewrite Progress

Friday, July 4th, 2008

Well, I worked today on rewriting the base of the kernel. The design is far better now, with proper architecture separation, and far less classes. So far, I have rewritten the C++ part of kernel.cc (which includes the main function and the kernel initialisation), moved the assembly part to the i386 arch folder, moved the runtime methods over, and ported all my old text-mode video functions to the new kernel.

All that remains now is to port the IDT, GDT keyboard code, timer code etc. over, and then I can continue on my way to implementing paging, a vfs, multitasking, etc.

Also, the makefile system could do with a rewrite, as the i386 target is kind of hard-coded into the build system. It’s not that bad though, and wouldn’t take that long to fix if I researched how to write makefiles properly.

Kernel Refactoring

Wednesday, April 30th, 2008

Well, I’ve fixed all the char * warnings in the kernel, and now I’m going to refactor the code to make it more manageable and easier to port to other architectures. I’m also going to get rid of a lot of the classes I was using, because there isn’t any point in using them if you are going to only use one instance.

I never got around to moving to autotools, because I couldn’t get it to work… My system is working alright though, and I will improve it for more architecture independence.

New Build System

Sunday, March 30th, 2008

I have completely changed the SoS build system recently, moving to Autotools, and currently, it doesn’t compile. Pretty much the only problem is that it tries to link to the standard C library, so I need to fix that, but everything else works fine.

I have also started using the GIT version control system, and I’ll have to use git-svn or something to sync it back to the Google Code SVN server.

The directory layout of the source has completely changed too - now pretty much the only thing that is the same as before is the actual source code! But that will need a big revamp though because the new GCC throws heaps of warnings now that you can’t assign a string to a char * - you have to use const char * instead. Not to hard to fix, but it will be fairly tedious because there are so many of those in the code.

Timing Stuff

Tuesday, February 5th, 2008

I committed revision 34 tonight - in the last few revisions, I’ve improved the keyboard driver, and added a timer IRQ handler - so now I can do delays and things like that. I’ve also been slowly but surely nearing the completion of paging.

I’ve been coding just for 32 bit recently. I have to see if it compiles for 64bit soon! I haven’t actually got around to enabling Long mode though.

I will probably need to move the arch specific stuff into different folders - but then I would need to generate a makefile and a header containing the #define that sets the platform to 64 bits in the C++ code. This would be good, but it will take some time, and I don’t really know how to do it…

A little update

Sunday, February 3rd, 2008

I thought it was pretty lame that backspace just made a weird character, so I added support for that to the video driver.

It’s pretty funny that you can backspace over the rest of the information on screen - of course, the finished keyboard driver won’t let you even go over the prompt.

Wow - it actually worked

Saturday, February 2nd, 2008

I finally got interrupts working in SoS! This means that I will be able to write a keyboard driver, and make a basic console.

It turned out that the problem was with clearing the memory that the IDT occupies - the way I was doing it (with memset) didn’t work at all, and was causing the code to crash when it received an interrupt.

The current SVN has very basic keyboard support, allowing you to type lower case letters. Currently the backspace, control, shift and keys like that don’t work… I’ll work on it after I’ve solved some other problems.

Interrupt Descriptor Table (again)

Friday, February 1st, 2008

I am currently in the middle of doing paging on SoS, but for that to work, it needs to be able to receive page fault interrupts. This means that I’ll have to make a IDT. I’ve tried to do this a few times unsuccessfully on the C++ kernel in the past, but hopefully this time I’ll be able to find the problem.