[coreboot] [patch] i82810 WIP for fixing VGA and 512MB

Joseph Smith joe at settoplinux.org
Mon Nov 17 04:30:43 CET 2008




On Mon, 17 Nov 2008 04:25:34 +0200, "Elia Yehuda" <z4ziggy at gmail.com>
wrote:
> Those 2 patches are one step towards having a working Onboard-VGA
> and 512MB (the max for i810). The raminit.c patch fixes some
> misconfigurations and probes the DIMMs correctly (all dual-sided are
> now recognized properly), and also set buffer_strength to handle 2
> DIMMs although atm this doesn't work. The i82810/northbridge.c patch
> takes care of allocating Onboard-VGA memory.
> 
> Signed-off-by: Elia Yehuda <z4ziggy at gmail.com>

Sorry I'm going to have to nack your northbridge.patch.

Your VGA memory has to be subtracted from tomk in kb,like this:

#ifdef CONFIG_VIDEO_MB
		/* check for VGA reserved memory 
		 * possible CONFIG_VIDEO_MB values are 512(kb) and 1(mb)
		 */
		if (CONFIG_VIDEO_MB == 512) {
			tomk -= 512;
		} else if (CONFIG_VIDEO_MB == 1) {
			tomk -= 1024;
		} else {
                           /* assume no vga if incorrect value */
 			tomk == tomk;
#endif

Also Make sure you have already set the CONFIG_VIDEO_MB value in your
northbridge vga memory register. I would recomend this earlier in
raminit.c. Clue from i82830 raminit.c:

         /* Set the value for GMCH Control Register #1 */ 
         switch (CONFIG_VIDEO_MB) { 
         case 512: /* 512K of memory */ 
                 igd_memory = 0x2; 
                 break; 
         case 1: /* 1M of memory */ 
                 igd_memory = 0x3; 
                 break; 
         case 8: /* 8M of memory */ 
                 igd_memory = 0x4; 
                 break; 
         default: /* No memory */ 
                 pci_write_config16(ctrl->d0, GCC1, 0x0002); 
                 igd_memory = 0x0; 
         } 

         value = pci_read_config16(ctrl->d0, GCC1); 
         value |= igd_memory << 4; 
         pci_write_config16(ctrl->d0, GCC1, value); 


Hope that helps.

-- 
Thanks,
Joseph Smith
Set-Top-Linux
www.settoplinux.org





More information about the coreboot mailing list