Function report |
Source Code:arch\x86\kernel\cpu\cacheinfo.c |
Create Date:2022-07-28 07:53:53 |
| Last Modify:2020-03-16 20:07:28 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:amd_cpuid4
Proto:static void amd_cpuid4(int leaf, union _cpuid4_leaf_eax *eax, union _cpuid4_leaf_ebx *ebx, union _cpuid4_leaf_ecx *ecx)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| int | leaf | |
| union _cpuid4_leaf_eax * | eax | |
| union _cpuid4_leaf_ebx * | ebx | |
| union _cpuid4_leaf_ecx * | ecx |
| 241 | full = 0 |
| 242 | full = 0 |
| 243 | full = 0 |
| 249 | Case leaf == 1 |
| 252 | Case leaf == 0 |
| 260 | Case leaf == 2 |
| 261 | If Not val Then Return |
| 265 | lines_per_tag = lines_per_tag |
| 267 | size_in_kb = Operations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.( KB - valid for CPUS which support this call: ) |
| 268 | Break |
| 269 | Case leaf == 3 |
| 270 | If Not val Then Return |
| 274 | lines_per_tag = lines_per_tag |
| 275 | size_in_kb = size_encoded * 512 |
| 276 | If boot_cpu_has(AMD multi-node processor ) Then |
| 277 | size_in_kb = size_in_kb >> 1 |
| 280 | Break |
| 281 | Default |
| 282 | Return |
| 285 | is_self_initializing = 1 |
| 288 | num_threads_sharing = 0 |
| 289 | num_cores_on_die = Operations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.(cpuid returned max cores value: ) - 1 |
| 292 | If assoc == 0xffff Then is_fully_associative = 1 |
| 294 | coherency_line_size = line_size - 1 |
| 295 | ways_of_associativity = assoc - 1 |
| 296 | physical_line_partition = lines_per_tag - 1 |
| 297 | number_of_sets = size_in_kb * 1024 / line_size / (ways_of_associativity + 1) - 1 |
| Name | Describe |
|---|---|
| cpuid4_cache_lookup_regs |
| 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 |