Attention is currently required from: Bao Zheng, Jason Glenesk, Raul Rangel, Marshall Dawson, Matt DeVillier, Zheng Bao, Martin Roth, Fred Reitberger, Felix Held.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/74260 )
Change subject: soc/amd/spi: Mmap 32M/64M flash
......................................................................
Patch Set 7:
(1 comment)
Patchset:
PS5:
For the newest SOC and 32M or 64M SPI flash.
I meant more, where will the mmap API be called? AIUI, the current implementation
will only work in very simple cases, i.e. a single mapping at a time. While the API
currently allows things like this:
const struct region_device *rd = boot_device_ro();
void *a = rdev_mmap(rd, 0, 1234);
void *b = rdev_mmap(rd, 34567890, 1234);
memcmp(a, b, 1234);
Such uses are not possible with the one-mapping-at-a-time SPI_ROM_PAGE register.
We also leak mappings of boot_device_ro() on purpose, because the mapping is
expected to work indefinitely. For instance elog_flash_offset_to_address(), or
spi_flash_get_mmap_windows(). These are expected to be used by the payload and OS
without knowing any SPI_ROM_PAGE index.
To be fully compatible with existing uses of boot_device_ro(), I would investigate
if working on a copy is feasible for `index != 0`, i.e. allocate memory when
`.mmap` gets called and pre-fill it with the data at the given offset.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/74260
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibd2bf1390635494443cac9ee8600a4a741a78c0d
Gerrit-Change-Number: 74260
Gerrit-PatchSet: 7
Gerrit-Owner: Bao Zheng
fishbaozi@gmail.com
Gerrit-Reviewer: Felix Held
felix-coreboot@felixheld.de
Gerrit-Reviewer: Fred Reitberger
reitbergerfred@gmail.com
Gerrit-Reviewer: Jason Glenesk
jason.glenesk@gmail.com
Gerrit-Reviewer: Marshall Dawson
marshalldawson3rd@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: Zheng Bao
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Nico Huber
nico.h@gmx.de
Gerrit-Attention: Bao Zheng
fishbaozi@gmail.com
Gerrit-Attention: Jason Glenesk
jason.glenesk@gmail.com
Gerrit-Attention: Raul Rangel
rrangel@chromium.org
Gerrit-Attention: Marshall Dawson
marshalldawson3rd@gmail.com
Gerrit-Attention: Matt DeVillier
matt.devillier@amd.corp-partner.google.com
Gerrit-Attention: Zheng Bao
Gerrit-Attention: Martin Roth
martin.roth@amd.corp-partner.google.com
Gerrit-Attention: Fred Reitberger
reitbergerfred@gmail.com
Gerrit-Attention: Felix Held
felix-coreboot@felixheld.de
Gerrit-Comment-Date: Sun, 09 Apr 2023 22:39:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Bao Zheng
fishbaozi@gmail.com
Comment-In-Reply-To: Nico Huber
nico.h@gmx.de
Gerrit-MessageType: comment