Attention is currently required from: Fred Reitberger, Jason Glenesk, Martin L Roth, Matt DeVillier, Nick Kochlowski, Varshit Pandya.
Felix Held has posted comments on this change by Nick Kochlowski. ( https://review.coreboot.org/c/coreboot/+/85634?usp=email )
Change subject: drivers/amd/opensil/memmap.c: Factor out common memmap code to driver ......................................................................
Patch Set 16:
(4 comments)
File src/drivers/amd/opensil/memmap.c:
https://review.coreboot.org/c/coreboot/+/85634/comment/1d5d3b2f_629fa159?usp... : PS16, Line 18: int i'd expect this to be an unsigned int. iirc this is implementation defined though. from looking at the uint32_t padding after the type field, i'd expect the type field to be assumed to always be an uint32_t so that the struct has a total size of 3 QWORDs. in coreboot unsigned int and uint32_t are identical, so i'd use uint32_t here
File src/vendorcode/amd/opensil/genoa_poc/memmap.c:
https://review.coreboot.org/c/coreboot/+/85634/comment/01c755ee_2fadd06d?usp... : PS16, Line 10: int i'd expect this to be an unsigned int or possibly uint32_t
https://review.coreboot.org/c/coreboot/+/85634/comment/0866af67_04a0b235?usp... : PS16, Line 37: for (i = 0; i < ARRAY_SIZE(types); i++) : if (enum_type == types[i].type) : break; : if (i == ARRAY_SIZE(types)) : return "Unknown type"; : return types[i].string; something for another patch, which is why i mark it as resolved, but this code can be rewritten to make it easier to read:
for (i = 0; i < ARRAY_SIZE(types); i++) if (enum_type == types[i].type) return types[i].string; return "Unknown type";
https://review.coreboot.org/c/coreboot/+/85634/comment/f635fea7_b838da13?usp... : PS16, Line 51: *hole_info = NULL; i'd also set n_holes to 0 in the error case just to be sure. maybe top_of_mem too?