HomeFreeBSD

MFC r316370-r316371

Description

MFC r316370-r316371

r316370:
[versatilepb] Convert VERSATILEPB kernel to INTRNG and switch to upstream DTB

Scope of this change is somewhat larger than just converting to INTRNG.
The reason for this is that INTRNG support required switching from custom
to upstream DTS because custom DTS didn't have interrup routing information.
This switch caused rewrite of PCI and CLCD drivers and adding SCM module.
List of changes in this commit:

  • Enable INTRNG and switch to versatile-pb.dts
  • Add SCM driver that controls various peripheral devices like LCD or PCI controller. Previously registers required for power-up and configuring peripherals were part of their respective nodes. Upstream DTS has dedicated node for SCM
  • Convert PL190 driver to INTRNG
  • Convert Versatile SIC (secondary interrupt controller) to INTRNG
  • Refactor CLCD driver to use SCM API to power up and configuration
  • Refactor PCI driver to use SCM API to enable controller
  • Refactor PCI driver to use interrupt map provided in DTS for interrupt routing. As a result it fixes broken IRQ routing and it's no longer required to run QEMU with "-global versatile_pci.broken-irq-mapping=1" command-line arguments

r316371:
[versatilepb] Fix keyboard driver after switching to upstream DTS

FreeBSD's DTS contained only one PL050 node and driver considered it to
be PS/2 keyboard. In reality PL050 is a PS/2 port that pushes bytes to/from
the periphers connected to it. New DTS contains two nodes and QEMU emulates
keyboard connected to port #0 and mouse connected to port #1. Since there
is no way to say what's connected to port by checking DTS we hardcode
this knowledge in the driver: it assumes keyboard on port #0 and ignores
port #1 altogether.

Also QEMU defaults emulated keyboard to scan code set 2 while driver used
to work with scan code set 1 so when initializing driver make sure keyboard
is switched to scan code set 1

Details

Provenance
gonzoAuthored on
Parents
rS331401: Debug interrupts aren't instruction traps
Branches
Unknown
Tags
Unknown