Discussion:
BL460c G1 issues
(too old to reply)
Steve Shockley
2016-05-24 20:02:21 UTC
Permalink
I have an HP BL460c blade I'm using with OpenBSD. I was able to get 5.8
to install by disabling ACPI; since I'm lazy I didn't submit a bug
report. I tried to upgrade to 5.9 (and -current), but booting from the
CD ends with:
wskbd0 at pckbd0: console keyboard, using wsdisplay1

This might be similar to
http://marc.info/?l=openbsd-misc&m=145182865626553, but the BIOS of this
machine doesn't give the option to disable cores/sockets. Details with
5.8 are below.

Crash with ACPI enabled:
booting hd0a:/bsd: 6683948/
booting hd0a:/bsd: 6683948+2138976+254984+0+598016
[72+563184+374279]=0xa210c0
entry point at 0x1000160 [7205c766, 34000004, 24448b12, 4060a304]
The Regents of the University of California. All rights
reserved.
Copyright (c) 1995-2015 OpenBSD. All rights reserved.
http://www.OpenBSD.org
[ using 938176 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
OpenBSD 5.8 (GENERIC.MP) #1: Wed Mar 16 10:03:13 CET 2016

***@stable-58-amd64.mtier.org:/binpatchng/work-binpatch58-amd64/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 6423851008 (6126MB)
avail mem = 6225272832 (5936MB)
acpi0 at bios0: rev 2
acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP SPCR MCFG HPET SPMI ERST APIC FFFF BERT HEST
SSDT
acpi0: wakeup devices PCI0(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0panic: cpu at apic id 0 already attached?
Stopped at Debugger+0x9: leave
Debugger() at Debugger+0x9
panic() at panic+0xfe
cpu_attach() at cpu_attach+0x371
config_attach() at config_attach+0x1bc
acpimadt_attach() at acpimadt_attach+0x544
config_attach() at config_attach+0x1bc
acpi_attach() at acpi_attach+0x471
config_attach() at config_attach+0x1bc
bios_attach() at bios_attach+0x23b
config_attach() at config_attach+0x1bc
end trace frame: 0xffffffff81a27e60, count: 0
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS
PANIC!
IF RUNNING SMP, USE 'mach ddbcpu <#>' AND 'trace' ON OTHER PROCESSORS,
TOO.
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb{0}>
ddb{0}> ps
PID PPID PGRP UID S FLAGS WAIT COMMAND
* 0 -1 0 0 7 0x10200 swapper
ddb{0}>

dmesg with acpi disabled:
OpenBSD 5.8 (GENERIC.MP) #1: Wed Mar 16 10:03:13 CET 2016

***@stable-58-amd64.mtier.org:/binpatchng/work-binpatch58-amd64/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 6423851008 (6126MB)
avail mem = 6225272832 (5936MB)
User Kernel Config
UKC> disable acpi
362 acpi0 disabled
UKC> quit
Continuing...
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xee000 (73 entries)
bios0: vendor HP version "I15" date 05/02/2011
bios0: HP ProLiant BL460c G1
acpi at bios0 not configured
mpbios0 at bios0: Intel MP Specification 1.4
cpu0 at mainbus0: apid 4 (boot processor)
cpu0: Intel(R) Xeon(R) CPU X5355 @ 2.66GHz, 2667.14 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,LONG,LAHF,PERF,SENSOR
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 1
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 333MHz
cpu0: mwait min=64, max=64, C-substates=0.2, IBE
cpu1 at mainbus0: apid 0 (application processor)
cpu1: Intel(R) Xeon(R) CPU X5355 @ 2.66GHz, 2666.76 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,LONG,LAHF,PERF,SENSOR
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 0, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Xeon(R) CPU X5355 @ 2.66GHz, 2666.76 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,LONG,LAHF,PERF,SENSOR
cpu2: 4MB 64b/line 16-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 2 (application processor)
cpu3: Intel(R) Xeon(R) CPU X5355 @ 2.66GHz, 2666.76 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,LONG,LAHF,PERF,SENSOR
cpu3: 4MB 64b/line 16-way L2 cache
cpu3: smt 0, core 2, package 0
cpu4 at mainbus0: apid 3 (application processor)
cpu4: Intel(R) Xeon(R) CPU X5355 @ 2.66GHz, 2666.76 MHz
cpu4:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,LONG,LAHF,PERF,SENSOR
cpu4: 4MB 64b/line 16-way L2 cache
cpu4: smt 0, core 3, package 0
cpu5 at mainbus0: apid 5 (application processor)
cpu5: Intel(R) Xeon(R) CPU X5355 @ 2.66GHz, 2666.76 MHz
cpu5:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,LONG,LAHF,PERF,SENSOR
cpu5: 4MB 64b/line 16-way L2 cache
cpu5: smt 0, core 1, package 1
cpu6 at mainbus0: apid 6 (application processor)
cpu6: Intel(R) Xeon(R) CPU X5355 @ 2.66GHz, 2666.76 MHz
cpu6:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,LONG,LAHF,PERF,SENSOR
cpu6: 4MB 64b/line 16-way L2 cache
cpu6: smt 0, core 2, package 1
cpu7 at mainbus0: apid 7 (application processor)
cpu7: Intel(R) Xeon(R) CPU X5355 @ 2.66GHz, 2667.03 MHz
cpu7:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,LONG,LAHF,PERF,SENSOR
cpu7: 4MB 64b/line 16-way L2 cache
cpu7: smt 0, core 3, package 1
mpbios0: bus 0 is type PCI
mpbios0: bus 1 is type PCI
mpbios0: bus 2 is type PCI
mpbios0: bus 3 is type PCI
mpbios0: bus 4 is type PCI
mpbios0: bus 5 is type PCI
mpbios0: bus 6 is type PCI
mpbios0: bus 7 is type PCI
mpbios0: bus 8 is type PCI
mpbios0: bus 9 is type PCI
mpbios0: bus 10 is type PCI
mpbios0: bus 164 is type PCI
mpbios0: bus 168 is type PCI
mpbios0: bus 13 is type PCI
mpbios0: bus 16 is type PCI
mpbios0: bus 19 is type PCI
mpbios0: bus 22 is type PCI
mpbios0: bus 188 is type PCI
mpbios0: bus 39 is type ISA
ioapic0 at mainbus0: apid 8 pa 0xfec00000, version 20, 24 pins
ipmi at mainbus0 not configured
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 5000P Host" rev 0xb1
ppb0 at pci0 dev 2 function 0 "Intel 5000 PCIE" rev 0xb1
pci1 at ppb0 bus 4
ppb1 at pci1 dev 0 function 0 "Intel 6321ESB PCIE" rev 0x01
pci2 at ppb1 bus 5
ppb2 at pci2 dev 0 function 0 "Intel 6321ESB PCIE" rev 0x01
pci3 at ppb2 bus 6
ppb3 at pci3 dev 0 function 0 "ServerWorks PCIE-PCIX" rev 0xc3
pci4 at ppb3 bus 7
bnx0 at pci4 dev 0 function 0 "Broadcom BCM5708S" rev 0x12: apic 8 int
16
ppb4 at pci2 dev 1 function 0 "Intel 6321ESB PCIE" rev 0x01
pci5 at ppb4 bus 8
ppb5 at pci1 dev 0 function 3 "Intel 6321ESB PCIE-PCIX" rev 0x01
pci6 at ppb5 bus 9
ppb6 at pci0 dev 3 function 0 "Intel 5000 PCIE" rev 0xb1
pci7 at ppb6 bus 10
ppb7 at pci7 dev 0 function 0 "ServerWorks PCIE-PCIX" rev 0xb4
pci8 at ppb7 bus 11
ppb8 at pci8 dev 4 function 0 "ServerWorks HT-1000 PCIX" rev 0xb2
pci9 at ppb8 bus 12
ciss0 at pci8 dev 8 function 0 "Hewlett-Packard Smart Array" rev 0x00:
apic 8 int 18
ciss0: 1 LD, HW rev 0, FW 1.86/1.86
scsibus1 at ciss0: 1 targets
sd0 at scsibus1 targ 0 lun 0: <HP, LOGICAL VOLUME, 1.86> SCSI3 0/direct
fixed
sd0: 69973MB, 512 bytes/sector, 143305920 sectors
ppb9 at pci0 dev 4 function 0 "Intel 5000 PCIE" rev 0xb1
pci10 at ppb9 bus 13
ppb10 at pci0 dev 5 function 0 "Intel 5000 PCIE" rev 0xb1
pci11 at ppb10 bus 16
ppb11 at pci0 dev 6 function 0 "Intel 5000 PCIE" rev 0xb1
pci12 at ppb11 bus 19
qle0 at pci12 dev 0 function 0 "QLogic ISP2432" rev 0x02: msi
qle0: bad startup mboxes: 0 0
qle0: firmware rev 4.0.20, attrs 0x2
scsibus2 at qle0: 2048 targets, WWPN 500110a00086a868, WWNN
500110a00086a869
qle1 at pci12 dev 0 function 1 "QLogic ISP2432" rev 0x02: msi
qle1: bad startup mboxes: 0 0
qle1: firmware rev 4.0.20, attrs 0x2
scsibus3 at qle1: 2048 targets, WWPN 500110a00086a86a, WWNN
500110a00086a86b
ppb12 at pci0 dev 7 function 0 "Intel 5000 PCIE" rev 0xb1
pci13 at ppb12 bus 22
pchb1 at pci0 dev 16 function 0 "Intel 5000 Error Reporting" rev 0xb1
pchb2 at pci0 dev 16 function 1 "Intel 5000 Error Reporting" rev 0xb1
pchb3 at pci0 dev 16 function 2 "Intel 5000 Error Reporting" rev 0xb1
pchb4 at pci0 dev 17 function 0 "Intel 5000 Reserved" rev 0xb1
pchb5 at pci0 dev 19 function 0 "Intel 5000 Reserved" rev 0xb1
pchb6 at pci0 dev 21 function 0 "Intel 5000 FBD" rev 0xb1
pchb7 at pci0 dev 22 function 0 "Intel 5000 FBD" rev 0xb1
ppb13 at pci0 dev 28 function 0 "Intel 6321ESB PCIE" rev 0x09
pci14 at ppb13 bus 2
ppb14 at pci14 dev 0 function 0 "ServerWorks PCIE-PCIX" rev 0xc3
pci15 at ppb14 bus 3
bnx1 at pci15 dev 0 function 0 "Broadcom BCM5708S" rev 0x12: apic 8 int
16
uhci0 at pci0 dev 29 function 0 "Intel 6321ESB USB" rev 0x09: apic 8 int
16
uhci1 at pci0 dev 29 function 1 "Intel 6321ESB USB" rev 0x09: apic 8 int
17
uhci2 at pci0 dev 29 function 2 "Intel 6321ESB USB" rev 0x09: apic 8 int
18
uhci3 at pci0 dev 29 function 3 "Intel 6321ESB USB" rev 0x09: apic 8 int
19
ehci0 at pci0 dev 29 function 7 "Intel 6321ESB USB" rev 0x09: apic 8 int
16
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb15 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xd9
pci16 at ppb15 bus 1
radeondrm0 at pci16 dev 3 function 0 "ATI ES1000" rev 0x02
drm0 at radeondrm0
radeondrm0: apic 8 int 23
"Compaq iLO" rev 0x03 at pci16 dev 4 function 0 not configured
"Compaq iLO" rev 0x03 at pci16 dev 4 function 2 not configured
uhci4 at pci16 dev 4 function 4 "Hewlett-Packard USB" rev 0x00: apic 8
int 22
"Hewlett-Packard IPMI" rev 0x00 at pci16 dev 4 function 6 not configured
usb1 at uhci4: USB revision 1.0
uhub1 at usb1 "Hewlett-Packard UHCI root hub" rev 1.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 "Intel 6321ESB LPC" rev 0x09
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: probed fifo depth: 0 bytes
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
uhidev0 at uhub1 port 1 configuration 1 interface 0 "HP Virtual
Keyboard" rev 1.10/0.02 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes, country code 33
wskbd1 at ukbd0 mux 1
uhidev1 at uhub1 port 1 configuration 1 interface 1 "HP Virtual
Keyboard" rev 1.10/0.02 addr 2
uhidev1: iclass 3/1
ums0 at uhidev1: 3 buttons
wsmouse0 at ums0 mux 0
vscsi0 at root
scsibus4 at vscsi0: 256 targets
softraid0 at root
scsibus5 at softraid0: 256 targets
root on sd0a (d5653f387f8813d1.a) swap on sd0b dump on sd0b
bnx0: address 00:1c:c4:a8:63:94
brgphy0 at bnx0 phy 2: BCM5708S 1000/2500baseSX PHY, rev. 1
bnx1: address 00:1c:c4:a8:63:8c
brgphy1 at bnx1 phy 2: BCM5708S 1000/2500baseSX PHY, rev. 1
radeondrm0: 1024x768
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using
wskbd0
wskbd1: connecting to wsdisplay0
wsdisplay0: screen 1-5 added (std, vt100 emulation)

ACPI dump (uuencoded)

[demime removed a uuencoded section named bl460c.tar.gz which was 132 lines]
Steve Shockley
2016-05-25 14:30:13 UTC
Permalink
Post by Steve Shockley
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS
PANIC!
IF RUNNING SMP, USE 'mach ddbcpu <#>' AND 'trace' ON OTHER PROCESSORS,
TOO.
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
Sorry, I need more practice at cutting and pasting. Here's the trace:

ddb{0}> trace
Debugger() at Debugger+0x9
panic() at panic+0xfe
cpu_attach() at cpu_attach+0x371
config_attach() at config_attach+0x1bc
acpimadt_attach() at acpimadt_attach+0x544
config_attach() at config_attach+0x1bc
acpi_attach() at acpi_attach+0x471
config_attach() at config_attach+0x1bc
bios_attach() at bios_attach+0x23b
config_attach() at config_attach+0x1bc
mainbus_attach() at mainbus_attach+0x66
config_attach() at config_attach+0x1bc
cpu_configure() at cpu_configure+0x1b
main() at main+0x40d
end trace frame: 0x0, count: -14
ddb{0}>
YASUOKA Masahiko
2016-08-04 03:33:16 UTC
Permalink
On Tue, 24 May 2016 16:02:21 -0400
Post by Steve Shockley
I have an HP BL460c blade I'm using with OpenBSD. I was able to get
5.8 to install by disabling ACPI; since I'm lazy I didn't submit a bug
report. I tried to upgrade to 5.9 (and -current), but booting from
I hit a similar problem on NEC Express5800/R110h-1. On that machine,
X2APIC is enabled on boot and this seems to cause the panic following.
Post by Steve Shockley
cpu0 at mainbus0panic: cpu at apic id 0 already attached?
So the diff disables the X2APIC. Can you try the diff attached?


Index: sys/arch/amd64/amd64/cpu.c
===================================================================
RCS file: /cvs/src/sys/arch/amd64/amd64/cpu.c,v
retrieving revision 1.102
diff -u -p -r1.102 cpu.c
--- sys/arch/amd64/amd64/cpu.c 28 Jul 2016 21:57:57 -0000 1.102
+++ sys/arch/amd64/amd64/cpu.c 4 Aug 2016 02:51:08 -0000
@@ -683,6 +683,8 @@ cpu_hatch(void *v)

ci->ci_flags |= CPUF_PRESENT;

+ if (ci->ci_flags & CPUF_AP)
+ lapic_ap_init();
lapic_enable();
lapic_startclock();

Index: sys/arch/amd64/amd64/lapic.c
===================================================================
RCS file: /cvs/src/sys/arch/amd64/amd64/lapic.c,v
retrieving revision 1.44
diff -u -p -r1.44 lapic.c
--- sys/arch/amd64/amd64/lapic.c 22 Jun 2016 01:12:38 -0000 1.44
+++ sys/arch/amd64/amd64/lapic.c 4 Aug 2016 02:51:08 -0000
@@ -155,6 +155,19 @@ x2apic_writeicr(u_int32_t hi, u_int32_t
__asm volatile("wrmsr" : : "a" (lo), "d" (hi), "c" (msr));
}

+void
+x2apic_disable(void)
+{
+ uint64_t msr;
+
+ msr = rdmsr(MSR_APICBASE);
+ if (msr & APICBASE_ENABLE_X2APIC) {
+ wrmsr(MSR_APICBASE,
+ (msr & ~(APICBASE_GLOBAL_ENABLE|APICBASE_ENABLE_X2APIC)));
+ wrmsr(MSR_APICBASE, (msr & ~APICBASE_ENABLE_X2APIC));
+ }
+}
+
u_int32_t
lapic_cpu_number(void)
{
@@ -204,6 +217,8 @@ lapic_map(paddr_t lapic_base)
return;
}

+ x2apic_disable();
+
va = (vaddr_t)&local_apic;

disable_intr();
@@ -370,6 +385,13 @@ lapic_boot_init(paddr_t lapic_base)
#ifdef MULTIPROCESSOR
evcount_attach(&ipi_count, "ipi", &ipi_irq);
#endif
+}
+
+void
+lapic_ap_init(void)
+{
+ if (!x2apic_enabled)
+ x2apic_disable();
}

static __inline u_int32_t
Index: sys/arch/amd64/amd64/mptramp.S
===================================================================
RCS file: /cvs/src/sys/arch/amd64/amd64/mptramp.S,v
retrieving revision 1.13
diff -u -p -r1.13 mptramp.S
--- sys/arch/amd64/amd64/mptramp.S 16 May 2016 01:54:15 -0000 1.13
+++ sys/arch/amd64/amd64/mptramp.S 4 Aug 2016 02:51:08 -0000
@@ -188,30 +188,35 @@ _TRMP_LABEL(mptramp_longmode)

_C_LABEL(cpu_spinup_trampoline_end): #end of code copied to MP_TRAMPOLINE
.globl _C_LABEL(x2apic_enabled)
- movl x2apic_enabled,%eax
- testl %eax,%eax
- jz 1f
-
mov $MSR_APICBASE,%ecx
mov $0,%edx
rdmsr
+ mov %eax,%edi
+ andl $APICBASE_ENABLE_X2APIC,%eax
+ testl %eax,%eax
+ jnz 1f
+ movl x2apic_enabled,%eax
+ testl %eax,%eax
+ jz 2f
+ mov %edi,%eax
orl $APICBASE_ENABLE_X2APIC,%eax
wrmsr
+1:
mov $MSR_X2APIC_ID,%ecx
rdmsr
andl $X2APIC_ID_MASK,%eax
- jmp 2f
-1:
+ jmp 3f
+2:
movl _C_LABEL(local_apic)+LAPIC_ID,%eax
shrl $LAPIC_ID_SHIFT,%eax
-2:
- xorq %rcx,%rcx
3:
+ xorq %rcx,%rcx
+4:
movq _C_LABEL(cpu_info)(,%rcx,8),%rdi
incq %rcx
movl CPU_INFO_APICID(%rdi),%edx
cmpl %eax,%edx
- jne 3b
+ jne 4b

movq CPU_INFO_IDLE_PCB(%rdi),%rsi

Index: sys/arch/amd64/include/i82489var.h
===================================================================
RCS file: /cvs/src/sys/arch/amd64/include/i82489var.h,v
retrieving revision 1.17
diff -u -p -r1.17 i82489var.h
--- sys/arch/amd64/include/i82489var.h 22 Jun 2016 01:12:38 -0000 1.17
+++ sys/arch/amd64/include/i82489var.h 4 Aug 2016 02:51:08 -0000
@@ -118,6 +118,7 @@ extern void Xrecurse_hyperv_upcall(void)
struct cpu_info;

extern void lapic_boot_init(paddr_t);
+extern void lapic_ap_init(void);
extern void lapic_set_lvt(void);
extern void lapic_enable(void);
extern void lapic_disable(void);

Loading...