void *video_hw_init(void) { GraphicDevice *gd = &ctfb; #ifndef CONFIG_SYS_CONSOLE_INFO_QUIET printf("Video: "); #endif if(!parse_coreboot_table_fb(gd)) { #ifndef CONFIG_SYS_CONSOLE_INFO_QUIET printf("No video mode configured in coreboot!\n"); #endif return NULL; } #ifndef CONFIG_SYS_CONSOLE_INFO_QUIET printf("%s\n", gd->modeIdent); #endif memset((void *)gd->pciBase, 0, gd->winSizeX * gd->winSizeY * gd->gdfBytesPP); return (void *)gd; }
void *video_hw_init(void) { GraphicDevice *gdev = &ctfb; int bits_per_pixel; printf("Video: "); if (!parse_coreboot_table_fb(gdev)) { printf("No video mode configured in coreboot!\n"); return NULL; } bits_per_pixel = gdev->gdfBytesPP * 8; /* fill in Graphic device struct */ sprintf(gdev->modeIdent, "%dx%dx%d", gdev->winSizeX, gdev->winSizeY, bits_per_pixel); printf("%s\n", gdev->modeIdent); memset((void *)gdev->pciBase, 0, gdev->winSizeX * gdev->winSizeY * gdev->gdfBytesPP); return (void *)gdev; }