Function report |
Source Code:arch\x86\kernel\amd_nb.c |
Create Date:2022-07-28 08:43:46 |
Last Modify:2020-03-16 21:36:56 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:amd_cache_northbridges
Proto:int amd_cache_northbridges(void)
Type:int
Parameter:Nothing
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 | If num Then Return 0 |
234 | If x86_vendor == X86_VENDOR_HYGON Then |
240 | misc = NULL |
241 | When ((misc = next_northbridge(misc, misc_ids)) != NULL) cycle |
242 | misc_count++ |
244 | If Not misc_count Then Return -ENODEV |
247 | root = NULL |
248 | When ((root = next_northbridge(root, root_ids)) != NULL) cycle |
249 | root_count++ |
251 | If root_count Then |
252 | roots_per_misc = root_count / misc_count |
258 | If Not roots_per_misc || root_count % roots_per_misc Then |
264 | nb = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). |
269 | num = misc_count |
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 | When j < roots_per_misc cycle root = next_northbridge(root, root_ids) |
293 | If amd_gart_present() Then flags |= AMD_NB_GART |
299 | If Not cpuid_edx(0x80000006) Then Return 0 |
306 | If x86 == 0x10 && x86_model >= 0x8 && ( x86_model > 0x9 || x86_stepping >= 0x1 ) Then flags |= AMD_NB_L3_INDEX_DISABLE |
312 | If x86 == 0x15 Then flags |= AMD_NB_L3_INDEX_DISABLE |
316 | If x86 == 0x15 Then flags |= AMD_NB_L3_PARTITIONING |
319 | Return 0 |
Name | Describe |
---|---|
init_amd_nbs |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |