函数逻辑报告 |
Source Code:arch\x86\kernel\aperture_64.c |
Create Date:2022-07-27 09:52:34 |
Last Modify:2020-03-17 10:38:51 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:gart_iommu_hole_init
函数原型:int __init gart_iommu_hole_init(void)
返回类型:int
参数:无
389 | agp_aper_base等于0, agp_aper_order等于0 |
390 | aper_alloc等于0, aper_order等于0, last_aper_order等于0 |
391 | last_aper_base等于0 |
392 | valid_agp等于0 |
395 | 如果非amd_gart_present()则返回:负ENODEV |
398 | 如果gart_iommu_aperture_disabled或非fix_aperture或非early_pci_allowed()则返回:负ENODEV |
402 | 打印信息("Checking aperture...\n") |
407 | fix等于0 |
408 | node等于0 |
423 | gart_iommu_aperture等于1 |
424 | IOMMU设置等于gart_iommu_init |
426 | ctl等于Direct PCI access. This is used for PCI accesses in early boot beforethe PCI subsystem works. |
435 | ctl与等于Aperture control register bits. 的反 |
436 | write_pci_config(bus, slot, 3, K8 On-cpu GART registers , ctl) |
438 | aper_order等于ctl右移1位按位与7 |
439 | aper_size等于32乘1024乘1024左移aper_order位 |
440 | aper_base等于Direct PCI access. This is used for PCI accesses in early boot beforethe PCI subsystem works. 按位与0x7fff |
441 | aper_base左移等于25位 |
443 | 打印信息("Node %d: aperture [bus addr %#010Lx-%#010Lx] (%uMB)\n", node, aper_base, aper_base + aper_size - 1, aper_size >> 20) |
446 | node自加 |
448 | 如果非aperture_valid(aper_base, aper_size, 64 << 20)则 |
456 | 打印错误信息("you are using iommu with agp, but GART size is less than 64MB\n") |
457 | 打印错误信息("please increase GART size in your BIOS setup\n") |
458 | 打印错误信息("if BIOS doesn't have that option, contact your HW vendor!\n") |
459 | printed_gart_size_msg等于1 |
461 | 否则 |
473 | last_aper_base等于aper_base |
477 | out : |
478 | 如果非fix且非fallback_aper_force则 |
492 | 如果非fallback_aper_force则 |
493 | aper_alloc等于agp_aper_base |
494 | aper_order等于agp_aper_order |
497 | 如果aper_alloc则否则如果非no_iommu且duplicated to the one in bootmem.h 大于4GB broken PCI/AGP hardware bus master zone 或force_iommu或valid_agp或fallback_aper_force则 |
503 | 打印信息("Your BIOS doesn't leave an aperture memory hole\n") |
504 | 打印信息("Please enable the IOMMU option in the BIOS setup\n") |
505 | 打印信息("This costs you %dMB of RAM\n", 32 << fallback_aper_order) |
509 | aper_alloc等于This code runs before the PCI subsystem is initialized, so justaccess the northbridge directly. |
510 | 如果非aper_alloc则 |
521 | 否则 |
522 | 返回:0 |
541 | ctl等于aper_order左移1位 |
550 | write_pci_config(bus, slot, 3, K8 On-cpu GART registers , ctl) |
551 | write_pci_config(bus, slot, 3, AMD64_GARTAPERTUREBASE, aper_alloc >> 25) |
557 | 返回:1 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |