函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\amd_gart_64.c Create Date:2022-07-27 09:51:59
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:gart_iommu_init

函数原型:int __init gart_iommu_init(void)

返回类型:int

参数:

716  如果非amd_nb_has_feature(AMD_NB_GART)则返回:0
720  no_agp等于1
729  如果no_iommu或非force_iommuduplicated to the one in bootmem.h 小于等于4GB broken PCI/AGP hardware bus master zone 或非gart_iommu_apertureno_agpPrivate Northbridge GATT initialization in case we cannot use the* AGP driver for some reason.小于0则
734  打印警告信息("More than 4GB of memory but GART IOMMU not available.\n")
735  打印警告信息("falling back to iommu=soft.\n")
737  返回:0
741  aper_size等于aper_size左移20位
742  aper_base等于aper_base
743  end_pfn等于aper_base右移PAGE_SHIFT determines the page size 位的值加aper_size右移PAGE_SHIFT determines the page size 位的值
745  start_pfn等于PFN_DOWN(aper_base)
746  如果非pfn_range_is_mapped(start_pfn, end_pfn)则init_memory_mapping(start_pfn << PAGE_SHIFT determines the page size , end_pfn << PAGE_SHIFT determines the page size )
749  打印信息("PCI-DMA: using GART IOMMU.\n")
750  size of remapping area bytes 等于check_iommu_size(aper_base, aper_size)
751  .. and in pages 等于size of remapping area bytes 右移PAGE_SHIFT determines the page size
753  Guarded by iommu_bitmap_lock: 等于__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)
755  如果非Guarded by iommu_bitmap_lock: panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
758  打印信息("PCI-DMA: Reserving %luMB of IOMMU area in the AGP aperture\n", size of remapping area bytes >> 20)
761  ackdoor interface to AGP driver 等于size of remapping area bytes
762  iommu_start等于aper_sizesize of remapping area bytes
763  GART remapping area (physical) 等于aper_baseiommu_start
764  Remapping table 等于agp_gatt_tableiommu_start右移PAGE_SHIFT determines the page size 位的值
775  set_memory_np((unsignedlong)__va(GART remapping area (physical) ), size of remapping area bytes >> PAGE_SHIFT determines the page size )
785  wbinvd()
793  enable_gart_translations()
801  scratch等于get_zeroed_page(GFP_KERNEL)
802  如果非scratchpanic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
804  gart_unmapped_entry等于GPTE_ENCODE(__pa(scratch))
806  Use global flush state to avoid races with multiple flushers.
807  dma_ops等于gart_dma_ops
808  iommu_shutdown等于gart_iommu_shutdown
809  swiotlb等于0
811  返回:0