Attention is currently required from: Angel Pons, Arthur Heymans.
Nico Huber has posted comments on this change by Arthur Heymans. ( https://review.coreboot.org/c/coreboot/+/84059?usp=email )
Change subject: drivers/spi: Stop using a variable-length array ......................................................................
Patch Set 1:
(3 comments)
File src/drivers/spi/spi_flash.c:
https://review.coreboot.org/c/coreboot/+/84059/comment/96bec406_fe20f0f6?usp... : PS1, Line 136: strain the stack strain *on* the stack
https://review.coreboot.org/c/coreboot/+/84059/comment/acb74534_8c636447?usp... : PS1, Line 137: static u8 buff[4 + MAX_FLASH_CMD_DATA_SIZE]; `+ ADDR_MOD`
It's set to 1 for `CONFIG_SPI_FLASH_FORCE_4_BYTE_ADDR_MODE` (seems not used, but we should be prepared).
https://review.coreboot.org/c/coreboot/+/84059/comment/8389b719_5e4dfb9c?usp... : PS1, Line 317: chunk_len = MIN(MAX_FLASH_CMD_DATA_SIZE, chunk_len);
Not sure about this part, does it truncate the write properly? Should it be an assertion of some kin […]
Seems fine to me. The caller of spi_flash_cmd_write_page_program(), and spi_crop_chunk() can already go below the page size. And I'm not aware of any SPI flash that would mind.