Announcement

Collapse
No announcement yet.

MemTest86 keyboard not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MemTest86 keyboard not working

    In response to earlier posts, about the keyboard not working on a Macbook Pro with MenTest86 V4, , we did some testing on a Mac today. Surprisingly we were able to reproduce the problem of the Mac not responding to the keyboard straight away. I say surprisingly, as the problem should have been fixed, or at least documented, before now.

    The way MemTest works at the moment is that it reads keyboard scan codes from two I/O ports (port 60 and port 64 to be exact). This makes use of the AT keyboard controller interface, which has been around since about 1984.

    Once the general switch to USB keyboards took place, then BIOS was setup to emulate the behaviour of the AT keyboard controller. This means that all your software (like the DOS operating system) would keep working.

    This emulation process is covered in this document,
    Universal Serial Bus PC Legacy Compatibility Specification


    The problem is that some PCs, and it seems most newer Macs, don't emulate an AT Keyboard any more.

    For most PCs the fix is trivial, there is a setting in BIOS to enable legacy keyboard support. In fact most PCs have this on by default, so MemTest, DOS, Linux boot loaders all just work.

    Mac's don't have this BIOS configuration option. So it seems there is no quick fix for the Mac.

    So, in short, Apple didn't follow the USB standard regarding emulation so the keyboard doesn't work. Maybe they did this deliberately, as this is an easy way to complicate other operating systems being loaded.

    The short term work around is to just allow MemTest86 to boot and run, without any keyboard interaction. Then power the machine down when you are done.

    The real solution is write some code to detect the USB devices on the system then talk to the keyboard directly via the USB protocols. This is complicated by the fact that there are several USB standards OHCI, UHCI, (USB1.x) and EHCI (USB2.0). We'll have a look and see how hard this is.

  • #2
    I am seeing the same issue on Intel S2600CP servers. This may be an issue eith uEFI no longer supporting legacy HW (other than a serial port, there are no legacy ports on these systems).

    Comment


    • #3
      We made an attempt to directly interface with USB Keyboards, rather than use the BIOS interface. It is technically possible, but rather complex. The USB host controllers need to be found, USB devices need to be detected and the USB protocol implemented. So probably 1000s of lines of code just to read in a key press.

      Our preferred solution, which we are investigating in parallel, is to develop a pure UEFI based solution.

      Update: New versions of MemTest86 are UEFI and don't have this particular problem anymore.

      Comment

      Working...
      X