函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\amd_nb.c Create Date:2022-07-27 09:42:53
Last Modify:2020-03-16 21:36:56 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:amd_cache_northbridges

函数原型:int amd_cache_northbridges(void)

返回类型:int

参数:

221  misc_ids等于amd_nb_misc_ids
222  link_ids等于amd_nb_link_ids
223  root_ids等于amd_root_ids
226  roots_per_misc等于0
227  misc_count等于0
228  root_count等于0
231  如果num则返回:0
234  如果x86_vendor恒等于X86_VENDOR_HYGON
235  root_ids等于hygon_root_ids
236  misc_ids等于hygon_nb_misc_ids
237  link_ids等于hygon_nb_link_ids
240  misc = NULL
241  当((misc = next_northbridge(misc, misc_ids)) != NULL)循环
242  misc_count自加
244  如果非misc_count则返回:负ENODEV
247  root = NULL
248  当((root = next_northbridge(root, root_ids)) != NULL)循环
249  root_count自加
251  如果root_count
252  roots_per_misc等于root_countmisc_count
258  如果非roots_per_miscroot_count取模roots_per_misc
259  打印信息("Unsupported AMD DF/PCI configuration found\n")
260  返回:负ENODEV
264  nb等于分配数组内存并置零
265  如果非nb则返回:负ENOMEM
268  nb等于nb
269  num等于misc_count
271  link = misc = root = NULL
272 i小于num循环
273  root等于root等于next_northbridge(root, root_ids)
275  misc等于misc等于next_northbridge(misc, misc_ids)
277  link等于link等于next_northbridge(link, link_ids)
289 j小于roots_per_misc循环root等于next_northbridge(root, root_ids)
293  如果amd_gart_present()则flags或等于AMD_NB_GART
299  如果非cpuid_edx(0x80000006)则返回:0
306  如果x86恒等于0x10且x86_model大于等于0x8且x86_model大于0x9或x86_stepping大于等于0x1的值则flags或等于AMD_NB_L3_INDEX_DISABLE
312  如果x86恒等于0x15则flags或等于AMD_NB_L3_INDEX_DISABLE
316  如果x86恒等于0x15则flags或等于AMD_NB_L3_PARTITIONING
319  返回:0
调用者
名称描述
init_amd_nbs