Attention is currently required from: Maximilian Brune, Patrick Rudolph, Philipp Hug, ron minnich.
Patch set 5:Code-Review +2
2 comments:
File src/arch/riscv/include/arch/memlayout.h:
Patch Set #5, Line 27: opensbi
I am actually a little uncertain about that. If I choose to use: […]
+1 to what Max said, I think we should stick to the convention that all macros always take address and size. We could instead eliminate the redundant Kconfig as I suggested above, so that the address defined in memlayout becomes meaningful on its own.
File src/arch/riscv/include/arch/memlayout.h:
Patch Set #3, Line 24: #if CONFIG(RISCV_OPENSBI)
Honestly I am not a fan of the whole static addressing approach. […]
Well, the original idea behind having the address everywhere was that memlayout files can serve as both definition and documentation at once, so that if you want to know which address a certain region is mapped at you can simply look it up in the file. Of course, that requires that you write absolute offsets rather than your `FU540_L2LIM + ...` notation. (I don't think it's error-prone because any typos you make that would lead to overlaps get caught at build-time.)
You're not generally supposed to do the if-else thing for optional features. It only really makes sense when you really have an exclusive-or situation (where only one or the other case can be active, but not both). This normally only happens for stages (e.g. how `OVERLAP_VERSTAGE_ROMSTAGE()` is implemented), or for very rare cases where there's an exclusive choice of implementations (e.g. if we had support for both TF-A and another Secure Monitor on arm64, then overlapping the regions for them like this might make sense). But for anything that's independently optional, we want all of those regions in the layout unconditionally because we don't want to get into a situation where a certain board only builds when you enable a limited subset of optional features, but doesn't fit the available space when you enable all of them at once.
To view, visit change 77974. To unsubscribe, or for help writing mail filters, visit settings.