On Mon, Aug 27, 2012 at 04:05:36PM +0200, Christian Gmeiner wrote:
Maybe I am too blind but I don't get it:
out/../vgasrc/geodevga.c: In function ‘init_video_mode’: out/../vgasrc/geodevga.c:443:11: error: variable or field ‘__val’ declared void out/../vgasrc/geodevga.c:443:11: warning: dereferencing ‘void *’ pointer [enabled by default] out/../vgasrc/geodevga.c:443:11: warning: dereferencing ‘void *’ pointer [enabled by default] out/../vgasrc/geodevga.c:443:11: warning: dereferencing ‘void *’ pointer [enabled by default] out/../vgasrc/geodevga.c:443:11: warning: dereferencing ‘void *’ pointer [enabled by default] out/../vgasrc/geodevga.c:443:11: warning: taking address of expression of type ‘void’ [enabled by default] make: *** [out/vgaccode16.raw.s] Error 1
void *VG = (void *)pci_config_readl(GET_GLOBAL(VgaBDF), PCI_BASE_ADDRESS_3); ... u32 val = GET_FARVAR(0, *(VG + 0x50));
I only want to read a u32 value with offset to 0x50 from VG.
You can't read a void*, so use: GET_FARVAR(0, *(u32*)(VG + 0x50));
-Kevin