What does your OS look like? (Screen Shots..)

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
osdever
Member
Member
Posts: 492
Joined: Fri Apr 03, 2015 9:41 am
Contact:

Re: What does your OS look like? (Screen Shots..)

Post by osdever »

octacone wrote:Basic OS Update:
-Added PCI listing (oh god this took a while to implement, all those devices :roll: :roll: )
-Added RTC support (time + date)
-Added CPU Identification
-Added Graphics Identification
Wow! Cool :)
Developing U365.
Source:
only testing: http://gitlab.com/bps-projs/U365/tree/testing

OSDev newbies can copy any code from my repositories, just leave a notice that this code was written by U365 development team, not by you.
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: What does your OS look like? (Screen Shots..)

Post by Octacone »

catnikita255 wrote:
octacone wrote:Basic OS Update:
-Added PCI listing (oh god this took a while to implement, all those devices :roll: :roll: )
-Added RTC support (time + date)
-Added CPU Identification
-Added Graphics Identification
Wow! Cool :)
Thanks! :) :)
I had to do it anyways, working on an IDE controller.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
User avatar
crunch
Member
Member
Posts: 81
Joined: Wed Aug 31, 2016 9:53 pm
Libera.chat IRC: crunch
Location: San Diego, CA

Re: What does your OS look like? (Screen Shots..)

Post by crunch »

brunexgeek wrote:Nothing much to see here. This is from a kernel I started a couple weeks to run on Raspberry Pi boards. This screenshot is from a physical memory allocation test using the new and delete C++ operators.
How easy is it to get your kernel booted up on the Pi? I have one sitting around and have been contemplating it.
brunexgeek
Member
Member
Posts: 45
Joined: Wed Dec 25, 2013 11:51 am

Re: What does your OS look like? (Screen Shots..)

Post by brunexgeek »

crunch wrote:
brunexgeek wrote:Nothing much to see here. This is from a kernel I started a couple weeks to run on Raspberry Pi boards. This screenshot is from a physical memory allocation test using the new and delete C++ operators.
How easy is it to get your kernel booted up on the Pi? I have one sitting around and have been contemplating it.
It's easy, actually. The Raspberry Pi firmware loads your kernel image from SD card (RPI 3 can use LAN or USB mass storage) at a specified memory address (0x8000 by default) e starts to run your code. The system also provides a mailbox interface which you can use to get information about the system (memory map, etc.) or change things (graphic resolution, etc.).

I'm using boot from LAN which speeds up the development, since we can't (yet?) emulate the board.
User avatar
Ycep
Member
Member
Posts: 401
Joined: Mon Dec 28, 2015 11:11 am

Re: What does your OS look like? (Screen Shots..)

Post by Ycep »

octacone wrote:
catnikita255 wrote:
octacone wrote:Basic OS Update:
-Added PCI listing (oh god this took a while to implement, all those devices :roll: :roll: )
-Added RTC support (time + date)
-Added CPU Identification
-Added Graphics Identification
Wow! Cool :)
Thanks! :) :)
I had to do it anyways, working on an IDE controller.
Using PCI IDE for reading hard drives and CDs is not braindead simple, except you copy code from wiki, through :D .
I already recommended you to have working memory manager and filesystem driver before going on other stuff. That stuff is one of the most important.
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: What does your OS look like? (Screen Shots..)

Post by Octacone »

Lukand wrote: Using PCI IDE for reading hard drives and CDs is not braindead simple, except you copy code from wiki, through :D .
I already recommended you to have working memory manager and filesystem driver before going on other stuff. That stuff is one of the most important.
It is not that hard. I am coding an IDE driver just for fun, to learn how things work. Copying and pasting teaches you nothing, not recommended. I have a working memory manager, if you did not know. Next: a file system... first I need to be able to read/write from the hard drive and then implement a file system, then on top of that I need to write my very own virtual file system. Also PCI is crucial for some system specific features.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: What does your OS look like? (Screen Shots..)

Post by BrightLight »

Lukand wrote:Using PCI IDE for reading hard drives and CDs is not braindead simple, except you copy code from wiki, through :D .
I'd have to disagree here. PIO mode is very simple, just a few outb's, and you read back the data from the drive. DMA mode is slightly more difficult, but is mostly the same.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
User avatar
Ycep
Member
Member
Posts: 401
Joined: Mon Dec 28, 2015 11:11 am

Re: What does your OS look like? (Screen Shots..)

