On Thursday, March 12, 2015 10:35:23 PM Mono wrote:
is it just me? trying to build coreboot for a X60 motherboard or a macbook21 fails with tons of the following error:
src/northbridge/intel/i945/gma.c: In function 'gtt_setup': src/northbridge/intel/i945/gma.c:72:10: error: passing argument 1 of 'write32' makes pointer from integer without a cast [-Werror] write32(mmiobase + GFX_FLSH_CNTL, 0); ^
Yeah. I broke that one. write32() takes a void * (as opposed to long int), so you'll have to pass it void pointers,
In file included from src/include/device/pci.h:23:0, from src/northbridge/intel/i945/gma.c:24: src/arch/x86/include/arch/io.h:170:51: note: expected 'volatile void *' but argument is of type 'unsigned int' static inline __attribute__((always_inline)) void write32(volatile void *addr, uint32_t value) ^ src/northbridge/intel/i945/gma.c:74:10: error: passing argument 1 of 'write32' makes pointer from integer without a cast [-Werror] write32(mmiobase + PGETBL_CTL, PGETBL_save);
I figured this error occurs since commit bde6d309 (x86: Change MMIO addr in readN(addr)/writeN(addr, val) to pointer). I don't know how to fix it though or did I configured any wrong? Any help is much appreciated.
You can make mmiobase a uint8_t * then you can use the same pointer arithmetic as before.
Alex
greets Mono