Page 1 of 1

Understanding ARM

Posted: Sun Apr 13, 2014 12:51 pm
by PearOs
Hey guys!

So I am attempting to make my operating system support two important platforms, x86 and Arm. I know my way around the x86-x64 architecture well, however I don't know much about Arm. So I am going to ask some questions and hopefully they will help me better understand Arm, sorry if they are noobish.

So first, on x86 you use the PCI bus to find hardware, but on Arm does such thing exist? If not, how do you find installed hardware?

Like on x86 for example the wiki has everything from CPU, to PCI, to GPU, to Memory. Does something like this for Arm exist? I haven't been able to find it.

Thanks, Matt

Re: Understanding ARM

Posted: Sun Apr 13, 2014 1:04 pm
by Owen
PearOs wrote:Hey guys!

So I am attempting to make my operating system support two important platforms, x86 and Arm. I know my way around the x86-x64 architecture well, however I don't know much about Arm. So I am going to ask some questions and hopefully they will help me better understand Arm, sorry if they are noobish.

So first, on x86 you use the PCI bus to find hardware, but on Arm does such thing exist? If not, how do you find installed hardware?
You know about it ahead of time.
PearOs wrote:Like on x86 for example the wiki has everything from CPU, to PCI, to GPU, to Memory. Does something like this for Arm exist? I haven't been able to find it.
Your target chips' Technical Reference Manual. This will be a ~5000 page tome with everything you wanted to know (almost) and lots you didn't.

Re: Understanding ARM

Posted: Sun Apr 13, 2014 1:08 pm
by PearOs
Owen wrote:
PearOs wrote:Hey guys!

So I am attempting to make my operating system support two important platforms, x86 and Arm. I know my way around the x86-x64 architecture well, however I don't know much about Arm. So I am going to ask some questions and hopefully they will help me better understand Arm, sorry if they are noobish.

So first, on x86 you use the PCI bus to find hardware, but on Arm does such thing exist? If not, how do you find installed hardware?
You know about it ahead of time.
PearOs wrote:Like on x86 for example the wiki has everything from CPU, to PCI, to GPU, to Memory. Does something like this for Arm exist? I haven't been able to find it.
Your target chips' Technical Reference Manual. This will be a ~5000 page tome with everything you wanted to know (almost) and lots you didn't.
Oh I see, so Arm is like an embedded platform then. You don't just have a motherboard with an Arm chip like you do with x86. Makes sense, thank you that actually clears up a lot. Now just time to learn the instruction set for the Arm chip in the Raspberry Pi!

Thanks,

Matt

Re: Understanding ARM

Posted: Sun Apr 13, 2014 1:19 pm
by Nable
Intel (and others) produces complete CPUs (and sometimes even boards for them).
But ARM (situation with MIPS is similar, by the way) is a different beast, one company makes reference hardware design (possibly in some HDL -hardware description language) and sell licences, other companies buy licences and make their CPUs that are based on that hardware design but these CPUs may have some heavy modifications. Board designs are even more variable and vendor-specific. Even worse: ARM is often used in embedded hardware where things are tightly coupled (i.e. peripherals are directly attached to CPU) and there's no place for something like BIOS. So, only board vendor knows what devices are present and at what addresses.

Short answer: older linux versions had platform files (.c) for each cpu model + each board, where some datastructures and register_blablabla() calls described what is on your board. Now OSes are trying to switch to Flattened Device Trees (http://elinux.org/Device_Tree) - data structures that describe what hardware is present, at what addresses and which modules should be used. Now you can build somehow generic kernel and bootloader passes FDT structure to your kernel so it gets ready list of devices.

Re: Understanding ARM

Posted: Sun Apr 13, 2014 2:32 pm
by PearOs
Nable wrote:Intel (and others) produces complete CPUs (and sometimes even boards for them).
But ARM (situation with MIPS is similar, by the way) is a different beast, one company makes reference hardware design (possibly in some HDL -hardware description language) and sell licences, other companies buy licences and make their CPUs that are based on that hardware design but these CPUs may have some heavy modifications. Board designs are even more variable and vendor-specific. Even worse: ARM is often used in embedded hardware where things are tightly coupled (i.e. peripherals are directly attached to CPU) and there's no place for something like BIOS. So, only board vendor knows what devices are present and at what addresses.

Short answer: older linux versions had platform files (.c) for each cpu model + each board, where some datastructures and register_blablabla() calls described what is on your board. Now OSes are trying to switch to Flattened Device Trees (http://elinux.org/Device_Tree) - data structures that describe what hardware is present, at what addresses and which modules should be used. Now you can build somehow generic kernel and bootloader passes FDT structure to your kernel so it gets ready list of devices.
Interesting, thank you for that information. That may become useful in the future.

Thanks,

Matt

Re: Understanding ARM

Posted: Mon Apr 14, 2014 12:11 am
by bwat
PearOs wrote: So first, on x86 you use the PCI bus to find hardware, but on Arm does such thing exist? If not, how do you find installed hardware?
I've seen documentation for ARM boards with a PCI bus. I haven't worked with any of them personally, but you can find them with on the net. A processor is a processor, and a bus is a bus.

Edit: found this: http://en.wikipedia.org/wiki/Iyonix_PC. Looks like there was a Linux port so it would have been quite a nice OS dev machine for ARM. Unfortunately they stopped making them.
PearOs wrote: Like on x86 for example the wiki has everything from CPU, to PCI, to GPU, to Memory. Does something like this for Arm exist? I haven't been able to find it.
Try this: http://infocenter.arm.com/help/index.jsp and your hardware suppliers info, you'll find everything you need if you've bought a development kit.