Garrett D'Amore wrote > I believe that Solaris uses keyboards (and maybe mice too) in what is > called "BOOT Protocol" mode.
That's true for the USB keyboards. An USB mouse is used in report mode, though (I think otherwise we couldn't have USB mouse wheel support). > This is a simplistic report format that > was originally intended to allow simple translation to BIOS-compatible > keyboard support. (I.e. so you don't have to have a full HID parser in > your BIOS or other embedded environments if you only want basic > keyboard/mouse support.) Yes. > Apple doesn't have BIOS, and I *suspect* doesn't support the BOOT > protocol in their latest products. That can't be true, because Solaris' GRUB needs a BIOS, and GRUB is working just fine on the MacBook Pro, including the internal USB keyboard. Old Apple iMacs didn't have a BIOS, only EFI firmware. But at some point a firmware update named "BootCamp" was offered by Apple that added the missing BIOS support (to allow installing Windows - or Solaris / Linux / ....). > Having a full HID parser would probably solve the problem. Hmm, usbkbm is already using the HID parser. http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/io/usb/clients/usbkbm/usbkbm.c#548 And I suspect that's the problem! Since it's using the keyboard in boot protocol mode, it shouldn't try to find out the keyboard's packet size from looking at / parsing the HID descriptor. I suspect that would only be a valid strategy if the boot protocol is disabled. I suspect that when an usb keyboard is used in boot protocol mode, it should just use an expected keyboard data packet size of USB_KBD_DEFAULT_PACKET_SIZE (=8) bytes (without looking at the HID descriptors)! > That might be difficult to get into something the likes of GRUB.... No, keyboard in GRUB works just fine. > A question: do the keyboard/mouse work in X11 after the system has > booted (assuming you used an external keyboard to get that far)? Yes: The external USB keyboard works in X11. The internal USB trackpad works in X11. The internal USB keyboard doesn't work in X11, either. dtracing in usbkbm_rput() reveals that the MacBook Pro USB keyboard is sending standard 8 bytes boot protocol packets, but they are dropped on the floor because the usbkbm module thinks that the correct packets size is 0 (zero!) bytes - apparently that size of 0 bytes doesn't make any sense at all. All I have to do is patch the usbkbmd->usbkbm_packet_size variable from 0 to 8, and the internal usb MacBook Pro keyboard starts to work. So, I think for the MacBook USB keyboard we either need: replace this block: 548 if (hidparser_get_packet_size(usbkbmd->usbkbm_report_descr, 549 0, HIDPARSER_ITEM_INPUT, (uint32_t *)&packet_size) == 550 HIDPARSER_FAILURE) { 551 552 USB_DPRINTF_L3(PRINT_MASK_OPEN, 553 usbkbm_log_handle, "get_packet_size failed" 554 "setting default packet size(8)"); 555 556 /* Setting to default packet size = 8 */ 557 usbkbmd->usbkbm_packet_size = 558 USB_KBD_DEFAULT_PACKET_SIZE; 559 } else { 560 usbkbmd->usbkbm_packet_size = packet_size/8; 561 } with usbkbmd->usbkbm_packet_size = USB_KBD_DEFAULT_PACKET_SIZE; Or we could at least sanity check the packet size value returned by parsing the usb keyboard's HID descriptors after line 560. usbkbmd->usbkbm_packet_size == 0 doesn't make sense and should be replaced by USB_KBD_DEFAULT_PACKET_SIZE. -- This message posted from opensolaris.org