Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38647 )
Change subject: drivers/intel/gma/edid: Use byte swap function ......................................................................
Patch Set 1: Code-Review-1
(3 comments)
https://review.coreboot.org/c/coreboot/+/38647/1/src/drivers/intel/gma/edid.... File src/drivers/intel/gma/edid.c:
https://review.coreboot.org/c/coreboot/+/38647/1/src/drivers/intel/gma/edid.... PS1, Line 94: reg32
Do you mean `swab32(read32(GMBUS3_ADDR)`?
Yes, but I think it won't work.
https://review.coreboot.org/c/coreboot/+/38647/1/src/drivers/intel/gma/edid.... PS1, Line 96: edid[4 * i] = swab32(reg32);
I’d think, that all four bytes are written. But I still need to test it.
Well, if you looked at the disassembly right before this, can't you just check if the code will write the 32-bit value or will just cast it?
https://review.coreboot.org/c/coreboot/+/38647/1/src/drivers/intel/gma/edid.... PS1, Line 96: edid Call me cursed, buuut... What if you do a pointer cast and use an u32* here? This would make the byteswap unnecessary.