AgaresOS - please review

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
Agares
Posts: 18
Joined: Sat Aug 25, 2012 4:19 pm

AgaresOS - please review

Post by Agares »

Hello!
I am working on AgaresOS, an operating system of my own (well, that was unexpected). I would be glad if someone could review the code, maybe point out some of the stupid things I do. You can find the code here: https://github.com/Agares/AgaresOS/tree ... tion-to-64 (the branch I'm linking to is the most up to date one). One thing I know for sure is that paging won't work if the tables are not identity-mapped. My plans for the nearest future are to fix paging, finish the ELF loader and load the kernel from the loader. Then I think I will work on ACPI.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: AgaresOS - please review

Post by Combuster »

You probably like games, no?

Code: Select all

#pragma
With these certain earlier versions of gcc, if you compiled a file containing a #pragma, GCC would attempt each of the following in turn:

Attempt to launch a game of nethack.
Attempt to launch a game of rogue.
Attempt to launch a game of Towers of Hanoi via emacs.
Print the message "You are in a maze of twisty compiler features, all different."
Especially since you're often using pragma to hide bad coding manners.


Some other bits that are bound to haunt you sometime:
- No cross-compiler
- Calling make for individual files


Github search doesn't list any references to CR0, CR3, or WRMSR so it means some essential paging things are sadly missing.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: AgaresOS - please review

Post by iansjack »

Combuster wrote:Github search doesn't list any references to CR0, CR3, or WRMSR so it means some essential paging things are sadly missing.
You didn't look very hard.

It's probably better to rely on eyeballs rather than an inaccurate search (especially if you don't allow for lower case). I also think it's worth making the effort to try to keep criticism accurate (or else don't bother).
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: AgaresOS - please review

Post by Combuster »

I did try three of the four capitalisation options for the CRs before I posted it, and the fourth for the sole reason that you complained. Regardless, my observation is accurate even though it only proved how broken that search feature is, and misleadingly so considering "jmp far" as the search query does return hits. You're free to repeat my exercise.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: AgaresOS - please review

Post by iansjack »

Don't bother with searches (which obviously aren't working for you). If you just look at the source the places where those registers are read and written is obvious.

If you want to criticize source code a good starting point is to read it.
User avatar
Roman
Member
Member
Posts: 568
Joined: Thu Mar 27, 2014 3:57 am
Location: Moscow, Russia
Contact:

Re: AgaresOS - please review

Post by Roman »

Why is there a .gitkeep file in /common/src? This directory isn't empty.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: AgaresOS - please review

Post by iansjack »

Roman wrote:Why is there a .gitkeep file in /common/src? This directory isn't empty.
The commit history shows that that wasn't always the case.
Agares
Posts: 18
Joined: Sat Aug 25, 2012 4:19 pm

Re: AgaresOS - please review

Post by Agares »

Combuster wrote:You probably like games, no?

Code: Select all

#pragma
Well, compiling this code with an ancient version of GCC probably isn't going to end well anyway.
Combuster wrote: Some other bits that are bound to haunt you sometime:
- No cross-compiler
- Calling make for individual files
Yup, you are right here, the whole build system isn't the greatest at the moment.
Combuster wrote: Github search doesn't list any references to CR0, CR3, or WRMSR so it means some essential paging things are sadly missing.
Well, you can find them in common/src/cpu.c
Roman wrote:Why is there a .gitkeep file in /common/src? This directory isn't empty.
The directory was empty, but now isn't, I'll delete that file, thanks.

Thanks for all the answers, I'm going to fix the bugs/problems that you pointed out.
Post Reply