Attention is currently required from: Angel Pons, Arthur Heymans, Philipp Hug, ron minnich.
Maximilian Brune has posted comments on this change by Maximilian Brune. ( https://review.coreboot.org/c/coreboot/+/83056?usp=email )
Change subject: arch/riscv/pmp: Avoid race conditions in logging ......................................................................
Patch Set 2:
(5 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/83056/comment/933412eb_b258d015?usp... : PS2, Line 7: arch/riscv/pmp: Add print macro
"Add print macro" is not very informative. How about: […]
Done
https://review.coreboot.org/c/coreboot/+/83056/comment/b09ca679_7b18acfe?usp... : PS2, Line 9: This adds a printk macro in the PMP code to avoid all harts writing onto : the serial which causes crappy/broken output. :
The problem is that currently all harts/cores are printing that information on the console. […]
I marked it as solved. If you have concerns or think we can solve this better or in a more readable manner, let me know. I just chose the simplest and most performant way I could think of.
File src/arch/riscv/pmp.c:
https://review.coreboot.org/c/coreboot/+/83056/comment/2c1bfbe0_855dfc6b?usp... : PS2, Line 14: #define PMP_PRINTK(level, fmt, ...) { \ : if (read_csr(mhartid) == CONFIG_RISCV_WORKING_HARTID) \ : printk(level, fmt, __VA_ARGS__); \ : }
To avoid what https://gcc.gnu.org/onlinedocs/cpp/Swallowing-the-Semicolon. […]
Done
https://review.coreboot.org/c/coreboot/+/83056/comment/c1596f0e_24362b0f?usp... : PS2, Line 231: PMP_PRINTK(BIOS_INFO, "%s(%d, %lx) = %lx\n", __func__, idx, val, read_pmpaddr(idx));
nit: drop one tab
Done
https://review.coreboot.org/c/coreboot/+/83056/comment/76d726d5_8f5e4547?usp... : PS2, Line 234: if (read_csr(mhartid) == CONFIG_RISCV_WORKING_HARTID)
Seems redundant
Done