Page 1 of 2

Odius

Posted: Wed Nov 26, 2008 4:40 am
by OrOS
Odius is a complete rewrite of my old OS, OrOS. While it had fasm, tcc, and most everything else, I hated it. My code was damn ugly, not to mention I *shame* would have had copyright issues on about 100 lines of code.

My new project is called Odius, and its written in x86 ASM and C++ using nasm and gcc.

My progress is slow, but my code has been tested and works on all free and commercial emulators (- VirtualPC) as well as all the physical hardware its been tested on.

Implemented:
  • Advanced CPU detection using both processor quirks, and where available, cpuid
  • GDT
  • IDT
  • Timer
  • VMM (Includes heap and paging)
  • VFS (Unix-like, but non-compatible) including a full ramfs
  • /, /initrd, /dev/proc, /dev/pci/*, /dev/usb/* (Non-working, enumeration, nothing else), /temp
  • Multitasking
  • Usermode (The shell is being developed in userland)
Kinda-proud-of:
  • Compiles on two 800Mhz rackmount machines running Ubuntu server edition. I can connect from anywhere without the hassle of a cross-compiler. IE, I use it at school, on my mac, and on my pc using any IDE.
  • Full SMBIOS support, although non-reliant (Ex, it works in VirtualBox, but will still run fine in Qemu.) Really just used at the moment to skip a couple detection functions if its found.
  • Full APM and very basic ACPI support
  • Scans an enumerates most PCI devices
Kinda-sad-at:
  • No v86 and as such no higher video modes other then basic VGA. Basic VESA driver only works on VBE3.0, and thats only in theory, I have nothing to test it with ;-(
  • No free() !_!
  • USB driver barely functions, can only detect devices.
  • ACPI can shut the computer down. Thats about it.
Currently Working On:
  • Re-implement the shell from OrOS (had autocompletion, argument pushing, command history, text buffer, and a table based function lookup)
  • Expand ACPI so its actually useful
  • Looking into 16bit code translation, primarily for video
  • clean up the VMM. No free = lame. Mind you, everything it allocates so far never needs to be freed. In fact, I'd be scared if it did.
Long-Term:
  • Implement all USB standards
  • AC97 support
  • Network abstraction and at least support for VirtualBox and Qemu network drivers
  • APIC
Screenshot's and download once the shells done, which will mark the completion of 0.1.0

P.S If you read this meth0dz, I lost the test image for the old version, if you still have it post it.

I'm looking for people to test this on real hardware, if your up for it.

Also, lulz, I've been waiting for days for someone to accept me into the Wiki group, I have a ton of PD code to post for SMBIOS and emulator quirks.

Re: Odius

Posted: Thu Nov 27, 2008 10:59 pm
by OrOS
Update v0.1.2
  • Added support for several more SMBIOS structures. Thinking of a way of storing this serialized for application use.
  • Added video drivers: Generic VGA, VBE3.0+ (works in parallels), Bochs VBE, GD5446 (Bochs/Qemu)
I don't use v86 at all so far, so I'm happy :D

But really, not a single person is interested in testing? *Sob*

Re: Odius

Posted: Thu Nov 27, 2008 11:10 pm
by Troy Martin
Impressive, when I get the time I'll test it out and do a review on my project's wiki.

Good luck,
Troy

Re: Odius

Posted: Fri Nov 28, 2008 1:04 am
by leledumbo
I'd like to, but how can I test? You didn't provide any links / downloads.

Re: Odius

Posted: Fri Nov 28, 2008 1:28 am
by dosfan
Impressive feature list! Any screenshots for the curious ?

Re: Odius

Posted: Fri Nov 28, 2008 1:43 am
by OrOS
Current version is broken, halfway through code, give me about an hour to finish up the new BUS class and I can snap some screenies.

Re: Odius

Posted: Fri Nov 28, 2008 4:10 am
by OrOS
Excuse the ugly mess on the screen, just wanted to show something, heh. Just finished re-implementing PCI using the new abstract BUS class.

Running in VirtualBox. SMBIOS is present and info displayed.
Image

Running in Q, using the Bochs VGA Driver.
Image

VGA-MX1 & VGA-MX2 are the VirtualBox and Bochs display drivers, respectively. When the bus requests a driver from the manager, it uses this string to identify it.

P.S Does ANYONE know what the hell the PCI device 0x80ee/0xcafe is in virtualbox?

Re: Odius

Posted: Fri Nov 28, 2008 5:09 am
by JamesM
Apparently 0xCAFE is a vendor ID for Chrysalis-ITS, whatever that is! I can't find the device ID though...

Re: Odius

Posted: Fri Nov 28, 2008 5:11 am
by OrOS
0xCAFE is the device ID xD 0x80EE is the vendor, innotek.

Edit

Peeking at their source code, its defined as a "VMMDEBUG" PCI device - Debug output in VirtualBox, posssibly? *Continues to hunt it down*

Re: Odius

Posted: Fri Nov 28, 2008 5:30 am
by AJ
Hmm, Googling "Virtualbox chrysalis-its" and "innotek chrysalis-its" seems to bring up loads of stuff abouta hardware security module. IIRC, virtualbox is open source, so I guess someone could find out that way if they can be bothered...

Cheers,
Adam

Re: Odius

Posted: Fri Nov 28, 2008 5:33 am
by OrOS
Chrysalis has nothing to do with this ^^

I did peek at their source:

Code: Select all

98 	/** VMMDev PCI card identifiers */
99 	#define VMMDEV_VENDORID VBOX_PCI_VENDORID
100 	#define VMMDEV_DEVICEID (0xcafe)
Edit

