Understanding ARM

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
PearOs
Member
Member
Posts: 194
Joined: Mon Apr 08, 2013 3:03 pm
Location: Usually at my keyboard!

Understanding ARM

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

Re: Understanding ARM

Post 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.
PearOs
Member
Member
Posts: 194
Joined: Mon Apr 08, 2013 3:03 pm
Location: Usually at my keyboard!

Re: Understanding ARM

Post 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
Nable
Member
Member
Posts: 453
Joined: Tue Nov 08, 2011 11:35 am

Re: Understanding ARM

Post 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.
PearOs
Member
Member
Posts: 194
Joined: Mon Apr 08, 2013 3:03 pm
Location: Usually at my keyboard!

Re: Understanding ARM

Post 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
User avatar
bwat
Member
Member
Posts: 359
Joined: Fri Jul 03, 2009 6:21 am

Re: Understanding ARM

Post 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.
Every universe of discourse has its logical structure --- S. K. Langer.
Post Reply