Attention is currently required from: Maximilian Brune, Angel Pons, Lean Sheng Tan, David Milosevic.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/68137 )
Change subject: [WIP] mb/prodrive/atlas: Populate smbios table with VPD from ECs EMI ......................................................................
Patch Set 11:
(3 comments)
File src/mainboard/prodrive/atlas/mainboard.c:
https://review.coreboot.org/c/coreboot/+/68137/comment/34fccca4_fa798936 PS11, Line 42: const char prefix[5] = "P/N: "; : static u8 pn[sizeof(prefix) + PN_LENGTH + 1] = { '\x00' }; : : strncpy((char *) pn, prefix, sizeof(prefix)) Do you need a strncpy? I think you can statically set pn[] with a prefix. Btw if you set this to PAGESIZE + prefix, you might simplify the read_region function as it's easier to deal with 4 byte aligned data. Then just add NULL termination here at sizeof(prefix) + PN_LENGTH.
File src/mainboard/prodrive/atlas/vpd.h:
https://review.coreboot.org/c/coreboot/+/68137/comment/67e608fd_d8cccf5a PS11, Line 13: __packed __packed is a NOOP needed here.
File src/mainboard/prodrive/atlas/vpd.c:
https://review.coreboot.org/c/coreboot/+/68137/comment/8616899c_49f2cc14 PS11, Line 36: PN_LENGTH Do you need this in the read_region code? reading 4byte aligned data and dealing with it later is probably easier.