Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model B+ wont boot with invalid total_mem value. #782

Closed
paul-1 opened this issue Mar 28, 2017 · 6 comments
Closed

Model B+ wont boot with invalid total_mem value. #782

paul-1 opened this issue Mar 28, 2017 · 6 comments

Comments

@paul-1
Copy link

paul-1 commented Mar 28, 2017

With firmware pulled today (March 25th commit), it appears as issue #717 has cropped back up

A model B+ fails to boot with this setting
[PI1]
total_mem=513

This works, but how to distinguish between 256M and 512M models.
[PI1]
total_mem=512

Does a pi with less than 1024 memory benefit from this setting, or is total_mem=1024 providing extra memory for only rpi2B and rpi3B

@popcornmix
Copy link
Contributor

Can you test this: https://drive.google.com/uc?id=0B-6zmEDJwxZES1lhRmJhUWZkcmc&export=download
It should fix the total_mem=513 case.

The Pi SoC has a 30-bit address space (top 2 bits are used for caching aliases).
This means you can access a phyisical address range of 1G.
The ARM accesses this memory through a coarse MMU (64 pages or 16M each).
But the ARM also need to access the GPU's peripherals which makes the highest page unusable.
As a default the top 16M of actual sdram is unused.

However recent updates try to put GPU memory that the ARM doesn't need to access in the top page. We have provided a way for vcdbg to get GPU debug info from top page using DMA.

As this is still undergoing testing you must enable it manually with total_mem=1024.

As Pi0/Pi1 only used half the pages of the MMU anyway, they never had a missing 16M or sdram, so setting total_mem=512 will provide no benefit.

@paul-1
Copy link
Author

paul-1 commented Mar 29, 2017

Yes, That took care of the issue.
Also set total_mem=1024 in an [ALL] section. All of my easy access boards booted fine
Zero, Zero-w, B+, rpi2B rev1.2

And thanks for explanation. If I am using this on a headless box, will the extra memory be usable to the normal kernel?

@popcornmix
Copy link
Contributor

Yes, you will have 16M of extra usable memory.
If gpu_mem is not specified you will get 12M extra gpu_mem and 4M extra arm mem.
The extra gpu_mem allows improved chromium hardware video performance.

However you are free to set gpu_mem=64 and you will get 16M extra on the arm side.
Just boot up and run free -h and you should see an increase in free memory.

@paul-1
Copy link
Author

paul-1 commented Mar 29, 2017

Yes, I was only seeing 4MB extra. Thanks.

popcornmix added a commit that referenced this issue Mar 30, 2017
kernel: AudioInjector Octo sound card, updates
See: raspberrypi/linux#1921

kernel: Audioinjector Octo : add extra sample rates, fix rst and use bcm270x regs
See: raspberrypi/linux#1930

kernel: Driver support for Google voiceHAT soundcard
See: raspberrypi/linux#1923

kernel: Add support for Allo Boss DAC add-on board for Raspberry Pi
See: raspberrypi/linux#1924

kernel: Add support for Allo Piano DAC 2.1 plus add-on board for Raspberry Pi
See: raspberrypi/linux#1925

kernel: BCM270X_DT: Allow multiple instances of w1-gpio overlays

kernel: leds-gpio: Remove stray assignment to brightness_set

firmware: bootcode: Don't let total_mem exceed sdram size
See: #782

firmware: bootcode: Store boot partition number in PM_SPARE

firmware: dtoverlay: Change node address when reg is set
See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=178721
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Mar 30, 2017
kernel: AudioInjector Octo sound card, updates
See: raspberrypi/linux#1921

kernel: Audioinjector Octo : add extra sample rates, fix rst and use bcm270x regs
See: raspberrypi/linux#1930

kernel: Driver support for Google voiceHAT soundcard
See: raspberrypi/linux#1923

kernel: Add support for Allo Boss DAC add-on board for Raspberry Pi
See: raspberrypi/linux#1924

kernel: Add support for Allo Piano DAC 2.1 plus add-on board for Raspberry Pi
See: raspberrypi/linux#1925

kernel: BCM270X_DT: Allow multiple instances of w1-gpio overlays

kernel: leds-gpio: Remove stray assignment to brightness_set

firmware: bootcode: Don't let total_mem exceed sdram size
See: raspberrypi/firmware#782

firmware: bootcode: Store boot partition number in PM_SPARE

firmware: dtoverlay: Change node address when reg is set
See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=178721
@popcornmix
Copy link
Contributor

Fix should be in rpi-update firmware now. Okay to close?

@paul-1
Copy link
Author

paul-1 commented Mar 30, 2017

Did a quick test with the version from github. Everything seems fine.

@paul-1 paul-1 closed this as completed Mar 30, 2017
greg-erskine pushed a commit to greg-erskine/pCP-github that referenced this issue Aug 19, 2019
…ry from option

total_mem=1024 from 4MB to 16MB of extra memory on pi2 and pi3
  - Ref raspberrypi/firmware#782
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants