[SeaBIOS] Re: Keyboard is not working on MacBook Air 5,2 and MacBook Pro 10,1

2019-07-06 Thread Evgeny Zinoviev
Sorry for late response. Ok, I see. I'm trying to understand the code, please correct me where I am wrong. (It's my first time of some low level USB programming.) So there are two similar structures, `struct keyevent` and `struct usbkeyinfo` (if omit `u64 data` field in the latter): {     u8 modi

[SeaBIOS] Re: Keyboard is not working on MacBook Air 5,2 and MacBook Pro 10,1

2019-06-10 Thread Kevin O'Connor
On Sun, Jun 09, 2019 at 06:52:34PM +0300, Evgeny Zinoviev wrote: > So here's the patch for MacBooks, I hope it doesn't break anything. Unfortunately, the call to usb_poll_intr() in usb_check_key() will memcpy maxPacketSize bytes. That would overflow 'struct usbkeyinfo'. -Kevin > On 6/2/19 9:01

[SeaBIOS] Re: Keyboard is not working on MacBook Air 5,2 and MacBook Pro 10,1

2019-06-09 Thread Evgeny Zinoviev
So here's the patch for MacBooks, I hope it doesn't break anything. On 6/2/19 9:01 PM, Kevin O'Connor wrote: > On Sun, Jun 02, 2019 at 05:39:11PM +0300, Evgeny Zinoviev wrote: >> Hi folks. >> >> I've recently ported coreboot on MBA 5,2 (13'' mid 2012 model) and MBP >> 10,1 (15'' mid 2012 retina mo

[SeaBIOS] Re: Keyboard is not working on MacBook Air 5,2 and MacBook Pro 10,1

2019-06-02 Thread Evgeny Zinoviev
Thank you for answer. So, I discovered that the correct device is being ignored because of this check:     if (epdesc->wMaxPacketSize != 8)     return -1; If I just comment it out, the keyboard works. wMaxPacketSize = 10 in my case. I attach `lsusb -v` output, in case it will help. On 6/2/

[SeaBIOS] Re: Keyboard is not working on MacBook Air 5,2 and MacBook Pro 10,1

2019-06-02 Thread Kevin O'Connor
On Sun, Jun 02, 2019 at 05:39:11PM +0300, Evgeny Zinoviev wrote: > Hi folks. > > I've recently ported coreboot on MBA 5,2 (13'' mid 2012 model) and MBP > 10,1 (15'' mid 2012 retina model). The integrated keyboard on these > models is connected as a USB device, not PS/2. I have tested GRUB, > SeaBI