Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2cb07860 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by H. Peter Anvin
Browse files

x86, amd: Don't probe for extended APIC ID if APICs are disabled



If we've logically disabled apics, don't probe the PCI space for the
AMD extended APIC ID.

[ Impact: prevent boot crash under Xen. ]

Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Reported-by: default avatarBastian Blank <bastian@waldi.eu.org>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 6effa8f6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -356,7 +356,7 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c)
#endif
#endif
#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI)
#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI)
	/* check CPU config space for extended APIC ID */
	/* check CPU config space for extended APIC ID */
	if (c->x86 >= 0xf) {
	if (cpu_has_apic && c->x86 >= 0xf) {
		unsigned int val;
		unsigned int val;
		val = read_pci_config(0, 24, 0, 0x68);
		val = read_pci_config(0, 24, 0, 0x68);
		if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18)))
		if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18)))