Developing an OS for the ARM architecture?

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.
Post Reply
Edge
Posts: 6
Joined: Thu Jun 23, 2011 2:58 pm

Developing an OS for the ARM architecture?

Post by Edge »

I've read all of the things about ARM in the wiki, but I need more info. What's the basic theory? Any good references?
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: Developing an OS for the ARM architecture?

Post by Combuster »

OS Theory is no different for ARM than it is for x86.
"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
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Developing an OS for the ARM architecture?

Post by Solar »

Hmmm... the basic theory is the same as for any other architecture: Understand how it works, develop an idea of what you're about to do, and then start at the beginning.

A better question might yield a better answer...
Every good solution is obvious once you've found it.
Edge
Posts: 6
Joined: Thu Jun 23, 2011 2:58 pm

Re: Developing an OS for the ARM architecture?

Post by Edge »

Ok, thanks guys. I thought the theory would be the same as x86, but one major difference I have noticed is the structure of assembly for ARM. I guess I could have been more specific. Thanks again.

-Edge
User avatar
diodesign
Posts: 14
Joined: Sat Sep 11, 2010 10:14 am
Location: England
Contact:

Re: Developing an OS for the ARM architecture?

Post by diodesign »

Edge wrote:one major difference I have noticed is the structure of assembly for ARM.
Yes, 32bit ARM has a completely different ISA to x86: for a start, it's much simpler, and every instruction is conditional and is 4 bytes wide. Also, ARM is all memory-mapped IO. There's no concept of IO ports as in x86. ARM has a different register set to x86. The CPU's instruction pointer can be modified directly. And so on. There are many and major differences at low level, but higher level fundamental design basics of an OS can remain the same.

Generally speaking ;)
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: Developing an OS for the ARM architecture?

Post by JamesM »

Yes, 32bit ARM has a completely different ISA to x86: for a start, it's much simpler, and every instruction is conditional and is 4 bytes wide.
Apart from Thumb.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: Developing an OS for the ARM architecture?

Post by JamesM »

berkus wrote:
JamesM wrote:
Yes, 32bit ARM has a completely different ISA to x86: for a start, it's much simpler, and every instruction is conditional and is 4 bytes wide.
Apart from Thumb.
And Thumb1 and Thumb2 are different afaik. Also armv6 and armv7 instruction sets are slightly different. But this is just the details.

I recommend you grab ARM Integrator CP barebones on the wiki, ARM assembly book (ARM ARM by David Seal is superb, but expensive, old and doesn't cover some modern stuff like NEON, being issued in 2001, but it has very good coverage of basic architecture details - similar to Intel manuals in depth). I'm sure JamesM could recommend better literature.

I was able to boot basic ARM kernel on Beagleboard using Integrator CP barebones and Linux's serial IO details (UART is fairly simple on Bb). All in all it's around 20 lines of asm code + 50 lines in C. Most of it is UART initialisation code and port defines.
The official ARMARM is on infocenter: infocenter.arm.com .

The ARM architecture does have a lot more variation depending on CPU and architecture, but the essentials remain the same. Thumb1 and Thumb2 aren't identical but are close enough.

If you like SSE, you'll love NEON!
Post Reply