lkml.org 
[lkml]   [2000]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] agpgart oops & chipset support, patch against 2.4.0-test6-pre2
Hi guys. I have compiled in AGP + VIA chipset support into the kernel (not as
a module). Well, it seems like a nasty oops appears if the agp backend code
does not detect your card from its default list of chipsets.

I have the output of the Oops in the following text, and I can determine the
cause is most likely the variable agp_bridge.current_size is NULL on line 306
of agpgart_be.c. However, I believe the problem is more than a quick one-liner
fix; rather the code should not go beyond the point of detecting the card and
returning anything significant for AGP support if the card is not valid.

Of course, there's another possibility too: Default the Via chipset to the
generic card if it can't find it, and take out the module parameter. Anyways,
I'll leave that up to the agpgart developer(s) to decide.

However, please apply the attached patch to the latest kernel that allows
support for my Via chipset (86C686 / 8371). You'll find this in any Epox
EP-7KXA motherboard (rev. 0.4).

---ksymoops report follows:---

Unable to handle kernel NULL pointer dereference at virtual address 00000000
c01ade02
*pde = 00000000
Oops: 0000
CPU: 0
EIP: 0010:[<c01ade02>]
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010297
eax: 00000000 ebx: c12bb400 ecx: 00000000 edx: 00000000
esi: c028ae80 edi: c12bb420 ebp: c12bb400 esp: c1259f9c
ds: 0018 es: 0018 ss: 0018
Stack: c01ade5e c028ae3c c12bb43c c01b6cfb c12bb400 00000000 c028a800 c02e0388
c02dfc60 00000001 c0faff35 c02c7788 c0295fd8 00000000 0008e000 c0296bfa
00000f00 c0296c3a c0107007 00000f00 c0295fd8 c0108aa8 00000000 00000078
Call Trace: [<c01ade5e>] [<c01b6efb>] [<c01aff35>] [<c0107007>] [<c0108aa8>]
Code: 8b 00 c3 31 c0 c3 90 8d b4 26 00 00 00 00 57 53 8b 5c 24 0c

>>EIP; c01ade02 <agp_return_size+12/20> <=====
Trace; c01ade5e <agp_copy_info+4e/70>
Trace; c01b6efb <drm_agp_init+bb/1f0>
Trace; c01aff35 <mga_init+115/1f0>
Trace; c0107007 <init+7/110>
Trace; c0108aa8 <kernel_thread+28/40>
Code; c01ade02 <agp_return_size+12/20>
00000000 <_EIP>:
Code; c01ade02 <agp_return_size+12/20> <=====
0: 8b 00 mov (%eax),%eax <=====
Code; c01ade04 <agp_return_size+14/20>
2: c3 ret
Code; c01ade05 <agp_return_size+15/20>
3: 31 c0 xor %eax,%eax
Code; c01ade07 <agp_return_size+17/20>
5: c3 ret
Code; c01ade08 <agp_return_size+18/20>
6: 90 nop
Code; c01ade09 <agp_return_size+19/20>
7: 8d b4 26 00 00 00 00 lea 0x0(%esi,1),%esi
Code; c01ade10 <agp_copy_info+0/70>
e: 57 push %edi
Code; c01ade11 <agp_copy_info+1/70>
f: 53 push %ebx
Code; c01ade12 <agp_copy_info+2/70>
10: 8b 5c 24 0c mov 0xc(%esp,1),%ebx

Kernel panic: Attempted to kill init!


