13

Do the 512MB RPI's have a different board revision?

ie, can you just look at the revision in /proc/cpuinfo to determine if you have a 512MB RPi?

Otherwise what's the easiest way to check?

1
  • Note that ultimately you cannot do much with the knowledge, unless you are writing a tool to change the startup files, or simply want to inform the user what they have or if their current boot configuration is taking full advantage of the hardware. An application program on the ARM under the Linux kernel cannot actually use the extra memory unless it has been granted by the GPU startup code. Oct 16, 2012 at 15:50

2 Answers 2

10

As you said, the cat /proc/cpuinfo | grep Revision command will give you the board revision. Please note the revision is an hexadecimal value. To display the decimal equivalent, run this command printf '%d\n' 0x#, where # is the hexadecimal value displayed with the previous command.

According to the following chart, the codes 13, 14 and 15 stand for the 512 MB board.

Model and revision                                          Decimal code(s)     Hexadecimal equivalent
Model B Revision 1.0                                        2                   0x2
Model B Revision 1.0 + ECN0001 (no fuses, D14 removed)      3                   0x3
Model B Revision 2.0                                        4, 5, 6             0x4, 0x5, 0x6
Model B Revision 2.0 (512 MB)                               13, 14, 15          0xd, 0xe, 0xf

Source: Element14 community documentation

5
  • 1
    Keep in mind that this may change in future. I'm sure that codes 13,14,15 will always mean you have 512 MB of RAM but there may be others. And then it is not a good idea to assume all codes >13 have 512MB since we just don't know if that will be true. So it shouldn't be used in scripts etc. Oct 16, 2012 at 11:20
  • 1
    My Pi came in a box with a sticker saying "512MB RAM" in big letters but /proc/cpuinfo says Revision : 0005. I'm booting from an image in 2012-09-18-wheezy-raspbian.zip from http://www.raspberrypi.org/downloads Oct 21, 2012 at 16:20
  • @RedGrittyBrick: Same thing for me. I just received my Pi yesterday, and according to the official blog, I have a 512MB RAM version (I can see "4G" on the chip). But cat /proc/cpuinfo returns the revision 5. Isn't the revision hard-written in the SoC? Does Raspian need an update to "recognize" 512MB RAM version? Oct 21, 2012 at 16:26
  • @Morgan: Like yours, the top chip (RAM) on the CPU on my Pi is marked Samsung K4P4G324EB and Samsung's info confirms this is "128Mx32" = 4 GBit = 512 MB. I did read a forum item somewhere that suggested a firmware update is needed (I guess this is one of the files on the SD card) Oct 21, 2012 at 16:35
  • @RedGrittyBrick: I have now Revision: 000f. Probably a recent dist-upgrade. Nov 21, 2012 at 13:18
7

In a modern operating system such as Linux, what you really need to check is how much memory has been made available for general purpose usage; that may be less than the total physically installed. So for example, a 512 MB pi running an installation intended for a 256 MB one would not make that memory available to you.

Then, on the pi there is the further issue of the CPU vs. GPU memory split - something substantially less than the present memory would even be available for the use of the ARM CPU by the time Linux boots, since the GPU bootup process has already claimed a substantial amount as determined the start.elf file used.

To answer the direct question, the first line of /proc/meminfo or the free command should tell you how much physical memory is available to Linux overall.

How much memory is available to a given application is again more complicated - the kernel, buffers, and other applications will claim memory. And while perhaps not commonly used with an SD card as the only "disk", a swap partition could make the available virtual memory exceed the physical RAM.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.