op-build icon indicating copy to clipboard operation
op-build copied to clipboard

pnor: Mark HBB/HBI partitions as read-only

Open anoo1 opened this issue 6 years ago • 6 comments

This is a follow-up issue for commit https://github.com/open-power/pnor/commit/2f4e88c64aace62165122af6e5d336c7465c65be where the PNOR partitions were marked read-only, except for HBB/HBI due to some issues found during testing.

This issue is to resolve the problems found and mark HBB/HBI as read-only partitions, otherwise they can be modified on the PNOR chip.

anoo1 avatar Mar 28 '18 15:03 anoo1

I know @amboar has been working on some mbox fun with r/w windows for r/o sections and solidifying that behavior. Do we know what the issues were?

ghost avatar Mar 28 '18 21:03 ghost

@IlyaSmirnov91 mentioned that the system would hang during the power on when these partitions were marked read-only in the xml. Some early theories were the host mbox driver, also the read only flag has implications in hostboot code since it effectively prevents paging out of the memory pages.

The changes from @amboar are focused on the BMC side, these issues appear to be on the host side.

anoo1 avatar Mar 28 '18 22:03 anoo1

Hostboot shouldn't page out modified pages in read only sections though... otherwise it's modifying itself for future IPLs which sounds... not ideal (and would break secure boot)

ghost avatar Mar 28 '18 23:03 ghost

If I remember correctly, it is tied to how our VMM works. There is a strange (and likely incorrect) association between the PNOR permissions and our page permissions. So something in the bowels of that was leading to the problem where we ended up having pages stuck in memory because we couldn't get rid of them. My memory is pretty foggy though so this is a lot of speculation.

dcrowell77 avatar Mar 29 '18 15:03 dcrowell77

For the record, the BMC-side patches @stewart-ibm mentioned (which are currently only relevant on Witherspoon) are now integrated into OpenBMC, though from the input above sound unlikely have any impact on the problem.

amboar avatar Apr 09 '18 02:04 amboar

Do we have all the pieces for this upstream now? Should we close this issue?

ghost avatar Nov 09 '18 00:11 ghost