Page 1 of 1

Developing an OS for the ARM architecture?

Posted: Wed Jun 29, 2011 9:26 am
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?

Re: Developing an OS for the ARM architecture?

Posted: Wed Jun 29, 2011 10:13 am
by Combuster
OS Theory is no different for ARM than it is for x86.

Re: Developing an OS for the ARM architecture?

Posted: Wed Jun 29, 2011 10:13 am
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...

Re: Developing an OS for the ARM architecture?

Posted: Wed Jun 29, 2011 11:00 am
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

Re: Developing an OS for the ARM architecture?

Posted: Wed Jun 29, 2011 1:33 pm
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 ;)

Re: Developing an OS for the ARM architecture?

Posted: Wed Jun 29, 2011 1:52 pm
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.

Re: Developing an OS for the ARM architecture?

Posted: Wed Jun 29, 2011 2:09 pm
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!