From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta01.eonet.ne.jp ([203.140.81.45]) by ur; Fri Jul 8 21:49:42 EDT 2016 Received: from vaioL.jitaku.localdomain (101-141-37-76f1.osk3.eonet.ne.jp [101.141.37.76]) by mailmsa12.mozu.eo.k-opti.ad.jp with ESMTP id u691napD006871 for <9front@9front.org>; Sat, 9 Jul 2016 10:49:36 +0900 To: 9front@9front.org Subject: Re: [9front] core-i3 and vesa mode Date: Sat, 9 Jul 2016 10:49:35 +0900 From: kokamoto@hera.eonet.ne.jp Message-ID: <9f08cb0759674530b8a899a5311341c9@vaioL.jitaku.localdomain> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: immutable GPU solution I don't understand it well. Then, I added print() commands in gmsize() of /sys/src/9/pc/vgaigfx.c: static uintptr gmsize(Pcidev *pci, void *mmio) { u32int x, i, npg, *gtt; print("stolen index = %d\n", (pcicfgr16(pci, 0x50)>>3) & 0x1f); print("stolenmb = %d\n", (u32int)stolenmb(pci)); npg = stolenmb(pci)<<(20-12); print("npg = %ux\n", npg); if(npg == 0) return 0; gtt = (u32int*)((uchar*)mmio + pci->mem[0].size/2); print("gtt = 0x%ux\n", *gtt); if((gtt[0]&1) == 0) return 0; x = (gtt[0]>>12)+1; print("x = 0x%ux\n", x); for(i=1; i>12) != x) break; x++; } print("i = %ud\n", i); if(1) print("igfx: graphics memory at %p-%p (%ud MB)\n", (uintptr)(x-i)<<12, (uintptr)x<<12, (i>>(20-12))); return (uintptr)i<<12; } I boote up the system with BIOS menu of: Aperture size = 256MB, GTT size= 2MB, DVMT Pre-Allocated = 64 MB, DVMT Total Gfx Mem = MAX and got the results like: stolen index = 2, stolenMB = 62, npg = 3e00, gtt = 0xdba00001 x = 0xdba01, i=15872 igfx: graphics memory at dba00000-df800000 (62MB) storage = 0x3dfc000 I think those values are reasonable. However, in this case pci commands reports for the video device: 02.0: vid 03.00.00 8086/0152 11 0:f7800004 4194304 2:e000000c 268435456 4:0000f0001 64. As seen from the result, our graphics memory is out of the range of e000000c - (e000000c + 268435456). Of course, the system stalls after the print() command. How do you think? Kenji