Ticket #2536 (new bug)

Opened 6 weeks ago

Last modified 4 weeks ago

[kernel] Haiku reboots upon boot

Reported by: diver Owned by: axeld
Priority: normal Milestone: R1
Component: System/Kernel Version: R1 development
Cc: Blocked By:
Platform: All Blocking:

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.r26477 works
haiku.image.r26493 don't work

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

Change History

follow-up: ↓ 2   Changed 6 weeks ago by mmlr

That was most probably uncovered by r26492. 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.

in reply to: ↑ 1   Changed 6 weeks ago by jackburton

Replying to mmlr:

That was most probably uncovered by r26492. 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.

  Changed 6 weeks 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.

  Changed 6 weeks ago by anevilyak

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

  Changed 6 weeks 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.

  Changed 4 weeks 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.

Note: See TracTickets for help on using tickets.