--
Byron Stanoszek Ph: (330) 644-3059
Systems Programmer Fax: (330) 644-8110
Commercial Timesharing Inc. Email: bstanoszek@comtime.com
--- linux/drivers/char/drm/agpsupport.c.bak Thu Aug 3 23:54:44 2000
+++ linux/drivers/char/drm/agpsupport.c Thu Aug 3 23:23:27 2000
@@ -289,20 +289,21 @@
(*drm_agp.copy_info)(&head->agp_info);
head->memory = NULL;
switch (head->agp_info.chipset) {
- case INTEL_GENERIC: head->chipset = "Intel"; break;
- case INTEL_LX: head->chipset = "Intel 440LX"; break;
- case INTEL_BX: head->chipset = "Intel 440BX"; break;
- case INTEL_GX: head->chipset = "Intel 440GX"; break;
- case INTEL_I810: head->chipset = "Intel i810"; break;
- case VIA_GENERIC: head->chipset = "VIA"; break;
- case VIA_VP3: head->chipset = "VIA VP3"; break;
- case VIA_MVP3: head->chipset = "VIA MVP3"; break;
- case VIA_APOLLO_PRO: head->chipset = "VIA Apollo Pro"; break;
- case SIS_GENERIC: head->chipset = "SiS"; break;
- case AMD_GENERIC: head->chipset = "AMD"; break;
- case AMD_IRONGATE: head->chipset = "AMD Irongate"; break;
- case ALI_GENERIC: head->chipset = "ALi"; break;
- case ALI_M1541: head->chipset = "ALi M1541"; break;
+ case INTEL_GENERIC: head->chipset = "Intel"; break;
+ case INTEL_LX: head->chipset = "Intel 440LX"; break;
+ case INTEL_BX: head->chipset = "Intel 440BX"; break;
+ case INTEL_GX: head->chipset = "Intel 440GX"; break;
+ case INTEL_I810: head->chipset = "Intel i810"; break;
+ case VIA_GENERIC: head->chipset = "VIA"; break;
+ case VIA_VP3: head->chipset = "VIA VP3"; break;
+ case VIA_MVP3: head->chipset = "VIA MVP3"; break;
+ case VIA_APOLLO_PRO: head->chipset = "VIA Apollo Pro"; break;
+ case VIA_APOLLO_SUPER: head->chipset = "VIA Apollo Super"; break;
+ case SIS_GENERIC: head->chipset = "SiS"; break;
+ case AMD_GENERIC: head->chipset = "AMD"; break;
+ case AMD_IRONGATE: head->chipset = "AMD Irongate"; break;
+ case ALI_GENERIC: head->chipset = "ALi"; break;
+ case ALI_M1541: head->chipset = "ALi M1541"; break;
default:
}
DRM_INFO("AGP %d.%d on %s @ 0x%08lx %dMB\n",
--- linux/drivers/char/agp/agpgart_be.c.bak Sun Jul 9 02:41:10 2000
+++ linux/drivers/char/agp/agpgart_be.c Thu Aug 3 23:50:28 2000
@@ -2114,6 +2114,12 @@
#endif /* CONFIG_AGP_SIS */

#ifdef CONFIG_AGP_VIA
+ { PCI_DEVICE_ID_VIA_8371_0,
+ PCI_VENDOR_ID_VIA,
+ VIA_APOLLO_SUPER,
+ "Via",
+ "Apollo Super",
+ via_generic_setup },
{ PCI_DEVICE_ID_VIA_8501_0,
PCI_VENDOR_ID_VIA,
VIA_MVP4,
@@ -2183,16 +2189,15 @@
* there is a 'generic' bridge entry for this vendor */
if (agp_try_unsupported && agp_bridge_info[i].device_id == 0) {
printk(KERN_WARNING PFX "Trying generic %s routines"
- " for device id: %x\n",
+ " for device id: %04x\n",
agp_bridge_info[i].vendor_name, pdev->device);
agp_bridge.type = agp_bridge_info[i].chipset;
return agp_bridge_info[i].chipset_setup (pdev);
}

- printk(KERN_ERR PFX "Unsupported %s chipset,"
- " you might want to try "
- "agp_try_unsupported=1.\n",
- agp_bridge_info[i].vendor_name);
+ printk(KERN_ERR PFX "Unsupported %s chipset (device id: %04x),"
+ " you might want to try agp_try_unsupported=1.\n",
+ agp_bridge_info[i].vendor_name, pdev->device);
return -ENODEV;
}

--- linux/include/linux/agp_backend.h.bak Thu Aug 3 23:19:45 2000
+++ linux/include/linux/agp_backend.h Thu Aug 3 23:27:37 2000
@@ -50,6 +50,7 @@
VIA_VP3,
VIA_MVP3,
VIA_MVP4,
+ VIA_APOLLO_SUPER,
VIA_APOLLO_PRO,
SIS_GENERIC,
AMD_GENERIC,
\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.058 / U:1.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site