Post by Ycep »

omarrx024 wrote:
Lukand wrote:Using PCI IDE for reading hard drives and CDs is not braindead simple, except you copy code from wiki, through :D .
I'd have to disagree here. PIO mode is very simple, just a few outb's, and you read back the data from the drive. DMA mode is slightly more difficult, but is mostly the same.
I meant writting whole IDE Controller Driver with DMA.
It isn't hard, but it's boring.
Few outb()? Two-three outb?
I meant braindead simple, which is easy like printing "hello world" on screen.
Let's refresh this topic by adding more screenshots.
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: What does your OS look like? (Screen Shots..)

Post by Octacone »

Lukand wrote:
omarrx024 wrote:
Lukand wrote:Using PCI IDE for reading hard drives and CDs is not braindead simple, except you copy code from wiki, through :D .
I'd have to disagree here. PIO mode is very simple, just a few outb's, and you read back the data from the drive. DMA mode is slightly more difficult, but is mostly the same.
I meant writting whole IDE Controller Driver with DMA.
It isn't hard, but it's boring.
Few outb()? Two-three outb?
I meant braindead simple, which is easy like printing "hello world" on screen.
Let's refresh this topic by adding more screenshots.
More like 20 of them...
Being bored is not an excuse, if you really want to achieve something, you will most likely find a way to do it.
For example: I was delaying my PCI driver over and over... One day I really needed it, so I decided to spend like 30 hours and make one. The next day I did just that, it took me a little bit longer because I was having some bugs. After all it was worth it, if you really need/want something you must do it. If you are like super bored then better leave it for another day, broken code is worse than not having any. ;)
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: What does your OS look like? (Screen Shots..)

Post by BrightLight »

octacone wrote:More like 20 of them...
There aren't even 20 ATA registers, lol. :mrgreen:
There are only eight ATA registers (including the alternate status.)
You know your OS is advanced when you stop using the Intel programming guide as a reference.
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: What does your OS look like? (Screen Shots..)

Post by Octacone »

omarrx024 wrote:
octacone wrote:More like 20 of them...
There aren't even 20 ATA registers, lol. :mrgreen:
There are only eight ATA registers (including the alternate status.)
Registers? :D :D
I was talking about assembly calls such as: inportb, outportb, inportw, outportw, inportlong, outportlong... There are like 40 of those calls needed. :P
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: What does your OS look like? (Screen Shots..)

Post by BrightLight »

octacone wrote:Registers? :D :D
I was talking about assembly calls such as: inportb, outportb, inportw, outportw, inportlong, outportlong... There are like 40 of those calls needed. :P
No, there aren't that many needed. :roll:
You know your OS is advanced when you stop using the Intel programming guide as a reference.
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: What does your OS look like? (Screen Shots..)

Post by Octacone »

omarrx024 wrote:
octacone wrote:Registers? :D :D
I was talking about assembly calls such as: inportb, outportb, inportw, outportw, inportlong, outportlong... There are like 40 of those calls needed. :P
No, there aren't that many needed. :roll:
Count them for yourself. :D
I stopped at 20ish and approx. there are 40 of them.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: What does your OS look like? (Screen Shots..)

Post by BrightLight »

octacone wrote:Count them for yourself. :D

Code: Select all

	; first we need to send the highest 4 bits of the lba to the drive select port
	mov eax, [.lba]
	shr eax, 24		; keep only highest bits
	or al, [.device]
	mov dx, [.io]
	add dx, 6		; drive select port
	out dx, al
	call iowait

	; sector count
	mov dx, [.io]
	add dx, 2		; 0x1F2
	mov eax, [.count]
	out dx, al

	; LBA
	inc dx			; 0x1F3
	mov eax, [.lba]
	out dx, al
	inc dx			; 0x1F4
	shr eax, 8
	out dx, al
	inc dx			; 0x1F5
	shr eax, 8
	out dx, al
	inc dx
	inc dx			; 0x1F7

	mov al, ATA_READ_LBA28
	out dx, al
	call iowait
Edit for clarification: I've done 6 OUTs to the ATA channel to perform a 28-bit LBA read here.
Last edited by BrightLight on Thu Sep 08, 2016 2:23 pm, edited 1 time in total.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: What does your OS look like? (Screen Shots..)

Post by Octacone »

@omarx024
Assembly... I was talking about this: wiki page full of C code
There are many port calls.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Post Reply