Ok, I’ve finally got it working!

 

As I said earlier, this keyboard has interrupt endpoint size = 32 bytes. SeaBIOS doesn’t allow it ("usb_kbd_setup" function checks for “(epdesc->wMaxPacketSize != 8)").

 

But this fix is not enough, cause “ehci_poll_intr(struct usb_pipe *p, void *data)” use unsafe “memcpy_far” for data with size of “maxpacket”. So if maxpacket is 32, there will be 32 bytes copied. But “usb_check_key”  function use “keyevent” structure address as data parameter for “ehci_poll_intr” function. And the size of this structure is only 8 bytes, so this will lead to memory corruption.

 

If we look at "Device Class Definition for Human Interface Devices (HID)" specification (http://www.usb.org/developers/hidpage/HID1_11.pdf - Appendix B: Boot Interface Descriptors – page 59):

“The HID Subclass 1 defines two descriptors for Boot Devices. Devices may append additional data to these boot reports, but the first 8 bytes of keyboard reports and the first 3 bytes of mouse reports must conform to the format defined by the Boot Report descriptor in order for the data to be correctly interpreted by the BIOS. The report may not exceed 8 bytes in length. The BIOS will ignore any extensions to reports. These descriptors describe reports that the BIOS expects to see.”

 

This is a little ambiguous for me how “Devices may append additional data” but “The report may not exceed 8 bytes in length” (maybe I misunderstand “may not” in second sentence), but it looks like it is SeaBIOS responsibility to “ignore any extensions to reports”. What do you think?

 

Best regards,

Aladyshev Konstantin

 

 

-----Original Message-----
From:
Аладышев Константин [mailto:aladyshev@nicevt.ru]
Sent: Monday, January 15, 2018 3:02 PM
To: 'K
evin O'Connor'
Cc: 'seabios@seabios.org'
Subject: RE: K-TEK-M275TP-FN-BL-ML USB keyboard support

 

Ok, finally - boot log with the most modern SeaBIOS (https://pastebin.com/ZvPHXN61 ).

 

And please look at my post https://mail.coreboot.org/pipermail/seabios/2017-October/011897.html

 

Best regards,

Aladyshev Konstantin

 

________________________________________

 

Jumping to boot code at 000ffa38

CPU0: stack: 7f7cb000 - 7f7cc000, lowest used address 7f7cbaa4, stack used: 1372 bytes

SeaBIOS (version rel-1.11.0-4-g844b864)

BUILD: gcc: (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 binutils: (GNU Binutils for Ubuntu) 2.24

Attempting to find coreboot table

Found coreboot table forwarder.

Now attempting to find coreboot memory map

Add to e820 map: 00000000 00001000 2

Add to e820 map: 00001000 0009f000 1

Add to e820 map: 000a0000 00060000 2

Add to e820 map: 00100000 7f60b000 1

Add to e820 map: 7f70b000 000f5000 2

Add to e820 map: 7f800000 02a00000 2

Add to e820 map: f0000000 04000000 2

Add to e820 map: fed10000 0000a000 2

Add to e820 map: fed84000 00001000 2

Add to e820 map: 100000000 17de00000 1

Add to e820 map: 00000000 00004000 1

SeaBIOS (version rel-1.11.0-4-g844b864)

BUILD: gcc: (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 binutils: (GNU Binutils for Ubuntu) 2.24

Found coreboot cbmem console @ 7f7dd000

Found mainboard JSC Google Panther

malloc preinit

Add to e820 map: 000a0000 00050000 -1

Add to e820 map: 000f0000 00010000 2

Add to e820 map: 7f6cb000 00040000 2

phys_alloc zone=0x000eb77c size=56320 align=10 ret=7f6bd370 (detail=0x7f6bd340)

Relocating init from 0x000ddc00 to 0x7f6bd370 (size 56320)

malloc init

Found CBFS header at 0xfffff3c8

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bd240 (detail=0x7f6bd210)

Add romfile: bootsplash.jpg (size=100229)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bd170 (detail=0x7f6bd140)

Add romfile: bootorder (size=891)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bd0a0 (detail=0x7f6bd070)

Add romfile: cmos_layout.bin (size=1164)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bcfd0 (detail=0x7f6bcfa0)

Add romfile: pci8086,0a26.rom (size=65536)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bcf00 (detail=0x7f6bced0)

Add romfile: cmos.default (size=256)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bce30 (detail=0x7f6bce00)

Add romfile: cpu_microcode_blob.bin (size=20480)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bcd60 (detail=0x7f6bcd30)

Add romfile: etc/usb-time-sigatt (size=8)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bcc90 (detail=0x7f6bcc60)

Add romfile: config (size=6431)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bcbc0 (detail=0x7f6bcb90)

Add romfile: revision (size=576)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bcaf0 (detail=0x7f6bcac0)

Add romfile:  (size=216)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bca20 (detail=0x7f6bc9f0)

Add romfile: fallback/romstage (size=37740)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bc950 (detail=0x7f6bc920)

Add romfile: fallback/ramstage (size=85917)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bc880 (detail=0x7f6bc850)

Add romfile: fallback/payload (size=73135)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bc7b0 (detail=0x7f6bc780)

Add romfile: img/memtest (size=46157)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bc6e0 (detail=0x7f6bc6b0)

Add romfile: pci8086,1521.rom (size=65536)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bc610 (detail=0x7f6bc5e0)

Add romfile:  (size=149848)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bc540 (detail=0x7f6bc510)

Add romfile: mrc.bin (size=190180)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bc470 (detail=0x7f6bc440)

Add romfile:  (size=71832)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bc3a0 (detail=0x7f6bc370)

Add romfile: mrc.cache (size=65536)

phys_alloc zone=0x7f6caeec size=156 align=10 ret=7f6bc2d0 (detail=0x7f6bc2a0)

Add romfile:  (size=62360)

multiboot: eax=ffa38, ebx=7f7c33d8

init ivt

init bda

Add to e820 map: 0009fc00 00000400 2

phys_alloc zone=0x7f6caeec size=892 align=10 ret=7f6bbf20 (detail=0x7f6bbef0)

Copying romfile 'bootorder' (len 891)

Copying data 891@0xfff187e8 to 891@0x7f6bbf20

phys_alloc zone=0x7f6caeec size=108 align=10 ret=7f6bbe80 (detail=0x7f6bbe50)

boot order:

1: /pci@i0cf8/*@1f,2/drive@1/disk@0

2: /pci@i0cf8/usb@1d/hub@1/usb-*@1

3: /pci@i0cf8/usb@1d/hub@1/usb-*@2

4: /pci@i0cf8/usb@1d/hub@1/usb-*@3

5: /pci@i0cf8/usb@1d/hub@1/usb-*@4

6: /pci@i0cf8/usb@1d/hub@1/usb-*@5

7: /pci@i0cf8/usb@1d/hub@1/usb-*@6

8: /pci@i0cf8/usb@1d/hub@1/usb-*@7

9: /pci@i0cf8/pci-bridge@1c,4/*@0

10: /pci@i0cf8/pci-bridge@1c,4/*@0,1

11: /pci@i0cf8/pci-bridge@1c/*@0

12: /pci@i0cf8/pci-bridge@1c/*@0,1

13: /pci@i0cf8/pci-bridge@1c/*@0,2

14: /pci@i0cf8/pci-bridge@1c/*@0,3

15: /pci@i0cf8/pci-bridge@1c,1/*@0

16: /pci@i0cf8/pci-bridge@1c,1/*@0,1

17: /pci@i0cf8/pci-bridge@1c,1/*@0,2

18: /pci@i0cf8/pci-bridge@1c,1/*@0,3

19: /pci@i0cf8/pci-bridge@1c,2/*@0

20: /pci@i0cf8/pci-bridge@1c,2/*@0,1

21: /pci@i0cf8/pci-bridge@1c,2/*@0,2

22: /pci@i0cf8/pci-bridge@1c,2/*@0,3

23: /pci@i0cf8/pci-bridge@1c,3/*@0

24: /pci@i0cf8/pci-bridge@1c,3/*@0,1

25: /pci@i0cf8/pci-bridge@1c,3/*@0,2

26: /pci@i0cf8/pci-bridge@1c,3/*@0,3

27: /pci@i0cf8/*@1f,2/drive@0/disk@0

init bios32

init PMM

init PNPBIOS table

init keyboard

init mouse

init pic

math cp init

PCI probe

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bbe30 (detail=0x7f6bbe00)

PCI device 00:00.0 (vd=8086:0a04 c=0600)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bbde0 (detail=0x7f6bbdb0)

PCI device 00:02.0 (vd=8086:0a26 c=0300)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bbd90 (detail=0x7f6bbd60)

PCI device 00:03.0 (vd=8086:0a0c c=0403)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bbd40 (detail=0x7f6bbd10)

PCI device 00:16.0 (vd=8086:9c3a c=0780)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bbcf0 (detail=0x7f6bbcc0)

PCI device 00:1b.0 (vd=8086:9c20 c=0403)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bbca0 (detail=0x7f6bbc70)

PCI device 00:1c.0 (vd=8086:9c10 c=0604)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bbc50 (detail=0x7f6bbc20)

PCI device 00:1c.1 (vd=8086:9c12 c=0604)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bbc00 (detail=0x7f6bbbd0)

PCI device 00:1c.2 (vd=8086:9c14 c=0604)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bbbb0 (detail=0x7f6bbb80)

PCI device 00:1c.3 (vd=8086:9c16 c=0604)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bbb60 (detail=0x7f6bbb30)

PCI device 00:1c.4 (vd=8086:9c18 c=0604)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bbb10 (detail=0x7f6bbae0)

PCI device 00:1c.5 (vd=8086:9c1a c=0604)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bbac0 (detail=0x7f6bba90)

PCI device 00:1d.0 (vd=8086:9c26 c=0c03)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bba70 (detail=0x7f6bba40)

PCI device 00:1f.0 (vd=8086:9c43 c=0601)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bba20 (detail=0x7f6bb9f0)

PCI device 00:1f.2 (vd=8086:9c03 c=0106)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bb9d0 (detail=0x7f6bb9a0)

PCI device 00:1f.3 (vd=8086:9c22 c=0c05)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bb980 (detail=0x7f6bb950)

PCI device 05:00.0 (vd=8086:1521 c=0200)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bb930 (detail=0x7f6bb900)

PCI device 05:00.1 (vd=8086:1521 c=0200)

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bb8e0 (detail=0x7f6bb8b0)

PCI device 06:00.0 (vd=104c:8240 c=0604)

Found 18 PCI devices (max PCI bus is 07)

Relocating coreboot bios tables

phys_alloc zone=0x7f6caef4 size=31 align=10 ret=f4d90 (detail=0x7f6bb880)

Copying SMBIOS entry point from 0x7f713000 to 0x000f4d90

phys_alloc zone=0x7f6caef4 size=36 align=10 ret=f4d60 (detail=0x7f6bb850)

Copying ACPI RSDP from 0x7f715000 to 0x000f4d60

phys_alloc zone=0x7f6caef4 size=476 align=10 ret=f4b80 (detail=0x7f6bb820)

Copying MPTABLE from 0x7f739000/7f739010 to 0x000f4b80

phys_alloc zone=0x7f6caef4 size=304 align=10 ret=f4a50 (detail=0x7f6bb7f0)

Copying PIR from 0x7f73a000 to 0x000f4a50

rsdp=0x000f4d60

rsdt=0x7f715030

table(50434146)=0x7f718980

pm_tmr_blk=1008

Using pmtimer, ioport 0x1008

init timer

Scan for VGA option rom

Attempting to init PCI bdf 00:02.0 (vd 8086:0a26)

Copying data 65536@0xfff19078 to 65536@0x000c0000

Checking rom 0x000c0000 (sig aa55 size 128)

Running option rom at c000:0003

unimplemented handle_155fXX:27:

   a=04005f34  b=00000190  c=00000002  d=04000000 ds=0000 es=0000 ss=db80

  si=00042090 di=00000080 bp=00000000 sp=0000ffd6 cs=c000 ip=5bef  f=0046

unimplemented handle_155fXX:27:

   a=00005f51  b=0000c000  c=00000000  d=000003da ds=c000 es=c000 ss=db80

  si=00000c59 di=00000080 bp=00000000 sp=0000ffd6 cs=c000 ip=5bef  f=0046

Turning on vga text mode console

SeaBIOS (version rel-1.11.0-4-g844b864)

init usb

Copying data 8@0xfff2e278 to 8@0x00006e3c

phys_alloc zone=0x7f6caeec size=32 align=10 ret=7f6bb7d0 (detail=0x7f6bb7a0)

EHCI init on dev 00:1d.0 (regs=0xe0508820)

phys_alloc zone=0x7f6caef8 size=4096 align=1000 ret=7f70a000 (detail=0x7f6bb770)

phys_alloc zone=0x7f6caef8 size=68 align=80 ret=7f709f80 (detail=0x7f6bb740)

phys_alloc zone=0x7f6caef8 size=68 align=80 ret=7f709f00 (detail=0x7f6bb710)

phys_alloc zone=0x7f6caeec size=28 align=10 ret=7f6bb6f0 (detail=0x7f6bb6c0)

set_address 0x7f6bb7d0

ehci_alloc_async_pipe 0x7f6bb7d0 0

phys_alloc zone=0x7f6caeec size=92 align=80 ret=7f6bb600 (detail=0x7f6bb690)

ehci_send_pipe qh=0x7f6bb600 dir=0 data=0x00000000 size=0

ehci_alloc_async_pipe 0x7f6bb7d0 0

config_usb: 0x7f6bb650

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006d86 size=8

device rev=0200 cls=09 sub=00 proto=01 size=64

ehci_alloc_async_pipe 0x7f6bb7d0 0

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006dac size=9

phys_alloc zone=0x7f6caeec size=25 align=10 ret=7f6bb670 (detail=0x7f6bb5d0)

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x7f6bb670 size=25

ehci_send_pipe qh=0x7f6bb600 dir=0 data=0x00000000 size=0

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006d76 size=7

ehci_send_pipe qh=0x7f6bb600 dir=0 data=0x00000000 size=0

ehci_send_pipe qh=0x7f6bb600 dir=0 data=0x00000000 size=0

ehci_send_pipe qh=0x7f6bb600 dir=0 data=0x00000000 size=0

ehci_send_pipe qh=0x7f6bb600 dir=0 data=0x00000000 size=0

ehci_send_pipe qh=0x7f6bb600 dir=0 data=0x00000000 size=0

ehci_send_pipe qh=0x7f6bb600 dir=0 data=0x00000000 size=0

ehci_send_pipe qh=0x7f6bb600 dir=0 data=0x00000000 size=0

ehci_send_pipe qh=0x7f6bb600 dir=0 data=0x00000000 size=0

phys_alloc zone=0x7f6caeec size=28 align=10 ret=7f6bb5b0 (detail=0x7f6bb580)

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

phys_free 7f6bb5b0 (detail=0x7f6bb580)

phys_alloc zone=0x7f6caeec size=28 align=10 ret=7f6bb5b0 (detail=0x7f6bb580)

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

phys_free 7f6bb5b0 (detail=0x7f6bb580)

phys_alloc zone=0x7f6caeec size=28 align=10 ret=7f6bb5b0 (detail=0x7f6bb580)

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

phys_free 7f6bb5b0 (detail=0x7f6bb580)

phys_alloc zone=0x7f6caeec size=28 align=10 ret=7f6bb5b0 (detail=0x7f6bb580)

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

phys_free 7f6bb5b0 (detail=0x7f6bb580)

phys_alloc zone=0x7f6caeec size=28 align=10 ret=7f6bb5b0 (detail=0x7f6bb580)

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

ehci_send_pipe qh=0x7f6bb600 dir=0 data=0x00000000 size=0

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c18 size=4

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c18 size=4

set_address 0x7f6bb7d0

ehci_alloc_async_pipe 0x7f6bb7d0 0

phys_alloc zone=0x7f6caeec size=92 align=80 ret=7f6bb500 (detail=0x7f6bb4d0)

ehci_send_pipe qh=0x7f6bb500 dir=0 data=0x00000000 size=0

ehci_alloc_async_pipe 0x7f6bb7d0 0

config_usb: 0x7f6bb550

ehci_send_pipe qh=0x7f6bb500 dir=128 data=0x00006c9a size=8

device rev=0110 cls=00 sub=00 proto=00 size=64

ehci_alloc_async_pipe 0x7f6bb7d0 0

ehci_send_pipe qh=0x7f6bb500 dir=128 data=0x00006cc0 size=9

phys_alloc zone=0x7f6caeec size=59 align=10 ret=7f6bb490 (detail=0x7f6bb460)

ehci_send_pipe qh=0x7f6bb500 dir=128 data=0x7f6bb490 size=59

ehci_send_pipe qh=0x7f6bb500 dir=0 data=0x00000000 size=0

usb_hid_setup 0x7f6bb550

phys_free 7f6bb490 (detail=0x7f6bb460)

ehci_send_pipe qh=0x7f6bb600 dir=0 data=0x00000000 size=0

phys_free 7f6bb5b0 (detail=0x7f6bb580)

phys_alloc zone=0x7f6caeec size=28 align=10 ret=7f6bb5b0 (detail=0x7f6bb580)

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

phys_free 7f6bb5b0 (detail=0x7f6bb580)

phys_alloc zone=0x7f6caeec size=28 align=10 ret=7f6bb5b0 (detail=0x7f6bb580)

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

phys_free 7f6bb5b0 (detail=0x7f6bb580)

phys_alloc zone=0x7f6caeec size=28 align=10 ret=7f6bb5b0 (detail=0x7f6bb580)

ehci_send_pipe qh=0x7f6bb600 dir=128 data=0x00006c24 size=4

phys_free 7f6bb5b0 (detail=0x7f6bb580)

Initialized USB HUB (0 ports used)

phys_free 7f6bb670 (detail=0x7f6bb5d0)

phys_free 7f6bb6f0 (detail=0x7f6bb6c0)

phys_alloc zone=0x7f6caeec size=28 align=10 ret=7f6bb6f0 (detail=0x7f6bb6c0)

phys_free 7f6bb6f0 (detail=0x7f6bb6c0)

ehci_free_pipes 0x7f6bb7d0

phys_free 7f6bb600 (detail=0x7f6bb690)

phys_free 7f6bb500 (detail=0x7f6bb4d0)

phys_free 7f70a000 (detail=0x7f6bb770)

phys_free 7f709f80 (detail=0x7f6bb740)

phys_free 7f709f00 (detail=0x7f6bb710)

phys_free 7f6bb7d0 (detail=0x7f6bb7a0)

init ps2port

i8042_flush

i8042 flushed 55 (status=19)

i8042_command cmd=ad

i8042_wait_write

i8042_command cmd=a7

i8042_wait_write

i8042_flush

i8042_command cmd=1aa

i8042_wait_write

i8042_wait_read

i8042 param=55

i8042_command cmd=1ab

i8042_wait_write

i8042_wait_read

i8042 param=1

i8042 keyboard test failed (got 1 not 0x00)

init floppy drives

init hard drives

init ahci

phys_alloc zone=0x7f6caefc size=2048 align=10 ret=ea750 (detail=0x7f6bb7c0)

phys_alloc zone=0x7f6caef4 size=20 align=10 ret=f4a30 (detail=0x7f6bb790)

AHCI controller at 00:1f.2, iobase 0xe0508000, irq 10

AHCI: cap 0xdf34ff02, ports_impl 0x3

phys_alloc zone=0x7f6caeec size=68 align=10 ret=7f6bb740 (detail=0x7f6bb710)

phys_alloc zone=0x7f6caeec size=1024 align=400 ret=7f6bb000 (detail=0x7f6bb6e0)

phys_alloc zone=0x7f6caeec size=256 align=100 ret=7f6bb500 (detail=0x7f6bb6b0)

phys_alloc zone=0x7f6caeec size=256 align=100 ret=7f6bb400 (detail=0x7f6bb680)

AHCI/0: probing

AHCI/0: link up

AHCI/0: send cmd ...

AHCI/0: ... intbits 0x40000001, status 0x51 ...

AHCI/0: ... finished, status 0x51, ERROR 0x4

AHCI/0: send cmd ...

AHCI/0: ... intbits 0x2, status 0x58 ...

AHCI/0: ... finished, status 0x58, OK

phys_alloc zone=0x7f6caeec size=80 align=10 ret=7f6bb630 (detail=0x7f6bb600)

Searching bootorder for: /pci@i0cf8/*@1f,2/drive@0/disk@0

AHCI/0: supported modes: udma 6, multi-dma 2, pio 4

AHCI/0: Set transfer mode to UDMA-6

AHCI/0: send cmd ...

AHCI/0: ... intbits 0x1, status 0x50 ...

AHCI/0: ... finished, status 0x50, OK

phys_alloc zone=0x7f6caef4 size=68 align=10 ret=f49e0 (detail=0x7f6bafd0)

phys_free 7f6bb740 (detail=0x7f6bb710)

phys_free 7f6bb000 (detail=0x7f6bb6e0)

phys_free 7f6bb500 (detail=0x7f6bb6b0)

phys_free 7f6bb400 (detail=0x7f6bb680)

phys_alloc zone=0x7f6caef8 size=1024 align=400 ret=7f70ac00 (detail=0x7f6bb760)

phys_alloc zone=0x7f6caef8 size=256 align=100 ret=7f70ab00 (detail=0x7f6bb730)

phys_alloc zone=0x7f6caef8 size=256 align=100 ret=7f70aa00 (detail=0x7f6bb700)

AHCI/0: registering: "AHCI/0: 64GB SATA Flash Drive ATA-10 Hard-Disk (61057 MiBytes)"

phys_alloc zone=0x7f6caeec size=24 align=10 ret=7f6bb6e0 (detail=0x7f6bb6b0)

Registering bootable: AHCI/0: 64GB SATA Flash Drive ATA-10 Hard-Disk (61057 MiBytes) (type:2 prio:27 data:f49e0)

phys_alloc zone=0x7f6caeec size=68 align=10 ret=7f6bb5b0 (detail=0x7f6bb680)

phys_alloc zone=0x7f6caeec size=1024 align=400 ret=7f6bb000 (detail=0x7f6bb580)

phys_alloc zone=0x7f6caeec size=256 align=100 ret=7f6bb400 (detail=0x7f6bb550)

phys_alloc zone=0x7f6caeec size=256 align=100 ret=7f6bae00 (detail=0x7f6bb520)

AHCI/1: probing

AHCI/1: link up

AHCI/1: send cmd ...

AHCI/1: ... intbits 0x40000001, status 0x51 ...

AHCI/1: ... finished, status 0x51, ERROR 0x4

AHCI/1: send cmd ...

AHCI/1: ... intbits 0x2, status 0x58 ...

AHCI/1: ... finished, status 0x58, OK

phys_alloc zone=0x7f6caeec size=80 align=10 ret=7f6baf80 (detail=0x7f6baf50)

Searching bootorder for: /pci@i0cf8/*@1f,2/drive@1/disk@0

AHCI/1: supported modes: udma 5, multi-dma 2, pio 4

AHCI/1: Set transfer mode to UDMA-5

AHCI/1: send cmd ...

AHCI/1: ... intbits 0x1, status 0x50 ...

AHCI/1: ... finished, status 0x50, OK

phys_alloc zone=0x7f6caef4 size=68 align=10 ret=f4990 (detail=0x7f6baf20)

phys_free 7f6bb5b0 (detail=0x7f6bb680)

phys_free 7f6bb000 (detail=0x7f6bb580)

phys_free 7f6bb400 (detail=0x7f6bb550)

phys_free 7f6bae00 (detail=0x7f6bb520)

phys_alloc zone=0x7f6caef8 size=1024 align=400 ret=7f70a400 (detail=0x7f6bb680)

phys_alloc zone=0x7f6caef8 size=256 align=100 ret=7f70a900 (detail=0x7f6bb5d0)

phys_alloc zone=0x7f6caef8 size=256 align=100 ret=7f70a800 (detail=0x7f6bb5a0)

AHCI/1: registering: "AHCI/1: KINGSTON SVP180S264G ATA-8 Hard-Disk (61057 MiBytes)"

phys_alloc zone=0x7f6caeec size=24 align=10 ret=7f6bb580 (detail=0x7f6bb550)

Registering bootable: AHCI/1: KINGSTON SVP180S264G ATA-8 Hard-Disk (61057 MiBytes) (type:2 prio:1 data:f4990)

init megasas

init nvme

init lpt

Found 0 lpt ports

init serial

Found 1 serial ports

phys_alloc zone=0x7f6caeec size=80 align=10 ret=7f6bb500 (detail=0x7f6bb4d0)

Searching bootorder for: /rom@img/memtest

phys_alloc zone=0x7f6caeec size=24 align=10 ret=7f6bb4b0 (detail=0x7f6bb480)

Registering bootable: Payload [memtest] (type:32 prio:9999 data:fff60180)

Scan for option roms

Attempting to init PCI bdf 00:00.0 (vd 8086:0a04)

Attempting to map option rom on dev 00:00.0

Option rom sizing returned 0 0

Attempting to init PCI bdf 00:03.0 (vd 8086:0a0c)

Attempting to map option rom on dev 00:03.0

Option rom sizing returned 0 0

Attempting to init PCI bdf 00:16.0 (vd 8086:9c3a)

Attempting to map option rom on dev 00:16.0

Option rom sizing returned 0 0

Attempting to init PCI bdf 00:1b.0 (vd 8086:9c20)

Attempting to map option rom on dev 00:1b.0

Option rom sizing returned 0 0

Attempting to init PCI bdf 00:1c.0 (vd 8086:9c10)

Attempting to map option rom on dev 00:1c.0

Skipping non-normal pci device (type=81)

Attempting to init PCI bdf 00:1c.1 (vd 8086:9c12)

Attempting to map option rom on dev 00:1c.1

Skipping non-normal pci device (type=81)

Attempting to init PCI bdf 00:1c.2 (vd 8086:9c14)

Attempting to map option rom on dev 00:1c.2

Skipping non-normal pci device (type=81)

Attempting to init PCI bdf 00:1c.3 (vd 8086:9c16)

Attempting to map option rom on dev 00:1c.3

Skipping non-normal pci device (type=81)

Attempting to init PCI bdf 00:1c.4 (vd 8086:9c18)

Attempting to map option rom on dev 00:1c.4

Skipping non-normal pci device (type=81)

Attempting to init PCI bdf 00:1c.5 (vd 8086:9c1a)

Attempting to map option rom on dev 00:1c.5

Skipping non-normal pci device (type=81)

Attempting to init PCI bdf 00:1f.0 (vd 8086:9c43)

Attempting to map option rom on dev 00:1f.0

Option rom sizing returned 0 0

Attempting to init PCI bdf 00:1f.3 (vd 8086:9c22)

Attempting to map option rom on dev 00:1f.3

Option rom sizing returned 0 0

Attempting to init PCI bdf 05:00.0 (vd 8086:1521)

Copying data 65536@0xfff6b638 to 65536@0x000cf000

Checking rom 0x000cf000 (sig aa55 size 128)

Running option rom at cf00:0003

pmm call arg1=1

pmm01: handle=18ae1000

pmm call arg1=0

pmm00: length=1000 handle=18ae1000 flags=2

phys_alloc zone=0x7f6caeec size=65536 align=10 ret=7f6aaf20 (detail=0x7f6bb450)

pmm call arg1=1

pmm01: handle=18ae200a

pmm call arg1=0

pmm00: length=a000 handle=18ae200a flags=2

phys_alloc zone=0x7f6caeec size=655360 align=10 ret=7f60af20 (detail=0x7f6bb420)

Attempting to init PCI bdf 05:00.1 (vd 8086:1521)

Copying data 65536@0xfff6b638 to 65536@0x000d0000

Checking rom 0x000d0000 (sig aa55 size 128)

Running option rom at d000:0003

pmm call arg1=1

pmm01: handle=18ae1000

pmm call arg1=1

pmm01: handle=18ae200a

Attempting to init PCI bdf 06:00.0 (vd 104c:8240)

Attempting to map option rom on dev 06:00.0

Skipping non-normal pci device (type=1)

Checking rom 0x000cf000 (sig aa55 size 7)

Searching bootorder for: /pci@i0cf8/pci-bridge@1c,4/*@0

phys_alloc zone=0x7f6caeec size=24 align=10 ret=7f6bb400 (detail=0x7f6bb3d0)

Registering bootable: iPXE (PCI 05:00.0) (type:128 prio:9 data:cf000382)

Checking rom 0x000d0000 (sig aa55 size 7)

Searching bootorder for: /pci@i0cf8/pci-bridge@1c,4/*@0,1

phys_alloc zone=0x7f6caeec size=24 align=10 ret=7f6bb3b0 (detail=0x7f6bb380)

Registering bootable: iPXE (PCI 05:00.1) (type:128 prio:10 data:d0000382)

 

Press ESC for boot menu.

 

Checking for bootsplash

phys_alloc zone=0x7f6caeec size=100230 align=10 ret=7f5f2790 (detail=0x7f6bb350)

Copying romfile 'bootsplash.jpg' (len 100229)

Copying data 100229@0xfff00028 to 100229@0x7f5f2790

start showing bootsplash

phys_alloc zone=0x7f6caef0 size=256 align=10 ret=8ff00 (detail=0x7f6bb320)

phys_alloc zone=0x7f6caef0 size=256 align=10 ret=8fe00 (detail=0x7f6bb2f0)

VESA 3.0

VENDOR: Sя

PRODUCT: Sя

phys_alloc zone=0x7f6caeec size=22312 align=10 ret=7f5ed060 (detail=0x7f6bb2c0)

Decoding bootsplash.jpg

Finding vesa mode with dimensions 1024/768

mode: 0117

framebuffer: 0xd0000000

bytes per scanline: 2048

bits per pixel: 16

phys_alloc zone=0x7f6caeec size=1572864 align=10 ret=7f46d060 (detail=0x7f6bb290)

Decompressing bootsplash.jpg

Switching to graphics mode

Showing bootsplash picture

Bootsplash copy complete

phys_free 7f5f2790 (detail=0x7f6bb350)

phys_free 7f46d060 (detail=0x7f6bb290)

phys_free 8ff00 (detail=0x7f6bb320)

phys_free 8fe00 (detail=0x7f6bb2f0)

phys_free 7f5ed060 (detail=0x7f6bb2c0)

Turning on vga text mode console

SeaBIOS (version rel-1.11.0-4-g844b864)

Searching bootorder for: HALT

Mapping hd drive 0x000f4990 to 0

drive 0x000f4990: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 s=125045424

Mapping hd drive 0x000f49e0 to 1

drive 0x000f49e0: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 s=125045424

finalize PMM

malloc finalize

Add to e820 map: 0009fc00 00000400 2

Space available for UMB: d1000-ea000, f45b0-f4990

Add to e820 map: 7f6cb000 0003f000 1

Returned 258048 bytes of ZoneHigh

e820 map has 9 items:

  0: 0000000000000000 - 000000000009fc00 = 1 RAM

  1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED

  2: 00000000000f0000 - 0000000000100000 = 2 RESERVED

  3: 0000000000100000 - 000000007f70a000 = 1 RAM

  4: 000000007f70a000 - 0000000082200000 = 2 RESERVED

  5: 00000000f0000000 - 00000000f4000000 = 2 RESERVED

  6: 00000000fed10000 - 00000000fed1a000 = 2 RESERVED

  7: 00000000fed84000 - 00000000fed85000 = 2 RESERVED

  8: 0000000100000000 - 000000027de00000 = 1 RAM

Jump to int19

enter handle_19:

  NULL

Booting from Hard Disk...

 

_______________________________________________

 

 

-----Original Message-----

From: Kevin O'Connor [mailto:kevin@koconnor.net]

Sent: Monday, October 30, 2017 10:42 PM

To: Аладышев Константин

Cc: seabios@seabios.org

Subject: Re: K-TEK-M275TP-FN-BL-ML USB keyboard support

 

On Mon, Oct 30, 2017 at 04:00:17PM +0300, Аладышев Константин wrote:

> Hello! I'm having problems with K-TEK-M275TP-FN-BL-ML keyboard

> (http://www.key-tek.cn/Productview.asp?id=777). It is USB device with

> keyboard and touchpad combined. It works in OS correctly, but doesn't

> work in SeaBIOS.

 

If you're experiencing a problem with SeaBIOS, please send the full debug log to the mailing list as described at:

https://www.seabios.org/Debugging

 

> I've tried to debug this issue and found that "usb_kbd_setup" function

> fails on "(epdesc->wMaxPacketSize != 8)" check, cause

> "epdesc->wMaxPacketSize" is actually 32. I've modified this "if"

> statement to pass 32 value also and now function completes

> successfully. But it didn't help to solve my issue. There are no

> interrupts from keyboard, "ehci_poll_intr" always returns -1 on

> check:

>

> if (token & QTD_STS_ACTIVE) {

>         // No intrs found.

>         return -1;

> }

>

> I don't know what to do now. What should  I check next?

>

> Does SeaBIOS support USB keyboard+touchpad devices at all?

 

SeaBIOS should support any USB keyboard (or mouse) that supports the "USB HID boot protocol".

 

-Kevin