Page 1 of 2

SPARC kernel

Posted: Tue Jul 19, 2011 3:40 am
by diaconescud
Hello,

I am trying to make a minimal kernel for SUN Sparc arhitecture for educational purpose. I found tutorials for x86, but I couldn't find for SPARC arhitecture.
Can you give me some tutorials? I am trying to print a text message on the screen writing directly to video address. How can I print a message for this arhitecture?

Thank you,

Re: SPARC kernel

Posted: Tue Jul 19, 2011 3:54 am
by Combuster
Tip of the day: Tutorials only make you believe you can write an OS.

In this case, there are none and you'll have to make do with the manuals and other people's work.

Re: SPARC kernel

Posted: Tue Jul 19, 2011 6:10 am
by OSwhatever
diaconescud wrote:Hello,

I am trying to make a minimal kernel for SUN Sparc arhitecture for educational purpose. I found tutorials for x86, but I couldn't find for SPARC arhitecture.
Can you give me some tutorials? I am trying to print a text message on the screen writing directly to video address. How can I print a message for this arhitecture?

Thank you,
I suggest you take a look at the HW documentation of your HW board and processor. Often non-x86 computers have no generic methods for IO like in the PC-bios or standardized IO hardware.

Re: SPARC kernel

Posted: Tue Jul 19, 2011 7:18 am
by Owen
Its a Sun SPARC. He has OpenFirmware. I suggest he looks there (and specifically at OpenBoot, Sun's implementation of OpenFirmware)

Re: SPARC kernel

Posted: Wed Jul 20, 2011 3:50 am
by diaconescud
Owen wrote:Its a Sun SPARC. He has OpenFirmware. I suggest he looks there (and specifically at OpenBoot, Sun's implementation of OpenFirmware)
Can I use the OpenFirmware's initializations or shall I initializa again the video card and other devices?

Re: SPARC kernel

Posted: Wed Jul 20, 2011 6:02 am
by Owen
I was pointing you in the right direction based upon what I know about the architecture. I have never actually worked with it. If you want to learn about SPARC... You'll have to do it yourself - and hopefully even document it for others here.

I suggest that if this is your first venture in operating system development you choose something more well documented and with which more people have experience. x86 is, of course, the most well documented, but people hever have experience with architectures like ARM and PowerPC.

Re: SPARC kernel

Posted: Wed Jul 20, 2011 11:18 am
by OSwhatever
I think he should implement it on SPARC. Very few people develop for that architecture and it would be interesting to have someone who knows about it and that would be an asset to this forum and himself. Once you get past the documentation and toolchain barrier, it shouldn't be that much different to other architectures. Also qemu has an emulator for SPARC I think.

Re: SPARC kernel

Posted: Fri Aug 05, 2011 9:54 am
by 01000101
I'd love to see some documented boot code or examples around this arch in the wiki. Best of luck.

Re: SPARC kernel

Posted: Fri Aug 05, 2011 12:17 pm
by Combuster
I'd love to see some documented boot code or examples around this arch in the wiki.
Hrm? Sparc_Barebones

Re: SPARC kernel

Posted: Sat Aug 06, 2011 10:09 am
by 01000101
Looks like some work in this area has been done since I took a break from the forums. =D>

Re: SPARC kernel

Posted: Tue Oct 18, 2011 12:01 pm
by cb88
Yeah and it builds now it was missing the comments "!" in the assembly.

I ran the .bin with qemu-system-sparc -kernel boot.bin

I guess next would be mapping the print function from the prom and then maybe porting (as in adding the fuctions it needs to link) newlib and linking with that?

Re: SPARC kernel

Posted: Wed Oct 19, 2011 11:04 pm
by lemonyii
i have never seen sparc hardware around me, not even Mac!

Re: SPARC kernel

Posted: Thu Oct 20, 2011 5:13 am
by jal
lemonyii wrote:i have never seen sparc hardware around me, not even Mac!
Err... What has a Mac to do with Sparc hardware?


JAL

Re: SPARC kernel

Posted: Thu Oct 20, 2011 10:01 am
by lemonyii
jal wrote:
lemonyii wrote:i have never seen sparc hardware around me, not even Mac!
Err... What has a Mac to do with Sparc hardware?


JAL
i'm implying that i have nothing except PC

Re: SPARC kernel

Posted: Thu Oct 20, 2011 10:29 am
by OSwhatever
In the early stages of the OS development, qemu is usually better. It's simply faster to develop using qemu. If you want to try it out on a real hardware, it's actually harder. I've seen Sun SPARC desktops but they are getting more and more unusual. I have not seen any SPARC development board at all for a feasible amount of money. What you can do is get an FPGA and download one of those open source SPARC cores. Interesting really that SPARC is that unusual and I've no idea what the future holds for it. You can easily get x86, ARM and MIPS development boards but SPARC is just absent.