Subrata Banik has posted comments on this change. ( https://review.coreboot.org/18669 )
Change subject: soc/intel/common/block: Add Intel common PCR support ......................................................................
Patch Set 5:
(3 comments)
https://review.coreboot.org/#/c/18669/5/src/soc/intel/common/block/include/i... File src/soc/intel/common/block/include/intelblocks/pcr.h:
PS5, Line 20: #include <stddef.h>
What is this required for?
for size_t used in pcr.c
https://review.coreboot.org/#/c/18669/5/src/soc/intel/common/block/pcr/pcr.c File src/soc/intel/common/block/pcr/pcr.c:
Line 112: read32(pcr_reg_address(pid, offset));
Again, this is still wrong. offset could be misaligned. Therefore you shoul
as per PCH recommendation it should be a 32 bit dummy read, hence we could do something like this, to ensure its always a DWORD align address
read32(pcr_reg_address(pid, (offset & 0xFFFC)));
Also, why are you recalculating pcr_reg_address() ?
with above logic, now we again need to recalculate pcr address, isn't it?
PS5, Line 117: int
The fact that pcr_read32() and pcr_write32() are returning return codes is
so, you are recommending to assert rather returning -1 because "caller" don't bother abut return parameter.