Attention is currently required from: Jason Glenesk, Raul Rangel, Martin Roth, Fred Reitberger, Karthik Ramasubramanian, Felix Held.
Tim Van Patten has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/74334 )
Change subject: soc/amd/common/block/lpc/spi_dma: Leverage CBFS_CACHE when using SPI DMA
......................................................................
Patch Set 6:
(1 comment)
File src/soc/amd/common/block/lpc/spi_dma.c:
https://review.coreboot.org/c/coreboot/+/74334/comment/735e7215_83bef414
PS6, Line 242: mem_pool_free(&cbfs_cache, mapping);
This will attempt to free `&mdev->base[offset]` if `mem_pool_alloc()` failed initially. However, looking at the implementation of `mem_pool_free()`, `mp->last_alloc` will not point to that address, so it will return early and do nothing.
Looking at the implementation of `mem_pool.c`, it expects cached blocks to be returned in the order they are allocated. Otherwise, the memory is lost forever, which seems like the most likely case without careful consideration of allocations/frees.
How much space is left in the CBFS cache with this change? Do we expect the blocks to be freed immediately and recycled, or for the cache buffers to be consumed for the duration of Coreboot's execution?
--
To view, visit
https://review.coreboot.org/c/coreboot/+/74334
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie30b6324f9977261c60e55ed509e979ef290f1f1
Gerrit-Change-Number: 74334
Gerrit-PatchSet: 6
Gerrit-Owner: Karthik Ramasubramanian
kramasub@google.com
Gerrit-Reviewer: Felix Held
felix-coreboot@felixheld.de
Gerrit-Reviewer: Fred Reitberger
reitbergerfred@gmail.com
Gerrit-Reviewer: Jason Glenesk
jason.glenesk@amd.corp-partner.google.com
Gerrit-Reviewer: Jason Glenesk
jason.glenesk@gmail.com
Gerrit-Reviewer: Martin Roth
martin.roth@amd.corp-partner.google.com
Gerrit-Reviewer: Matt DeVillier
matt.devillier@amd.corp-partner.google.com
Gerrit-Reviewer: Raul Rangel
rrangel@chromium.org
Gerrit-Reviewer: Tim Van Patten
timvp@google.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-Attention: Jason Glenesk
jason.glenesk@gmail.com
Gerrit-Attention: Raul Rangel
rrangel@chromium.org
Gerrit-Attention: Jason Glenesk
jason.glenesk@amd.corp-partner.google.com
Gerrit-Attention: Martin Roth
martin.roth@amd.corp-partner.google.com
Gerrit-Attention: Fred Reitberger
reitbergerfred@gmail.com
Gerrit-Attention: Karthik Ramasubramanian
kramasub@google.com
Gerrit-Attention: Felix Held
felix-coreboot@felixheld.de
Gerrit-Comment-Date: Fri, 14 Apr 2023 15:30:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment