Wow! Cooloctacone wrote:Basic OS Update:
-Added PCI listing (oh god this took a while to implement, all those devices![]()
)
-Added RTC support (time + date)
-Added CPU Identification
-Added Graphics Identification

Wow! Cooloctacone wrote:Basic OS Update:
-Added PCI listing (oh god this took a while to implement, all those devices![]()
)
-Added RTC support (time + date)
-Added CPU Identification
-Added Graphics Identification
Thanks!catnikita255 wrote:Wow! Cooloctacone wrote:Basic OS Update:
-Added PCI listing (oh god this took a while to implement, all those devices![]()
)
-Added RTC support (time + date)
-Added CPU Identification
-Added Graphics Identification
How easy is it to get your kernel booted up on the Pi? I have one sitting around and have been contemplating it.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.
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.).crunch wrote:How easy is it to get your kernel booted up on the Pi? I have one sitting around and have been contemplating it.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.
Using PCI IDE for reading hard drives and CDs is not braindead simple, except you copy code from wiki, throughoctacone wrote:Thanks!catnikita255 wrote:Wow! Cooloctacone wrote:Basic OS Update:
-Added PCI listing (oh god this took a while to implement, all those devices![]()
)
-Added RTC support (time + date)
-Added CPU Identification
-Added Graphics Identification![]()
![]()
I had to do it anyways, working on an IDE controller.
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.Lukand wrote: Using PCI IDE for reading hard drives and CDs is not braindead simple, except you copy code from wiki, through.
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.
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.Lukand wrote:Using PCI IDE for reading hard drives and CDs is not braindead simple, except you copy code from wiki, through.
I meant writting whole IDE Controller Driver with DMA.omarrx024 wrote: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.Lukand wrote:Using PCI IDE for reading hard drives and CDs is not braindead simple, except you copy code from wiki, through.
More like 20 of them...Lukand wrote:I meant writting whole IDE Controller Driver with DMA.omarrx024 wrote: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.Lukand wrote:Using PCI IDE for reading hard drives and CDs is not braindead simple, except you copy code from wiki, through.
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.
There aren't even 20 ATA registers, lol.octacone wrote:More like 20 of them...
Registers?omarrx024 wrote:There aren't even 20 ATA registers, lol.octacone wrote:More like 20 of them...
There are only eight ATA registers (including the alternate status.)
No, there aren't that many needed.octacone wrote:Registers?![]()
![]()
I was talking about assembly calls such as: inportb, outportb, inportw, outportw, inportlong, outportlong... There are like 40 of those calls needed.
Count them for yourself.omarrx024 wrote:No, there aren't that many needed.octacone wrote:Registers?![]()
![]()
I was talking about assembly calls such as: inportb, outportb, inportw, outportw, inportlong, outportlong... There are like 40 of those calls needed.
octacone wrote:Count them for yourself.![]()
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