SPARC kernel

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.
diaconescud
Posts: 2
Joined: Tue Jul 19, 2011 3:32 am

SPARC kernel

Post 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,
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: SPARC kernel

Post 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.
"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 ]
OSwhatever
Member
Member
Posts: 595
Joined: Mon Jul 05, 2010 4:15 pm

Re: SPARC kernel

Post 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.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: SPARC kernel

Post by Owen »

Its a Sun SPARC. He has OpenFirmware. I suggest he looks there (and specifically at OpenBoot, Sun's implementation of OpenFirmware)
diaconescud
Posts: 2
Joined: Tue Jul 19, 2011 3:32 am

Re: SPARC kernel

Post 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?
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: SPARC kernel

Post 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.
OSwhatever
Member
Member
Posts: 595
Joined: Mon Jul 05, 2010 4:15 pm

Re: SPARC kernel

Post 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.
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: SPARC kernel

Post by 01000101 »

I'd love to see some documented boot code or examples around this arch in the wiki. Best of luck.
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: SPARC kernel

Post by Combuster »

I'd love to see some documented boot code or examples around this arch in the wiki.
Hrm? Sparc_Barebones
"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
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: SPARC kernel

Post by 01000101 »

Looks like some work in this area has been done since I took a break from the forums. =D>
cb88
Member
Member
Posts: 38
Joined: Sun Mar 07, 2010 4:06 pm

Re: SPARC kernel

Post 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?
User avatar
lemonyii
Member
Member
Posts: 153
Joined: Thu Mar 25, 2010 11:28 pm
Location: China

Re: SPARC kernel

Post by lemonyii »

i have never seen sparc hardware around me, not even Mac!
Enjoy my life!------A fish with a tattooed retina
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: SPARC kernel

Post 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
User avatar
lemonyii
Member
Member
Posts: 153
Joined: Thu Mar 25, 2010 11:28 pm
Location: China

Re: SPARC kernel

Post 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
Enjoy my life!------A fish with a tattooed retina
OSwhatever
Member
Member
Posts: 595
Joined: Mon Jul 05, 2010 4:15 pm

Re: SPARC kernel

Post 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.
Post Reply