For most (all?) Arm SoCs, there's no real reason the RAMSTAGE area is so small in memlayout. There's a lot of RAM available so it might well be larger. We just didn't have any need for that much space back when they were added, but then the FIT payload code came along which may need a decent chunk of scratch space (depending on how big of an FDT/initramfs you're loading). So if you have a problem on a specific SoC, just submit a change to increase the RAMSTAGE area (or manually configure a smaller HEAP_SIZE if that's enough for what you're trying to load).

So there's no real problem here, it's just that you may need to statically resize some things to make everything fit. There's more than enough space, usually, coreboot is just not good at placing stuff automatically for you so you need to tell it where what goes. We could tie the FIT scratch space to something like bootmem_allocate_buffer() instead, but then you trade the configuration hassle for the risk that something may end up overlapping later (e.g. if bootmem ends up grabbing the range that the payload wants to be loaded at later, you have a problem).

View Change

To view, visit change 32392. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id17f25e94d97e937b0e9a9cee3dd1a8aef1d525d
Gerrit-Change-Number: 32392
Gerrit-PatchSet: 3
Gerrit-Owner: Marty E. Plummer <hanetzer@startmail.com>
Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Marty E. Plummer <hanetzer@startmail.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-CC: Kyösti Mälkki <kyosti.malkki@gmail.com>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Comment-Date: Mon, 16 Sep 2019 21:40:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment