On Mon, Sep 12, 2016 at 08:05:33PM +0300, Andriy Gapon wrote:
> On 12/09/2016 19:44, Slawa Olhovchenkov wrote:
> > I am not kernel developer: please point what I am need insert and file
> > for edit.
>
> In sys/amd64/amd64/mp_machdep.c (assuming you use amd64), in function
> cpu_mp_start, in this place
> /* Set boot_cpu_id if needed. */
> if (boot_cpu_id == -1) {
> boot_cpu_id = PCPU_GET(apic_id);
> cpu_info[boot_cpu_id].cpu_bsp = 1;
> } else
>
> right after boot_cpu_id = PCPU_GET(apic_id) line please insert
> printf("boot_cpu_id = %d\n", boot_cpu_id);
VT(vga): text 80x25
CPU: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz (2200.05-MHz K8-class CPU)
Origin="GenuineIntel" Id=0x406f1 Family=0x6 Model=0x4f
Stepping=1
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
Features2=0x7ffefbff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
AMD Features2=0x121<LAHF,ABM,Prefetch>
Structured Extended
Features=0x21cbfbb<FSGSBASE,TSCADJ,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,PQM,NFPUSG,PQE,RDSEED,ADX,SMAP,PROCTRACE>
XSAVE Features=0x1<XSAVEOPT>
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID,VID,PostIntr
TSC: P-state invariant, performance statistics
real memory = 137438953472 (131072 MB)
avail memory = 133407973376 (127227 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <ALASKA A M I >
boot_cpu_id = 255
kernel trap 12 with interrupts disabled
Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = ff
fault virtual address = 0x0
fault code = supervisor read data, page not present
instruction pointer = 0x20:0xffffffff80537e74
stack pointer = 0x28:0xffffffff814b3a60
frame pointer = 0x28:0xffffffff814b3a70
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = resume, IOPL = 0
current process = 0 ()
trap number = 12
panic: page fault
cpuid = 0
KDB: stack backtrace:
#0 0xffffffff805272e7 at kdb_backtrace+0x67
#1 0xffffffff804dd662 at vpanic+0x182
#2 0xffffffff804dd4d3 at panic+0x43
#3 0xffffffff807a37a1 at trap_fatal+0x351
#4 0xffffffff807a3993 at trap_pfault+0x1e3
#5 0xffffffff807a2f1c at trap+0x26c
#6 0xffffffff80787ca1 at calltrap+0x8
#7 0xffffffff8083b53a at topo_probe+0x61a
#8 0xffffffff8078fe93 at cpu_mp_start+0x1c3
#9 0xffffffff805382ca at mp_start+0x3a
#10 0xffffffff80465cd8 at mi_startup+0x118
#11 0xffffffff8028dfac at btext+0x2c
Uptime: 1s