Opened 11 years ago

Closed 7 years ago

Last modified 12 months ago

#2536 closed bug (fixed)

[kernel] Haiku reboots upon boot

Reported by: diver Owned by: mmlr
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Bug report from damoklas Since a few revisions Haiku don't boot anymore, it reboots just after boot logo appears on screen.
Safemode options doesn't change anything.

haiku.image.hrev26477 works
haiku.image.hrev26493 don't work

CPU — AMD Athlon™ XP 2500+ (Barton)
Motherboard — ABIT NF7–S2G
1GB DDR RAM
HDD — SAMSUNG SP0812N (IDE)

Attachments (1)

mappinglocalapic.jpg (353.9 KB) - added by damoklas 9 years ago.
PANIC: maping the local apic failed

Download all attachments as: .zip

Change History (14)

comment:1 Changed 11 years ago by mmlr

That was most probably uncovered by hrev26492. The change itself is not problematic, but it enabled APIC timers on non-SMP systems. Probably there is a problem with the timer and/or APIC code in this case. Please try removing the "gAPICTimer" on line 41 of src/system/kernel/arch/x86/arch_timer.c to verify that. If this resolves the reboot problem we would need to look into better verifying the functionality of the APIC or review the APIC setup code.

comment:2 in reply to:  1 Changed 11 years ago by jackburton

Replying to mmlr:

That was most probably uncovered by hrev26492. The change itself is not problematic, but it enabled APIC timers on non-SMP systems. Probably there is a problem with the timer and/or APIC code in this case. Please try removing the "gAPICTimer" on line 41 of src/system/kernel/arch/x86/arch_timer.c to verify that. If this resolves the reboot problem we would need to look into better verifying the functionality of the APIC or review the APIC setup code.

There seems to be some faulty BIOSes which cause problems when using the local APIC (as you already pointed out, btw). We should have a kernel setting and a safe mode option to disable the use of the local APIC.

comment:3 Changed 11 years ago by mmlr

The local APIC is necessary when doing SMP anyway (as it is responsible for inter-CPU messaging) and always seemed to work fine for all the configurations I have used it on. Therefore using APIC timers when doing SMP should be pretty much OK. Using it for non-SMP configurations has a higher chance of not working, because the local APIC is not strictly needed on a non-SMP system and I can very well imagine that there are broken local APICs / BIOSes in those cases. We might just change the code a bit again so that local APICs aren't used at all in the non-SMP case, as this seemed to work fine up to now.

comment:4 Changed 11 years ago by anevilyak

Just curious, is there any inherent advantage to the APIC timer over the PIT? Better precision or anything like that?

comment:5 Changed 11 years ago by mmlr

Well, it's a controller built into the processor, so it has the advantage of having less overhead compared to an external controller. It probably has a higher precision too, though I wouldn't know the numbers. The local APIC is part of processors since the Pentium Pro, so it's nothing just recently introduced. The problem is, as mentioned above, that it is not strictly necessary on non-SMP systems, so its exposure is far less which makes unrecognized bugs more likely.

comment:6 Changed 11 years ago by diver

It seems that if APIC option is disabled in BIOS Haiku doesn't boot, if enabled (either 1.1 or 1.4) Haiku boots just fine.

comment:7 Changed 9 years ago by damoklas

I'm tested for this bug Haiku rev. 38478 and got (if APIC Mode Disalabled) on that same motherboard kernel panic at start OS, see added by me picture.

Changed 9 years ago by damoklas

Attachment: mappinglocalapic.jpg added

PANIC: maping the local apic failed

comment:8 Changed 8 years ago by diver

Owner: changed from axeld to mmlr
Status: newassigned

comment:9 Changed 8 years ago by diver

damoklas, can you check with current revision?

comment:10 Changed 8 years ago by scottmc

Can you recheck this with a recent Haiku build? It may have been fixed recently.

comment:11 Changed 8 years ago by scottmc

Blocking: 7665 added

comment:12 Changed 7 years ago by diver

Resolution: fixed
Status: assignedclosed

It was reported as fixed.

comment:13 Changed 12 months ago by waddlesplash

Blocking: 7665 removed
Note: See TracTickets for help on using tickets.