FreeBSD Bugzilla – Attachment 152311 Details for
Bug 196542
System stops booting with "ACPI APIC Table: <INTEL DENLOW>"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
mp_machdep.c patch with printf
mp_machdep.patch (text/plain), 7.36 KB, created by
Jonas Keidel
on 2015-01-28 14:00:11 UTC
(
hide
)
Description:
mp_machdep.c patch with printf
Filename:
MIME Type:
Creator:
Jonas Keidel
Created:
2015-01-28 14:00:11 UTC
Size:
7.36 KB
patch
obsolete
>--- mp_machdep.c 2014-11-11 21:03:19.000000000 +0100 >+++ mp_machdep.c.patched 2015-01-28 13:56:07.142876386 +0100 >@@ -522,13 +522,13 @@ > { > int i; > >- /* Initialize the logical ID to APIC ID table. */ >+ printf("Initialize the logical ID to APIC ID table.\n"); > for (i = 0; i < MAXCPU; i++) { > cpu_apic_ids[i] = -1; > cpu_ipi_pending[i] = 0; > } > >- /* Install an inter-CPU IPI for TLB invalidation */ >+ printf("Install an inter-CPU IPI for TLB invalidation\n"); > if (pmap_pcid_enabled) { > setidt(IPI_INVLTLB, IDTVEC(invltlb_pcid), SDT_SYSIGT, > SEL_KPL, 0); >@@ -540,23 +540,23 @@ > } > setidt(IPI_INVLRNG, IDTVEC(invlrng), SDT_SYSIGT, SEL_KPL, 0); > >- /* Install an inter-CPU IPI for cache invalidation. */ >+ printf("Install an inter-CPU IPI for cache invalidation.\n"); > setidt(IPI_INVLCACHE, IDTVEC(invlcache), SDT_SYSIGT, SEL_KPL, 0); > >- /* Install an inter-CPU IPI for all-CPU rendezvous */ >+ printf("Install an inter-CPU IPI for all-CPU rendezvous\n"); > setidt(IPI_RENDEZVOUS, IDTVEC(rendezvous), SDT_SYSIGT, SEL_KPL, 0); > >- /* Install generic inter-CPU IPI handler */ >+ printf("Install generic inter-CPU IPI handler\n"); > setidt(IPI_BITMAP_VECTOR, IDTVEC(ipi_intr_bitmap_handler), > SDT_SYSIGT, SEL_KPL, 0); > >- /* Install an inter-CPU IPI for CPU stop/restart */ >+ printf("Install an inter-CPU IPI for CPU stop/restart\n"); > setidt(IPI_STOP, IDTVEC(cpustop), SDT_SYSIGT, SEL_KPL, 0); > >- /* Install an inter-CPU IPI for CPU suspend/resume */ >+ printf("Install an inter-CPU IPI for CPU suspend/resume\n"); > setidt(IPI_SUSPEND, IDTVEC(cpususpend), SDT_SYSIGT, SEL_KPL, 0); > >- /* Set boot_cpu_id if needed. */ >+ printf("Set boot_cpu_id if needed.\n"); > if (boot_cpu_id == -1) { > boot_cpu_id = PCPU_GET(apic_id); > cpu_info[boot_cpu_id].cpu_bsp = 1; >@@ -564,14 +564,16 @@ > KASSERT(boot_cpu_id == PCPU_GET(apic_id), > ("BSP's APIC ID doesn't match boot_cpu_id")); > >- /* Probe logical/physical core configuration. */ >+ printf("Probe logical/physical core configuration.\n"); > topo_probe(); > >+ printf("assign_cpu_ids\n"); > assign_cpu_ids(); > >- /* Start each Application Processor */ >+ printf("Start each Application Processor\n"); > start_all_aps(); > >+ printf("set_interrupt_apic_ids\n"); > set_interrupt_apic_ids(); > } > >@@ -919,47 +921,47 @@ > > mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN); > >- /* install the AP 1st level boot code */ >+ printf("install the AP 1st level boot code\n"); > pmap_kenter(va, boot_address); > pmap_invalidate_page(kernel_pmap, va); > bcopy(mptramp_start, (void *)va, bootMP_size); > >- /* Locate the page tables, they'll be below the trampoline */ >+ printf("Locate the page tables, they'll be below the trampoline\n"); > pt4 = (u_int64_t *)(uintptr_t)(mptramp_pagetables + KERNBASE); > pt3 = pt4 + (PAGE_SIZE) / sizeof(u_int64_t); > pt2 = pt3 + (PAGE_SIZE) / sizeof(u_int64_t); > >- /* Create the initial 1GB replicated page tables */ >+ printf("Create the initial 1GB replicated page tables\n"); > for (i = 0; i < 512; i++) { >- /* Each slot of the level 4 pages points to the same level 3 page */ >+ printf("Each slot of the level 4 pages points to the same level 3 page\n"); > pt4[i] = (u_int64_t)(uintptr_t)(mptramp_pagetables + PAGE_SIZE); > pt4[i] |= PG_V | PG_RW | PG_U; > >- /* Each slot of the level 3 pages points to the same level 2 page */ >+ printf("Each slot of the level 3 pages points to the same level 2 page\n"); > pt3[i] = (u_int64_t)(uintptr_t)(mptramp_pagetables + (2 * PAGE_SIZE)); > pt3[i] |= PG_V | PG_RW | PG_U; > >- /* The level 2 page slots are mapped with 2MB pages for 1GB. */ >+ printf("The level 2 page slots are mapped with 2MB pages for 1GB.\n"); > pt2[i] = i * (2 * 1024 * 1024); > pt2[i] |= PG_V | PG_RW | PG_PS | PG_U; > } > >- /* save the current value of the warm-start vector */ >+ printf("save the current value of the warm-start vector\n"); > mpbioswarmvec = *((u_int32_t *) WARMBOOT_OFF); > outb(CMOS_REG, BIOS_RESET); > mpbiosreason = inb(CMOS_DATA); > >- /* setup a vector to our boot code */ >+ printf("setup a vector to our boot code\n"); > *((volatile u_short *) WARMBOOT_OFF) = WARMBOOT_TARGET; > *((volatile u_short *) WARMBOOT_SEG) = (boot_address >> 4); > outb(CMOS_REG, BIOS_RESET); > outb(CMOS_DATA, BIOS_WARM); /* 'warm-start' */ > >- /* start each AP */ >+ printf("start each AP\n"); > for (cpu = 1; cpu < mp_ncpus; cpu++) { > apic_id = cpu_apic_ids[cpu]; > >- /* allocate and set up an idle stack data page */ >+ printf("allocate and set up an idle stack data page\n"); > bootstacks[cpu] = (void *)kmem_malloc(kernel_arena, > KSTACK_PAGES * PAGE_SIZE, M_WAITOK | M_ZERO); > doublefault_stack = (char *)kmem_malloc(kernel_arena, >@@ -972,9 +974,9 @@ > bootSTK = (char *)bootstacks[cpu] + KSTACK_PAGES * PAGE_SIZE - 8; > bootAP = cpu; > >- /* attempt to start the Application Processor */ >+ printf("attempt to start the Application Processor\n"); > if (!start_ap(apic_id)) { >- /* restore the warmstart vector */ >+ printf("restore the warmstart vector\n"); > *(u_int32_t *) WARMBOOT_OFF = mpbioswarmvec; > panic("AP #%d (PHY# %d) failed!", cpu, apic_id); > } >@@ -982,13 +984,13 @@ > CPU_SET(cpu, &all_cpus); /* record AP in CPU map */ > } > >- /* restore the warmstart vector */ >+ printf("restore the warmstart vector\n"); > *(u_int32_t *) WARMBOOT_OFF = mpbioswarmvec; > > outb(CMOS_REG, BIOS_RESET); > outb(CMOS_DATA, mpbiosreason); > >- /* number of APs actually started */ >+ printf("number of APs actually started: %d\n", mp_naps); > return mp_naps; > } > >@@ -1006,16 +1008,17 @@ > int vector, ms; > int cpus; > >- /* calculate the vector */ >+ printf("calculate the vector\n"); > vector = (boot_address >> 12) & 0xff; > >- /* used as a watchpoint to signal AP startup */ >+ printf("used as a watchpoint to signal AP startup\n"); > cpus = mp_naps; > > ipi_startup(apic_id, vector); > >- /* Wait up to 5 seconds for it to start. */ >+ printf("Wait up to 5 seconds for it to start.\n"); > for (ms = 0; ms < 5000; ms++) { >+ printf("wait ms: %d\n", ms); > if (mp_naps > cpus) > return 1; /* return SUCCESS */ > DELAY(1000); >@@ -1072,9 +1075,12 @@ > * bug), CPU waiting for STARTUP IPI. OR this INIT IPI might be > * ignored. > */ >+ printf("ipi_startup: lapic_ipi_raw - init ipi\n"); > lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | > APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_INIT, apic_id); >- lapic_ipi_wait(-1); >+ printf("ipi_startup: lapic_ipi_wait\n"); >+ lapic_ipi_wait(10000); >+ printf("ipi_startup: delay\n"); > DELAY(10000); /* wait ~10mS */ > > /* >@@ -1085,10 +1091,13 @@ > * run. OR the previous INIT IPI was ignored. and this STARTUP IPI > * will run. > */ >+ printf("ipi_startup: lapic_ipi_raw - startup ipi\n"); > lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | > APIC_LEVEL_DEASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP | > vector, apic_id); >- lapic_ipi_wait(-1); >+ printf("ipi_startup: lapic_ipi_wait\n"); >+ lapic_ipi_wait(10000); >+ printf("ipi_startup: delay\n"); > DELAY(200); /* wait ~200uS */ > > /* >@@ -1097,10 +1106,13 @@ > * this STARTUP IPI will be ignored, as only ONE STARTUP IPI is > * recognized after hardware RESET or INIT IPI. > */ >+ printf("ipi_startup: lapic_ipi_raw - startup ipi #2\n"); > lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | > APIC_LEVEL_DEASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP | > vector, apic_id); >- lapic_ipi_wait(-1); >+ printf("ipi_startup: lapic_ipi_wait\n"); >+ lapic_ipi_wait(10000); >+ printf("ipi_startup: delay\n"); > DELAY(200); /* wait ~200uS */ > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 196542
:
151448
|
151451
|
151604
|
152254
|
152309
| 152311