Attention is currently required from: Kevin Paul Herbert.
Nico Huber has posted comments on this change by Kevin Paul Herbert. ( https://review.coreboot.org/c/coreboot/+/7784?usp=email )
Change subject: x86: Change MMIO addr in readN(addr)/writeN(addr, val) to pointer ......................................................................
Patch Set 10:
(1 comment)
File src/device/azalia_device.c:
https://review.coreboot.org/c/coreboot/+/7784/comment/e60449bd_cb3f826b?usp=... : PS10, Line 62: codec_detect(u8 *base)
Please why the "base" changed from `u32` to `u8`?
It didn't. It was changed to a pointer to `u8`. That's a different type. The reason `u8 *` is used is that there is pointer arithmetic going on, e.g. ``` if (set_bits(base + 0x08, ... ``` If we want this `+ 0x08` to mean 8 *bytes* higher in memory, the pointer needs to point to something of 1B size. (some people use `void *` instead which works too if one knows that the compiler implies a size of 1B but it's not standard C).
shouldn't be `uintptr_t`
Not in the context of this patch. The summary says: "x86: Change [...] to pointer". So the intention was to make more use of pointers. Back then we didn't have the readXXp()/writeXXp() versions, so using pointers avoided a lot of casts, I guess.