Patch Set 3:

Patch Set 3:

So it sounds like we need a way to tie in the Kconfig to this allocation (if possible). Have you looked into various options?

In the old days of bounce buffers and non-relocatable ramstage on x86, it would have been fragile for payload to access back to ramstage program. If I read the source correctly, ramstage heap became part of the hand-of-buffer with FIT payloads. Do we really want to allow that?

I think lib/device_tree.c and lib/fit_payload.c should malloc() from a completely separate heap.

I'm not up on the details of this sharing. Is the region just referenced or is it reused for its own malloc implementation?

NVM. After a second read, it appears the flattened devicetree is the handoff buffer, and it is located outside ramstage heap. So FIT payload does not reference back to ramstage heap.

Instead of attempting to adjust ARM memlayouts, might still be easier to have (unpacked) devicetree carved from any BM_MEM_RAM, it only has lifetime of fit_payload() and memory could be freed right after pack_fdt(), even before loading kernel and initrd.

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 16:29:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment