Ticket #1664 (closed bug: fixed)

Opened 13 months ago

Last modified 13 months ago

boot failure with r23114 on a p4 3Ghz when the intel hyperthreading feature is disabled

Reported by: kaoutsis Owned by: mmlr
Priority: normal Milestone: R1
Component: System/Boot Loader Version: R1 development
Cc: Blocked By:
Platform: All Blocking:

Description

serial log says that num_cpus =2 may be is related?

Attachments

boot-failure.txt (15.4 KB) - added by kaoutsis 13 months ago.
syslog-hyper-threading.txt (75.1 KB) - added by kaoutsis 13 months ago.
two-cpus.png (116.1 KB) - added by kaoutsis 13 months ago.
syslog-r23119-with-HT-enabled.txt (75.3 KB) - added by kaoutsis 13 months ago.
syslog-r23119-without-HT-enabled.txt (75.2 KB) - added by kaoutsis 13 months ago.
with-without-HT.diff (12.3 KB) - added by kaoutsis 13 months ago.

Change History

Changed 13 months ago by kaoutsis

follow-up: ↓ 2   Changed 13 months ago by axeld

  • owner changed from axeld to mmlr
  • component changed from - General to System/Boot Loader

Is this a new problem and used to work with an older revision? Does it not have 2 CPUs (hyperthreading)?

in reply to: ↑ 1   Changed 13 months ago by kaoutsis

  • summary changed from boot failure with r23114 on a p4 3Ghz MT to boot failure with r23114 on a p4 3Ghz with the intel hyperthreading feature

Replying to axeld:

Is this a new problem and used to work with an older revision? Does it not have 2 CPUs (hyperthreading)?

both correct; this is a new problem,i believe related with the SMP changes and the machine has this hyperthreading feature, which i had always turned off in the bios settings.

follow-up: ↓ 4   Changed 13 months ago by mmlr

  • status changed from new to assigned

From the output it is definitely caused by the new code. In your case probably only one CPU should be found (since you have hyper-threading disabled). What looks strange to me are the APIC ids found:

smp: found local APIC with id 0
smp: found local APIC with id 129
smp: found local APIC with id 130
smp: found local APIC with id 131

The first is OK and the boot CPU. The others are either from a broken ACPI table or are simply no CPUs. I will try to find something corresponding in the spec. Probably the three extra APICs (with IDs > 128) should just be ignored. With that logic it would be a normal single CPU system.

What you could do is to enable hyper-threading in the BIOS and see if the output changes. It should add another local APIC probably with id 1.

in reply to: ↑ 3 ; follow-up: ↓ 5   Changed 13 months ago by kaoutsis

Replying to mmlr:

What you could do is to enable hyper-threading in the BIOS and see if the output changes. It should add another local APIC probably with id 1.

Ok, i will.

in reply to: ↑ 4 ; follow-up: ↓ 7   Changed 13 months ago by kaoutsis

Replying to kaoutsis:

Replying to mmlr:

What you could do is to enable hyper-threading in the BIOS and see if the output changes. It should add another local APIC probably with id 1.

Ok, i will.

I have enabled hyper-threading support, and now haiku boots fine! :-)

the interesting part: (see attached syslog-hyper-threading.txt for the full log, and a screen shot two-cpus.png)

KERN: APM version 1.2 available, flags 2.
KERN: smp_acpi_probe: entry base 0x9fc00, limit 0xa0000
KERN: smp_acpi_probe: entry base 0xf0000, limit 0x100000
KERN: smp_acpi_probe: found ACPI RSDP signature at 0x000fa6d0
KERN: smp: using ACPI to detect MP configuration
KERN: smp: found rsdp at 0x000fa6d0 oem id: ACPIAM
KERN: smp: rsdp points to rsdt at 0x1f740000
KERN: smp: searching 3 entries for APIC information
KERN: smp: skipping uninteresting header 'FACP'
KERN: smp: local apic address is 0xfee00000
KERN: smp: found local APIC with id 0
KERN: smp: found local APIC with id 1
KERN: smp: found local APIC with id 130
KERN: smp: found local APIC with id 131
KERN: smp: found io APIC with id 2 and address 0xfec00000
KERN: smp_boot: had found > 1 cpus
KERN: post config:
KERN: num_cpus = 2
KERN: apic_phys = 0xfee00000
KERN: ioapic_phys = 0xfec00000
KERN: apic = 0x80108000
KERN: ioapic = 0x80109000
KERN: APIC ticks/sec = 199627639
[...]

i am confused, how many cpus does this machine have, one or two? :-)

Changed 13 months ago by kaoutsis

Changed 13 months ago by kaoutsis

  Changed 13 months ago by kaoutsis

  • summary changed from boot failure with r23114 on a p4 3Ghz with the intel hyperthreading feature to boot failure with r23114 on a p4 3Ghz when the intel hyperthreading feature is disabled

in reply to: ↑ 5   Changed 13 months ago by mmlr

Replying to kaoutsis:

i am confused, how many cpus does this machine have, one or two? :-)

It has one physical processor but when HT is enabled it provides two logical processors.

When you enable hyper-threading there are two processors listed in the ACPI table. That it works with hyper-threading enabled is caused by the fact that with the revision you test there is a limit of 2 CPUs. With enabled HT the two logical processors are enumerated first and the "strange ones" that cause the hang are disabled because of the limit. I have removed that limit some revisions later though so if you update to a more recent one and try again you will see it fail with either HT setting.

There is an enable flag in the local APIC structure which I forgot to check against. If the entries your BIOS reports are disabled, it is an easy fix. If not I have to investigate this further. Will check in a fix later tonight.

follow-up: ↓ 9   Changed 13 months ago by mmlr

I have checked in the change to ignore disabled local APICs. Can you please check with a revision > r23118 and report if this solves your problem?

Changed 13 months ago by kaoutsis

Changed 13 months ago by kaoutsis

Changed 13 months ago by kaoutsis

in reply to: ↑ 8   Changed 13 months ago by kaoutsis

Replying to mmlr:

I have checked in the change to ignore disabled local APICs. Can you please check with a revision > r23118 and report if this solves your problem?

yes, it's fixed, thanks; for more info i have attached syslog-r23119-with-HT-enabled.txt, syslog-r23119-without-HT-enabled.txt, with-without-HT.diff

  Changed 13 months ago by mmlr

  • status changed from assigned to closed
  • resolution set to fixed

Perfect, thanks for testing! In that case I will close this bug as fixed.

Note: See TracTickets for help on using tickets.