Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35463 )
Change subject: device/mmio.h: Add bit field helpers ......................................................................
Patch Set 13:
Hmm, why is the API mixing host endianness with little-endian in the SET case? Is that intentional?
I think it's just because we didn't have a clrsetbits() primitive that works directly on host endianness, and we don't have a big-endian architecture anyway. It's meant to be host endianness.
Right. If there was clrsetbits32 I'd definitely use them. Julius and I had discussion on this and the conclusion is there's no active platform using bigendian today in coreboot (the only exception was MIPS, which was going to be dropped) so we can make the change.
People try to get Power9 running and even though that has configurable endianness, they have specified that the firmware runs with big-endian. I've also seen past attempts to get PowerPC support back in, for current SoCs... but everyone is running into trouble because too much code assumes little-endian by now.