All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: Get machine type in user space
Date: Thu, 20 Jun 2013 21:30:55 +0200	[thread overview]
Message-ID: <201306202130.55247.arnd@arndb.de> (raw)
In-Reply-To: <CABp-a4cUbwXEGPUQBjGRnNR+X91j1qGQigS=KYTZ1fZ2ZGzQtA@mail.gmail.com>

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

  reply	other threads:[~2013-06-20 19:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 18:22 Get machine type in user space Per Strandh
2013-06-20 19:30 ` Arnd Bergmann [this message]
2013-06-20 19:45   ` Nishanth Menon
2013-06-20 20:14     ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201306202130.55247.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.