Opened 17 years ago

Closed 17 years ago

#1664 closed bug (fixed)

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/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

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

Attachments (6)

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

Download all attachments as: .zip

Change History (16)

by kaoutsis, 17 years ago

Attachment: boot-failure.txt added

comment:1 by axeld, 17 years ago

Component: - GeneralSystem/Boot Loader
Owner: changed from axeld to mmlr

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

in reply to:  1 comment:2 by kaoutsis, 17 years ago

Summary: boot failure with r23114 on a p4 3Ghz MTboot 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.

comment:3 by mmlr, 17 years ago

Status: newassigned

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 ; comment:4 by kaoutsis, 17 years ago

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 ; comment:5 by kaoutsis, 17 years ago

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? :-)

by kaoutsis, 17 years ago

Attachment: syslog-hyper-threading.txt added

by kaoutsis, 17 years ago

Attachment: two-cpus.png added

comment:6 by kaoutsis, 17 years ago

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

in reply to:  5 comment:7 by mmlr, 17 years ago

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.

comment:8 by mmlr, 17 years ago

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

by kaoutsis, 17 years ago

by kaoutsis, 17 years ago

by kaoutsis, 17 years ago

Attachment: with-without-HT.diff added

in reply to:  8 comment:9 by kaoutsis, 17 years ago

Replying to mmlr:

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

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

comment:10 by mmlr, 17 years ago

Resolution: fixed
Status: assignedclosed

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

Note: See TracTickets for help on using tickets.