/* * Check if the CPU can handle C2 and deeper
*/ staticinlineunsignedint acpi_processor_cstate_check(unsignedint max_cstate)
{ /* * Early models (<=5) of AMD Opterons are not supposed to go into * C2 state. * * Steppings 0x0A and later are good
*/ if (boot_cpu_data.x86 == 0x0F &&
boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
boot_cpu_data.x86_model <= 0x05 &&
boot_cpu_data.x86_stepping < 0x0A) return 1; elseif (boot_cpu_has(X86_BUG_AMD_APIC_C1E)) return 1; else return max_cstate;
}
/* Enable coordination with firmware's _TSD info */
*cap |= ACPI_PROC_CAP_SMP_T_SWCOORD;
if (cpu_has(c, X86_FEATURE_EST))
*cap |= ACPI_PROC_CAP_EST_CAPABILITY_SWSMP;
if (cpu_has(c, X86_FEATURE_ACPI))
*cap |= ACPI_PROC_CAP_T_FFH;
if (cpu_has(c, X86_FEATURE_HWP))
*cap |= ACPI_PROC_CAP_COLLAB_PROC_PERF;
/* * If mwait/monitor is unsupported, C_C1_FFH and * C2/C3_FFH will be disabled.
*/ if (!cpu_has(c, X86_FEATURE_MWAIT) ||
boot_option_idle_override == IDLE_NOMWAIT)
*cap &= ~(ACPI_PROC_CAP_C_C1_FFH | ACPI_PROC_CAP_C_C2C3_FFH);
if (xen_initial_domain()) { /* * When Linux is running as Xen dom0, the hypervisor is the * entity in charge of the processor power management, and so * Xen needs to check the OS capabilities reported in the * processor capabilities buffer matches what the hypervisor * driver supports.
*/
xen_sanitize_proc_cap_bits(cap);
}
}
#ifdef CONFIG_ACPI_APEI staticinline pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr)
{ /* * We currently have no way to look up the EFI memory map * attributes for a region in a consistent way, because the * memmap is discarded after efi_free_boot_services(). So if * you call efi_mem_attributes() during boot and at runtime, * you could theoretically see different attributes. * * We are yet to see any x86 platforms that require anything * other than PAGE_KERNEL (some ARM64 platforms require the * equivalent of PAGE_KERNEL_NOCACHE). Additionally, if SME * is active, the ACPI information will not be encrypted, * so return PAGE_KERNEL_NOENC until we know differently.
*/ return PAGE_KERNEL_NOENC;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.