Ticket #2654 (closed bug: fixed)

Opened 4 years ago

Last modified 14 months ago

The Boot Menu doesn't work on Intel Macs

Reported by: VinDuv Owned by: axeld
Priority: normal Milestone: R1
Component: System/Boot Loader Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: x86

Description

When I start Haiku on my Mac mini (with a USB keyboard), I can press the spacebar to enter the boot menu, but after that nothing happens if I press the arrows or the Enter keys.

Attachments

keyboard.cpp.diff Download (516 bytes) - added by jonas.kirilla 14 months ago.

Change History

comment:1 Changed 3 years ago by VinDuv

I just made some more tests.

Since the problem seemed to be in the wait_for_key function (in src/system/boot/platform/bios_ia32/keyboard.cpp), I replaced it with :

extern "C" union key
wait_for_key(void)
{
	union key key;
	
	do {
		key.ax = check_for_key();
	} while(key.ax == 0);


	return key;
}

Probably not the best way to do this, but it made the boot menu working...

The problem seems to be the "regs.eax = 0; call_bios(0x16, &regs);" call used in wait_for_keys. It seems to hang forever (I tried adding it to the top of check_for_boot_keys, and got nothing but a blinking cursor at boot)

comment:2 Changed 14 months ago by deejam

I have the same problem on my Mac Mini 1,1 on hrev41092. The same happens with an Apple Wireless Keyboard (white) and a Dell USB keyboard. I can enter the menu but I cannot navigate using the arrow keys or select using enter. Nothing happens.

Changed 14 months ago by jonas.kirilla

comment:3 Changed 14 months ago by jonas.kirilla

  • Has a Patch set

comment:4 follow-up: ↓ 5 Changed 14 months ago by jonas.kirilla

Here's an image to try with:

 http://www.kirilla.com/bios_keyboard_ticket_2654/haiku-nightly-anyboot.image.xz

It may contain other changes, so don't install from it please.

comment:5 in reply to: ↑ 4 Changed 14 months ago by deejam

Replying to jonas.kirilla:

Here's an image to try with:

 http://www.kirilla.com/bios_keyboard_ticket_2654/haiku-nightly-anyboot.image.xz

It may contain other changes, so don't install from it please.

Nice work kirilla! Tested on my Mac Mini 1,1 and in VirtualBox 4.0.4 on Mac OS X, and it works! I will test it on a couple of more computers this weekend.

comment:6 Changed 14 months ago by jonas.kirilla

Well, it's VinDuv's work really.

I tested my anyboot image burned to a CD on an i5, a C2Q and a P4/celeron. The boot menu could be entered and it all seemed to work okay, FWIW. (And the while loop didn't make anything catch fire that I noticed.)

comment:7 Changed 14 months ago by deejam

I have now tested this on a Macbook Pro, Macbook, Thinkad X21, Thinkpad T41 and a unknown HP Desktop. It works on all of them. I even tested to leave the T41 at the boot menu for half an hour to see if the fan would rev up, but it did'nt.

So it's safe to add this fix to svn and close this ticket. Big thanks to VinDuv for spoting the problem and take the time to create a patch. To bad it took 2 years before anybody took their time to verify it...

comment:8 Changed 14 months ago by axeld

  • Status changed from new to in-progress

The patch looks good besides a minor coding style issue, I'm going to commit it now.

comment:9 Changed 14 months ago by axeld

  • Status changed from in-progress to closed
  • Resolution set to fixed

Applied in hrev41117. The only possible downside would be a higher CPU usage, will see how this turns out in the future.

Note: See TracTickets for help on using tickets.