Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\amd_gart_64.c Create Date:2022-07-28 08:52:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Private Northbridge GATT initialization in case we cannot use the* AGP driver for some reason.

Proto:static __init int init_amd_gatt(struct agp_kern_info *info)

Type:int

Parameter:

TypeParameterName
struct agp_kern_info *info
623  pr_info("PCI-DMA: Disabling AGP.\n")
625  aper_size = aper_base = aper_size = 0
626  dev = NULL
627  When i < amd_nb_num() cycle
628  dev = misc
629  new_aper_base = read_aperture(dev, & new_aper_size)
630  If Not new_aper_base Then Go to nommu
633  If Not aper_base Then
637  If aper_size != new_aper_size || aper_base != new_aper_base Then Go to nommu
640  If Not aper_base Then Go to nommu
643  aper_base = aper_base
644  aper_size = aper_size >> 20
646  gatt_size = (aper_size >> PAGE_SHIFT determines the page size ) * sizeof(u32)
647  gatt = __get_free_pages(GFP_KERNEL | __GFP_ZERO, get_order - Determine the allocation order of a memory size*@size: The size for which to get the order* Determine the allocation order of a particular sized block of memory)
649  If Not gatt Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
651  If set_memory_uc((unsignedlong)gatt, gatt_size >> PAGE_SHIFT determines the page size ) Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
654  agp_gatt_table = gatt
656  register_syscore_ops( & gart_syscore_ops)
658  Use global flush state to avoid races with multiple flushers.
660  pr_info("PCI-DMA: aperture base @ %x size %u KB\n", aper_base, aper_size >> 10)
663  Return 0
665  nommu :
667  pr_warn("PCI-DMA: More than 4GB of RAM and no IOMMU - falling back to iommu=soft.\n")
668  Return -1
Caller
NameDescribe
gart_iommu_init