Ah, its the interface used by the OS Additions to communicate with the Host OS.

Edit

Everything you need to setup your OS to send log output in VirtualBox, as well as a range of other goodies is in:
http://www.virtualbox.org/browser/trunk ... BoxDev.cpp

Edit

xD With a couple minutes of fiddling and an IRQ handler, I can blink the host folder icon, lol.

Re: Odius

Posted: Fri Nov 28, 2008 11:12 pm
by MeTh0Dz
Hm, I actually think I still have the old image, I'll edit and post it if I do.

Re: Odius

Posted: Sat Nov 29, 2008 7:56 pm
by OrOS
Update 0.1.5
  • All APM code has been removed
  • ACPI code improved and very basic AML parser
  • Start of a graphics library over top of the dsp_video abstract class
  • Cirrus & VBE3.0 broke, being ported to new class. Bochs and VGA still work.
  • Mouse driver
  • No longer *requires* grub. Startup is a bit faster using grub, but it can still fallback and do most things itself.
  • Old OrOS shell is mostly ported...ToDo: virtual terminals, graphics mode fonts (*GROAN*), file access.
  • EventListener interface. Supports key & mouse events.
  • SystemObject interface, can be used to query status on any device, Ex. BUS_PCI, DSP_VGA, whatever.
  • DriverBlockObject interface, for getting driver information, including a serialized string of settings.
  • 'pcilist' command, which shows what pcidevices were recognized and mapped, as well as their load address.
  • 'wm' command, which asks the device manager for a handle to a graphics driver and loads a (future WM) thats completely independent of its driver.
Requires less than 6mb of ram :D

Next up, finish porting ls, cd, mkdir, cat to the new shell, and add HDD access.

Screenies! (btw, you may notice 'paging' is "NO!." It is working, I just have it 1:1 while I'm working on drivers)

Image
Image
Image

Re: Odius

Posted: Sun Nov 30, 2008 7:26 am
by OrOS
~Zomg!~

Re: Odius

Posted: Sun Nov 30, 2008 8:36 am
by lukem95
looks like a good start you have going there, i loved getting basic VESA stuff working, very rewarding :)

the ACPI stuff is also impressive, not too many of us on this forum have that. did it take you long?
ACPI is something i plan to do, but i don't have time for my OS at the moment, nevermind trawling through specifications to write drivers.

~Luke