All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Andrew Baumann <Andrew.Baumann@microsoft.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	"qemu-arm@nongnu.org" <qemu-arm@nongnu.org>
Subject: Re: [Qemu-arm] [PATCH] bcm2835_property: implement "get board revision" query
Date: Mon, 8 Feb 2016 21:28:07 -0700	[thread overview]
Message-ID: <56B96AD7.1040002@wwwdotorg.org> (raw)
In-Reply-To: <BLUPR0301MB20343F80372F1202A8EF2D3A9ED40@BLUPR0301MB2034.namprd03.prod.outlook.com>

On 02/07/2016 03:37 PM, Andrew Baumann wrote:
> Hi Stephen,
> 
> Thanks for the patch!
> 
>> From: Stephen Warren [mailto:swarren@wwwdotorg.org]
>> Sent: Sunday, 7 February 2016 4:09 PM
>>
>> Return a valid value from the BCM2835 property mailbox query "get board
>> revision". This query is used by U-Boot. Implementing it fixes the first
>> obvious difference between qemu and real HW.
...
> * Do you know where we can find the appropriate values for Pi1 boards?

Sure. There are two encoding schemes. For most boards, the revision
number is a simple integer that indicates the board type. A list can be
found at:

> https://github.com/AndrewFromMelbourne/raspberry_pi_revision/blob/master/README.md#prior-to-raspberry-pi-2

(There's also a bit that indicates the Pi has been over-volted in there,
so you need to mask off 0x1000000 or just use the LS byte when
extracting the revision.)

The RPi2 and RPi0 introduce a more complex multi-field encoding scheme
described at:

> https://github.com/AndrewFromMelbourne/raspberry_pi_revision/blob/master/README.md#raspberry-pi-2--model-zero

You can find how U-Boot interprets the revision fields at:

> https://github.com/swarren/u-boot/blob/rpi_dev/board/raspberrypi/rpi/rpi.c#L335

Also see the various xx_models[] arrays, and some more links at:

> https://github.com/swarren/u-boot/blob/rpi_dev/board/raspberrypi/rpi/rpi.c#L77


      reply	other threads:[~2016-02-09  4:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-07  5:09 [Qemu-arm] [PATCH] bcm2835_property: implement "get board revision" query Stephen Warren
2016-02-07 12:48 ` Peter Maydell
2016-02-07 12:48   ` [Qemu-devel] " Peter Maydell
2016-02-07 22:37 ` [Qemu-arm] " Andrew Baumann
2016-02-09  4:28   ` Stephen Warren [this message]

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=56B96AD7.1040002@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=Andrew.Baumann@microsoft.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.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.