cmarrin
Posts: 23
Joined: Sat Sep 15, 2018 7:19 pm

Why does my Raspberry Pi Zero W report that it has 256MB?

Wed Sep 26, 2018 6:16 pm

I'm working on some bare metal mailbox code. So I decided to test it out by getting some info from the system. I've sent the ARMMemory (0x00010005) and VCMemory (0x00010006) commands and this is what I get back:

ARMMemory: start=0x00000000, size=0x08000000
VCMemory: start=0x08000000, size=0x08000000

That's showing that I have 256MB. But all the specs I've read say that these boards have 512MB. This is a board I bought from Adafruit and shows as rev 1.1, so I don't think it's some kind of grey market board. I also have an older model B+. It also shows that it has 256MB. But it's from 2014 and it looks like that's what those boards should have.

Are the specs lying, or does the Zero W set it set it self up with half it's available memory? Or am I misinterpreting the response from the mailbox?

rst
Posts: 494
Joined: Sat Apr 20, 2013 6:42 pm
Location: Germany

Re: Why does my Raspberry Pi Zero W report that it has 256MB?

Wed Sep 26, 2018 6:40 pm

I guess, the firmware file fixup.dat is missing on your uSD card. Without it the firmware cannot relocate the file start.elf in memory.

User avatar
Imperf3kt
Posts: 4145
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia
Contact: Twitter

Re: Why does my Raspberry Pi Zero W report that it has 256MB?

Wed Sep 26, 2018 9:11 pm

Your Pi0w did not come from 2014 as they weren't made until 2017.
Did you perhaps mean the Raspberry Pi model A?
55:55:44:44:4C
52:4C:52:42:41

Rose tinted glasses are difficult to see through.

cmarrin
Posts: 23
Joined: Sat Sep 15, 2018 7:19 pm

Re: Why does my Raspberry Pi Zero W report that it has 256MB?

Wed Sep 26, 2018 10:26 pm

Imperf3kt wrote:
Wed Sep 26, 2018 9:11 pm
Your Pi0w did not come from 2014 as they weren't made until 2017.
Did you perhaps mean the Raspberry Pi model A?
Sorry, I wasn't clear. My Raspberry Pi model B+ is from 2014. That's why I think it probably only has 256MB.

ericcooper
Posts: 148
Joined: Sat Apr 08, 2017 6:23 pm

Re: Why does my Raspberry Pi Zero W report that it has 256MB?

Wed Sep 26, 2018 10:38 pm

Boot it with a Raspbian SD card and see how much memory the kernel reports in the log, or the "free" command prints. If it says 512M, there's probably some low-level hardware initialization that you haven't done, or are doing differently.

cmarrin
Posts: 23
Joined: Sat Sep 15, 2018 7:19 pm

Re: Why does my Raspberry Pi Zero W report that it has 256MB?

Wed Sep 26, 2018 10:41 pm

rst wrote:
Wed Sep 26, 2018 6:40 pm
I guess, the firmware file fixup.dat is missing on your uSD card. Without it the firmware cannot relocate the file start.elf in memory.
Thanks! That was the problem. Everything worked without it, so I assumed it was an optional file! With its inclusion, I now get:

ARMMemory: start=0x00000000, size=0x1c000000
VCMemory: start=0x1c000000, size=0x04000000

That's 64MB for the VC, which the docs say is the default, and 448MB for the ARM. All is well. Not only that but my model B+ also reports 512MB. So I have all the memory in the world now

User avatar
Imperf3kt
Posts: 4145
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia
Contact: Twitter

Re: Why does my Raspberry Pi Zero W report that it has 256MB?

Wed Sep 26, 2018 10:44 pm

cmarrin wrote:
Wed Sep 26, 2018 10:26 pm
Imperf3kt wrote:
Wed Sep 26, 2018 9:11 pm
Your Pi0w did not come from 2014 as they weren't made until 2017.
Did you perhaps mean the Raspberry Pi model A?
Sorry, I wasn't clear. My Raspberry Pi model B+ is from 2014. That's why I think it probably only has 256MB.
No, sorry it was actually my mistake. I misread your post.
55:55:44:44:4C
52:4C:52:42:41

Rose tinted glasses are difficult to see through.

User avatar
rpdom
Posts: 17974
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Why does my Raspberry Pi Zero W report that it has 256MB?

Thu Sep 27, 2018 5:23 am

cmarrin wrote:
Wed Sep 26, 2018 10:26 pm
Imperf3kt wrote:
Wed Sep 26, 2018 9:11 pm
Your Pi0w did not come from 2014 as they weren't made until 2017.
Did you perhaps mean the Raspberry Pi model A?
Sorry, I wasn't clear. My Raspberry Pi model B+ is from 2014. That's why I think it probably only has 256MB.
The B+ had 512MB RAM. It may be that your GPU memory split is set to use 256MB/256MB, which would limit the memory available to Linux.
The only Pi models with 256MB RAM were the original (1)B from 2012 and the (1)A.

Return to “Bare metal, Assembly language”