2 * Copyright 2001-2003 SuSE Labs.
3 * Distributed under the GNU public license, v2.
5 * This is a GART driver for the AMD Opteron/Athlon64 on-CPU northbridge.
6 * It also includes support for the AMD 8151 AGP bridge,
7 * although it doesn't actually do much, as all the real
8 * work is done in the northbridge(s).
11 #include <linux/config.h>
12 #include <linux/module.h>
13 #include <linux/pci.h>
14 #include <linux/init.h>
15 #include <linux/agp_backend.h>
16 #include <asm/page.h> /* PAGE_SIZE */
19 /* Will need to be increased if AMD64 ever goes >8-way. */
20 #define MAX_HAMMER_GARTS 8
24 #define GPTE_COHERENT 2
26 /* Aperture control register bits. */
28 #define DISGARTCPU (1<<4)
29 #define DISGARTIO (1<<5)
31 /* GART cache control register bits. */
32 #define INVGART (1<<0)
33 #define GARTPTEERR (1<<1)
35 /* K8 On-cpu GART registers */
36 #define AMD64_GARTAPERTURECTL 0x90
37 #define AMD64_GARTAPERTUREBASE 0x94
38 #define AMD64_GARTTABLEBASE 0x98
39 #define AMD64_GARTCACHECTL 0x9c
40 #define AMD64_GARTEN (1<<0)
42 /* NVIDIA K8 registers */
43 #define NVIDIA_X86_64_0_APBASE 0x10
44 #define NVIDIA_X86_64_1_APBASE1 0x50
45 #define NVIDIA_X86_64_1_APLIMIT1 0x54
46 #define NVIDIA_X86_64_1_APSIZE 0xa8
47 #define NVIDIA_X86_64_1_APBASE2 0xd8
48 #define NVIDIA_X86_64_1_APLIMIT2 0xdc
50 /* ULi K8 registers */
51 #define ULI_X86_64_BASE_ADDR 0x10
52 #define ULI_X86_64_HTT_FEA_REG 0x50
53 #define ULI_X86_64_ENU_SCR_REG 0x54
56 static struct pci_dev * hammers[MAX_HAMMER_GARTS];
58 static struct resource *aperture_resource;
59 static int __initdata agp_try_unsupported = 1;
61 static int gart_iterator;
62 #define for_each_nb() for(gart_iterator=0;gart_iterator<nr_garts;gart_iterator++)
64 static void flush_amd64_tlb(struct pci_dev *dev)
68 pci_read_config_dword (dev, AMD64_GARTCACHECTL, &tmp);
70 pci_write_config_dword (dev, AMD64_GARTCACHECTL, tmp);
73 static void amd64_tlbflush(struct agp_memory *temp)
76 flush_amd64_tlb(hammers[gart_iterator]);
79 static int amd64_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
81 int i, j, num_entries;
85 num_entries = agp_num_entries();
87 if (type != 0 || mem->type != 0)
90 /* Make sure we can fit the range in the gatt table. */
91 /* FIXME: could wrap */
92 if (((unsigned long)pg_start + mem->page_count) > num_entries)
97 /* gatt table should be empty. */
98 while (j < (pg_start + mem->page_count)) {
99 if (!PGE_EMPTY(agp_bridge, readl(agp_bridge->gatt_table+j)))
104 if (mem->is_flushed == FALSE) {
105 global_cache_flush();
106 mem->is_flushed = TRUE;
109 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
110 tmp = agp_bridge->driver->mask_memory(agp_bridge,
111 mem->memory[i], mem->type);
113 BUG_ON(tmp & 0xffffff0000000ffcULL);
114 pte = (tmp & 0x000000ff00000000ULL) >> 28;
115 pte |=(tmp & 0x00000000fffff000ULL);
116 pte |= GPTE_VALID | GPTE_COHERENT;
118 writel(pte, agp_bridge->gatt_table+j);
119 readl(agp_bridge->gatt_table+j); /* PCI Posting. */
126 * This hack alters the order element according
127 * to the size of a long. It sucks. I totally disown this, even
128 * though it does appear to work for the most part.
130 static struct aper_size_info_32 amd64_aperture_sizes[7] =
132 {32, 8192, 3+(sizeof(long)/8), 0 },
133 {64, 16384, 4+(sizeof(long)/8), 1<<1 },
134 {128, 32768, 5+(sizeof(long)/8), 1<<2 },
135 {256, 65536, 6+(sizeof(long)/8), 1<<1 | 1<<2 },
136 {512, 131072, 7+(sizeof(long)/8), 1<<3 },
137 {1024, 262144, 8+(sizeof(long)/8), 1<<1 | 1<<3},
138 {2048, 524288, 9+(sizeof(long)/8), 1<<2 | 1<<3}
143 * Get the current Aperture size from the x86-64.
144 * Note, that there may be multiple x86-64's, but we just return
145 * the value from the first one we find. The set_size functions
146 * keep the rest coherent anyway. Or at least should do.
148 static int amd64_fetch_size(void)
153 struct aper_size_info_32 *values;
159 pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &temp);
161 values = A_SIZE_32(amd64_aperture_sizes);
163 for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) {
164 if (temp == values[i].size_value) {
165 agp_bridge->previous_size =
166 agp_bridge->current_size = (void *) (values + i);
168 agp_bridge->aperture_size_idx = i;
169 return values[i].size;
176 * In a multiprocessor x86-64 system, this function gets
177 * called once for each CPU.
179 static u64 amd64_configure (struct pci_dev *hammer, u64 gatt_table)
185 /* Address to map to */
186 pci_read_config_dword (hammer, AMD64_GARTAPERTUREBASE, &tmp);
187 aperturebase = tmp << 25;
188 aper_base = (aperturebase & PCI_BASE_ADDRESS_MEM_MASK);
190 /* address of the mappings table */
191 addr = (u64) gatt_table;
195 pci_write_config_dword (hammer, AMD64_GARTTABLEBASE, tmp);
197 /* Enable GART translation for this hammer. */
198 pci_read_config_dword(hammer, AMD64_GARTAPERTURECTL, &tmp);
200 tmp &= ~(DISGARTCPU | DISGARTIO);
201 pci_write_config_dword(hammer, AMD64_GARTAPERTURECTL, tmp);
203 /* keep CPU's coherent. */
204 flush_amd64_tlb (hammer);
210 static struct aper_size_info_32 amd_8151_sizes[7] =
212 {2048, 524288, 9, 0x00000000 }, /* 0 0 0 0 0 0 */
213 {1024, 262144, 8, 0x00000400 }, /* 1 0 0 0 0 0 */
214 {512, 131072, 7, 0x00000600 }, /* 1 1 0 0 0 0 */
215 {256, 65536, 6, 0x00000700 }, /* 1 1 1 0 0 0 */
216 {128, 32768, 5, 0x00000720 }, /* 1 1 1 1 0 0 */
217 {64, 16384, 4, 0x00000730 }, /* 1 1 1 1 1 0 */
218 {32, 8192, 3, 0x00000738 } /* 1 1 1 1 1 1 */
221 static int amd_8151_configure(void)
223 unsigned long gatt_bus = virt_to_gart(agp_bridge->gatt_table_real);
225 /* Configure AGP regs in each x86-64 host bridge. */
227 agp_bridge->gart_bus_addr =
228 amd64_configure(hammers[gart_iterator],gatt_bus);
234 static void amd64_cleanup(void)
239 /* disable gart translation */
240 pci_read_config_dword (hammers[gart_iterator], AMD64_GARTAPERTURECTL, &tmp);
241 tmp &= ~AMD64_GARTEN;
242 pci_write_config_dword (hammers[gart_iterator], AMD64_GARTAPERTURECTL, tmp);
247 static struct agp_bridge_driver amd_8151_driver = {
248 .owner = THIS_MODULE,
249 .aperture_sizes = amd_8151_sizes,
250 .size_type = U32_APER_SIZE,
251 .num_aperture_sizes = 7,
252 .configure = amd_8151_configure,
253 .fetch_size = amd64_fetch_size,
254 .cleanup = amd64_cleanup,
255 .tlb_flush = amd64_tlbflush,
256 .mask_memory = agp_generic_mask_memory,
258 .agp_enable = agp_generic_enable,
259 .cache_flush = global_cache_flush,
260 .create_gatt_table = agp_generic_create_gatt_table,
261 .free_gatt_table = agp_generic_free_gatt_table,
262 .insert_memory = amd64_insert_memory,
263 .remove_memory = agp_generic_remove_memory,
264 .alloc_by_type = agp_generic_alloc_by_type,
265 .free_by_type = agp_generic_free_by_type,
266 .agp_alloc_page = agp_generic_alloc_page,
267 .agp_destroy_page = agp_generic_destroy_page,
270 /* Some basic sanity checks for the aperture. */
271 static int __devinit aperture_valid(u64 aper, u32 size)
275 printk(KERN_ERR PFX "No aperture\n");
278 if (size < 32*1024*1024) {
279 printk(KERN_ERR PFX "Aperture too small (%d MB)\n", size>>20);
282 if (aper + size > 0xffffffff) {
283 printk(KERN_ERR PFX "Aperture out of bounds\n");
286 pfn = aper >> PAGE_SHIFT;
287 for (c = 0; c < size/PAGE_SIZE; c++) {
288 if (!pfn_valid(pfn + c))
290 if (!PageReserved(pfn_to_page(pfn + c))) {
291 printk(KERN_ERR PFX "Aperture pointing to RAM\n");
296 /* Request the Aperture. This catches cases when someone else
297 already put a mapping in there - happens with some very broken BIOS
299 Maybe better to use pci_assign_resource/pci_enable_device instead
300 trusting the bridges? */
301 if (!aperture_resource &&
302 !(aperture_resource = request_mem_region(aper, size, "aperture"))) {
303 printk(KERN_ERR PFX "Aperture conflicts with PCI mapping.\n");
310 * W*s centric BIOS sometimes only set up the aperture in the AGP
311 * bridge, not the northbridge. On AMD64 this is handled early
312 * in aperture.c, but when GART_IOMMU is not enabled or we run
313 * on a 32bit kernel this needs to be redone.
314 * Unfortunately it is impossible to fix the aperture here because it's too late
315 * to allocate that much memory. But at least error out cleanly instead of
318 static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp,
321 u32 aper_low, aper_hi;
324 u32 nb_order, nb_base;
327 pci_read_config_dword(nb, 0x90, &nb_order);
328 nb_order = (nb_order >> 1) & 7;
329 pci_read_config_dword(nb, 0x94, &nb_base);
330 nb_aper = nb_base << 25;
331 if (aperture_valid(nb_aper, (32*1024*1024)<<nb_order)) {
335 /* Northbridge seems to contain crap. Try the AGP bridge. */
337 pci_read_config_word(agp, cap+0x14, &apsize);
338 if (apsize == 0xffff)
342 /* Some BIOS use weird encodings not in the AGPv3 table. */
345 order = 7 - hweight16(apsize);
347 pci_read_config_dword(agp, 0x10, &aper_low);
348 pci_read_config_dword(agp, 0x14, &aper_hi);
349 aper = (aper_low & ~((1<<22)-1)) | ((u64)aper_hi << 32);
350 printk(KERN_INFO PFX "Aperture from AGP @ %Lx size %u MB\n", aper, 32 << order);
351 if (order < 0 || !aperture_valid(aper, (32*1024*1024)<<order))
354 pci_write_config_dword(nb, 0x90, order << 1);
355 pci_write_config_dword(nb, 0x94, aper >> 25);
360 static __devinit int cache_nbs (struct pci_dev *pdev, u32 cap_ptr)
362 struct pci_dev *loop_dev = NULL;
365 /* cache pci_devs of northbridges. */
366 while ((loop_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev))
368 if (i == MAX_HAMMER_GARTS) {
369 printk(KERN_ERR PFX "Too many northbridges for AGP\n");
372 if (fix_northbridge(loop_dev, pdev, cap_ptr) < 0) {
373 printk(KERN_ERR PFX "No usable aperture found.\n");
375 /* should port this to i386 */
376 printk(KERN_ERR PFX "Consider rebooting with iommu=memaper=2 to get a good aperture.\n");
380 hammers[i++] = loop_dev;
383 return i == 0 ? -1 : 0;
386 /* Handle AMD 8151 quirks */
387 static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data *bridge)
392 pci_read_config_byte(pdev, PCI_REVISION_ID, &rev_id);
394 case 0x01: revstring="A0"; break;
395 case 0x02: revstring="A1"; break;
396 case 0x11: revstring="B0"; break;
397 case 0x12: revstring="B1"; break;
398 case 0x13: revstring="B2"; break;
399 case 0x14: revstring="B3"; break;
400 default: revstring="??"; break;
403 printk (KERN_INFO PFX "Detected AMD 8151 AGP Bridge rev %s\n", revstring);
406 * Work around errata.
407 * Chips before B2 stepping incorrectly reporting v3.5
410 printk (KERN_INFO PFX "Correcting AGP revision (reports 3.5, is really 3.0)\n");
411 bridge->major_version = 3;
412 bridge->minor_version = 0;
417 static struct aper_size_info_32 uli_sizes[7] =
427 static int __devinit uli_agp_init(struct pci_dev *pdev)
429 u32 httfea,baseaddr,enuscr;
430 struct pci_dev *dev1;
432 unsigned size = amd64_fetch_size();
433 printk(KERN_INFO "Setting up ULi AGP.\n");
434 dev1 = pci_find_slot ((unsigned int)pdev->bus->number,PCI_DEVFN(0,0));
436 printk(KERN_INFO PFX "Detected a ULi chipset, "
437 "but could not fine the secondary device.\n");
441 for (i = 0; i < ARRAY_SIZE(uli_sizes); i++)
442 if (uli_sizes[i].size == size)
445 if (i == ARRAY_SIZE(uli_sizes)) {
446 printk(KERN_INFO PFX "No ULi size found for %d\n", size);
450 /* shadow x86-64 registers into ULi registers */
451 pci_read_config_dword (hammers[0], AMD64_GARTAPERTUREBASE, &httfea);
453 /* if x86-64 aperture base is beyond 4G, exit here */
454 if ((httfea & 0x7fff) >> (32 - 25))
457 httfea = (httfea& 0x7fff) << 25;
459 pci_read_config_dword(pdev, ULI_X86_64_BASE_ADDR, &baseaddr);
460 baseaddr&= ~PCI_BASE_ADDRESS_MEM_MASK;
462 pci_write_config_dword(pdev, ULI_X86_64_BASE_ADDR, baseaddr);
464 enuscr= httfea+ (size * 1024 * 1024) - 1;
465 pci_write_config_dword(dev1, ULI_X86_64_HTT_FEA_REG, httfea);
466 pci_write_config_dword(dev1, ULI_X86_64_ENU_SCR_REG, enuscr);
471 static struct aper_size_info_32 nforce3_sizes[5] =
473 {512, 131072, 7, 0x00000000 },
474 {256, 65536, 6, 0x00000008 },
475 {128, 32768, 5, 0x0000000C },
476 {64, 16384, 4, 0x0000000E },
477 {32, 8192, 3, 0x0000000F }
480 /* Handle shadow device of the Nvidia NForce3 */
481 /* CHECK-ME original 2.4 version set up some IORRs. Check if that is needed. */
482 static int __devinit nforce3_agp_init(struct pci_dev *pdev)
484 u32 tmp, apbase, apbar, aplimit;
485 struct pci_dev *dev1;
487 unsigned size = amd64_fetch_size();
489 printk(KERN_INFO PFX "Setting up Nforce3 AGP.\n");
491 dev1 = pci_find_slot((unsigned int)pdev->bus->number, PCI_DEVFN(11, 0));
493 printk(KERN_INFO PFX "agpgart: Detected an NVIDIA "
494 "nForce3 chipset, but could not find "
495 "the secondary device.\n");
499 for (i = 0; i < ARRAY_SIZE(nforce3_sizes); i++)
500 if (nforce3_sizes[i].size == size)
503 if (i == ARRAY_SIZE(nforce3_sizes)) {
504 printk(KERN_INFO PFX "No NForce3 size found for %d\n", size);
508 pci_read_config_dword(dev1, NVIDIA_X86_64_1_APSIZE, &tmp);
510 tmp |= nforce3_sizes[i].size_value;
511 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APSIZE, tmp);
513 /* shadow x86-64 registers into NVIDIA registers */
514 pci_read_config_dword (hammers[0], AMD64_GARTAPERTUREBASE, &apbase);
516 /* if x86-64 aperture base is beyond 4G, exit here */
517 if ( (apbase & 0x7fff) >> (32 - 25) )
520 apbase = (apbase & 0x7fff) << 25;
522 pci_read_config_dword(pdev, NVIDIA_X86_64_0_APBASE, &apbar);
523 apbar &= ~PCI_BASE_ADDRESS_MEM_MASK;
525 pci_write_config_dword(pdev, NVIDIA_X86_64_0_APBASE, apbar);
527 aplimit = apbase + (size * 1024 * 1024) - 1;
528 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APBASE1, apbase);
529 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APLIMIT1, aplimit);
530 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APBASE2, apbase);
531 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APLIMIT2, aplimit);
536 static int __devinit agp_amd64_probe(struct pci_dev *pdev,
537 const struct pci_device_id *ent)
539 struct agp_bridge_data *bridge;
542 cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
546 /* Could check for AGPv3 here */
548 bridge = agp_alloc_bridge();
552 if (pdev->vendor == PCI_VENDOR_ID_AMD &&
553 pdev->device == PCI_DEVICE_ID_AMD_8151_0) {
554 amd8151_init(pdev, bridge);
556 printk(KERN_INFO PFX "Detected AGP bridge %x\n", pdev->devfn);
559 bridge->driver = &amd_8151_driver;
561 bridge->capndx = cap_ptr;
563 /* Fill in the mode register */
564 pci_read_config_dword(pdev, bridge->capndx+PCI_AGP_STATUS, &bridge->mode);
566 if (cache_nbs(pdev, cap_ptr) == -1) {
567 agp_put_bridge(bridge);
571 if (pdev->vendor == PCI_VENDOR_ID_NVIDIA) {
572 int ret = nforce3_agp_init(pdev);
574 agp_put_bridge(bridge);
579 if (pdev->vendor == PCI_VENDOR_ID_AL) {
580 int ret = uli_agp_init(pdev);
582 agp_put_bridge(bridge);
587 pci_set_drvdata(pdev, bridge);
588 return agp_add_bridge(bridge);
591 static void __devexit agp_amd64_remove(struct pci_dev *pdev)
593 struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
595 release_mem_region(virt_to_gart(bridge->gatt_table_real),
596 amd64_aperture_sizes[bridge->aperture_size_idx].size);
597 agp_remove_bridge(bridge);
598 agp_put_bridge(bridge);
601 static struct pci_device_id agp_amd64_pci_table[] = {
603 .class = (PCI_CLASS_BRIDGE_HOST << 8),
605 .vendor = PCI_VENDOR_ID_AMD,
606 .device = PCI_DEVICE_ID_AMD_8151_0,
607 .subvendor = PCI_ANY_ID,
608 .subdevice = PCI_ANY_ID,
612 .class = (PCI_CLASS_BRIDGE_HOST << 8),
614 .vendor = PCI_VENDOR_ID_AL,
615 .device = PCI_DEVICE_ID_AL_M1689,
616 .subvendor = PCI_ANY_ID,
617 .subdevice = PCI_ANY_ID,
621 .class = (PCI_CLASS_BRIDGE_HOST << 8),
623 .vendor = PCI_VENDOR_ID_VIA,
624 .device = PCI_DEVICE_ID_VIA_K8T800PRO_0,
625 .subvendor = PCI_ANY_ID,
626 .subdevice = PCI_ANY_ID,
630 .class = (PCI_CLASS_BRIDGE_HOST << 8),
632 .vendor = PCI_VENDOR_ID_VIA,
633 .device = PCI_DEVICE_ID_VIA_8385_0,
634 .subvendor = PCI_ANY_ID,
635 .subdevice = PCI_ANY_ID,
637 /* VIA K8M800 / K8N800 */
639 .class = (PCI_CLASS_BRIDGE_HOST << 8),
641 .vendor = PCI_VENDOR_ID_VIA,
642 .device = PCI_DEVICE_ID_VIA_8380_0,
643 .subvendor = PCI_ANY_ID,
644 .subdevice = PCI_ANY_ID,
648 .class = (PCI_CLASS_BRIDGE_HOST << 8),
650 .vendor = PCI_VENDOR_ID_VIA,
651 .device = PCI_DEVICE_ID_VIA_3238_0,
652 .subvendor = PCI_ANY_ID,
653 .subdevice = PCI_ANY_ID,
655 /* VIA K8T800/K8M800/K8N800 */
657 .class = (PCI_CLASS_BRIDGE_HOST << 8),
659 .vendor = PCI_VENDOR_ID_VIA,
660 .device = PCI_DEVICE_ID_VIA_838X_1,
661 .subvendor = PCI_ANY_ID,
662 .subdevice = PCI_ANY_ID,
666 .class = (PCI_CLASS_BRIDGE_HOST << 8),
668 .vendor = PCI_VENDOR_ID_NVIDIA,
669 .device = PCI_DEVICE_ID_NVIDIA_NFORCE3,
670 .subvendor = PCI_ANY_ID,
671 .subdevice = PCI_ANY_ID,
674 .class = (PCI_CLASS_BRIDGE_HOST << 8),
676 .vendor = PCI_VENDOR_ID_NVIDIA,
677 .device = PCI_DEVICE_ID_NVIDIA_NFORCE3S,
678 .subvendor = PCI_ANY_ID,
679 .subdevice = PCI_ANY_ID,
683 .class = (PCI_CLASS_BRIDGE_HOST << 8),
685 .vendor = PCI_VENDOR_ID_SI,
686 .device = PCI_DEVICE_ID_SI_755,
687 .subvendor = PCI_ANY_ID,
688 .subdevice = PCI_ANY_ID,
692 .class = (PCI_CLASS_BRIDGE_HOST << 8),
694 .vendor = PCI_VENDOR_ID_SI,
695 .device = PCI_DEVICE_ID_SI_760,
696 .subvendor = PCI_ANY_ID,
697 .subdevice = PCI_ANY_ID,
701 .class = (PCI_CLASS_BRIDGE_HOST << 8),
703 .vendor = PCI_VENDOR_ID_AL,
705 .subvendor = PCI_ANY_ID,
706 .subdevice = PCI_ANY_ID,
712 MODULE_DEVICE_TABLE(pci, agp_amd64_pci_table);
714 static struct pci_driver agp_amd64_pci_driver = {
715 .name = "agpgart-amd64",
716 .id_table = agp_amd64_pci_table,
717 .probe = agp_amd64_probe,
718 .remove = agp_amd64_remove,
722 /* Not static due to IOMMU code calling it early. */
723 int __init agp_amd64_init(void)
726 static struct pci_device_id amd64nb[] = {
727 { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1103) },
733 if (pci_register_driver(&agp_amd64_pci_driver) > 0) {
735 if (!agp_try_unsupported && !agp_try_unsupported_boot) {
736 printk(KERN_INFO PFX "No supported AGP bridge found.\n");
738 printk(KERN_INFO PFX "You can try agp_try_unsupported=1\n");
740 printk(KERN_INFO PFX "You can boot with agp=try_unsupported\n");
745 /* First check that we have at least one AMD64 NB */
746 if (!pci_dev_present(amd64nb))
749 /* Look for any AGP bridge */
752 for_each_pci_dev(dev) {
753 if (!pci_find_capability(dev, PCI_CAP_ID_AGP))
755 /* Only one bridge supported right now */
756 if (agp_amd64_probe(dev, NULL) == 0) {
765 static void __exit agp_amd64_cleanup(void)
767 if (aperture_resource)
768 release_resource(aperture_resource);
769 pci_unregister_driver(&agp_amd64_pci_driver);
772 /* On AMD64 the PCI driver needs to initialize this driver early
773 for the IOMMU, so it has to be called via a backdoor. */
774 #ifndef CONFIG_GART_IOMMU
775 module_init(agp_amd64_init);
776 module_exit(agp_amd64_cleanup);
779 MODULE_AUTHOR("Dave Jones <davej@codemonkey.org.uk>, Andi Kleen");
780 module_param(agp_try_unsupported, bool, 0);
781 MODULE_LICENSE("GPL");