* Get machine type in user space
@ 2013-06-20 18:22 Per Strandh
2013-06-20 19:30 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Per Strandh @ 2013-06-20 18:22 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
I work for a company that develops our own arm-based embedded linux
products. (both hardware and software)
My question is about the "machine type" parameter that is passed from
the bootloader to the kernel.
If the kernel supports more than one "machine type", the the one that
are specified by the bootloader will be choosen.
If the kernel only supports one "machine type" that will *always* be choosen.
Question:
Is it possible from user-space to find out the "machine type" that was
passed from the bootloader?
I know that in /proc/cpuinfo it is possible to see that "name" of the
choosen "machine type", but not if it was the correct one.
Regards
/Per/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Get machine type in user space
2013-06-20 18:22 Get machine type in user space Per Strandh
@ 2013-06-20 19:30 ` Arnd Bergmann
2013-06-20 19:45 ` Nishanth Menon
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2013-06-20 19:30 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday 20 June 2013, Per Strandh wrote:
> I work for a company that develops our own arm-based embedded linux
> products. (both hardware and software)
>
> My question is about the "machine type" parameter that is passed from
> the bootloader to the kernel.
>
> If the kernel supports more than one "machine type", the the one that
> are specified by the bootloader will be choosen.
> If the kernel only supports one "machine type" that will always be choosen.
>
> Question:
> Is it possible from user-space to find out the "machine type" that was
> passed from the bootloader?
> I know that in /proc/cpuinfo it is possible to see that "name" of the
> choosen "machine type", but not if it was the correct one.
You can look in the "compatible" property of the root node in /proc/device-tree
That will have the exact string used to match the platform.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Get machine type in user space
2013-06-20 19:30 ` Arnd Bergmann
@ 2013-06-20 19:45 ` Nishanth Menon
2013-06-20 20:14 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Nishanth Menon @ 2013-06-20 19:45 UTC (permalink / raw)
To: linux-arm-kernel
On 21:30-20130620, Arnd Bergmann wrote:
> On Thursday 20 June 2013, Per Strandh wrote:
> > I work for a company that develops our own arm-based embedded linux
> > products. (both hardware and software)
> >
> > My question is about the "machine type" parameter that is passed from
> > the bootloader to the kernel.
> >
> > If the kernel supports more than one "machine type", the the one that
> > are specified by the bootloader will be choosen.
> > If the kernel only supports one "machine type" that will always be choosen.
> >
> > Question:
> > Is it possible from user-space to find out the "machine type" that was
> > passed from the bootloader?
> > I know that in /proc/cpuinfo it is possible to see that "name" of the
> > choosen "machine type", but not if it was the correct one.
>
> You can look in the "compatible" property of the root node in /proc/device-tree
>
> That will have the exact string used to match the platform.
>
Documentation/ABI/testing/sysfs-devices-soc exposes
/sys/devices/socX/machine if enabled might help as well?
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-20 20:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-20 18:22 Get machine type in user space Per Strandh
2013-06-20 19:30 ` Arnd Bergmann
2013-06-20 19:45 ` Nishanth Menon
2013-06-20 20:14 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).