Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36273 )
Change subject: lib/cbmem_top: Add a common cbmem_top implementation ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36273/1/src/include/cbmem.h File src/include/cbmem.h:
https://review.coreboot.org/c/coreboot/+/36273/1/src/include/cbmem.h@77 PS1, Line 77: uintptr_t
uintptr_t may not match between stages unless we're asserting that's always the case. […]
Or let's just capture it in a comment somewhere so the assumptions aren't implicit. I personally think it's hard to assert that outside of qemu where RAM is consistently available vs a real implementation where we actually need different ISAs targeted across stages because one couldn't enter x86-64 mode, e.g., until ramstage.