On Fri, Mar 6, 2020 at 6:52 PM Julius Werner <jwerner@chromium.org> wrote:
[resend with right account]

On Fri, Mar 6, 2020 at 5:50 PM Julius Werner <jwerner@google.com> wrote:
>
> Hi,
>
> I'm trying to refactor some CBFS code (which necessarily leaks into
> the prog_loaders) and
> mirror_payload()/CONFIG_MIRROR_PAYLOAD_TO_RAM_BEFORE_LOADING is a bit
> of a complication. I'm trying to understand if this option is actually
> used by anyone. It seems to be "default n" in Kconfig and I don't see
> any mainboard/SoC select it specifically. It is not user-visible in
> menuconfig and the Chrome OS specific defconfig files don't select it
> either. In the original patch
> (https://review.coreboot.org/c/coreboot/+/5305) there seems to have
> been some discussion about which boards can even benefit from this,
> and I don't see any indication that it was ever really enabled
> anywhere.
>
> So is this actually used anywhere, by anyone? Can I just rip it out?

We can likely rip it out if it's not being used. In the past it was done to load everything into memory prior to performing decompression. We used to have the equivalent enabled everywhere. Subsequent churn in various places has led to the current situation. We have definitely seen speedups by using it, but if no one is actively taking advantage of it then I don't see why we should keep it. This was a related patch: http://review.coreboot.org/5144