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 4:
(2 comments)
File src/soc/amd/common/block/lpc/spi_dma.c:
https://review.coreboot.org/c/coreboot/+/74334/comment/dbf29f04_156daa30
PS4, Line 218: if (!CONFIG_CBFS_CACHE_SIZE)
By extra copy into the cache, are you referring to cbfs_cache?
Correct.
`spi_dma_readat_mmap()` will copy into the allocated cache buffer:
```
static ssize_t spi_dma_readat_mmap(const struct region_device *rd, void *b, size_t offset,
size_t size)
{
const struct mem_region_device *mdev;
mdev = container_of(rd, __typeof__(*mdev), rdev);
memcpy(b, &mdev->base[offset], size);
return size;
}
```
Do we want this? If so, then we should update the fallback case (see: ref1 below) to perform the same copy, since the data is still available and the cache buffer is still good.
https://review.coreboot.org/c/coreboot/+/74334/comment/332fbd2e_2488bf43
PS4, Line 230: mem_pool_free(&cbfs_cache, mapping);
: /* Fall-back to memory map */
: return &mdev->base[offset];
ref1
--
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: 4
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: Thu, 13 Apr 2023 16:20:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Tim Van Patten
timvp@google.com
Comment-In-Reply-To: Karthik Ramasubramanian
kramasub@google.com
Gerrit-MessageType: comment