[Concept,v2,00/20] expo: Complete mouse operation in the EFI app

Message ID 20251007170549.541981-1-sjg@u-boot.org
Headers
Series expo: Complete mouse operation in the EFI app |

Message

Simon Glass Oct. 7, 2025, 5:05 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

This series includes various improvements which allow the mouse to be
used when running as an EFI app.

In particular:
- support for the absolute-pointer protocol, since this provides better
  integration when running under QEMU
- input tweaks to improve performance under QEMU

It also includes some x86-specific fixes for i8042 and MTRRs.

Finally, a new --bootcmd option is added to the build-qemu script to
allow passing a boot command to U-Boot.

This series is part F

Changes in v2:
- Add new patch to replace mouse_press_state_t enum with bool
- Add new patch to replace press_state with bool pressed
- Add new patch to move click detection into mouse_get_event()

Simon Glass (20):
  qfw: Export qfw_locate_file() for external use
  event: Add EVT_BOOTCMD event for custom boot commands
  x86: qemu: Add EVT_BOOTCMD handler to get bootcmd from fw_cfg
  scripts: build-qemu: Add --bootcmd option to pass bootcmd via fw_cfg
  mouse: Replace mouse_press_state_t enum with bool
  mouse: Replace press_state with bool pressed
  mouse: Move click detection into mouse_get_event()
  expo: Speed up polling the keyboard
  x86: efi: Avoid setting MTRRs in the app
  x86: efi: Disable i8042 in the x86 app
  efi: app: Support reading SMBIOS3 tables
  efi: app: Detect running under QEMU
  efi: serial: Speed up reading from input
  efi: video: Add some more debugging for the modes
  efi: mouse: Move simple-pointer code into a function
  efi: mouse: Move button handling into a function
  efi: mouse: Split out event handling further
  efi: Add definitions for the absolute-pointer protocol
  efi: mouse: Add support for an absolute pointer
  efi: mouse: Scale the pointer to the display

 arch/sandbox/cpu/sdl.c            |   4 +-
 arch/x86/cpu/qemu/qemu.c          |  31 +++
 arch/x86/lib/init_helpers.c       |   3 +-
 boot/expo.c                       |  16 +-
 cmd/mouse.c                       |   2 +-
 common/event.c                    |   1 +
 common/main.c                     |  32 ++-
 doc/board/emulation/script.rst    |  15 ++
 drivers/input/Kconfig             |   2 +-
 drivers/input/efi_mouse.c         | 426 +++++++++++++++++++++++-------
 drivers/input/mouse-uclass.c      |  50 ++--
 drivers/input/usb_mouse.c         |   2 +-
 drivers/qfw/qfw.c                 |   4 +-
 drivers/serial/serial_efi.c       |  45 ++--
 drivers/video/efi.c               |  15 +-
 include/asm-generic/global_data.h |   6 +
 include/efi.h                     |   1 +
 include/efi_api.h                 |  30 +++
 include/event.h                   |  22 ++
 include/expo.h                    |   2 +
 include/mouse.h                   |  17 +-
 include/qfw.h                     |  12 +
 lib/efi/device_path.c             |   1 +
 lib/efi_client/efi_app.c          |  33 ++-
 scripts/build-qemu                |   7 +
 test/dm/mouse.c                   |  16 +-
 26 files changed, 615 insertions(+), 180 deletions(-)