From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerald Britton Subject: Re: xen and agpgart Date: Fri, 3 Sep 2004 23:11:35 -0400 Sender: xen-devel-admin@lists.sourceforge.net Message-ID: <20040904031135.GA8938@fog.sekrit.org> References: <20040904011922.GA6505@fog.sekrit.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Keir Fraser Cc: xen-devel@lists.sourceforge.net List-Id: xen-devel@lists.xenproject.org > Hmmmm.... I think the problem is people using virt_to_phys() instead > of virt_to_bus(). I would have expected the latter to be correct > really. I'll take a look at uses of ioremap() and ioremap_nocache() > throughout Linux. It may be there's a simple fix that will work for all > uses... You could try manually changing the address passed in to > virt_to_bus() and see if you get fiurther. Ok. I've gone through and tweaked a little to see if I could make some more forward progress. I've basically done s/virt_to_page/virt_to_bus/ and have gotten the system to initialize, when X starts though, I run into another one of those pagetable tweaking oopses (below). The code which is executing here is pretty straightforward: #define map_page_into_agp(page) change_page_attr(page, 1, PAGE_KERNEL_NOCACHE) void *agp_generic_alloc_page(void) { struct page * page; page = alloc_page(GFP_KERNEL); if (page == NULL) return NULL; map_page_into_agp(page); get_page(page); SetPageLocked(page); atomic_inc(&agp_bridge->current_memory_agp); return page_address(page); } With the code blowing up inside the change_page_attr(). Oops detail below. -- Gerald Linux agpgart interface v0.100 (c) Dave Jones agpgart: Detected an Intel 855PM Chipset. agpgart: Maximum main memory to use for agp memory: 440M agpgart: AGP aperture is 256M @ 0xd0000000 [drm] Initialized radeon 1.11.0 20020828 on minor 0: ioperm not fully supported - set iopl to 3 ioperm not fully supported - ignore resource release ioperm not fully supported - ignore resource release agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0. agpgart: Putting AGP V2 device at 0000:00:00.0 into 1x mode agpgart: Putting AGP V2 device at 0000:01:00.0 into 1x mode Unable to handle kernel paging request at virtual address c0102d64 printing eip: c0117ff8 *pde = ma 0308b067 pa 0048b067 *pte = ma 02c02061 pa 00002061 [] __change_page_attr+0x14e/0x21e [] change_page_attr+0x7a/0x8f [] agp_generic_alloc_page+0x3c/0x65 [agpgart] [] agp_allocate_memory+0x72/0xd2 [agpgart] [] radeon_agp_allocate_memory+0x22/0x2a [radeon] [] radeon_agp_alloc+0xb9/0x1a2 [radeon] [] inflate_dynamic+0x428/0x5f5 [] radeon_ioctl+0xc9/0x13f [radeon] [] inflate_dynamic+0x428/0x5f5 [] inflate_dynamic+0x428/0x5f5 [] radeon_ioctl+0x0/0x13f [radeon] [] sys_ioctl+0xf7/0x24c [] inflate_dynamic+0x428/0x5f5 [] syscall_call+0x7/0xb [] inflate_dynamic+0x428/0x5f5 Oops: 0003 [#1] PREEMPT Modules linked in: radeon intel_agp agpgart ds yenta_socket pcmcia_core ip_tables vfat fat ehci_hcd uhci_hcd CPU: 0 EIP: 0061:[] Not tainted EFLAGS: 00013202 (2.6.8.1-xen0) EIP is at set_pmd_pte+0xe/0x8a eax: c0102d64 ebx: 190000e3 ecx: d66c0000 edx: d66c0000 esi: c05e4b00 edi: 191c0063 ebp: c1109c80 esp: d3565eb0 ds: 0069 es: 0069 ss: 0069 Process X (pid: 2354, threadinfo=d3564000 task=df8091e0) Stack: c0102d64 c05e4b00 c01181c2 c0102d64 d66c0000 190000e3 d66c0000 c13cb800 00000000 00000000 00000000 c011830c c13cb800 00000073 c13cb800 00000000 00000800 00000000 e110f58e c13cb800 00000001 00000073 e00f5500 e110e7e7 Call Trace: [] __change_page_attr+0x14e/0x21e [] change_page_attr+0x7a/0x8f [] agp_generic_alloc_page+0x3c/0x65 [agpgart] [] agp_allocate_memory+0x72/0xd2 [agpgart] [] radeon_agp_allocate_memory+0x22/0x2a [radeon] [] radeon_agp_alloc+0xb9/0x1a2 [radeon] [] inflate_dynamic+0x428/0x5f5 [] radeon_ioctl+0xc9/0x13f [radeon] [] inflate_dynamic+0x428/0x5f5 [] inflate_dynamic+0x428/0x5f5 [] radeon_ioctl+0x0/0x13f [radeon] [] sys_ioctl+0xf7/0x24c [] inflate_dynamic+0x428/0x5f5 [] syscall_call+0x7/0xb [] inflate_dynamic+0x428/0x5f5 Code: 89 18 a1 40 87 3f c0 0f b6 70 01 c6 40 01 01 b8 00 e0 ff ff ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click