aboutsummaryrefslogtreecommitdiff
path: root/drivers/ddr
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-26 21:01:23 -0600
committerTom Rini <trini@konsulko.com>2023-08-03 15:30:54 -0400
commit6a8c2f9781cede2a7cb2b95ee6310cd53b1c20e2 (patch)
treea3b0128db838f27da61d3a93c37bcd1025cf36fa /drivers/ddr
parent146242cc998ed6e002831d4ff409189353e1960a (diff)
bootstd: Avoid allocating memory for the EFI file
The current bootflow-iteration algorithm reads the bootflow file into an allocated memory buffer so it can be examined. This works well in most cases. However, while the common case is that the first bootflow is immediately booted, it is also possible just to scan for available bootflows, perhaps selecting one to boot later. Even with the common case, EFI bootflows can be quite large. It doesn't make sense to read it into an allocated buffer when we have kernel_addr_t providing a suitable address for it. Even if we do have plenty of malloc() space available, it is a violation of U-Boot's lazy-init principle to read the bootflow before it is needed. So overall it seems better to make a change. Adjust the logic to read just the size of the EFI file at first. Later, when the bootflow is booted, read the rest of the file into the designated kernel buffer. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Da Xue <da@libre.computer> Reported-by: Vincent Stehlé <vincent.stehle@arm.com>
Diffstat (limited to 'drivers/ddr')
0 files changed, 0 insertions, 0 deletions